2 import * as fs from 'fs';
3 const source = fs.readFileSync('./ldk.wasm');
5 const memory = new WebAssembly.Memory({initial: 256});
6 const wasmModule = new WebAssembly.Module(source);
8 const imports: any = {};
11 imports.env.memoryBase = 0;
12 imports.env.memory = memory;
13 imports.env.tableBase = 0;
14 imports.env.table = new WebAssembly.Table({initial: 4, element: 'anyfunc'});
16 imports.env["abort"] = function () {
17 console.error("ABORT");
21 let isWasmInitialized: boolean = false;
26 const nextMultipleOfFour = (value: number) => {
27 return Math.ceil(value / 4) * 4;
30 const encodeUint8Array = (inputArray) => {
31 const cArrayPointer = wasm.TS_malloc(inputArray.length + 4);
32 const arrayLengthView = new Uint32Array(memory.buffer, cArrayPointer, 1);
33 arrayLengthView[0] = inputArray.length;
34 const arrayMemoryView = new Uint8Array(memory.buffer, cArrayPointer + 4, inputArray.length);
35 arrayMemoryView.set(inputArray);
39 const encodeUint32Array = (inputArray) => {
40 const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 4);
41 const arrayMemoryView = new Uint32Array(memory.buffer, cArrayPointer, inputArray.length);
42 arrayMemoryView.set(inputArray, 1);
43 arrayMemoryView[0] = inputArray.length;
47 const getArrayLength = (arrayPointer) => {
48 const arraySizeViewer = new Uint32Array(
49 memory.buffer, // value
50 arrayPointer, // offset
53 return arraySizeViewer[0];
55 const decodeUint8Array = (arrayPointer, free = true) => {
56 const arraySize = getArrayLength(arrayPointer);
57 const actualArrayViewer = new Uint8Array(
58 memory.buffer, // value
59 arrayPointer + 4, // offset (ignoring length bytes)
60 arraySize // uint8 count
62 // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
63 // will free the underlying memory when it becomes unreachable instead of copying here.
64 const actualArray = actualArrayViewer.slice(0, arraySize);
66 wasm.TS_free(arrayPointer);
70 const decodeUint32Array = (arrayPointer, free = true) => {
71 const arraySize = getArrayLength(arrayPointer);
72 const actualArrayViewer = new Uint32Array(
73 memory.buffer, // value
74 arrayPointer + 4, // offset (ignoring length bytes)
75 arraySize // uint32 count
77 // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
78 // will free the underlying memory when it becomes unreachable instead of copying here.
79 const actualArray = actualArrayViewer.slice(0, arraySize);
81 wasm.TS_free(arrayPointer);
86 const encodeString = (string) => {
87 // make malloc count divisible by 4
88 const memoryNeed = nextMultipleOfFour(string.length + 1);
89 const stringPointer = wasm.TS_malloc(memoryNeed);
90 const stringMemoryView = new Uint8Array(
91 memory.buffer, // value
92 stringPointer, // offset
93 string.length + 1 // length
95 for (let i = 0; i < string.length; i++) {
96 stringMemoryView[i] = string.charCodeAt(i);
98 stringMemoryView[string.length] = 0;
102 const decodeString = (stringPointer, free = true) => {
103 const memoryView = new Uint8Array(memory.buffer, stringPointer);
107 while (memoryView[cursor] !== 0) {
108 result += String.fromCharCode(memoryView[cursor]);
113 wasm.wasm_free(stringPointer);
119 export class VecOrSliceDef {
120 public dataptr: number;
121 public datalen: number;
122 public stride: number;
123 public constructor(dataptr: number, datalen: number, stride: number) {
124 this.dataptr = dataptr;
125 this.datalen = datalen;
126 this.stride = stride;
133 System.loadLibrary("lightningjni");
134 init(java.lang.Enum.class, VecOrSliceDef.class);
138 static native void init(java.lang.Class c, java.lang.Class slicedef);
139 static native void init_class_cache();
141 public static native boolean deref_bool(long ptr);
142 public static native long deref_long(long ptr);
143 public static native void free_heap_ptr(long ptr);
144 public static native byte[] read_bytes(long ptr, long len);
145 public static native byte[] get_u8_slice_bytes(long slice_ptr);
146 public static native long bytes_to_u8_vec(byte[] bytes);
147 public static native long new_txpointer_copy_data(byte[] txdata);
148 public static native void txpointer_free(long ptr);
149 public static native byte[] txpointer_get_buffer(long ptr);
150 public static native long vec_slice_len(long vec);
151 public static native long new_empty_slice_vec();
154 public static native long LDKCVec_u8Z_new(number[] elems);
155 public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
156 public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
157 public static native Secp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
158 public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
159 public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
160 public static native Secp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
161 public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
162 public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
163 public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
164 public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
165 public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
166 public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
167 public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
168 public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
169 public static native Secp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
170 public static class LDKCOption_u32Z {
171 private LDKCOption_u32Z() {}
172 export class Some extends LDKCOption_u32Z {
174 Some(number some) { this.some = some; }
176 export class None extends LDKCOption_u32Z {
179 static native void init();
181 static { LDKCOption_u32Z.init(); }
182 public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
183 public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
184 public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
185 public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
186 public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
187 public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
188 public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
189 public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
190 public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
191 public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
192 public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
193 public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
194 public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
195 public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
196 public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
197 public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
198 public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
199 public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
200 public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
201 public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
202 public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
203 public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
204 public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
205 public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
206 public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
207 public static native boolean LDKCResult_NoneErrorZ_result_ok(long arg);
208 public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
209 public static native IOError LDKCResult_NoneErrorZ_get_err(long arg);
210 public static native boolean LDKCResult_RouteHopDecodeErrorZ_result_ok(long arg);
211 public static native number LDKCResult_RouteHopDecodeErrorZ_get_ok(long arg);
212 public static native number LDKCResult_RouteHopDecodeErrorZ_get_err(long arg);
213 public static native long LDKCVec_RouteHopZ_new(number[] elems);
214 public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
215 public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
216 public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
217 public static class LDKCOption_u64Z {
218 private LDKCOption_u64Z() {}
219 export class Some extends LDKCOption_u64Z {
221 Some(number some) { this.some = some; }
223 export class None extends LDKCOption_u64Z {
226 static native void init();
228 static { LDKCOption_u64Z.init(); }
229 public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
230 public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
231 public static native long LDKCVec_RouteHintHopZ_new(number[] elems);
232 public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
233 public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
234 public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
235 public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
236 public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
237 public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
238 public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
239 public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
240 public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
241 public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
242 public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
243 public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
244 public static native ChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
245 public static class LDKMonitorEvent {
246 private LDKMonitorEvent() {}
247 export class HTLCEvent extends LDKMonitorEvent {
248 public number htlc_event;
249 HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
251 export class CommitmentTxBroadcasted extends LDKMonitorEvent {
252 public number commitment_tx_broadcasted;
253 CommitmentTxBroadcasted(number commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
255 static native void init();
257 static { LDKMonitorEvent.init(); }
258 public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
259 public static native long LDKCVec_MonitorEventZ_new(number[] elems);
260 public static class LDKCOption_C2Tuple_usizeTransactionZZ {
261 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
262 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
264 Some(number some) { this.some = some; }
266 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
269 static native void init();
271 static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
272 public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
273 public static class LDKSpendableOutputDescriptor {
274 private LDKSpendableOutputDescriptor() {}
275 export class StaticOutput extends LDKSpendableOutputDescriptor {
276 public number outpoint;
277 public number output;
278 StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
280 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
281 public number delayed_payment_output;
282 DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
284 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
285 public number static_payment_output;
286 StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
288 static native void init();
290 static { LDKSpendableOutputDescriptor.init(); }
291 public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
292 public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
293 public static class LDKErrorAction {
294 private LDKErrorAction() {}
295 export class DisconnectPeer extends LDKErrorAction {
297 DisconnectPeer(number msg) { this.msg = msg; }
299 export class IgnoreError extends LDKErrorAction {
302 export class SendErrorMessage extends LDKErrorAction {
304 SendErrorMessage(number msg) { this.msg = msg; }
306 static native void init();
308 static { LDKErrorAction.init(); }
309 public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
310 public static class LDKHTLCFailChannelUpdate {
311 private LDKHTLCFailChannelUpdate() {}
312 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
314 ChannelUpdateMessage(number msg) { this.msg = msg; }
316 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
317 public number short_channel_id;
318 public boolean is_permanent;
319 ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
321 export class NodeFailure extends LDKHTLCFailChannelUpdate {
322 public Uint8Array node_id;
323 public boolean is_permanent;
324 NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
326 static native void init();
328 static { LDKHTLCFailChannelUpdate.init(); }
329 public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
330 public static class LDKMessageSendEvent {
331 private LDKMessageSendEvent() {}
332 export class SendAcceptChannel extends LDKMessageSendEvent {
333 public Uint8Array node_id;
335 SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
337 export class SendOpenChannel extends LDKMessageSendEvent {
338 public Uint8Array node_id;
340 SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
342 export class SendFundingCreated extends LDKMessageSendEvent {
343 public Uint8Array node_id;
345 SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
347 export class SendFundingSigned extends LDKMessageSendEvent {
348 public Uint8Array node_id;
350 SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
352 export class SendFundingLocked extends LDKMessageSendEvent {
353 public Uint8Array node_id;
355 SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
357 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
358 public Uint8Array node_id;
360 SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
362 export class UpdateHTLCs extends LDKMessageSendEvent {
363 public Uint8Array node_id;
364 public number updates;
365 UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
367 export class SendRevokeAndACK extends LDKMessageSendEvent {
368 public Uint8Array node_id;
370 SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
372 export class SendClosingSigned extends LDKMessageSendEvent {
373 public Uint8Array node_id;
375 SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
377 export class SendShutdown extends LDKMessageSendEvent {
378 public Uint8Array node_id;
380 SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
382 export class SendChannelReestablish extends LDKMessageSendEvent {
383 public Uint8Array node_id;
385 SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
387 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
389 public number update_msg;
390 BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
392 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
394 BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
396 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
398 BroadcastChannelUpdate(number msg) { this.msg = msg; }
400 export class HandleError extends LDKMessageSendEvent {
401 public Uint8Array node_id;
402 public number action;
403 HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
405 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
406 public number update;
407 PaymentFailureNetworkUpdate(number update) { this.update = update; }
409 export class SendChannelRangeQuery extends LDKMessageSendEvent {
410 public Uint8Array node_id;
412 SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
414 export class SendShortIdsQuery extends LDKMessageSendEvent {
415 public Uint8Array node_id;
417 SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
419 export class SendReplyChannelRange extends LDKMessageSendEvent {
420 public Uint8Array node_id;
422 SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
424 static native void init();
426 static { LDKMessageSendEvent.init(); }
427 public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
428 public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
429 public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
430 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
431 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
432 public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
433 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
434 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
435 public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
436 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
437 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
438 public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
439 public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
440 public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
441 public static native boolean LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
442 public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
443 public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
444 public static native boolean LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
445 public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
446 public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
447 public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
448 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
449 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
450 public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
451 public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
452 public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
453 public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
454 public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
455 public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
456 public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
457 public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
458 public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
462 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
464 export interface LDKBaseSign {
465 get_per_commitment_point (idx: number): Uint8Array;
466 release_commitment_secret (idx: number): Uint8Array;
467 channel_keys_id (): Uint8Array;
468 sign_counterparty_commitment (commitment_tx: number): number;
469 sign_holder_commitment_and_htlcs (commitment_tx: number): number;
470 sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
471 sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
472 sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
473 sign_closing_transaction (closing_tx: Uint8Array): number;
474 sign_channel_announcement (msg: number): number;
475 ready_channel (channel_parameters: number): void;
478 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
479 throw new Error('unimplemented'); // TODO: bind to WASM
482 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
485 // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
486 export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
487 if(!isWasmInitialized) {
488 throw new Error("initializeWasm() must be awaited first!");
490 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
491 return decodeArray(nativeResponseValue);
493 // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
494 export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
495 if(!isWasmInitialized) {
496 throw new Error("initializeWasm() must be awaited first!");
498 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
499 return decodeArray(nativeResponseValue);
501 // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
502 export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
503 if(!isWasmInitialized) {
504 throw new Error("initializeWasm() must be awaited first!");
506 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
507 return decodeArray(nativeResponseValue);
509 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
510 export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
511 if(!isWasmInitialized) {
512 throw new Error("initializeWasm() must be awaited first!");
514 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
515 return nativeResponseValue;
517 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
518 export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
519 if(!isWasmInitialized) {
520 throw new Error("initializeWasm() must be awaited first!");
522 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
523 return nativeResponseValue;
525 // LDKCResult_SignatureNoneZ BaseSign_sign_justice_revoked_output LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]
526 export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
527 if(!isWasmInitialized) {
528 throw new Error("initializeWasm() must be awaited first!");
530 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_output(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key));
531 return nativeResponseValue;
533 // LDKCResult_SignatureNoneZ BaseSign_sign_justice_revoked_htlc LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
534 export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
535 if(!isWasmInitialized) {
536 throw new Error("initializeWasm() must be awaited first!");
538 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_htlc(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
539 return nativeResponseValue;
541 // LDKCResult_SignatureNoneZ BaseSign_sign_counterparty_htlc_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
542 export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
543 if(!isWasmInitialized) {
544 throw new Error("initializeWasm() must be awaited first!");
546 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
547 return nativeResponseValue;
549 // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
550 export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
551 if(!isWasmInitialized) {
552 throw new Error("initializeWasm() must be awaited first!");
554 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
555 return nativeResponseValue;
557 // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
558 export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
559 if(!isWasmInitialized) {
560 throw new Error("initializeWasm() must be awaited first!");
562 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
563 return nativeResponseValue;
565 // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
566 export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
567 if(!isWasmInitialized) {
568 throw new Error("initializeWasm() must be awaited first!");
570 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
571 // debug statements here
573 // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
574 export function BaseSign_get_pubkeys(this_arg: number): number {
575 if(!isWasmInitialized) {
576 throw new Error("initializeWasm() must be awaited first!");
578 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
579 return nativeResponseValue;
584 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
586 export interface LDKSign {
587 write (): Uint8Array;
590 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
591 throw new Error('unimplemented'); // TODO: bind to WASM
594 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
597 // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
598 export function Sign_write(this_arg: number): Uint8Array {
599 if(!isWasmInitialized) {
600 throw new Error("initializeWasm() must be awaited first!");
602 const nativeResponseValue = wasm.Sign_write(this_arg);
603 return decodeArray(nativeResponseValue);
605 public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
606 public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
607 public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
608 public static native boolean LDKCResult_RecoverableSignatureNoneZ_result_ok(long arg);
609 public static native Uint8Array LDKCResult_RecoverableSignatureNoneZ_get_ok(long arg);
610 public static native void LDKCResult_RecoverableSignatureNoneZ_get_err(long arg);
611 public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
612 public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
613 public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
614 public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
615 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
616 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
617 public static native long LDKCVec_TxOutZ_new(number[] elems);
618 public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
619 public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
620 public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
621 public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
622 public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
623 public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
624 public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
625 public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
626 public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
627 public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
628 public static class LDKAPIError {
629 private LDKAPIError() {}
630 export class APIMisuseError extends LDKAPIError {
632 APIMisuseError(String err) { this.err = err; }
634 export class FeeRateTooHigh extends LDKAPIError {
636 public number feerate;
637 FeeRateTooHigh(String err, number feerate) { this.err = err; this.feerate = feerate; }
639 export class RouteError extends LDKAPIError {
641 RouteError(String err) { this.err = err; }
643 export class ChannelUnavailable extends LDKAPIError {
645 ChannelUnavailable(String err) { this.err = err; }
647 export class MonitorUpdateFailed extends LDKAPIError {
648 MonitorUpdateFailed() { }
650 static native void init();
652 static { LDKAPIError.init(); }
653 public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
654 public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
655 public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
656 public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
657 public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
658 public static native long LDKCVec_APIErrorZ_new(number[] elems);
659 public static class LDKPaymentSendFailure {
660 private LDKPaymentSendFailure() {}
661 export class ParameterError extends LDKPaymentSendFailure {
662 public number parameter_error;
663 ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
665 export class PathParameterError extends LDKPaymentSendFailure {
666 public number[] path_parameter_error;
667 PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
669 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
670 public number[] all_failed_retry_safe;
671 AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
673 export class PartialFailure extends LDKPaymentSendFailure {
674 public number[] partial_failure;
675 PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
677 static native void init();
679 static { LDKPaymentSendFailure.init(); }
680 public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
681 public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
682 public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
683 public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
684 public static class LDKNetAddress {
685 private LDKNetAddress() {}
686 export class IPv4 extends LDKNetAddress {
687 public Uint8Array addr;
689 IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
691 export class IPv6 extends LDKNetAddress {
692 public Uint8Array addr;
694 IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
696 export class OnionV2 extends LDKNetAddress {
697 public Uint8Array addr;
699 OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
701 export class OnionV3 extends LDKNetAddress {
702 public Uint8Array ed25519_pubkey;
703 public number checksum;
704 public number version;
706 OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
708 static native void init();
710 static { LDKNetAddress.init(); }
711 public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
712 public static native long LDKCVec_NetAddressZ_new(number[] elems);
713 public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(Uint8Array a, Uint8Array b);
714 public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(long ptr);
715 public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(long ptr);
716 public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
717 public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
718 public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
719 public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
723 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
725 export interface LDKWatch {
726 watch_channel (funding_txo: number, monitor: number): number;
727 update_channel (funding_txo: number, update: number): number;
728 release_pending_monitor_events (): number[];
731 export function LDKWatch_new(impl: LDKWatch): number {
732 throw new Error('unimplemented'); // TODO: bind to WASM
735 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
738 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
739 export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
740 if(!isWasmInitialized) {
741 throw new Error("initializeWasm() must be awaited first!");
743 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
744 return nativeResponseValue;
746 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
747 export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
748 if(!isWasmInitialized) {
749 throw new Error("initializeWasm() must be awaited first!");
751 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
752 return nativeResponseValue;
754 // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
755 export function Watch_release_pending_monitor_events(this_arg: number): number[] {
756 if(!isWasmInitialized) {
757 throw new Error("initializeWasm() must be awaited first!");
759 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
760 return nativeResponseValue;
765 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
767 export interface LDKBroadcasterInterface {
768 broadcast_transaction (tx: Uint8Array): void;
771 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
772 throw new Error('unimplemented'); // TODO: bind to WASM
775 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
778 // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
779 export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
780 if(!isWasmInitialized) {
781 throw new Error("initializeWasm() must be awaited first!");
783 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
784 // debug statements here
789 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
791 export interface LDKKeysInterface {
792 get_node_secret (): Uint8Array;
793 get_destination_script (): Uint8Array;
794 get_shutdown_pubkey (): Uint8Array;
795 get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
796 get_secure_random_bytes (): Uint8Array;
797 read_chan_signer (reader: Uint8Array): number;
798 sign_invoice (invoice_preimage: Uint8Array): number;
801 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
802 throw new Error('unimplemented'); // TODO: bind to WASM
805 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
808 // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
809 export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
810 if(!isWasmInitialized) {
811 throw new Error("initializeWasm() must be awaited first!");
813 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
814 return decodeArray(nativeResponseValue);
816 // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
817 export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
818 if(!isWasmInitialized) {
819 throw new Error("initializeWasm() must be awaited first!");
821 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
822 return decodeArray(nativeResponseValue);
824 // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
825 export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
826 if(!isWasmInitialized) {
827 throw new Error("initializeWasm() must be awaited first!");
829 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
830 return decodeArray(nativeResponseValue);
832 // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
833 export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
834 if(!isWasmInitialized) {
835 throw new Error("initializeWasm() must be awaited first!");
837 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
838 return nativeResponseValue;
840 // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
841 export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
842 if(!isWasmInitialized) {
843 throw new Error("initializeWasm() must be awaited first!");
845 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
846 return decodeArray(nativeResponseValue);
848 // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
849 export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
850 if(!isWasmInitialized) {
851 throw new Error("initializeWasm() must be awaited first!");
853 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
854 return nativeResponseValue;
856 // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
857 export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
858 if(!isWasmInitialized) {
859 throw new Error("initializeWasm() must be awaited first!");
861 const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
862 return nativeResponseValue;
867 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
869 export interface LDKFeeEstimator {
870 get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
873 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
874 throw new Error('unimplemented'); // TODO: bind to WASM
877 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
880 // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
881 export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
882 if(!isWasmInitialized) {
883 throw new Error("initializeWasm() must be awaited first!");
885 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
886 return nativeResponseValue;
891 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
893 export interface LDKLogger {
894 log (record: String): void;
897 export function LDKLogger_new(impl: LDKLogger): number {
898 throw new Error('unimplemented'); // TODO: bind to WASM
901 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
904 public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
905 public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
906 public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
907 public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
908 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
909 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
910 public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
911 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
912 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
913 public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
914 public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
915 public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
916 public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
917 public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
918 public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
919 public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
920 public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
921 public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
922 public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
923 public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
924 public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
925 public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(number a, Uint8Array b, number c);
926 public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
927 public static native Uint8Array LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
928 public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
929 public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
930 public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
931 public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
932 public static native long LDKCVec_RouteHintZ_new(number[] elems);
933 public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
934 public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
935 public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
936 public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
937 public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
938 public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
939 public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
940 public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
941 public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
942 public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
943 public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
944 public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
945 public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
946 public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
947 public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
948 public static native boolean LDKCResult_RouteHintCreationErrorZ_result_ok(long arg);
949 public static native number LDKCResult_RouteHintCreationErrorZ_get_ok(long arg);
950 public static native CreationError LDKCResult_RouteHintCreationErrorZ_get_err(long arg);
951 public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
952 public static native String LDKCResult_StringErrorZ_get_ok(long arg);
953 public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
954 public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
955 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
956 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
957 public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
958 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
959 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
960 public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
961 public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
962 public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
963 public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
964 public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
965 public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
966 public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
967 public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
968 public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
969 public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
970 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
971 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
972 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
973 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
974 public static class LDKEvent {
975 private LDKEvent() {}
976 export class FundingGenerationReady extends LDKEvent {
977 public Uint8Array temporary_channel_id;
978 public number channel_value_satoshis;
979 public Uint8Array output_script;
980 public number user_channel_id;
981 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; }
983 export class PaymentReceived extends LDKEvent {
984 public Uint8Array payment_hash;
985 public Uint8Array payment_preimage;
986 public Uint8Array payment_secret;
988 public number user_payment_id;
989 PaymentReceived(Uint8Array payment_hash, Uint8Array payment_preimage, Uint8Array payment_secret, number amt, number user_payment_id) { this.payment_hash = payment_hash; this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.amt = amt; this.user_payment_id = user_payment_id; }
991 export class PaymentSent extends LDKEvent {
992 public Uint8Array payment_preimage;
993 PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
995 export class PaymentFailed extends LDKEvent {
996 public Uint8Array payment_hash;
997 public boolean rejected_by_dest;
998 PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
1000 export class PendingHTLCsForwardable extends LDKEvent {
1001 public number time_forwardable;
1002 PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
1004 export class SpendableOutputs extends LDKEvent {
1005 public number[] outputs;
1006 SpendableOutputs(number[] outputs) { this.outputs = outputs; }
1008 static native void init();
1010 static { LDKEvent.init(); }
1011 public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
1012 public static native long LDKCVec_EventZ_new(number[] elems);
1013 public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
1014 public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
1015 public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
1016 public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
1017 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
1018 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
1019 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
1020 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
1021 public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
1022 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
1023 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
1024 public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
1025 public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
1026 public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
1027 public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
1028 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
1029 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
1030 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
1031 public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
1032 public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
1033 public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
1034 public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
1035 public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
1036 public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
1037 public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
1038 public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
1039 public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
1040 public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
1041 public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
1042 public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
1043 public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
1044 public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
1045 public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
1046 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
1047 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
1048 public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
1049 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
1050 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
1051 public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
1052 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
1053 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
1054 public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
1055 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
1056 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
1057 public static native long LDKCVec_u64Z_new(number[] elems);
1058 public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
1059 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
1060 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1061 public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
1062 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1063 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1064 public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
1065 public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
1066 public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
1067 public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
1068 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
1069 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
1070 public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
1071 public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1072 public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1073 public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
1074 public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
1075 public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
1076 public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
1077 public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
1078 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1079 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1080 public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
1081 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1082 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1083 public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
1084 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1085 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1086 public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
1087 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1088 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1089 public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
1090 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1091 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1092 public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
1093 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1094 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1095 public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
1096 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1097 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1098 public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
1099 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1100 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1101 public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
1102 public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1103 public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1104 public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
1105 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1106 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1107 public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
1108 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1109 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1110 public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
1111 public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1112 public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1113 public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
1114 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1115 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1116 public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
1117 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1118 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1119 public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
1120 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1121 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1122 public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
1123 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1124 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1125 public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
1126 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1127 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1128 public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
1129 public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1130 public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1131 public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
1132 public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1133 public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1134 public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1135 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1136 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1137 public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1138 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1139 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1140 public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
1141 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1142 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1143 public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1144 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1145 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1146 public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1147 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1148 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1149 public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1150 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1151 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1152 public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1153 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1154 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1155 public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1156 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1157 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1158 public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1159 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1160 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1161 public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1162 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1163 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1164 public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1165 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1166 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1167 public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1168 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1169 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1170 public static class LDKSignOrCreationError {
1171 private LDKSignOrCreationError() {}
1172 export class SignError extends LDKSignOrCreationError {
1175 export class CreationError extends LDKSignOrCreationError {
1176 public CreationError creation_error;
1177 CreationError(CreationError creation_error) { this.creation_error = creation_error; }
1179 static native void init();
1181 static { LDKSignOrCreationError.init(); }
1182 public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1183 public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
1184 public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1185 public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1189 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1191 export interface LDKMessageSendEventsProvider {
1192 get_and_clear_pending_msg_events (): number[];
1195 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1196 throw new Error('unimplemented'); // TODO: bind to WASM
1199 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1202 // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1203 export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1204 if(!isWasmInitialized) {
1205 throw new Error("initializeWasm() must be awaited first!");
1207 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1208 return nativeResponseValue;
1213 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1215 export interface LDKEventHandler {
1216 handle_event (event: number): void;
1219 export function LDKEventHandler_new(impl: LDKEventHandler): number {
1220 throw new Error('unimplemented'); // TODO: bind to WASM
1223 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1226 // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, struct LDKEvent event
1227 export function EventHandler_handle_event(this_arg: number, event: number): void {
1228 if(!isWasmInitialized) {
1229 throw new Error("initializeWasm() must be awaited first!");
1231 const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
1232 // debug statements here
1237 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1239 export interface LDKEventsProvider {
1240 process_pending_events (handler: number): void;
1243 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1244 throw new Error('unimplemented'); // TODO: bind to WASM
1247 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1250 // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1251 export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
1252 if(!isWasmInitialized) {
1253 throw new Error("initializeWasm() must be awaited first!");
1255 const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
1256 // debug statements here
1261 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1263 export interface LDKAccess {
1264 get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1267 export function LDKAccess_new(impl: LDKAccess): number {
1268 throw new Error('unimplemented'); // TODO: bind to WASM
1271 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1274 // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1275 export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1276 if(!isWasmInitialized) {
1277 throw new Error("initializeWasm() must be awaited first!");
1279 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1280 return nativeResponseValue;
1285 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1287 export interface LDKListen {
1288 block_connected (block: Uint8Array, height: number): void;
1289 block_disconnected (header: Uint8Array, height: number): void;
1292 export function LDKListen_new(impl: LDKListen): number {
1293 throw new Error('unimplemented'); // TODO: bind to WASM
1296 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1299 // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1300 export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1301 if(!isWasmInitialized) {
1302 throw new Error("initializeWasm() must be awaited first!");
1304 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1305 // debug statements here
1307 // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1308 export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1309 if(!isWasmInitialized) {
1310 throw new Error("initializeWasm() must be awaited first!");
1312 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1313 // debug statements here
1318 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1320 export interface LDKConfirm {
1321 transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
1322 transaction_unconfirmed (txid: Uint8Array): void;
1323 best_block_updated (header: Uint8Array, height: number): void;
1324 get_relevant_txids (): Uint8Array[];
1327 export function LDKConfirm_new(impl: LDKConfirm): number {
1328 throw new Error('unimplemented'); // TODO: bind to WASM
1331 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1334 // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1335 export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
1336 if(!isWasmInitialized) {
1337 throw new Error("initializeWasm() must be awaited first!");
1339 const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
1340 // debug statements here
1342 // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1343 export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
1344 if(!isWasmInitialized) {
1345 throw new Error("initializeWasm() must be awaited first!");
1347 const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
1348 // debug statements here
1350 // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1351 export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
1352 if(!isWasmInitialized) {
1353 throw new Error("initializeWasm() must be awaited first!");
1355 const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
1356 // debug statements here
1358 // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1359 export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
1360 if(!isWasmInitialized) {
1361 throw new Error("initializeWasm() must be awaited first!");
1363 const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
1364 return nativeResponseValue;
1369 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1371 export interface LDKFilter {
1372 register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1373 register_output (output: number): number;
1376 export function LDKFilter_new(impl: LDKFilter): number {
1377 throw new Error('unimplemented'); // TODO: bind to WASM
1380 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1383 // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1384 export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1385 if(!isWasmInitialized) {
1386 throw new Error("initializeWasm() must be awaited first!");
1388 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1389 // debug statements here
1391 // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1392 export function Filter_register_output(this_arg: number, output: number): number {
1393 if(!isWasmInitialized) {
1394 throw new Error("initializeWasm() must be awaited first!");
1396 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1397 return nativeResponseValue;
1402 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1404 export interface LDKPersist {
1405 persist_new_channel (id: number, data: number): number;
1406 update_persisted_channel (id: number, update: number, data: number): number;
1409 export function LDKPersist_new(impl: LDKPersist): number {
1410 throw new Error('unimplemented'); // TODO: bind to WASM
1413 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1416 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1417 export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1418 if(!isWasmInitialized) {
1419 throw new Error("initializeWasm() must be awaited first!");
1421 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1422 return nativeResponseValue;
1424 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
1425 export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1426 if(!isWasmInitialized) {
1427 throw new Error("initializeWasm() must be awaited first!");
1429 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1430 return nativeResponseValue;
1435 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1437 export interface LDKChannelMessageHandler {
1438 handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1439 handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1440 handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1441 handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1442 handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1443 handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1444 handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1445 handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1446 handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1447 handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1448 handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1449 handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1450 handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1451 handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1452 handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1453 peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1454 peer_connected (their_node_id: Uint8Array, msg: number): void;
1455 handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1456 handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1457 handle_error (their_node_id: Uint8Array, msg: number): void;
1460 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1461 throw new Error('unimplemented'); // TODO: bind to WASM
1464 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1467 // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg
1468 export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1469 if(!isWasmInitialized) {
1470 throw new Error("initializeWasm() must be awaited first!");
1472 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1473 // debug statements here
1475 // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg
1476 export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1477 if(!isWasmInitialized) {
1478 throw new Error("initializeWasm() must be awaited first!");
1480 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1481 // debug statements here
1483 // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1484 export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1485 if(!isWasmInitialized) {
1486 throw new Error("initializeWasm() must be awaited first!");
1488 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1489 // debug statements here
1491 // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1492 export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1493 if(!isWasmInitialized) {
1494 throw new Error("initializeWasm() must be awaited first!");
1496 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1497 // debug statements here
1499 // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1500 export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1501 if(!isWasmInitialized) {
1502 throw new Error("initializeWasm() must be awaited first!");
1504 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1505 // debug statements here
1507 // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInitFeatures *NONNULL_PTR their_features, const struct LDKShutdown *NONNULL_PTR msg
1508 export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1509 if(!isWasmInitialized) {
1510 throw new Error("initializeWasm() must be awaited first!");
1512 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1513 // debug statements here
1515 // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1516 export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1517 if(!isWasmInitialized) {
1518 throw new Error("initializeWasm() must be awaited first!");
1520 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1521 // debug statements here
1523 // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1524 export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1525 if(!isWasmInitialized) {
1526 throw new Error("initializeWasm() must be awaited first!");
1528 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1529 // debug statements here
1531 // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1532 export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1533 if(!isWasmInitialized) {
1534 throw new Error("initializeWasm() must be awaited first!");
1536 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1537 // debug statements here
1539 // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1540 export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1541 if(!isWasmInitialized) {
1542 throw new Error("initializeWasm() must be awaited first!");
1544 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1545 // debug statements here
1547 // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1548 export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1549 if(!isWasmInitialized) {
1550 throw new Error("initializeWasm() must be awaited first!");
1552 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1553 // debug statements here
1555 // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1556 export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1557 if(!isWasmInitialized) {
1558 throw new Error("initializeWasm() must be awaited first!");
1560 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1561 // debug statements here
1563 // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1564 export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1565 if(!isWasmInitialized) {
1566 throw new Error("initializeWasm() must be awaited first!");
1568 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1569 // debug statements here
1571 // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1572 export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1573 if(!isWasmInitialized) {
1574 throw new Error("initializeWasm() must be awaited first!");
1576 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1577 // debug statements here
1579 // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1580 export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1581 if(!isWasmInitialized) {
1582 throw new Error("initializeWasm() must be awaited first!");
1584 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1585 // debug statements here
1587 // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1588 export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1589 if(!isWasmInitialized) {
1590 throw new Error("initializeWasm() must be awaited first!");
1592 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1593 // debug statements here
1595 // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1596 export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1597 if(!isWasmInitialized) {
1598 throw new Error("initializeWasm() must be awaited first!");
1600 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1601 // debug statements here
1603 // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1604 export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1605 if(!isWasmInitialized) {
1606 throw new Error("initializeWasm() must be awaited first!");
1608 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1609 // debug statements here
1611 // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
1612 export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1613 if(!isWasmInitialized) {
1614 throw new Error("initializeWasm() must be awaited first!");
1616 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
1617 // debug statements here
1619 // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1620 export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1621 if(!isWasmInitialized) {
1622 throw new Error("initializeWasm() must be awaited first!");
1624 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1625 // debug statements here
1630 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1632 export interface LDKRoutingMessageHandler {
1633 handle_node_announcement (msg: number): number;
1634 handle_channel_announcement (msg: number): number;
1635 handle_channel_update (msg: number): number;
1636 handle_htlc_fail_channel_update (update: number): void;
1637 get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1638 get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1639 sync_routing_table (their_node_id: Uint8Array, init: number): void;
1640 handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1641 handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1642 handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1643 handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1646 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1647 throw new Error('unimplemented'); // TODO: bind to WASM
1650 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1653 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1654 export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1655 if(!isWasmInitialized) {
1656 throw new Error("initializeWasm() must be awaited first!");
1658 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1659 return nativeResponseValue;
1661 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1662 export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1663 if(!isWasmInitialized) {
1664 throw new Error("initializeWasm() must be awaited first!");
1666 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1667 return nativeResponseValue;
1669 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1670 export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1671 if(!isWasmInitialized) {
1672 throw new Error("initializeWasm() must be awaited first!");
1674 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1675 return nativeResponseValue;
1677 // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1678 export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1679 if(!isWasmInitialized) {
1680 throw new Error("initializeWasm() must be awaited first!");
1682 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1683 // debug statements here
1685 // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1686 export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1687 if(!isWasmInitialized) {
1688 throw new Error("initializeWasm() must be awaited first!");
1690 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1691 return nativeResponseValue;
1693 // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1694 export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1695 if(!isWasmInitialized) {
1696 throw new Error("initializeWasm() must be awaited first!");
1698 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1699 return nativeResponseValue;
1701 // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1702 export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1703 if(!isWasmInitialized) {
1704 throw new Error("initializeWasm() must be awaited first!");
1706 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1707 // debug statements here
1709 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1710 export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1711 if(!isWasmInitialized) {
1712 throw new Error("initializeWasm() must be awaited first!");
1714 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1715 return nativeResponseValue;
1717 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1718 export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1719 if(!isWasmInitialized) {
1720 throw new Error("initializeWasm() must be awaited first!");
1722 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1723 return nativeResponseValue;
1725 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1726 export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1727 if(!isWasmInitialized) {
1728 throw new Error("initializeWasm() must be awaited first!");
1730 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1731 return nativeResponseValue;
1733 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1734 export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1735 if(!isWasmInitialized) {
1736 throw new Error("initializeWasm() must be awaited first!");
1738 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1739 return nativeResponseValue;
1744 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1746 export interface LDKSocketDescriptor {
1747 send_data (data: Uint8Array, resume_read: boolean): number;
1748 disconnect_socket (): void;
1749 eq (other_arg: number): boolean;
1753 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1754 throw new Error('unimplemented'); // TODO: bind to WASM
1757 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1760 // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1761 export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1762 if(!isWasmInitialized) {
1763 throw new Error("initializeWasm() must be awaited first!");
1765 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1766 return nativeResponseValue;
1768 // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1769 export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1770 if(!isWasmInitialized) {
1771 throw new Error("initializeWasm() must be awaited first!");
1773 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1774 // debug statements here
1776 // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1777 export function SocketDescriptor_hash(this_arg: number): number {
1778 if(!isWasmInitialized) {
1779 throw new Error("initializeWasm() must be awaited first!");
1781 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1782 return nativeResponseValue;
1787 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1789 export interface LDKChannelManagerPersister {
1790 persist_manager (channel_manager: number): number;
1793 export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
1794 throw new Error('unimplemented'); // TODO: bind to WASM
1797 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1800 // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
1801 export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
1802 if(!isWasmInitialized) {
1803 throw new Error("initializeWasm() must be awaited first!");
1805 const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
1806 return nativeResponseValue;
1808 public static class LDKFallback {
1809 private LDKFallback() {}
1810 export class SegWitProgram extends LDKFallback {
1811 public number version;
1812 public Uint8Array program;
1813 SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
1815 export class PubKeyHash extends LDKFallback {
1816 public Uint8Array pub_key_hash;
1817 PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
1819 export class ScriptHash extends LDKFallback {
1820 public Uint8Array script_hash;
1821 ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
1823 static native void init();
1825 static { LDKFallback.init(); }
1826 public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
1827 // struct LDKStr _ldk_get_compiled_version(void);
1828 export function _ldk_get_compiled_version(): String {
1829 if(!isWasmInitialized) {
1830 throw new Error("initializeWasm() must be awaited first!");
1832 const nativeResponseValue = wasm._ldk_get_compiled_version();
1833 return nativeResponseValue;
1835 // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
1836 export function _ldk_c_bindings_get_compiled_version(): String {
1837 if(!isWasmInitialized) {
1838 throw new Error("initializeWasm() must be awaited first!");
1840 const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
1841 return nativeResponseValue;
1843 // void Transaction_free(struct LDKTransaction _res);
1844 export function Transaction_free(_res: Uint8Array): void {
1845 if(!isWasmInitialized) {
1846 throw new Error("initializeWasm() must be awaited first!");
1848 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1849 // debug statements here
1851 // void TxOut_free(struct LDKTxOut _res);
1852 export function TxOut_free(_res: number): void {
1853 if(!isWasmInitialized) {
1854 throw new Error("initializeWasm() must be awaited first!");
1856 const nativeResponseValue = wasm.TxOut_free(_res);
1857 // debug statements here
1859 // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1860 export function TxOut_clone(orig: number): number {
1861 if(!isWasmInitialized) {
1862 throw new Error("initializeWasm() must be awaited first!");
1864 const nativeResponseValue = wasm.TxOut_clone(orig);
1865 return nativeResponseValue;
1867 // void Str_free(struct LDKStr _res);
1868 export function Str_free(_res: String): void {
1869 if(!isWasmInitialized) {
1870 throw new Error("initializeWasm() must be awaited first!");
1872 const nativeResponseValue = wasm.Str_free(_res);
1873 // debug statements here
1875 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1876 export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1877 if(!isWasmInitialized) {
1878 throw new Error("initializeWasm() must be awaited first!");
1880 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1881 return nativeResponseValue;
1883 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1884 export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
1885 if(!isWasmInitialized) {
1886 throw new Error("initializeWasm() must be awaited first!");
1888 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1889 return nativeResponseValue;
1891 // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1892 export function CResult_SecretKeyErrorZ_free(_res: number): void {
1893 if(!isWasmInitialized) {
1894 throw new Error("initializeWasm() must be awaited first!");
1896 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1897 // debug statements here
1899 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1900 export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1901 if(!isWasmInitialized) {
1902 throw new Error("initializeWasm() must be awaited first!");
1904 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1905 return nativeResponseValue;
1907 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1908 export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
1909 if(!isWasmInitialized) {
1910 throw new Error("initializeWasm() must be awaited first!");
1912 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1913 return nativeResponseValue;
1915 // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1916 export function CResult_PublicKeyErrorZ_free(_res: number): void {
1917 if(!isWasmInitialized) {
1918 throw new Error("initializeWasm() must be awaited first!");
1920 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1921 // debug statements here
1923 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
1924 export function CResult_PublicKeyErrorZ_clone(orig: number): number {
1925 if(!isWasmInitialized) {
1926 throw new Error("initializeWasm() must be awaited first!");
1928 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
1929 return nativeResponseValue;
1931 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1932 export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1933 if(!isWasmInitialized) {
1934 throw new Error("initializeWasm() must be awaited first!");
1936 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1937 return nativeResponseValue;
1939 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1940 export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1941 if(!isWasmInitialized) {
1942 throw new Error("initializeWasm() must be awaited first!");
1944 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1945 return nativeResponseValue;
1947 // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1948 export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1949 if(!isWasmInitialized) {
1950 throw new Error("initializeWasm() must be awaited first!");
1952 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1953 // debug statements here
1955 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1956 export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
1957 if(!isWasmInitialized) {
1958 throw new Error("initializeWasm() must be awaited first!");
1960 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
1961 return nativeResponseValue;
1963 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1964 export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
1965 if(!isWasmInitialized) {
1966 throw new Error("initializeWasm() must be awaited first!");
1968 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
1969 return nativeResponseValue;
1971 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1972 export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
1973 if(!isWasmInitialized) {
1974 throw new Error("initializeWasm() must be awaited first!");
1976 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
1977 return nativeResponseValue;
1979 // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1980 export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
1981 if(!isWasmInitialized) {
1982 throw new Error("initializeWasm() must be awaited first!");
1984 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
1985 // debug statements here
1987 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1988 export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
1989 if(!isWasmInitialized) {
1990 throw new Error("initializeWasm() must be awaited first!");
1992 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
1993 return nativeResponseValue;
1995 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1996 export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
1997 if(!isWasmInitialized) {
1998 throw new Error("initializeWasm() must be awaited first!");
2000 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
2001 return nativeResponseValue;
2003 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
2004 export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
2005 if(!isWasmInitialized) {
2006 throw new Error("initializeWasm() must be awaited first!");
2008 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
2009 return nativeResponseValue;
2011 // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
2012 export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
2013 if(!isWasmInitialized) {
2014 throw new Error("initializeWasm() must be awaited first!");
2016 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
2017 // debug statements here
2019 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
2020 export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
2021 if(!isWasmInitialized) {
2022 throw new Error("initializeWasm() must be awaited first!");
2024 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
2025 return nativeResponseValue;
2027 // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
2028 export function COption_u32Z_some(o: number): number {
2029 if(!isWasmInitialized) {
2030 throw new Error("initializeWasm() must be awaited first!");
2032 const nativeResponseValue = wasm.COption_u32Z_some(o);
2033 return nativeResponseValue;
2035 // struct LDKCOption_u32Z COption_u32Z_none(void);
2036 export function COption_u32Z_none(): number {
2037 if(!isWasmInitialized) {
2038 throw new Error("initializeWasm() must be awaited first!");
2040 const nativeResponseValue = wasm.COption_u32Z_none();
2041 return nativeResponseValue;
2043 // void COption_u32Z_free(struct LDKCOption_u32Z _res);
2044 export function COption_u32Z_free(_res: number): void {
2045 if(!isWasmInitialized) {
2046 throw new Error("initializeWasm() must be awaited first!");
2048 const nativeResponseValue = wasm.COption_u32Z_free(_res);
2049 // debug statements here
2051 // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
2052 export function COption_u32Z_clone(orig: number): number {
2053 if(!isWasmInitialized) {
2054 throw new Error("initializeWasm() must be awaited first!");
2056 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
2057 return nativeResponseValue;
2059 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
2060 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
2061 if(!isWasmInitialized) {
2062 throw new Error("initializeWasm() must be awaited first!");
2064 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
2065 return nativeResponseValue;
2067 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
2068 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
2069 if(!isWasmInitialized) {
2070 throw new Error("initializeWasm() must be awaited first!");
2072 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
2073 return nativeResponseValue;
2075 // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
2076 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
2077 if(!isWasmInitialized) {
2078 throw new Error("initializeWasm() must be awaited first!");
2080 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
2081 // debug statements here
2083 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
2084 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
2085 if(!isWasmInitialized) {
2086 throw new Error("initializeWasm() must be awaited first!");
2088 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
2089 return nativeResponseValue;
2091 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
2092 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2093 if(!isWasmInitialized) {
2094 throw new Error("initializeWasm() must be awaited first!");
2096 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
2097 return nativeResponseValue;
2099 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2100 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2101 if(!isWasmInitialized) {
2102 throw new Error("initializeWasm() must be awaited first!");
2104 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
2105 return nativeResponseValue;
2107 // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
2108 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2109 if(!isWasmInitialized) {
2110 throw new Error("initializeWasm() must be awaited first!");
2112 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
2113 // debug statements here
2115 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2116 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2117 if(!isWasmInitialized) {
2118 throw new Error("initializeWasm() must be awaited first!");
2120 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
2121 return nativeResponseValue;
2123 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
2124 export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2125 if(!isWasmInitialized) {
2126 throw new Error("initializeWasm() must be awaited first!");
2128 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
2129 return nativeResponseValue;
2131 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2132 export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2133 if(!isWasmInitialized) {
2134 throw new Error("initializeWasm() must be awaited first!");
2136 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
2137 return nativeResponseValue;
2139 // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
2140 export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2141 if(!isWasmInitialized) {
2142 throw new Error("initializeWasm() must be awaited first!");
2144 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
2145 // debug statements here
2147 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2148 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2149 if(!isWasmInitialized) {
2150 throw new Error("initializeWasm() must be awaited first!");
2152 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
2153 return nativeResponseValue;
2155 // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
2156 export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
2157 if(!isWasmInitialized) {
2158 throw new Error("initializeWasm() must be awaited first!");
2160 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
2161 // debug statements here
2163 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
2164 export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2165 if(!isWasmInitialized) {
2166 throw new Error("initializeWasm() must be awaited first!");
2168 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
2169 return nativeResponseValue;
2171 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2172 export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
2173 if(!isWasmInitialized) {
2174 throw new Error("initializeWasm() must be awaited first!");
2176 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
2177 return nativeResponseValue;
2179 // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
2180 export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2181 if(!isWasmInitialized) {
2182 throw new Error("initializeWasm() must be awaited first!");
2184 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
2185 // debug statements here
2187 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2188 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2189 if(!isWasmInitialized) {
2190 throw new Error("initializeWasm() must be awaited first!");
2192 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2193 return nativeResponseValue;
2195 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2196 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2197 if(!isWasmInitialized) {
2198 throw new Error("initializeWasm() must be awaited first!");
2200 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2201 return nativeResponseValue;
2203 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2204 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2205 if(!isWasmInitialized) {
2206 throw new Error("initializeWasm() must be awaited first!");
2208 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2209 return nativeResponseValue;
2211 // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2212 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2213 if(!isWasmInitialized) {
2214 throw new Error("initializeWasm() must be awaited first!");
2216 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2217 // debug statements here
2219 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2220 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2221 if(!isWasmInitialized) {
2222 throw new Error("initializeWasm() must be awaited first!");
2224 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
2225 return nativeResponseValue;
2227 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
2228 export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
2229 if(!isWasmInitialized) {
2230 throw new Error("initializeWasm() must be awaited first!");
2232 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
2233 return nativeResponseValue;
2235 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2236 export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
2237 if(!isWasmInitialized) {
2238 throw new Error("initializeWasm() must be awaited first!");
2240 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
2241 return nativeResponseValue;
2243 // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
2244 export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
2245 if(!isWasmInitialized) {
2246 throw new Error("initializeWasm() must be awaited first!");
2248 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
2249 // debug statements here
2251 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2252 export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2253 if(!isWasmInitialized) {
2254 throw new Error("initializeWasm() must be awaited first!");
2256 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
2257 return nativeResponseValue;
2259 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2260 export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2261 if(!isWasmInitialized) {
2262 throw new Error("initializeWasm() must be awaited first!");
2264 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2265 return nativeResponseValue;
2267 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2268 export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2269 if(!isWasmInitialized) {
2270 throw new Error("initializeWasm() must be awaited first!");
2272 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2273 return nativeResponseValue;
2275 // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2276 export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2277 if(!isWasmInitialized) {
2278 throw new Error("initializeWasm() must be awaited first!");
2280 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2281 // debug statements here
2283 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
2284 export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
2285 if(!isWasmInitialized) {
2286 throw new Error("initializeWasm() must be awaited first!");
2288 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
2289 return nativeResponseValue;
2291 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
2292 export function CResult_CVec_SignatureZNoneZ_err(): number {
2293 if(!isWasmInitialized) {
2294 throw new Error("initializeWasm() must be awaited first!");
2296 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
2297 return nativeResponseValue;
2299 // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
2300 export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
2301 if(!isWasmInitialized) {
2302 throw new Error("initializeWasm() must be awaited first!");
2304 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
2305 // debug statements here
2307 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
2308 export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
2309 if(!isWasmInitialized) {
2310 throw new Error("initializeWasm() must be awaited first!");
2312 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
2313 return nativeResponseValue;
2315 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
2316 export function CResult_NoneErrorZ_ok(): number {
2317 if(!isWasmInitialized) {
2318 throw new Error("initializeWasm() must be awaited first!");
2320 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
2321 return nativeResponseValue;
2323 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
2324 export function CResult_NoneErrorZ_err(e: IOError): number {
2325 if(!isWasmInitialized) {
2326 throw new Error("initializeWasm() must be awaited first!");
2328 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
2329 return nativeResponseValue;
2331 // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
2332 export function CResult_NoneErrorZ_free(_res: number): void {
2333 if(!isWasmInitialized) {
2334 throw new Error("initializeWasm() must be awaited first!");
2336 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
2337 // debug statements here
2339 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
2340 export function CResult_NoneErrorZ_clone(orig: number): number {
2341 if(!isWasmInitialized) {
2342 throw new Error("initializeWasm() must be awaited first!");
2344 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
2345 return nativeResponseValue;
2347 // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
2348 export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
2349 if(!isWasmInitialized) {
2350 throw new Error("initializeWasm() must be awaited first!");
2352 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
2353 return nativeResponseValue;
2355 // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
2356 export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
2357 if(!isWasmInitialized) {
2358 throw new Error("initializeWasm() must be awaited first!");
2360 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
2361 return nativeResponseValue;
2363 // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
2364 export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
2365 if(!isWasmInitialized) {
2366 throw new Error("initializeWasm() must be awaited first!");
2368 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
2369 // debug statements here
2371 // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
2372 export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
2373 if(!isWasmInitialized) {
2374 throw new Error("initializeWasm() must be awaited first!");
2376 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
2377 return nativeResponseValue;
2379 // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
2380 export function CVec_RouteHopZ_free(_res: number[]): void {
2381 if(!isWasmInitialized) {
2382 throw new Error("initializeWasm() must be awaited first!");
2384 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
2385 // debug statements here
2387 // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
2388 export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
2389 if(!isWasmInitialized) {
2390 throw new Error("initializeWasm() must be awaited first!");
2392 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
2393 // debug statements here
2395 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
2396 export function CResult_RouteDecodeErrorZ_ok(o: number): number {
2397 if(!isWasmInitialized) {
2398 throw new Error("initializeWasm() must be awaited first!");
2400 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
2401 return nativeResponseValue;
2403 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
2404 export function CResult_RouteDecodeErrorZ_err(e: number): number {
2405 if(!isWasmInitialized) {
2406 throw new Error("initializeWasm() must be awaited first!");
2408 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
2409 return nativeResponseValue;
2411 // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
2412 export function CResult_RouteDecodeErrorZ_free(_res: number): void {
2413 if(!isWasmInitialized) {
2414 throw new Error("initializeWasm() must be awaited first!");
2416 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
2417 // debug statements here
2419 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
2420 export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
2421 if(!isWasmInitialized) {
2422 throw new Error("initializeWasm() must be awaited first!");
2424 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
2425 return nativeResponseValue;
2427 // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
2428 export function COption_u64Z_some(o: number): number {
2429 if(!isWasmInitialized) {
2430 throw new Error("initializeWasm() must be awaited first!");
2432 const nativeResponseValue = wasm.COption_u64Z_some(o);
2433 return nativeResponseValue;
2435 // struct LDKCOption_u64Z COption_u64Z_none(void);
2436 export function COption_u64Z_none(): number {
2437 if(!isWasmInitialized) {
2438 throw new Error("initializeWasm() must be awaited first!");
2440 const nativeResponseValue = wasm.COption_u64Z_none();
2441 return nativeResponseValue;
2443 // void COption_u64Z_free(struct LDKCOption_u64Z _res);
2444 export function COption_u64Z_free(_res: number): void {
2445 if(!isWasmInitialized) {
2446 throw new Error("initializeWasm() must be awaited first!");
2448 const nativeResponseValue = wasm.COption_u64Z_free(_res);
2449 // debug statements here
2451 // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
2452 export function COption_u64Z_clone(orig: number): number {
2453 if(!isWasmInitialized) {
2454 throw new Error("initializeWasm() must be awaited first!");
2456 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
2457 return nativeResponseValue;
2459 // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2460 export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2461 if(!isWasmInitialized) {
2462 throw new Error("initializeWasm() must be awaited first!");
2464 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2465 // debug statements here
2467 // void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res);
2468 export function CVec_RouteHintHopZ_free(_res: number[]): void {
2469 if(!isWasmInitialized) {
2470 throw new Error("initializeWasm() must be awaited first!");
2472 const nativeResponseValue = wasm.CVec_RouteHintHopZ_free(_res);
2473 // debug statements here
2475 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
2476 export function CResult_RouteLightningErrorZ_ok(o: number): number {
2477 if(!isWasmInitialized) {
2478 throw new Error("initializeWasm() must be awaited first!");
2480 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
2481 return nativeResponseValue;
2483 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
2484 export function CResult_RouteLightningErrorZ_err(e: number): number {
2485 if(!isWasmInitialized) {
2486 throw new Error("initializeWasm() must be awaited first!");
2488 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
2489 return nativeResponseValue;
2491 // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
2492 export function CResult_RouteLightningErrorZ_free(_res: number): void {
2493 if(!isWasmInitialized) {
2494 throw new Error("initializeWasm() must be awaited first!");
2496 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
2497 // debug statements here
2499 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
2500 export function CResult_RouteLightningErrorZ_clone(orig: number): number {
2501 if(!isWasmInitialized) {
2502 throw new Error("initializeWasm() must be awaited first!");
2504 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
2505 return nativeResponseValue;
2507 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2508 export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2509 if(!isWasmInitialized) {
2510 throw new Error("initializeWasm() must be awaited first!");
2512 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2513 return nativeResponseValue;
2515 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2516 export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
2517 if(!isWasmInitialized) {
2518 throw new Error("initializeWasm() must be awaited first!");
2520 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2521 return nativeResponseValue;
2523 // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2524 export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2525 if(!isWasmInitialized) {
2526 throw new Error("initializeWasm() must be awaited first!");
2528 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2529 // debug statements here
2531 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2532 export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2533 if(!isWasmInitialized) {
2534 throw new Error("initializeWasm() must be awaited first!");
2536 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2537 return nativeResponseValue;
2539 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
2540 export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
2541 if(!isWasmInitialized) {
2542 throw new Error("initializeWasm() must be awaited first!");
2544 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
2545 return nativeResponseValue;
2547 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2548 export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2549 if(!isWasmInitialized) {
2550 throw new Error("initializeWasm() must be awaited first!");
2552 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2553 return nativeResponseValue;
2555 // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2556 export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2557 if(!isWasmInitialized) {
2558 throw new Error("initializeWasm() must be awaited first!");
2560 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2561 // debug statements here
2563 // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2564 export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2565 if(!isWasmInitialized) {
2566 throw new Error("initializeWasm() must be awaited first!");
2568 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2569 // debug statements here
2571 // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
2572 export function CVec_TxidZ_free(_res: Uint8Array[]): void {
2573 if(!isWasmInitialized) {
2574 throw new Error("initializeWasm() must be awaited first!");
2576 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
2577 // debug statements here
2579 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2580 export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2581 if(!isWasmInitialized) {
2582 throw new Error("initializeWasm() must be awaited first!");
2584 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2585 return nativeResponseValue;
2587 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2588 export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
2589 if(!isWasmInitialized) {
2590 throw new Error("initializeWasm() must be awaited first!");
2592 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2593 return nativeResponseValue;
2595 // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2596 export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2597 if(!isWasmInitialized) {
2598 throw new Error("initializeWasm() must be awaited first!");
2600 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2601 // debug statements here
2603 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2604 export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2605 if(!isWasmInitialized) {
2606 throw new Error("initializeWasm() must be awaited first!");
2608 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2609 return nativeResponseValue;
2611 // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2612 export function CVec_MonitorEventZ_free(_res: number[]): void {
2613 if(!isWasmInitialized) {
2614 throw new Error("initializeWasm() must be awaited first!");
2616 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2617 // debug statements here
2619 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
2620 export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
2621 if(!isWasmInitialized) {
2622 throw new Error("initializeWasm() must be awaited first!");
2624 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
2625 return nativeResponseValue;
2627 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
2628 export function COption_C2Tuple_usizeTransactionZZ_none(): number {
2629 if(!isWasmInitialized) {
2630 throw new Error("initializeWasm() must be awaited first!");
2632 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
2633 return nativeResponseValue;
2635 // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
2636 export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
2637 if(!isWasmInitialized) {
2638 throw new Error("initializeWasm() must be awaited first!");
2640 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
2641 // debug statements here
2643 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
2644 export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
2645 if(!isWasmInitialized) {
2646 throw new Error("initializeWasm() must be awaited first!");
2648 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
2649 return nativeResponseValue;
2651 // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2652 export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2653 if(!isWasmInitialized) {
2654 throw new Error("initializeWasm() must be awaited first!");
2656 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2657 // debug statements here
2659 // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
2660 export function CVec_MessageSendEventZ_free(_res: number[]): void {
2661 if(!isWasmInitialized) {
2662 throw new Error("initializeWasm() must be awaited first!");
2664 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
2665 // debug statements here
2667 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
2668 export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
2669 if(!isWasmInitialized) {
2670 throw new Error("initializeWasm() must be awaited first!");
2672 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
2673 return nativeResponseValue;
2675 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2676 export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
2677 if(!isWasmInitialized) {
2678 throw new Error("initializeWasm() must be awaited first!");
2680 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
2681 return nativeResponseValue;
2683 // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2684 export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
2685 if(!isWasmInitialized) {
2686 throw new Error("initializeWasm() must be awaited first!");
2688 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
2689 // debug statements here
2691 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2692 export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
2693 if(!isWasmInitialized) {
2694 throw new Error("initializeWasm() must be awaited first!");
2696 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
2697 return nativeResponseValue;
2699 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2700 export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
2701 if(!isWasmInitialized) {
2702 throw new Error("initializeWasm() must be awaited first!");
2704 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
2705 return nativeResponseValue;
2707 // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2708 export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
2709 if(!isWasmInitialized) {
2710 throw new Error("initializeWasm() must be awaited first!");
2712 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
2713 // debug statements here
2715 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2716 export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
2717 if(!isWasmInitialized) {
2718 throw new Error("initializeWasm() must be awaited first!");
2720 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
2721 return nativeResponseValue;
2723 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2724 export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
2725 if(!isWasmInitialized) {
2726 throw new Error("initializeWasm() must be awaited first!");
2728 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
2729 return nativeResponseValue;
2731 // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2732 export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
2733 if(!isWasmInitialized) {
2734 throw new Error("initializeWasm() must be awaited first!");
2736 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
2737 // debug statements here
2739 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
2740 export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
2741 if(!isWasmInitialized) {
2742 throw new Error("initializeWasm() must be awaited first!");
2744 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
2745 return nativeResponseValue;
2747 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2748 export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
2749 if(!isWasmInitialized) {
2750 throw new Error("initializeWasm() must be awaited first!");
2752 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
2753 return nativeResponseValue;
2755 // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
2756 export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
2757 if(!isWasmInitialized) {
2758 throw new Error("initializeWasm() must be awaited first!");
2760 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
2761 // debug statements here
2763 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
2764 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
2765 if(!isWasmInitialized) {
2766 throw new Error("initializeWasm() must be awaited first!");
2768 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
2769 return nativeResponseValue;
2771 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2772 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
2773 if(!isWasmInitialized) {
2774 throw new Error("initializeWasm() must be awaited first!");
2776 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
2777 return nativeResponseValue;
2779 // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
2780 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
2781 if(!isWasmInitialized) {
2782 throw new Error("initializeWasm() must be awaited first!");
2784 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
2785 // debug statements here
2787 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2788 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2789 if(!isWasmInitialized) {
2790 throw new Error("initializeWasm() must be awaited first!");
2792 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
2793 return nativeResponseValue;
2795 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
2796 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
2797 if(!isWasmInitialized) {
2798 throw new Error("initializeWasm() must be awaited first!");
2800 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
2801 return nativeResponseValue;
2803 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2804 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
2805 if(!isWasmInitialized) {
2806 throw new Error("initializeWasm() must be awaited first!");
2808 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
2809 return nativeResponseValue;
2811 // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
2812 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
2813 if(!isWasmInitialized) {
2814 throw new Error("initializeWasm() must be awaited first!");
2816 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
2817 // debug statements here
2819 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2820 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2821 if(!isWasmInitialized) {
2822 throw new Error("initializeWasm() must be awaited first!");
2824 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
2825 return nativeResponseValue;
2827 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
2828 export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
2829 if(!isWasmInitialized) {
2830 throw new Error("initializeWasm() must be awaited first!");
2832 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
2833 return nativeResponseValue;
2835 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2836 export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
2837 if(!isWasmInitialized) {
2838 throw new Error("initializeWasm() must be awaited first!");
2840 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
2841 return nativeResponseValue;
2843 // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
2844 export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
2845 if(!isWasmInitialized) {
2846 throw new Error("initializeWasm() must be awaited first!");
2848 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
2849 // debug statements here
2851 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2852 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2853 if(!isWasmInitialized) {
2854 throw new Error("initializeWasm() must be awaited first!");
2856 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
2857 return nativeResponseValue;
2859 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
2860 export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
2861 if(!isWasmInitialized) {
2862 throw new Error("initializeWasm() must be awaited first!");
2864 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
2865 return nativeResponseValue;
2867 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
2868 export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
2869 if(!isWasmInitialized) {
2870 throw new Error("initializeWasm() must be awaited first!");
2872 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
2873 return nativeResponseValue;
2875 // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
2876 export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
2877 if(!isWasmInitialized) {
2878 throw new Error("initializeWasm() must be awaited first!");
2880 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
2881 // debug statements here
2883 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
2884 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
2885 if(!isWasmInitialized) {
2886 throw new Error("initializeWasm() must be awaited first!");
2888 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
2889 return nativeResponseValue;
2891 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
2892 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
2893 if(!isWasmInitialized) {
2894 throw new Error("initializeWasm() must be awaited first!");
2896 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
2897 return nativeResponseValue;
2899 // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
2900 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
2901 if(!isWasmInitialized) {
2902 throw new Error("initializeWasm() must be awaited first!");
2904 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
2905 // debug statements here
2907 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
2908 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
2909 if(!isWasmInitialized) {
2910 throw new Error("initializeWasm() must be awaited first!");
2912 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
2913 return nativeResponseValue;
2915 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
2916 export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
2917 if(!isWasmInitialized) {
2918 throw new Error("initializeWasm() must be awaited first!");
2920 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
2921 return nativeResponseValue;
2923 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
2924 export function CResult_SignatureNoneZ_err(): number {
2925 if(!isWasmInitialized) {
2926 throw new Error("initializeWasm() must be awaited first!");
2928 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
2929 return nativeResponseValue;
2931 // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
2932 export function CResult_SignatureNoneZ_free(_res: number): void {
2933 if(!isWasmInitialized) {
2934 throw new Error("initializeWasm() must be awaited first!");
2936 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
2937 // debug statements here
2939 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
2940 export function CResult_SignatureNoneZ_clone(orig: number): number {
2941 if(!isWasmInitialized) {
2942 throw new Error("initializeWasm() must be awaited first!");
2944 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
2945 return nativeResponseValue;
2947 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
2948 export function CResult_SignDecodeErrorZ_ok(o: number): number {
2949 if(!isWasmInitialized) {
2950 throw new Error("initializeWasm() must be awaited first!");
2952 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
2953 return nativeResponseValue;
2955 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
2956 export function CResult_SignDecodeErrorZ_err(e: number): number {
2957 if(!isWasmInitialized) {
2958 throw new Error("initializeWasm() must be awaited first!");
2960 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
2961 return nativeResponseValue;
2963 // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
2964 export function CResult_SignDecodeErrorZ_free(_res: number): void {
2965 if(!isWasmInitialized) {
2966 throw new Error("initializeWasm() must be awaited first!");
2968 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
2969 // debug statements here
2971 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
2972 export function CResult_SignDecodeErrorZ_clone(orig: number): number {
2973 if(!isWasmInitialized) {
2974 throw new Error("initializeWasm() must be awaited first!");
2976 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
2977 return nativeResponseValue;
2979 // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2980 export function CVec_u8Z_free(_res: Uint8Array): void {
2981 if(!isWasmInitialized) {
2982 throw new Error("initializeWasm() must be awaited first!");
2984 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
2985 // debug statements here
2987 // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
2988 export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
2989 if(!isWasmInitialized) {
2990 throw new Error("initializeWasm() must be awaited first!");
2992 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
2993 return nativeResponseValue;
2995 // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
2996 export function CResult_RecoverableSignatureNoneZ_err(): number {
2997 if(!isWasmInitialized) {
2998 throw new Error("initializeWasm() must be awaited first!");
3000 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
3001 return nativeResponseValue;
3003 // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
3004 export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
3005 if(!isWasmInitialized) {
3006 throw new Error("initializeWasm() must be awaited first!");
3008 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
3009 // debug statements here
3011 // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
3012 export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
3013 if(!isWasmInitialized) {
3014 throw new Error("initializeWasm() must be awaited first!");
3016 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
3017 return nativeResponseValue;
3019 // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3020 export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3021 if(!isWasmInitialized) {
3022 throw new Error("initializeWasm() must be awaited first!");
3024 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3025 // debug statements here
3027 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3028 export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3029 if(!isWasmInitialized) {
3030 throw new Error("initializeWasm() must be awaited first!");
3032 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3033 return nativeResponseValue;
3035 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3036 export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3037 if(!isWasmInitialized) {
3038 throw new Error("initializeWasm() must be awaited first!");
3040 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3041 return nativeResponseValue;
3043 // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3044 export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3045 if(!isWasmInitialized) {
3046 throw new Error("initializeWasm() must be awaited first!");
3048 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3049 // debug statements here
3051 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3052 export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3053 if(!isWasmInitialized) {
3054 throw new Error("initializeWasm() must be awaited first!");
3056 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3057 return nativeResponseValue;
3059 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3060 export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3061 if(!isWasmInitialized) {
3062 throw new Error("initializeWasm() must be awaited first!");
3064 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3065 return nativeResponseValue;
3067 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3068 export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3069 if(!isWasmInitialized) {
3070 throw new Error("initializeWasm() must be awaited first!");
3072 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3073 return nativeResponseValue;
3075 // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3076 export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3077 if(!isWasmInitialized) {
3078 throw new Error("initializeWasm() must be awaited first!");
3080 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3081 // debug statements here
3083 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3084 export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3085 if(!isWasmInitialized) {
3086 throw new Error("initializeWasm() must be awaited first!");
3088 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3089 return nativeResponseValue;
3091 // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3092 export function CVec_TxOutZ_free(_res: number[]): void {
3093 if(!isWasmInitialized) {
3094 throw new Error("initializeWasm() must be awaited first!");
3096 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3097 // debug statements here
3099 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3100 export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3101 if(!isWasmInitialized) {
3102 throw new Error("initializeWasm() must be awaited first!");
3104 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3105 return nativeResponseValue;
3107 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3108 export function CResult_TransactionNoneZ_err(): number {
3109 if(!isWasmInitialized) {
3110 throw new Error("initializeWasm() must be awaited first!");
3112 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3113 return nativeResponseValue;
3115 // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3116 export function CResult_TransactionNoneZ_free(_res: number): void {
3117 if(!isWasmInitialized) {
3118 throw new Error("initializeWasm() must be awaited first!");
3120 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3121 // debug statements here
3123 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
3124 export function CResult_TransactionNoneZ_clone(orig: number): number {
3125 if(!isWasmInitialized) {
3126 throw new Error("initializeWasm() must be awaited first!");
3128 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
3129 return nativeResponseValue;
3131 // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
3132 export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
3133 if(!isWasmInitialized) {
3134 throw new Error("initializeWasm() must be awaited first!");
3136 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
3137 return nativeResponseValue;
3139 // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
3140 export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
3141 if(!isWasmInitialized) {
3142 throw new Error("initializeWasm() must be awaited first!");
3144 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
3145 // debug statements here
3147 // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
3148 export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
3149 if(!isWasmInitialized) {
3150 throw new Error("initializeWasm() must be awaited first!");
3152 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
3153 // debug statements here
3155 // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
3156 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
3157 if(!isWasmInitialized) {
3158 throw new Error("initializeWasm() must be awaited first!");
3160 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
3161 return nativeResponseValue;
3163 // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
3164 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
3165 if(!isWasmInitialized) {
3166 throw new Error("initializeWasm() must be awaited first!");
3168 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
3169 return nativeResponseValue;
3171 // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
3172 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
3173 if(!isWasmInitialized) {
3174 throw new Error("initializeWasm() must be awaited first!");
3176 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
3177 // debug statements here
3179 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
3180 export function CResult_NoneAPIErrorZ_ok(): number {
3181 if(!isWasmInitialized) {
3182 throw new Error("initializeWasm() must be awaited first!");
3184 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
3185 return nativeResponseValue;
3187 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
3188 export function CResult_NoneAPIErrorZ_err(e: number): number {
3189 if(!isWasmInitialized) {
3190 throw new Error("initializeWasm() must be awaited first!");
3192 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
3193 return nativeResponseValue;
3195 // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
3196 export function CResult_NoneAPIErrorZ_free(_res: number): void {
3197 if(!isWasmInitialized) {
3198 throw new Error("initializeWasm() must be awaited first!");
3200 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
3201 // debug statements here
3203 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
3204 export function CResult_NoneAPIErrorZ_clone(orig: number): number {
3205 if(!isWasmInitialized) {
3206 throw new Error("initializeWasm() must be awaited first!");
3208 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
3209 return nativeResponseValue;
3211 // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
3212 export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
3213 if(!isWasmInitialized) {
3214 throw new Error("initializeWasm() must be awaited first!");
3216 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
3217 // debug statements here
3219 // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
3220 export function CVec_APIErrorZ_free(_res: number[]): void {
3221 if(!isWasmInitialized) {
3222 throw new Error("initializeWasm() must be awaited first!");
3224 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
3225 // debug statements here
3227 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
3228 export function CResult_NonePaymentSendFailureZ_ok(): number {
3229 if(!isWasmInitialized) {
3230 throw new Error("initializeWasm() must be awaited first!");
3232 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
3233 return nativeResponseValue;
3235 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3236 export function CResult_NonePaymentSendFailureZ_err(e: number): number {
3237 if(!isWasmInitialized) {
3238 throw new Error("initializeWasm() must be awaited first!");
3240 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
3241 return nativeResponseValue;
3243 // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
3244 export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
3245 if(!isWasmInitialized) {
3246 throw new Error("initializeWasm() must be awaited first!");
3248 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
3249 // debug statements here
3251 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
3252 export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
3253 if(!isWasmInitialized) {
3254 throw new Error("initializeWasm() must be awaited first!");
3256 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
3257 return nativeResponseValue;
3259 // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
3260 export function CVec_NetAddressZ_free(_res: number[]): void {
3261 if(!isWasmInitialized) {
3262 throw new Error("initializeWasm() must be awaited first!");
3264 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
3265 // debug statements here
3267 // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
3268 export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
3269 if(!isWasmInitialized) {
3270 throw new Error("initializeWasm() must be awaited first!");
3272 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
3273 return nativeResponseValue;
3275 // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
3276 export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
3277 if(!isWasmInitialized) {
3278 throw new Error("initializeWasm() must be awaited first!");
3280 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
3281 return nativeResponseValue;
3283 // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
3284 export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
3285 if(!isWasmInitialized) {
3286 throw new Error("initializeWasm() must be awaited first!");
3288 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
3289 // debug statements here
3291 // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
3292 export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
3293 if(!isWasmInitialized) {
3294 throw new Error("initializeWasm() must be awaited first!");
3296 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
3297 return nativeResponseValue;
3299 // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
3300 export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
3301 if(!isWasmInitialized) {
3302 throw new Error("initializeWasm() must be awaited first!");
3304 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
3305 return nativeResponseValue;
3307 // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
3308 export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
3309 if(!isWasmInitialized) {
3310 throw new Error("initializeWasm() must be awaited first!");
3312 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
3313 // debug statements here
3315 // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
3316 export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
3317 if(!isWasmInitialized) {
3318 throw new Error("initializeWasm() must be awaited first!");
3320 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
3321 return nativeResponseValue;
3323 // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
3324 export function CVec_ChannelMonitorZ_free(_res: number[]): void {
3325 if(!isWasmInitialized) {
3326 throw new Error("initializeWasm() must be awaited first!");
3328 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
3329 // debug statements here
3331 // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
3332 export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
3333 if(!isWasmInitialized) {
3334 throw new Error("initializeWasm() must be awaited first!");
3336 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
3337 return nativeResponseValue;
3339 // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
3340 export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
3341 if(!isWasmInitialized) {
3342 throw new Error("initializeWasm() must be awaited first!");
3344 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
3345 // debug statements here
3347 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
3348 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
3349 if(!isWasmInitialized) {
3350 throw new Error("initializeWasm() must be awaited first!");
3352 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
3353 return nativeResponseValue;
3355 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
3356 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
3357 if(!isWasmInitialized) {
3358 throw new Error("initializeWasm() must be awaited first!");
3360 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
3361 return nativeResponseValue;
3363 // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
3364 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
3365 if(!isWasmInitialized) {
3366 throw new Error("initializeWasm() must be awaited first!");
3368 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
3369 // debug statements here
3371 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
3372 export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
3373 if(!isWasmInitialized) {
3374 throw new Error("initializeWasm() must be awaited first!");
3376 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
3377 return nativeResponseValue;
3379 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
3380 export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
3381 if(!isWasmInitialized) {
3382 throw new Error("initializeWasm() must be awaited first!");
3384 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
3385 return nativeResponseValue;
3387 // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
3388 export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
3389 if(!isWasmInitialized) {
3390 throw new Error("initializeWasm() must be awaited first!");
3392 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
3393 // debug statements here
3395 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
3396 export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
3397 if(!isWasmInitialized) {
3398 throw new Error("initializeWasm() must be awaited first!");
3400 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
3401 return nativeResponseValue;
3403 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
3404 export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
3405 if(!isWasmInitialized) {
3406 throw new Error("initializeWasm() must be awaited first!");
3408 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
3409 return nativeResponseValue;
3411 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
3412 export function CResult_OutPointDecodeErrorZ_err(e: number): number {
3413 if(!isWasmInitialized) {
3414 throw new Error("initializeWasm() must be awaited first!");
3416 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
3417 return nativeResponseValue;
3419 // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
3420 export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
3421 if(!isWasmInitialized) {
3422 throw new Error("initializeWasm() must be awaited first!");
3424 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
3425 // debug statements here
3427 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
3428 export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
3429 if(!isWasmInitialized) {
3430 throw new Error("initializeWasm() must be awaited first!");
3432 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
3433 return nativeResponseValue;
3435 // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
3436 export function CResult_SiPrefixNoneZ_ok(o: SiPrefix): number {
3437 if(!isWasmInitialized) {
3438 throw new Error("initializeWasm() must be awaited first!");
3440 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_ok(o);
3441 return nativeResponseValue;
3443 // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
3444 export function CResult_SiPrefixNoneZ_err(): number {
3445 if(!isWasmInitialized) {
3446 throw new Error("initializeWasm() must be awaited first!");
3448 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_err();
3449 return nativeResponseValue;
3451 // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
3452 export function CResult_SiPrefixNoneZ_free(_res: number): void {
3453 if(!isWasmInitialized) {
3454 throw new Error("initializeWasm() must be awaited first!");
3456 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_free(_res);
3457 // debug statements here
3459 // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
3460 export function CResult_SiPrefixNoneZ_clone(orig: number): number {
3461 if(!isWasmInitialized) {
3462 throw new Error("initializeWasm() must be awaited first!");
3464 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone(orig);
3465 return nativeResponseValue;
3467 // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
3468 export function CResult_InvoiceNoneZ_ok(o: number): number {
3469 if(!isWasmInitialized) {
3470 throw new Error("initializeWasm() must be awaited first!");
3472 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_ok(o);
3473 return nativeResponseValue;
3475 // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
3476 export function CResult_InvoiceNoneZ_err(): number {
3477 if(!isWasmInitialized) {
3478 throw new Error("initializeWasm() must be awaited first!");
3480 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_err();
3481 return nativeResponseValue;
3483 // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
3484 export function CResult_InvoiceNoneZ_free(_res: number): void {
3485 if(!isWasmInitialized) {
3486 throw new Error("initializeWasm() must be awaited first!");
3488 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_free(_res);
3489 // debug statements here
3491 // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
3492 export function CResult_InvoiceNoneZ_clone(orig: number): number {
3493 if(!isWasmInitialized) {
3494 throw new Error("initializeWasm() must be awaited first!");
3496 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone(orig);
3497 return nativeResponseValue;
3499 // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
3500 export function CResult_SignedRawInvoiceNoneZ_ok(o: number): number {
3501 if(!isWasmInitialized) {
3502 throw new Error("initializeWasm() must be awaited first!");
3504 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_ok(o);
3505 return nativeResponseValue;
3507 // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
3508 export function CResult_SignedRawInvoiceNoneZ_err(): number {
3509 if(!isWasmInitialized) {
3510 throw new Error("initializeWasm() must be awaited first!");
3512 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_err();
3513 return nativeResponseValue;
3515 // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
3516 export function CResult_SignedRawInvoiceNoneZ_free(_res: number): void {
3517 if(!isWasmInitialized) {
3518 throw new Error("initializeWasm() must be awaited first!");
3520 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_free(_res);
3521 // debug statements here
3523 // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
3524 export function CResult_SignedRawInvoiceNoneZ_clone(orig: number): number {
3525 if(!isWasmInitialized) {
3526 throw new Error("initializeWasm() must be awaited first!");
3528 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone(orig);
3529 return nativeResponseValue;
3531 // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
3532 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig: number): number {
3533 if(!isWasmInitialized) {
3534 throw new Error("initializeWasm() must be awaited first!");
3536 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig);
3537 return nativeResponseValue;
3539 // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
3540 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a: number, b: Uint8Array, c: number): number {
3541 if(!isWasmInitialized) {
3542 throw new Error("initializeWasm() must be awaited first!");
3544 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a, encodeArray(b), c);
3545 return nativeResponseValue;
3547 // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
3548 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res: number): void {
3549 if(!isWasmInitialized) {
3550 throw new Error("initializeWasm() must be awaited first!");
3552 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res);
3553 // debug statements here
3555 // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
3556 export function CResult_PayeePubKeyErrorZ_ok(o: number): number {
3557 if(!isWasmInitialized) {
3558 throw new Error("initializeWasm() must be awaited first!");
3560 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_ok(o);
3561 return nativeResponseValue;
3563 // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
3564 export function CResult_PayeePubKeyErrorZ_err(e: Secp256k1Error): number {
3565 if(!isWasmInitialized) {
3566 throw new Error("initializeWasm() must be awaited first!");
3568 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_err(e);
3569 return nativeResponseValue;
3571 // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
3572 export function CResult_PayeePubKeyErrorZ_free(_res: number): void {
3573 if(!isWasmInitialized) {
3574 throw new Error("initializeWasm() must be awaited first!");
3576 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_free(_res);
3577 // debug statements here
3579 // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
3580 export function CResult_PayeePubKeyErrorZ_clone(orig: number): number {
3581 if(!isWasmInitialized) {
3582 throw new Error("initializeWasm() must be awaited first!");
3584 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone(orig);
3585 return nativeResponseValue;
3587 // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3588 export function CVec_RouteHintZ_free(_res: number[]): void {
3589 if(!isWasmInitialized) {
3590 throw new Error("initializeWasm() must be awaited first!");
3592 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3593 // debug statements here
3595 // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
3596 export function CResult_PositiveTimestampCreationErrorZ_ok(o: number): number {
3597 if(!isWasmInitialized) {
3598 throw new Error("initializeWasm() must be awaited first!");
3600 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_ok(o);
3601 return nativeResponseValue;
3603 // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
3604 export function CResult_PositiveTimestampCreationErrorZ_err(e: CreationError): number {
3605 if(!isWasmInitialized) {
3606 throw new Error("initializeWasm() must be awaited first!");
3608 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_err(e);
3609 return nativeResponseValue;
3611 // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
3612 export function CResult_PositiveTimestampCreationErrorZ_free(_res: number): void {
3613 if(!isWasmInitialized) {
3614 throw new Error("initializeWasm() must be awaited first!");
3616 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_free(_res);
3617 // debug statements here
3619 // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
3620 export function CResult_PositiveTimestampCreationErrorZ_clone(orig: number): number {
3621 if(!isWasmInitialized) {
3622 throw new Error("initializeWasm() must be awaited first!");
3624 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone(orig);
3625 return nativeResponseValue;
3627 // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
3628 export function CResult_NoneSemanticErrorZ_ok(): number {
3629 if(!isWasmInitialized) {
3630 throw new Error("initializeWasm() must be awaited first!");
3632 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_ok();
3633 return nativeResponseValue;
3635 // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
3636 export function CResult_NoneSemanticErrorZ_err(e: SemanticError): number {
3637 if(!isWasmInitialized) {
3638 throw new Error("initializeWasm() must be awaited first!");
3640 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_err(e);
3641 return nativeResponseValue;
3643 // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
3644 export function CResult_NoneSemanticErrorZ_free(_res: number): void {
3645 if(!isWasmInitialized) {
3646 throw new Error("initializeWasm() must be awaited first!");
3648 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_free(_res);
3649 // debug statements here
3651 // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
3652 export function CResult_NoneSemanticErrorZ_clone(orig: number): number {
3653 if(!isWasmInitialized) {
3654 throw new Error("initializeWasm() must be awaited first!");
3656 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone(orig);
3657 return nativeResponseValue;
3659 // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
3660 export function CResult_InvoiceSemanticErrorZ_ok(o: number): number {
3661 if(!isWasmInitialized) {
3662 throw new Error("initializeWasm() must be awaited first!");
3664 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_ok(o);
3665 return nativeResponseValue;
3667 // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
3668 export function CResult_InvoiceSemanticErrorZ_err(e: SemanticError): number {
3669 if(!isWasmInitialized) {
3670 throw new Error("initializeWasm() must be awaited first!");
3672 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_err(e);
3673 return nativeResponseValue;
3675 // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
3676 export function CResult_InvoiceSemanticErrorZ_free(_res: number): void {
3677 if(!isWasmInitialized) {
3678 throw new Error("initializeWasm() must be awaited first!");
3680 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_free(_res);
3681 // debug statements here
3683 // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
3684 export function CResult_InvoiceSemanticErrorZ_clone(orig: number): number {
3685 if(!isWasmInitialized) {
3686 throw new Error("initializeWasm() must be awaited first!");
3688 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone(orig);
3689 return nativeResponseValue;
3691 // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
3692 export function CResult_DescriptionCreationErrorZ_ok(o: number): number {
3693 if(!isWasmInitialized) {
3694 throw new Error("initializeWasm() must be awaited first!");
3696 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_ok(o);
3697 return nativeResponseValue;
3699 // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
3700 export function CResult_DescriptionCreationErrorZ_err(e: CreationError): number {
3701 if(!isWasmInitialized) {
3702 throw new Error("initializeWasm() must be awaited first!");
3704 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_err(e);
3705 return nativeResponseValue;
3707 // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
3708 export function CResult_DescriptionCreationErrorZ_free(_res: number): void {
3709 if(!isWasmInitialized) {
3710 throw new Error("initializeWasm() must be awaited first!");
3712 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_free(_res);
3713 // debug statements here
3715 // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
3716 export function CResult_DescriptionCreationErrorZ_clone(orig: number): number {
3717 if(!isWasmInitialized) {
3718 throw new Error("initializeWasm() must be awaited first!");
3720 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone(orig);
3721 return nativeResponseValue;
3723 // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
3724 export function CResult_ExpiryTimeCreationErrorZ_ok(o: number): number {
3725 if(!isWasmInitialized) {
3726 throw new Error("initializeWasm() must be awaited first!");
3728 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_ok(o);
3729 return nativeResponseValue;
3731 // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
3732 export function CResult_ExpiryTimeCreationErrorZ_err(e: CreationError): number {
3733 if(!isWasmInitialized) {
3734 throw new Error("initializeWasm() must be awaited first!");
3736 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_err(e);
3737 return nativeResponseValue;
3739 // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
3740 export function CResult_ExpiryTimeCreationErrorZ_free(_res: number): void {
3741 if(!isWasmInitialized) {
3742 throw new Error("initializeWasm() must be awaited first!");
3744 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_free(_res);
3745 // debug statements here
3747 // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
3748 export function CResult_ExpiryTimeCreationErrorZ_clone(orig: number): number {
3749 if(!isWasmInitialized) {
3750 throw new Error("initializeWasm() must be awaited first!");
3752 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone(orig);
3753 return nativeResponseValue;
3755 // struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_ok(struct LDKRouteHint o);
3756 export function CResult_RouteHintCreationErrorZ_ok(o: number): number {
3757 if(!isWasmInitialized) {
3758 throw new Error("initializeWasm() must be awaited first!");
3760 const nativeResponseValue = wasm.CResult_RouteHintCreationErrorZ_ok(o);
3761 return nativeResponseValue;
3763 // struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_err(enum LDKCreationError e);
3764 export function CResult_RouteHintCreationErrorZ_err(e: CreationError): number {
3765 if(!isWasmInitialized) {
3766 throw new Error("initializeWasm() must be awaited first!");
3768 const nativeResponseValue = wasm.CResult_RouteHintCreationErrorZ_err(e);
3769 return nativeResponseValue;
3771 // void CResult_RouteHintCreationErrorZ_free(struct LDKCResult_RouteHintCreationErrorZ _res);
3772 export function CResult_RouteHintCreationErrorZ_free(_res: number): void {
3773 if(!isWasmInitialized) {
3774 throw new Error("initializeWasm() must be awaited first!");
3776 const nativeResponseValue = wasm.CResult_RouteHintCreationErrorZ_free(_res);
3777 // debug statements here
3779 // struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_clone(const struct LDKCResult_RouteHintCreationErrorZ *NONNULL_PTR orig);
3780 export function CResult_RouteHintCreationErrorZ_clone(orig: number): number {
3781 if(!isWasmInitialized) {
3782 throw new Error("initializeWasm() must be awaited first!");
3784 const nativeResponseValue = wasm.CResult_RouteHintCreationErrorZ_clone(orig);
3785 return nativeResponseValue;
3787 // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
3788 export function CResult_StringErrorZ_ok(o: String): number {
3789 if(!isWasmInitialized) {
3790 throw new Error("initializeWasm() must be awaited first!");
3792 const nativeResponseValue = wasm.CResult_StringErrorZ_ok(o);
3793 return nativeResponseValue;
3795 // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
3796 export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
3797 if(!isWasmInitialized) {
3798 throw new Error("initializeWasm() must be awaited first!");
3800 const nativeResponseValue = wasm.CResult_StringErrorZ_err(e);
3801 return nativeResponseValue;
3803 // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
3804 export function CResult_StringErrorZ_free(_res: number): void {
3805 if(!isWasmInitialized) {
3806 throw new Error("initializeWasm() must be awaited first!");
3808 const nativeResponseValue = wasm.CResult_StringErrorZ_free(_res);
3809 // debug statements here
3811 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
3812 export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
3813 if(!isWasmInitialized) {
3814 throw new Error("initializeWasm() must be awaited first!");
3816 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
3817 return nativeResponseValue;
3819 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3820 export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
3821 if(!isWasmInitialized) {
3822 throw new Error("initializeWasm() must be awaited first!");
3824 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
3825 return nativeResponseValue;
3827 // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
3828 export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
3829 if(!isWasmInitialized) {
3830 throw new Error("initializeWasm() must be awaited first!");
3832 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
3833 // debug statements here
3835 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
3836 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
3837 if(!isWasmInitialized) {
3838 throw new Error("initializeWasm() must be awaited first!");
3840 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
3841 return nativeResponseValue;
3843 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
3844 export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
3845 if(!isWasmInitialized) {
3846 throw new Error("initializeWasm() must be awaited first!");
3848 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
3849 return nativeResponseValue;
3851 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3852 export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
3853 if(!isWasmInitialized) {
3854 throw new Error("initializeWasm() must be awaited first!");
3856 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
3857 return nativeResponseValue;
3859 // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
3860 export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
3861 if(!isWasmInitialized) {
3862 throw new Error("initializeWasm() must be awaited first!");
3864 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
3865 // debug statements here
3867 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
3868 export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
3869 if(!isWasmInitialized) {
3870 throw new Error("initializeWasm() must be awaited first!");
3872 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
3873 return nativeResponseValue;
3875 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
3876 export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
3877 if(!isWasmInitialized) {
3878 throw new Error("initializeWasm() must be awaited first!");
3880 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
3881 return nativeResponseValue;
3883 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
3884 export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
3885 if(!isWasmInitialized) {
3886 throw new Error("initializeWasm() must be awaited first!");
3888 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
3889 return nativeResponseValue;
3891 // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
3892 export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
3893 if(!isWasmInitialized) {
3894 throw new Error("initializeWasm() must be awaited first!");
3896 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
3897 // debug statements here
3899 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
3900 export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
3901 if(!isWasmInitialized) {
3902 throw new Error("initializeWasm() must be awaited first!");
3904 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
3905 return nativeResponseValue;
3907 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
3908 export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
3909 if(!isWasmInitialized) {
3910 throw new Error("initializeWasm() must be awaited first!");
3912 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
3913 return nativeResponseValue;
3915 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
3916 export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
3917 if(!isWasmInitialized) {
3918 throw new Error("initializeWasm() must be awaited first!");
3920 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
3921 return nativeResponseValue;
3923 // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
3924 export function C2Tuple_OutPointScriptZ_free(_res: number): void {
3925 if(!isWasmInitialized) {
3926 throw new Error("initializeWasm() must be awaited first!");
3928 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
3929 // debug statements here
3931 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
3932 export function C2Tuple_u32ScriptZ_clone(orig: number): number {
3933 if(!isWasmInitialized) {
3934 throw new Error("initializeWasm() must be awaited first!");
3936 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
3937 return nativeResponseValue;
3939 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
3940 export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
3941 if(!isWasmInitialized) {
3942 throw new Error("initializeWasm() must be awaited first!");
3944 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
3945 return nativeResponseValue;
3947 // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
3948 export function C2Tuple_u32ScriptZ_free(_res: number): void {
3949 if(!isWasmInitialized) {
3950 throw new Error("initializeWasm() must be awaited first!");
3952 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
3953 // debug statements here
3955 // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
3956 export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
3957 if(!isWasmInitialized) {
3958 throw new Error("initializeWasm() must be awaited first!");
3960 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
3961 // debug statements here
3963 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
3964 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig: number): number {
3965 if(!isWasmInitialized) {
3966 throw new Error("initializeWasm() must be awaited first!");
3968 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig);
3969 return nativeResponseValue;
3971 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
3972 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
3973 if(!isWasmInitialized) {
3974 throw new Error("initializeWasm() must be awaited first!");
3976 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
3977 return nativeResponseValue;
3979 // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
3980 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
3981 if(!isWasmInitialized) {
3982 throw new Error("initializeWasm() must be awaited first!");
3984 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
3985 // debug statements here
3987 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
3988 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
3989 if(!isWasmInitialized) {
3990 throw new Error("initializeWasm() must be awaited first!");
3992 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
3993 // debug statements here
3995 // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
3996 export function CVec_EventZ_free(_res: number[]): void {
3997 if(!isWasmInitialized) {
3998 throw new Error("initializeWasm() must be awaited first!");
4000 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
4001 // debug statements here
4003 // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
4004 export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
4005 if(!isWasmInitialized) {
4006 throw new Error("initializeWasm() must be awaited first!");
4008 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
4009 // debug statements here
4011 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
4012 export function C2Tuple_u32TxOutZ_clone(orig: number): number {
4013 if(!isWasmInitialized) {
4014 throw new Error("initializeWasm() must be awaited first!");
4016 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
4017 return nativeResponseValue;
4019 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
4020 export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
4021 if(!isWasmInitialized) {
4022 throw new Error("initializeWasm() must be awaited first!");
4024 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
4025 return nativeResponseValue;
4027 // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
4028 export function C2Tuple_u32TxOutZ_free(_res: number): void {
4029 if(!isWasmInitialized) {
4030 throw new Error("initializeWasm() must be awaited first!");
4032 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
4033 // debug statements here
4035 // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
4036 export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
4037 if(!isWasmInitialized) {
4038 throw new Error("initializeWasm() must be awaited first!");
4040 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
4041 // debug statements here
4043 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
4044 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
4045 if(!isWasmInitialized) {
4046 throw new Error("initializeWasm() must be awaited first!");
4048 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
4049 return nativeResponseValue;
4051 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
4052 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
4053 if(!isWasmInitialized) {
4054 throw new Error("initializeWasm() must be awaited first!");
4056 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
4057 return nativeResponseValue;
4059 // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
4060 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
4061 if(!isWasmInitialized) {
4062 throw new Error("initializeWasm() must be awaited first!");
4064 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
4065 // debug statements here
4067 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
4068 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
4069 if(!isWasmInitialized) {
4070 throw new Error("initializeWasm() must be awaited first!");
4072 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
4073 // debug statements here
4075 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
4076 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
4077 if(!isWasmInitialized) {
4078 throw new Error("initializeWasm() must be awaited first!");
4080 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
4081 return nativeResponseValue;
4083 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
4084 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
4085 if(!isWasmInitialized) {
4086 throw new Error("initializeWasm() must be awaited first!");
4088 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
4089 return nativeResponseValue;
4091 // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
4092 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
4093 if(!isWasmInitialized) {
4094 throw new Error("initializeWasm() must be awaited first!");
4096 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
4097 // debug statements here
4099 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
4100 export function CResult_boolLightningErrorZ_ok(o: boolean): number {
4101 if(!isWasmInitialized) {
4102 throw new Error("initializeWasm() must be awaited first!");
4104 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
4105 return nativeResponseValue;
4107 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
4108 export function CResult_boolLightningErrorZ_err(e: number): number {
4109 if(!isWasmInitialized) {
4110 throw new Error("initializeWasm() must be awaited first!");
4112 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
4113 return nativeResponseValue;
4115 // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
4116 export function CResult_boolLightningErrorZ_free(_res: number): void {
4117 if(!isWasmInitialized) {
4118 throw new Error("initializeWasm() must be awaited first!");
4120 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
4121 // debug statements here
4123 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
4124 export function CResult_boolLightningErrorZ_clone(orig: number): number {
4125 if(!isWasmInitialized) {
4126 throw new Error("initializeWasm() must be awaited first!");
4128 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
4129 return nativeResponseValue;
4131 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
4132 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
4133 if(!isWasmInitialized) {
4134 throw new Error("initializeWasm() must be awaited first!");
4136 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
4137 return nativeResponseValue;
4139 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
4140 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
4141 if(!isWasmInitialized) {
4142 throw new Error("initializeWasm() must be awaited first!");
4144 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
4145 return nativeResponseValue;
4147 // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
4148 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
4149 if(!isWasmInitialized) {
4150 throw new Error("initializeWasm() must be awaited first!");
4152 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
4153 // debug statements here
4155 // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
4156 export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
4157 if(!isWasmInitialized) {
4158 throw new Error("initializeWasm() must be awaited first!");
4160 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
4161 // debug statements here
4163 // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
4164 export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
4165 if(!isWasmInitialized) {
4166 throw new Error("initializeWasm() must be awaited first!");
4168 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
4169 // debug statements here
4171 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
4172 export function CResult_NoneLightningErrorZ_ok(): number {
4173 if(!isWasmInitialized) {
4174 throw new Error("initializeWasm() must be awaited first!");
4176 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
4177 return nativeResponseValue;
4179 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
4180 export function CResult_NoneLightningErrorZ_err(e: number): number {
4181 if(!isWasmInitialized) {
4182 throw new Error("initializeWasm() must be awaited first!");
4184 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
4185 return nativeResponseValue;
4187 // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
4188 export function CResult_NoneLightningErrorZ_free(_res: number): void {
4189 if(!isWasmInitialized) {
4190 throw new Error("initializeWasm() must be awaited first!");
4192 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
4193 // debug statements here
4195 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
4196 export function CResult_NoneLightningErrorZ_clone(orig: number): number {
4197 if(!isWasmInitialized) {
4198 throw new Error("initializeWasm() must be awaited first!");
4200 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
4201 return nativeResponseValue;
4203 // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
4204 export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
4205 if(!isWasmInitialized) {
4206 throw new Error("initializeWasm() must be awaited first!");
4208 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
4209 // debug statements here
4211 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
4212 export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
4213 if(!isWasmInitialized) {
4214 throw new Error("initializeWasm() must be awaited first!");
4216 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
4217 return nativeResponseValue;
4219 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
4220 export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
4221 if(!isWasmInitialized) {
4222 throw new Error("initializeWasm() must be awaited first!");
4224 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
4225 return nativeResponseValue;
4227 // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
4228 export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
4229 if(!isWasmInitialized) {
4230 throw new Error("initializeWasm() must be awaited first!");
4232 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
4233 // debug statements here
4235 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
4236 export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
4237 if(!isWasmInitialized) {
4238 throw new Error("initializeWasm() must be awaited first!");
4240 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
4241 return nativeResponseValue;
4243 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
4244 export function CResult_NonePeerHandleErrorZ_ok(): number {
4245 if(!isWasmInitialized) {
4246 throw new Error("initializeWasm() must be awaited first!");
4248 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
4249 return nativeResponseValue;
4251 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
4252 export function CResult_NonePeerHandleErrorZ_err(e: number): number {
4253 if(!isWasmInitialized) {
4254 throw new Error("initializeWasm() must be awaited first!");
4256 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
4257 return nativeResponseValue;
4259 // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
4260 export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
4261 if(!isWasmInitialized) {
4262 throw new Error("initializeWasm() must be awaited first!");
4264 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
4265 // debug statements here
4267 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
4268 export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
4269 if(!isWasmInitialized) {
4270 throw new Error("initializeWasm() must be awaited first!");
4272 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
4273 return nativeResponseValue;
4275 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
4276 export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
4277 if(!isWasmInitialized) {
4278 throw new Error("initializeWasm() must be awaited first!");
4280 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
4281 return nativeResponseValue;
4283 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
4284 export function CResult_boolPeerHandleErrorZ_err(e: number): number {
4285 if(!isWasmInitialized) {
4286 throw new Error("initializeWasm() must be awaited first!");
4288 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
4289 return nativeResponseValue;
4291 // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
4292 export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
4293 if(!isWasmInitialized) {
4294 throw new Error("initializeWasm() must be awaited first!");
4296 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
4297 // debug statements here
4299 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
4300 export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
4301 if(!isWasmInitialized) {
4302 throw new Error("initializeWasm() must be awaited first!");
4304 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
4305 return nativeResponseValue;
4307 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
4308 export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
4309 if(!isWasmInitialized) {
4310 throw new Error("initializeWasm() must be awaited first!");
4312 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
4313 return nativeResponseValue;
4315 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
4316 export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
4317 if(!isWasmInitialized) {
4318 throw new Error("initializeWasm() must be awaited first!");
4320 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
4321 return nativeResponseValue;
4323 // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
4324 export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
4325 if(!isWasmInitialized) {
4326 throw new Error("initializeWasm() must be awaited first!");
4328 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
4329 // debug statements here
4331 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
4332 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
4333 if(!isWasmInitialized) {
4334 throw new Error("initializeWasm() must be awaited first!");
4336 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
4337 return nativeResponseValue;
4339 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
4340 export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
4341 if(!isWasmInitialized) {
4342 throw new Error("initializeWasm() must be awaited first!");
4344 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
4345 return nativeResponseValue;
4347 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
4348 export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
4349 if(!isWasmInitialized) {
4350 throw new Error("initializeWasm() must be awaited first!");
4352 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
4353 return nativeResponseValue;
4355 // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
4356 export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
4357 if(!isWasmInitialized) {
4358 throw new Error("initializeWasm() must be awaited first!");
4360 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
4361 // debug statements here
4363 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
4364 export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
4365 if(!isWasmInitialized) {
4366 throw new Error("initializeWasm() must be awaited first!");
4368 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
4369 return nativeResponseValue;
4371 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
4372 export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
4373 if(!isWasmInitialized) {
4374 throw new Error("initializeWasm() must be awaited first!");
4376 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
4377 return nativeResponseValue;
4379 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
4380 export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
4381 if(!isWasmInitialized) {
4382 throw new Error("initializeWasm() must be awaited first!");
4384 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
4385 return nativeResponseValue;
4387 // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
4388 export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
4389 if(!isWasmInitialized) {
4390 throw new Error("initializeWasm() must be awaited first!");
4392 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
4393 // debug statements here
4395 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
4396 export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
4397 if(!isWasmInitialized) {
4398 throw new Error("initializeWasm() must be awaited first!");
4400 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
4401 return nativeResponseValue;
4403 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
4404 export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
4405 if(!isWasmInitialized) {
4406 throw new Error("initializeWasm() must be awaited first!");
4408 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
4409 return nativeResponseValue;
4411 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
4412 export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
4413 if(!isWasmInitialized) {
4414 throw new Error("initializeWasm() must be awaited first!");
4416 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
4417 return nativeResponseValue;
4419 // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
4420 export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
4421 if(!isWasmInitialized) {
4422 throw new Error("initializeWasm() must be awaited first!");
4424 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
4425 // debug statements here
4427 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
4428 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
4429 if(!isWasmInitialized) {
4430 throw new Error("initializeWasm() must be awaited first!");
4432 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
4433 return nativeResponseValue;
4435 // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
4436 export function CVec_u64Z_free(_res: number[]): void {
4437 if(!isWasmInitialized) {
4438 throw new Error("initializeWasm() must be awaited first!");
4440 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
4441 // debug statements here
4443 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
4444 export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
4445 if(!isWasmInitialized) {
4446 throw new Error("initializeWasm() must be awaited first!");
4448 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
4449 return nativeResponseValue;
4451 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
4452 export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
4453 if(!isWasmInitialized) {
4454 throw new Error("initializeWasm() must be awaited first!");
4456 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
4457 return nativeResponseValue;
4459 // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
4460 export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
4461 if(!isWasmInitialized) {
4462 throw new Error("initializeWasm() must be awaited first!");
4464 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
4465 // debug statements here
4467 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
4468 export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
4469 if(!isWasmInitialized) {
4470 throw new Error("initializeWasm() must be awaited first!");
4472 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
4473 return nativeResponseValue;
4475 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
4476 export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
4477 if(!isWasmInitialized) {
4478 throw new Error("initializeWasm() must be awaited first!");
4480 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
4481 return nativeResponseValue;
4483 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
4484 export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
4485 if(!isWasmInitialized) {
4486 throw new Error("initializeWasm() must be awaited first!");
4488 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
4489 return nativeResponseValue;
4491 // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
4492 export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
4493 if(!isWasmInitialized) {
4494 throw new Error("initializeWasm() must be awaited first!");
4496 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
4497 // debug statements here
4499 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
4500 export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
4501 if(!isWasmInitialized) {
4502 throw new Error("initializeWasm() must be awaited first!");
4504 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
4505 return nativeResponseValue;
4507 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
4508 export function CResult_NetAddressu8Z_ok(o: number): number {
4509 if(!isWasmInitialized) {
4510 throw new Error("initializeWasm() must be awaited first!");
4512 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
4513 return nativeResponseValue;
4515 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
4516 export function CResult_NetAddressu8Z_err(e: number): number {
4517 if(!isWasmInitialized) {
4518 throw new Error("initializeWasm() must be awaited first!");
4520 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
4521 return nativeResponseValue;
4523 // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
4524 export function CResult_NetAddressu8Z_free(_res: number): void {
4525 if(!isWasmInitialized) {
4526 throw new Error("initializeWasm() must be awaited first!");
4528 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
4529 // debug statements here
4531 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
4532 export function CResult_NetAddressu8Z_clone(orig: number): number {
4533 if(!isWasmInitialized) {
4534 throw new Error("initializeWasm() must be awaited first!");
4536 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
4537 return nativeResponseValue;
4539 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
4540 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
4541 if(!isWasmInitialized) {
4542 throw new Error("initializeWasm() must be awaited first!");
4544 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
4545 return nativeResponseValue;
4547 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
4548 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
4549 if(!isWasmInitialized) {
4550 throw new Error("initializeWasm() must be awaited first!");
4552 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
4553 return nativeResponseValue;
4555 // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
4556 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
4557 if(!isWasmInitialized) {
4558 throw new Error("initializeWasm() must be awaited first!");
4560 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
4561 // debug statements here
4563 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
4564 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
4565 if(!isWasmInitialized) {
4566 throw new Error("initializeWasm() must be awaited first!");
4568 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
4569 return nativeResponseValue;
4571 // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
4572 export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
4573 if(!isWasmInitialized) {
4574 throw new Error("initializeWasm() must be awaited first!");
4576 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_ok(o);
4577 return nativeResponseValue;
4579 // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
4580 export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
4581 if(!isWasmInitialized) {
4582 throw new Error("initializeWasm() must be awaited first!");
4584 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_err(e);
4585 return nativeResponseValue;
4587 // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
4588 export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
4589 if(!isWasmInitialized) {
4590 throw new Error("initializeWasm() must be awaited first!");
4592 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_free(_res);
4593 // debug statements here
4595 // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
4596 export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
4597 if(!isWasmInitialized) {
4598 throw new Error("initializeWasm() must be awaited first!");
4600 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone(orig);
4601 return nativeResponseValue;
4603 // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
4604 export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
4605 if(!isWasmInitialized) {
4606 throw new Error("initializeWasm() must be awaited first!");
4608 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
4609 // debug statements here
4611 // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
4612 export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
4613 if(!isWasmInitialized) {
4614 throw new Error("initializeWasm() must be awaited first!");
4616 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
4617 // debug statements here
4619 // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
4620 export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
4621 if(!isWasmInitialized) {
4622 throw new Error("initializeWasm() must be awaited first!");
4624 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
4625 // debug statements here
4627 // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
4628 export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
4629 if(!isWasmInitialized) {
4630 throw new Error("initializeWasm() must be awaited first!");
4632 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
4633 // debug statements here
4635 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
4636 export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
4637 if(!isWasmInitialized) {
4638 throw new Error("initializeWasm() must be awaited first!");
4640 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
4641 return nativeResponseValue;
4643 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
4644 export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
4645 if(!isWasmInitialized) {
4646 throw new Error("initializeWasm() must be awaited first!");
4648 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
4649 return nativeResponseValue;
4651 // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
4652 export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
4653 if(!isWasmInitialized) {
4654 throw new Error("initializeWasm() must be awaited first!");
4656 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
4657 // debug statements here
4659 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
4660 export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
4661 if(!isWasmInitialized) {
4662 throw new Error("initializeWasm() must be awaited first!");
4664 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
4665 return nativeResponseValue;
4667 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
4668 export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
4669 if(!isWasmInitialized) {
4670 throw new Error("initializeWasm() must be awaited first!");
4672 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
4673 return nativeResponseValue;
4675 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
4676 export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
4677 if(!isWasmInitialized) {
4678 throw new Error("initializeWasm() must be awaited first!");
4680 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
4681 return nativeResponseValue;
4683 // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
4684 export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
4685 if(!isWasmInitialized) {
4686 throw new Error("initializeWasm() must be awaited first!");
4688 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
4689 // debug statements here
4691 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
4692 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
4693 if(!isWasmInitialized) {
4694 throw new Error("initializeWasm() must be awaited first!");
4696 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
4697 return nativeResponseValue;
4699 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
4700 export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
4701 if(!isWasmInitialized) {
4702 throw new Error("initializeWasm() must be awaited first!");
4704 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
4705 return nativeResponseValue;
4707 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
4708 export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
4709 if(!isWasmInitialized) {
4710 throw new Error("initializeWasm() must be awaited first!");
4712 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
4713 return nativeResponseValue;
4715 // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
4716 export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
4717 if(!isWasmInitialized) {
4718 throw new Error("initializeWasm() must be awaited first!");
4720 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
4721 // debug statements here
4723 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
4724 export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
4725 if(!isWasmInitialized) {
4726 throw new Error("initializeWasm() must be awaited first!");
4728 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
4729 return nativeResponseValue;
4731 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
4732 export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
4733 if(!isWasmInitialized) {
4734 throw new Error("initializeWasm() must be awaited first!");
4736 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
4737 return nativeResponseValue;
4739 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
4740 export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
4741 if(!isWasmInitialized) {
4742 throw new Error("initializeWasm() must be awaited first!");
4744 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
4745 return nativeResponseValue;
4747 // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
4748 export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
4749 if(!isWasmInitialized) {
4750 throw new Error("initializeWasm() must be awaited first!");
4752 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
4753 // debug statements here
4755 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
4756 export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
4757 if(!isWasmInitialized) {
4758 throw new Error("initializeWasm() must be awaited first!");
4760 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
4761 return nativeResponseValue;
4763 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
4764 export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
4765 if(!isWasmInitialized) {
4766 throw new Error("initializeWasm() must be awaited first!");
4768 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
4769 return nativeResponseValue;
4771 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
4772 export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
4773 if(!isWasmInitialized) {
4774 throw new Error("initializeWasm() must be awaited first!");
4776 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
4777 return nativeResponseValue;
4779 // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
4780 export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
4781 if(!isWasmInitialized) {
4782 throw new Error("initializeWasm() must be awaited first!");
4784 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
4785 // debug statements here
4787 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
4788 export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
4789 if(!isWasmInitialized) {
4790 throw new Error("initializeWasm() must be awaited first!");
4792 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
4793 return nativeResponseValue;
4795 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
4796 export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
4797 if(!isWasmInitialized) {
4798 throw new Error("initializeWasm() must be awaited first!");
4800 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
4801 return nativeResponseValue;
4803 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
4804 export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
4805 if(!isWasmInitialized) {
4806 throw new Error("initializeWasm() must be awaited first!");
4808 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
4809 return nativeResponseValue;
4811 // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
4812 export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
4813 if(!isWasmInitialized) {
4814 throw new Error("initializeWasm() must be awaited first!");
4816 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
4817 // debug statements here
4819 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
4820 export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
4821 if(!isWasmInitialized) {
4822 throw new Error("initializeWasm() must be awaited first!");
4824 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
4825 return nativeResponseValue;
4827 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
4828 export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
4829 if(!isWasmInitialized) {
4830 throw new Error("initializeWasm() must be awaited first!");
4832 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
4833 return nativeResponseValue;
4835 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
4836 export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
4837 if(!isWasmInitialized) {
4838 throw new Error("initializeWasm() must be awaited first!");
4840 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
4841 return nativeResponseValue;
4843 // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
4844 export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
4845 if(!isWasmInitialized) {
4846 throw new Error("initializeWasm() must be awaited first!");
4848 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
4849 // debug statements here
4851 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
4852 export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
4853 if(!isWasmInitialized) {
4854 throw new Error("initializeWasm() must be awaited first!");
4856 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
4857 return nativeResponseValue;
4859 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
4860 export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
4861 if(!isWasmInitialized) {
4862 throw new Error("initializeWasm() must be awaited first!");
4864 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
4865 return nativeResponseValue;
4867 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
4868 export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
4869 if(!isWasmInitialized) {
4870 throw new Error("initializeWasm() must be awaited first!");
4872 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
4873 return nativeResponseValue;
4875 // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
4876 export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
4877 if(!isWasmInitialized) {
4878 throw new Error("initializeWasm() must be awaited first!");
4880 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
4881 // debug statements here
4883 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
4884 export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
4885 if(!isWasmInitialized) {
4886 throw new Error("initializeWasm() must be awaited first!");
4888 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
4889 return nativeResponseValue;
4891 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
4892 export function CResult_InitDecodeErrorZ_ok(o: number): number {
4893 if(!isWasmInitialized) {
4894 throw new Error("initializeWasm() must be awaited first!");
4896 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
4897 return nativeResponseValue;
4899 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
4900 export function CResult_InitDecodeErrorZ_err(e: number): number {
4901 if(!isWasmInitialized) {
4902 throw new Error("initializeWasm() must be awaited first!");
4904 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
4905 return nativeResponseValue;
4907 // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
4908 export function CResult_InitDecodeErrorZ_free(_res: number): void {
4909 if(!isWasmInitialized) {
4910 throw new Error("initializeWasm() must be awaited first!");
4912 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
4913 // debug statements here
4915 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
4916 export function CResult_InitDecodeErrorZ_clone(orig: number): number {
4917 if(!isWasmInitialized) {
4918 throw new Error("initializeWasm() must be awaited first!");
4920 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
4921 return nativeResponseValue;
4923 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
4924 export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
4925 if(!isWasmInitialized) {
4926 throw new Error("initializeWasm() must be awaited first!");
4928 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
4929 return nativeResponseValue;
4931 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
4932 export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
4933 if(!isWasmInitialized) {
4934 throw new Error("initializeWasm() must be awaited first!");
4936 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
4937 return nativeResponseValue;
4939 // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
4940 export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
4941 if(!isWasmInitialized) {
4942 throw new Error("initializeWasm() must be awaited first!");
4944 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
4945 // debug statements here
4947 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
4948 export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
4949 if(!isWasmInitialized) {
4950 throw new Error("initializeWasm() must be awaited first!");
4952 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
4953 return nativeResponseValue;
4955 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
4956 export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
4957 if(!isWasmInitialized) {
4958 throw new Error("initializeWasm() must be awaited first!");
4960 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
4961 return nativeResponseValue;
4963 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
4964 export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
4965 if(!isWasmInitialized) {
4966 throw new Error("initializeWasm() must be awaited first!");
4968 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
4969 return nativeResponseValue;
4971 // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
4972 export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
4973 if(!isWasmInitialized) {
4974 throw new Error("initializeWasm() must be awaited first!");
4976 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
4977 // debug statements here
4979 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
4980 export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
4981 if(!isWasmInitialized) {
4982 throw new Error("initializeWasm() must be awaited first!");
4984 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
4985 return nativeResponseValue;
4987 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
4988 export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
4989 if(!isWasmInitialized) {
4990 throw new Error("initializeWasm() must be awaited first!");
4992 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
4993 return nativeResponseValue;
4995 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
4996 export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
4997 if(!isWasmInitialized) {
4998 throw new Error("initializeWasm() must be awaited first!");
5000 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
5001 return nativeResponseValue;
5003 // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
5004 export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
5005 if(!isWasmInitialized) {
5006 throw new Error("initializeWasm() must be awaited first!");
5008 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
5009 // debug statements here
5011 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
5012 export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
5013 if(!isWasmInitialized) {
5014 throw new Error("initializeWasm() must be awaited first!");
5016 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
5017 return nativeResponseValue;
5019 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
5020 export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
5021 if(!isWasmInitialized) {
5022 throw new Error("initializeWasm() must be awaited first!");
5024 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
5025 return nativeResponseValue;
5027 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5028 export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
5029 if(!isWasmInitialized) {
5030 throw new Error("initializeWasm() must be awaited first!");
5032 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
5033 return nativeResponseValue;
5035 // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
5036 export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
5037 if(!isWasmInitialized) {
5038 throw new Error("initializeWasm() must be awaited first!");
5040 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
5041 // debug statements here
5043 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
5044 export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
5045 if(!isWasmInitialized) {
5046 throw new Error("initializeWasm() must be awaited first!");
5048 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
5049 return nativeResponseValue;
5051 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
5052 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
5053 if(!isWasmInitialized) {
5054 throw new Error("initializeWasm() must be awaited first!");
5056 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
5057 return nativeResponseValue;
5059 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5060 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
5061 if(!isWasmInitialized) {
5062 throw new Error("initializeWasm() must be awaited first!");
5064 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
5065 return nativeResponseValue;
5067 // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
5068 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
5069 if(!isWasmInitialized) {
5070 throw new Error("initializeWasm() must be awaited first!");
5072 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
5073 // debug statements here
5075 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
5076 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
5077 if(!isWasmInitialized) {
5078 throw new Error("initializeWasm() must be awaited first!");
5080 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
5081 return nativeResponseValue;
5083 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
5084 export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
5085 if(!isWasmInitialized) {
5086 throw new Error("initializeWasm() must be awaited first!");
5088 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
5089 return nativeResponseValue;
5091 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
5092 export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
5093 if(!isWasmInitialized) {
5094 throw new Error("initializeWasm() must be awaited first!");
5096 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
5097 return nativeResponseValue;
5099 // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
5100 export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
5101 if(!isWasmInitialized) {
5102 throw new Error("initializeWasm() must be awaited first!");
5104 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
5105 // debug statements here
5107 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
5108 export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
5109 if(!isWasmInitialized) {
5110 throw new Error("initializeWasm() must be awaited first!");
5112 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
5113 return nativeResponseValue;
5115 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
5116 export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
5117 if(!isWasmInitialized) {
5118 throw new Error("initializeWasm() must be awaited first!");
5120 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
5121 return nativeResponseValue;
5123 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5124 export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
5125 if(!isWasmInitialized) {
5126 throw new Error("initializeWasm() must be awaited first!");
5128 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
5129 return nativeResponseValue;
5131 // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
5132 export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
5133 if(!isWasmInitialized) {
5134 throw new Error("initializeWasm() must be awaited first!");
5136 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
5137 // debug statements here
5139 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
5140 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
5141 if(!isWasmInitialized) {
5142 throw new Error("initializeWasm() must be awaited first!");
5144 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
5145 return nativeResponseValue;
5147 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
5148 export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
5149 if(!isWasmInitialized) {
5150 throw new Error("initializeWasm() must be awaited first!");
5152 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
5153 return nativeResponseValue;
5155 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5156 export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
5157 if(!isWasmInitialized) {
5158 throw new Error("initializeWasm() must be awaited first!");
5160 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
5161 return nativeResponseValue;
5163 // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
5164 export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
5165 if(!isWasmInitialized) {
5166 throw new Error("initializeWasm() must be awaited first!");
5168 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
5169 // debug statements here
5171 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
5172 export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
5173 if(!isWasmInitialized) {
5174 throw new Error("initializeWasm() must be awaited first!");
5176 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
5177 return nativeResponseValue;
5179 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
5180 export function CResult_PingDecodeErrorZ_ok(o: number): number {
5181 if(!isWasmInitialized) {
5182 throw new Error("initializeWasm() must be awaited first!");
5184 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
5185 return nativeResponseValue;
5187 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
5188 export function CResult_PingDecodeErrorZ_err(e: number): number {
5189 if(!isWasmInitialized) {
5190 throw new Error("initializeWasm() must be awaited first!");
5192 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
5193 return nativeResponseValue;
5195 // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
5196 export function CResult_PingDecodeErrorZ_free(_res: number): void {
5197 if(!isWasmInitialized) {
5198 throw new Error("initializeWasm() must be awaited first!");
5200 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
5201 // debug statements here
5203 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
5204 export function CResult_PingDecodeErrorZ_clone(orig: number): number {
5205 if(!isWasmInitialized) {
5206 throw new Error("initializeWasm() must be awaited first!");
5208 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
5209 return nativeResponseValue;
5211 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
5212 export function CResult_PongDecodeErrorZ_ok(o: number): number {
5213 if(!isWasmInitialized) {
5214 throw new Error("initializeWasm() must be awaited first!");
5216 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
5217 return nativeResponseValue;
5219 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
5220 export function CResult_PongDecodeErrorZ_err(e: number): number {
5221 if(!isWasmInitialized) {
5222 throw new Error("initializeWasm() must be awaited first!");
5224 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
5225 return nativeResponseValue;
5227 // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
5228 export function CResult_PongDecodeErrorZ_free(_res: number): void {
5229 if(!isWasmInitialized) {
5230 throw new Error("initializeWasm() must be awaited first!");
5232 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
5233 // debug statements here
5235 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
5236 export function CResult_PongDecodeErrorZ_clone(orig: number): number {
5237 if(!isWasmInitialized) {
5238 throw new Error("initializeWasm() must be awaited first!");
5240 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
5241 return nativeResponseValue;
5243 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
5244 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
5245 if(!isWasmInitialized) {
5246 throw new Error("initializeWasm() must be awaited first!");
5248 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
5249 return nativeResponseValue;
5251 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5252 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
5253 if(!isWasmInitialized) {
5254 throw new Error("initializeWasm() must be awaited first!");
5256 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
5257 return nativeResponseValue;
5259 // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
5260 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
5261 if(!isWasmInitialized) {
5262 throw new Error("initializeWasm() must be awaited first!");
5264 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
5265 // debug statements here
5267 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5268 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
5269 if(!isWasmInitialized) {
5270 throw new Error("initializeWasm() must be awaited first!");
5272 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
5273 return nativeResponseValue;
5275 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
5276 export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
5277 if(!isWasmInitialized) {
5278 throw new Error("initializeWasm() must be awaited first!");
5280 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
5281 return nativeResponseValue;
5283 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5284 export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
5285 if(!isWasmInitialized) {
5286 throw new Error("initializeWasm() must be awaited first!");
5288 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
5289 return nativeResponseValue;
5291 // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
5292 export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
5293 if(!isWasmInitialized) {
5294 throw new Error("initializeWasm() must be awaited first!");
5296 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
5297 // debug statements here
5299 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5300 export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
5301 if(!isWasmInitialized) {
5302 throw new Error("initializeWasm() must be awaited first!");
5304 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
5305 return nativeResponseValue;
5307 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
5308 export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
5309 if(!isWasmInitialized) {
5310 throw new Error("initializeWasm() must be awaited first!");
5312 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
5313 return nativeResponseValue;
5315 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5316 export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
5317 if(!isWasmInitialized) {
5318 throw new Error("initializeWasm() must be awaited first!");
5320 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
5321 return nativeResponseValue;
5323 // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
5324 export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
5325 if(!isWasmInitialized) {
5326 throw new Error("initializeWasm() must be awaited first!");
5328 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
5329 // debug statements here
5331 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
5332 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
5333 if(!isWasmInitialized) {
5334 throw new Error("initializeWasm() must be awaited first!");
5336 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
5337 return nativeResponseValue;
5339 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
5340 export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
5341 if(!isWasmInitialized) {
5342 throw new Error("initializeWasm() must be awaited first!");
5344 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
5345 return nativeResponseValue;
5347 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5348 export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
5349 if(!isWasmInitialized) {
5350 throw new Error("initializeWasm() must be awaited first!");
5352 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
5353 return nativeResponseValue;
5355 // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
5356 export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
5357 if(!isWasmInitialized) {
5358 throw new Error("initializeWasm() must be awaited first!");
5360 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
5361 // debug statements here
5363 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
5364 export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
5365 if(!isWasmInitialized) {
5366 throw new Error("initializeWasm() must be awaited first!");
5368 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
5369 return nativeResponseValue;
5371 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
5372 export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
5373 if(!isWasmInitialized) {
5374 throw new Error("initializeWasm() must be awaited first!");
5376 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
5377 return nativeResponseValue;
5379 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
5380 export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
5381 if(!isWasmInitialized) {
5382 throw new Error("initializeWasm() must be awaited first!");
5384 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
5385 return nativeResponseValue;
5387 // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
5388 export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
5389 if(!isWasmInitialized) {
5390 throw new Error("initializeWasm() must be awaited first!");
5392 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
5393 // debug statements here
5395 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
5396 export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
5397 if(!isWasmInitialized) {
5398 throw new Error("initializeWasm() must be awaited first!");
5400 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
5401 return nativeResponseValue;
5403 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
5404 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
5405 if(!isWasmInitialized) {
5406 throw new Error("initializeWasm() must be awaited first!");
5408 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
5409 return nativeResponseValue;
5411 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5412 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
5413 if(!isWasmInitialized) {
5414 throw new Error("initializeWasm() must be awaited first!");
5416 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
5417 return nativeResponseValue;
5419 // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
5420 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
5421 if(!isWasmInitialized) {
5422 throw new Error("initializeWasm() must be awaited first!");
5424 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
5425 // debug statements here
5427 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5428 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
5429 if(!isWasmInitialized) {
5430 throw new Error("initializeWasm() must be awaited first!");
5432 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
5433 return nativeResponseValue;
5435 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
5436 export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
5437 if(!isWasmInitialized) {
5438 throw new Error("initializeWasm() must be awaited first!");
5440 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
5441 return nativeResponseValue;
5443 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5444 export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
5445 if(!isWasmInitialized) {
5446 throw new Error("initializeWasm() must be awaited first!");
5448 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
5449 return nativeResponseValue;
5451 // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
5452 export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
5453 if(!isWasmInitialized) {
5454 throw new Error("initializeWasm() must be awaited first!");
5456 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
5457 // debug statements here
5459 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5460 export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
5461 if(!isWasmInitialized) {
5462 throw new Error("initializeWasm() must be awaited first!");
5464 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
5465 return nativeResponseValue;
5467 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
5468 export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
5469 if(!isWasmInitialized) {
5470 throw new Error("initializeWasm() must be awaited first!");
5472 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
5473 return nativeResponseValue;
5475 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
5476 export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
5477 if(!isWasmInitialized) {
5478 throw new Error("initializeWasm() must be awaited first!");
5480 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
5481 return nativeResponseValue;
5483 // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
5484 export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
5485 if(!isWasmInitialized) {
5486 throw new Error("initializeWasm() must be awaited first!");
5488 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
5489 // debug statements here
5491 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
5492 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
5493 if(!isWasmInitialized) {
5494 throw new Error("initializeWasm() must be awaited first!");
5496 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
5497 return nativeResponseValue;
5499 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
5500 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
5501 if(!isWasmInitialized) {
5502 throw new Error("initializeWasm() must be awaited first!");
5504 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
5505 return nativeResponseValue;
5507 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
5508 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
5509 if(!isWasmInitialized) {
5510 throw new Error("initializeWasm() must be awaited first!");
5512 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
5513 return nativeResponseValue;
5515 // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
5516 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
5517 if(!isWasmInitialized) {
5518 throw new Error("initializeWasm() must be awaited first!");
5520 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
5521 // debug statements here
5523 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
5524 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
5525 if(!isWasmInitialized) {
5526 throw new Error("initializeWasm() must be awaited first!");
5528 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
5529 return nativeResponseValue;
5531 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
5532 export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
5533 if(!isWasmInitialized) {
5534 throw new Error("initializeWasm() must be awaited first!");
5536 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
5537 return nativeResponseValue;
5539 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
5540 export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
5541 if(!isWasmInitialized) {
5542 throw new Error("initializeWasm() must be awaited first!");
5544 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
5545 return nativeResponseValue;
5547 // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
5548 export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
5549 if(!isWasmInitialized) {
5550 throw new Error("initializeWasm() must be awaited first!");
5552 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
5553 // debug statements here
5555 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
5556 export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
5557 if(!isWasmInitialized) {
5558 throw new Error("initializeWasm() must be awaited first!");
5560 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
5561 return nativeResponseValue;
5563 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
5564 export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
5565 if(!isWasmInitialized) {
5566 throw new Error("initializeWasm() must be awaited first!");
5568 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
5569 return nativeResponseValue;
5571 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
5572 export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
5573 if(!isWasmInitialized) {
5574 throw new Error("initializeWasm() must be awaited first!");
5576 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
5577 return nativeResponseValue;
5579 // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
5580 export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
5581 if(!isWasmInitialized) {
5582 throw new Error("initializeWasm() must be awaited first!");
5584 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
5585 // debug statements here
5587 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
5588 export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
5589 if(!isWasmInitialized) {
5590 throw new Error("initializeWasm() must be awaited first!");
5592 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
5593 return nativeResponseValue;
5595 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
5596 export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
5597 if(!isWasmInitialized) {
5598 throw new Error("initializeWasm() must be awaited first!");
5600 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
5601 return nativeResponseValue;
5603 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
5604 export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
5605 if(!isWasmInitialized) {
5606 throw new Error("initializeWasm() must be awaited first!");
5608 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
5609 return nativeResponseValue;
5611 // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
5612 export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
5613 if(!isWasmInitialized) {
5614 throw new Error("initializeWasm() must be awaited first!");
5616 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
5617 // debug statements here
5619 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
5620 export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
5621 if(!isWasmInitialized) {
5622 throw new Error("initializeWasm() must be awaited first!");
5624 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
5625 return nativeResponseValue;
5627 // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
5628 export function CResult_InvoiceSignOrCreationErrorZ_ok(o: number): number {
5629 if(!isWasmInitialized) {
5630 throw new Error("initializeWasm() must be awaited first!");
5632 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_ok(o);
5633 return nativeResponseValue;
5635 // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
5636 export function CResult_InvoiceSignOrCreationErrorZ_err(e: number): number {
5637 if(!isWasmInitialized) {
5638 throw new Error("initializeWasm() must be awaited first!");
5640 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_err(e);
5641 return nativeResponseValue;
5643 // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
5644 export function CResult_InvoiceSignOrCreationErrorZ_free(_res: number): void {
5645 if(!isWasmInitialized) {
5646 throw new Error("initializeWasm() must be awaited first!");
5648 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_free(_res);
5649 // debug statements here
5651 // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
5652 export function CResult_InvoiceSignOrCreationErrorZ_clone(orig: number): number {
5653 if(!isWasmInitialized) {
5654 throw new Error("initializeWasm() must be awaited first!");
5656 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone(orig);
5657 return nativeResponseValue;
5659 // void Event_free(struct LDKEvent this_ptr);
5660 export function Event_free(this_ptr: number): void {
5661 if(!isWasmInitialized) {
5662 throw new Error("initializeWasm() must be awaited first!");
5664 const nativeResponseValue = wasm.Event_free(this_ptr);
5665 // debug statements here
5667 // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
5668 export function Event_clone(orig: number): number {
5669 if(!isWasmInitialized) {
5670 throw new Error("initializeWasm() must be awaited first!");
5672 const nativeResponseValue = wasm.Event_clone(orig);
5673 return nativeResponseValue;
5675 // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
5676 export function Event_write(obj: number): Uint8Array {
5677 if(!isWasmInitialized) {
5678 throw new Error("initializeWasm() must be awaited first!");
5680 const nativeResponseValue = wasm.Event_write(obj);
5681 return decodeArray(nativeResponseValue);
5683 // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
5684 export function MessageSendEvent_free(this_ptr: number): void {
5685 if(!isWasmInitialized) {
5686 throw new Error("initializeWasm() must be awaited first!");
5688 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
5689 // debug statements here
5691 // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
5692 export function MessageSendEvent_clone(orig: number): number {
5693 if(!isWasmInitialized) {
5694 throw new Error("initializeWasm() must be awaited first!");
5696 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
5697 return nativeResponseValue;
5699 // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
5700 export function MessageSendEventsProvider_free(this_ptr: number): void {
5701 if(!isWasmInitialized) {
5702 throw new Error("initializeWasm() must be awaited first!");
5704 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
5705 // debug statements here
5707 // void EventsProvider_free(struct LDKEventsProvider this_ptr);
5708 export function EventsProvider_free(this_ptr: number): void {
5709 if(!isWasmInitialized) {
5710 throw new Error("initializeWasm() must be awaited first!");
5712 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
5713 // debug statements here
5715 // void EventHandler_free(struct LDKEventHandler this_ptr);
5716 export function EventHandler_free(this_ptr: number): void {
5717 if(!isWasmInitialized) {
5718 throw new Error("initializeWasm() must be awaited first!");
5720 const nativeResponseValue = wasm.EventHandler_free(this_ptr);
5721 // debug statements here
5723 // void APIError_free(struct LDKAPIError this_ptr);
5724 export function APIError_free(this_ptr: number): void {
5725 if(!isWasmInitialized) {
5726 throw new Error("initializeWasm() must be awaited first!");
5728 const nativeResponseValue = wasm.APIError_free(this_ptr);
5729 // debug statements here
5731 // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
5732 export function APIError_clone(orig: number): number {
5733 if(!isWasmInitialized) {
5734 throw new Error("initializeWasm() must be awaited first!");
5736 const nativeResponseValue = wasm.APIError_clone(orig);
5737 return nativeResponseValue;
5739 // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, struct LDKSecretKey sk);
5740 export function sign(msg: Uint8Array, sk: Uint8Array): number {
5741 if(!isWasmInitialized) {
5742 throw new Error("initializeWasm() must be awaited first!");
5744 const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
5745 return nativeResponseValue;
5747 // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
5748 export function recover_pk(msg: Uint8Array, sig: String): number {
5749 if(!isWasmInitialized) {
5750 throw new Error("initializeWasm() must be awaited first!");
5752 const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
5753 return nativeResponseValue;
5755 // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
5756 export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
5757 if(!isWasmInitialized) {
5758 throw new Error("initializeWasm() must be awaited first!");
5760 const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
5761 return nativeResponseValue;
5763 // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
5764 export function Level_clone(orig: number): Level {
5765 if(!isWasmInitialized) {
5766 throw new Error("initializeWasm() must be awaited first!");
5768 const nativeResponseValue = wasm.Level_clone(orig);
5769 return nativeResponseValue;
5771 // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
5772 export function Level_eq(a: number, b: number): boolean {
5773 if(!isWasmInitialized) {
5774 throw new Error("initializeWasm() must be awaited first!");
5776 const nativeResponseValue = wasm.Level_eq(a, b);
5777 return nativeResponseValue;
5779 // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
5780 export function Level_hash(o: number): number {
5781 if(!isWasmInitialized) {
5782 throw new Error("initializeWasm() must be awaited first!");
5784 const nativeResponseValue = wasm.Level_hash(o);
5785 return nativeResponseValue;
5787 // MUST_USE_RES enum LDKLevel Level_max(void);
5788 export function Level_max(): Level {
5789 if(!isWasmInitialized) {
5790 throw new Error("initializeWasm() must be awaited first!");
5792 const nativeResponseValue = wasm.Level_max();
5793 return nativeResponseValue;
5795 // void Logger_free(struct LDKLogger this_ptr);
5796 export function Logger_free(this_ptr: number): void {
5797 if(!isWasmInitialized) {
5798 throw new Error("initializeWasm() must be awaited first!");
5800 const nativeResponseValue = wasm.Logger_free(this_ptr);
5801 // debug statements here
5803 // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
5804 export function ChannelHandshakeConfig_free(this_obj: number): void {
5805 if(!isWasmInitialized) {
5806 throw new Error("initializeWasm() must be awaited first!");
5808 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
5809 // debug statements here
5811 // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
5812 export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
5813 if(!isWasmInitialized) {
5814 throw new Error("initializeWasm() must be awaited first!");
5816 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
5817 return nativeResponseValue;
5819 // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
5820 export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
5821 if(!isWasmInitialized) {
5822 throw new Error("initializeWasm() must be awaited first!");
5824 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
5825 // debug statements here
5827 // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
5828 export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
5829 if(!isWasmInitialized) {
5830 throw new Error("initializeWasm() must be awaited first!");
5832 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
5833 return nativeResponseValue;
5835 // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
5836 export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
5837 if(!isWasmInitialized) {
5838 throw new Error("initializeWasm() must be awaited first!");
5840 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
5841 // debug statements here
5843 // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
5844 export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
5845 if(!isWasmInitialized) {
5846 throw new Error("initializeWasm() must be awaited first!");
5848 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
5849 return nativeResponseValue;
5851 // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
5852 export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
5853 if(!isWasmInitialized) {
5854 throw new Error("initializeWasm() must be awaited first!");
5856 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
5857 // debug statements here
5859 // 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);
5860 export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
5861 if(!isWasmInitialized) {
5862 throw new Error("initializeWasm() must be awaited first!");
5864 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
5865 return nativeResponseValue;
5867 // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
5868 export function ChannelHandshakeConfig_clone(orig: number): number {
5869 if(!isWasmInitialized) {
5870 throw new Error("initializeWasm() must be awaited first!");
5872 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
5873 return nativeResponseValue;
5875 // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
5876 export function ChannelHandshakeConfig_default(): number {
5877 if(!isWasmInitialized) {
5878 throw new Error("initializeWasm() must be awaited first!");
5880 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
5881 return nativeResponseValue;
5883 // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
5884 export function ChannelHandshakeLimits_free(this_obj: number): void {
5885 if(!isWasmInitialized) {
5886 throw new Error("initializeWasm() must be awaited first!");
5888 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
5889 // debug statements here
5891 // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5892 export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
5893 if(!isWasmInitialized) {
5894 throw new Error("initializeWasm() must be awaited first!");
5896 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
5897 return nativeResponseValue;
5899 // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5900 export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
5901 if(!isWasmInitialized) {
5902 throw new Error("initializeWasm() must be awaited first!");
5904 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
5905 // debug statements here
5907 // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5908 export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
5909 if(!isWasmInitialized) {
5910 throw new Error("initializeWasm() must be awaited first!");
5912 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
5913 return nativeResponseValue;
5915 // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5916 export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
5917 if(!isWasmInitialized) {
5918 throw new Error("initializeWasm() must be awaited first!");
5920 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
5921 // debug statements here
5923 // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5924 export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
5925 if(!isWasmInitialized) {
5926 throw new Error("initializeWasm() must be awaited first!");
5928 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
5929 return nativeResponseValue;
5931 // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5932 export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
5933 if(!isWasmInitialized) {
5934 throw new Error("initializeWasm() must be awaited first!");
5936 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
5937 // debug statements here
5939 // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5940 export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
5941 if(!isWasmInitialized) {
5942 throw new Error("initializeWasm() must be awaited first!");
5944 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
5945 return nativeResponseValue;
5947 // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5948 export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
5949 if(!isWasmInitialized) {
5950 throw new Error("initializeWasm() must be awaited first!");
5952 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
5953 // debug statements here
5955 // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5956 export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
5957 if(!isWasmInitialized) {
5958 throw new Error("initializeWasm() must be awaited first!");
5960 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
5961 return nativeResponseValue;
5963 // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
5964 export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
5965 if(!isWasmInitialized) {
5966 throw new Error("initializeWasm() must be awaited first!");
5968 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
5969 // debug statements here
5971 // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5972 export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
5973 if(!isWasmInitialized) {
5974 throw new Error("initializeWasm() must be awaited first!");
5976 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
5977 return nativeResponseValue;
5979 // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
5980 export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
5981 if(!isWasmInitialized) {
5982 throw new Error("initializeWasm() must be awaited first!");
5984 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
5985 // debug statements here
5987 // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5988 export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
5989 if(!isWasmInitialized) {
5990 throw new Error("initializeWasm() must be awaited first!");
5992 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
5993 return nativeResponseValue;
5995 // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
5996 export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
5997 if(!isWasmInitialized) {
5998 throw new Error("initializeWasm() must be awaited first!");
6000 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
6001 // debug statements here
6003 // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6004 export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
6005 if(!isWasmInitialized) {
6006 throw new Error("initializeWasm() must be awaited first!");
6008 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
6009 return nativeResponseValue;
6011 // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
6012 export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
6013 if(!isWasmInitialized) {
6014 throw new Error("initializeWasm() must be awaited first!");
6016 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
6017 // debug statements here
6019 // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
6020 export function ChannelHandshakeLimits_new(min_funding_satoshis_arg: number, max_htlc_minimum_msat_arg: number, min_max_htlc_value_in_flight_msat_arg: number, max_channel_reserve_satoshis_arg: number, min_max_accepted_htlcs_arg: number, max_minimum_depth_arg: number, force_announced_channel_preference_arg: boolean, their_to_self_delay_arg: number): number {
6021 if(!isWasmInitialized) {
6022 throw new Error("initializeWasm() must be awaited first!");
6024 const nativeResponseValue = wasm.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
6025 return nativeResponseValue;
6027 // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
6028 export function ChannelHandshakeLimits_clone(orig: number): number {
6029 if(!isWasmInitialized) {
6030 throw new Error("initializeWasm() must be awaited first!");
6032 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
6033 return nativeResponseValue;
6035 // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
6036 export function ChannelHandshakeLimits_default(): number {
6037 if(!isWasmInitialized) {
6038 throw new Error("initializeWasm() must be awaited first!");
6040 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
6041 return nativeResponseValue;
6043 // void ChannelConfig_free(struct LDKChannelConfig this_obj);
6044 export function ChannelConfig_free(this_obj: number): void {
6045 if(!isWasmInitialized) {
6046 throw new Error("initializeWasm() must be awaited first!");
6048 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
6049 // debug statements here
6051 // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6052 export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
6053 if(!isWasmInitialized) {
6054 throw new Error("initializeWasm() must be awaited first!");
6056 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
6057 return nativeResponseValue;
6059 // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
6060 export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
6061 if(!isWasmInitialized) {
6062 throw new Error("initializeWasm() must be awaited first!");
6064 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
6065 // debug statements here
6067 // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6068 export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
6069 if(!isWasmInitialized) {
6070 throw new Error("initializeWasm() must be awaited first!");
6072 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
6073 return nativeResponseValue;
6075 // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
6076 export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
6077 if(!isWasmInitialized) {
6078 throw new Error("initializeWasm() must be awaited first!");
6080 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
6081 // debug statements here
6083 // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6084 export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
6085 if(!isWasmInitialized) {
6086 throw new Error("initializeWasm() must be awaited first!");
6088 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
6089 return nativeResponseValue;
6091 // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
6092 export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
6093 if(!isWasmInitialized) {
6094 throw new Error("initializeWasm() must be awaited first!");
6096 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
6097 // debug statements here
6099 // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6100 export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
6101 if(!isWasmInitialized) {
6102 throw new Error("initializeWasm() must be awaited first!");
6104 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
6105 return nativeResponseValue;
6107 // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
6108 export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
6109 if(!isWasmInitialized) {
6110 throw new Error("initializeWasm() must be awaited first!");
6112 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
6113 // debug statements here
6115 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
6116 export function ChannelConfig_new(fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
6117 if(!isWasmInitialized) {
6118 throw new Error("initializeWasm() must be awaited first!");
6120 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
6121 return nativeResponseValue;
6123 // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
6124 export function ChannelConfig_clone(orig: number): number {
6125 if(!isWasmInitialized) {
6126 throw new Error("initializeWasm() must be awaited first!");
6128 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
6129 return nativeResponseValue;
6131 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
6132 export function ChannelConfig_default(): number {
6133 if(!isWasmInitialized) {
6134 throw new Error("initializeWasm() must be awaited first!");
6136 const nativeResponseValue = wasm.ChannelConfig_default();
6137 return nativeResponseValue;
6139 // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
6140 export function ChannelConfig_write(obj: number): Uint8Array {
6141 if(!isWasmInitialized) {
6142 throw new Error("initializeWasm() must be awaited first!");
6144 const nativeResponseValue = wasm.ChannelConfig_write(obj);
6145 return decodeArray(nativeResponseValue);
6147 // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
6148 export function ChannelConfig_read(ser: Uint8Array): number {
6149 if(!isWasmInitialized) {
6150 throw new Error("initializeWasm() must be awaited first!");
6152 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
6153 return nativeResponseValue;
6155 // void UserConfig_free(struct LDKUserConfig this_obj);
6156 export function UserConfig_free(this_obj: number): void {
6157 if(!isWasmInitialized) {
6158 throw new Error("initializeWasm() must be awaited first!");
6160 const nativeResponseValue = wasm.UserConfig_free(this_obj);
6161 // debug statements here
6163 // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6164 export function UserConfig_get_own_channel_config(this_ptr: number): number {
6165 if(!isWasmInitialized) {
6166 throw new Error("initializeWasm() must be awaited first!");
6168 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
6169 return nativeResponseValue;
6171 // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
6172 export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
6173 if(!isWasmInitialized) {
6174 throw new Error("initializeWasm() must be awaited first!");
6176 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
6177 // debug statements here
6179 // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6180 export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
6181 if(!isWasmInitialized) {
6182 throw new Error("initializeWasm() must be awaited first!");
6184 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
6185 return nativeResponseValue;
6187 // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
6188 export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
6189 if(!isWasmInitialized) {
6190 throw new Error("initializeWasm() must be awaited first!");
6192 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
6193 // debug statements here
6195 // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6196 export function UserConfig_get_channel_options(this_ptr: number): number {
6197 if(!isWasmInitialized) {
6198 throw new Error("initializeWasm() must be awaited first!");
6200 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
6201 return nativeResponseValue;
6203 // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
6204 export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
6205 if(!isWasmInitialized) {
6206 throw new Error("initializeWasm() must be awaited first!");
6208 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
6209 // debug statements here
6211 // 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);
6212 export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
6213 if(!isWasmInitialized) {
6214 throw new Error("initializeWasm() must be awaited first!");
6216 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
6217 return nativeResponseValue;
6219 // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
6220 export function UserConfig_clone(orig: number): number {
6221 if(!isWasmInitialized) {
6222 throw new Error("initializeWasm() must be awaited first!");
6224 const nativeResponseValue = wasm.UserConfig_clone(orig);
6225 return nativeResponseValue;
6227 // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
6228 export function UserConfig_default(): number {
6229 if(!isWasmInitialized) {
6230 throw new Error("initializeWasm() must be awaited first!");
6232 const nativeResponseValue = wasm.UserConfig_default();
6233 return nativeResponseValue;
6235 // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
6236 export function AccessError_clone(orig: number): AccessError {
6237 if(!isWasmInitialized) {
6238 throw new Error("initializeWasm() must be awaited first!");
6240 const nativeResponseValue = wasm.AccessError_clone(orig);
6241 return nativeResponseValue;
6243 // void Access_free(struct LDKAccess this_ptr);
6244 export function Access_free(this_ptr: number): void {
6245 if(!isWasmInitialized) {
6246 throw new Error("initializeWasm() must be awaited first!");
6248 const nativeResponseValue = wasm.Access_free(this_ptr);
6249 // debug statements here
6251 // void Listen_free(struct LDKListen this_ptr);
6252 export function Listen_free(this_ptr: number): void {
6253 if(!isWasmInitialized) {
6254 throw new Error("initializeWasm() must be awaited first!");
6256 const nativeResponseValue = wasm.Listen_free(this_ptr);
6257 // debug statements here
6259 // void Confirm_free(struct LDKConfirm this_ptr);
6260 export function Confirm_free(this_ptr: number): void {
6261 if(!isWasmInitialized) {
6262 throw new Error("initializeWasm() must be awaited first!");
6264 const nativeResponseValue = wasm.Confirm_free(this_ptr);
6265 // debug statements here
6267 // void Watch_free(struct LDKWatch this_ptr);
6268 export function Watch_free(this_ptr: number): void {
6269 if(!isWasmInitialized) {
6270 throw new Error("initializeWasm() must be awaited first!");
6272 const nativeResponseValue = wasm.Watch_free(this_ptr);
6273 // debug statements here
6275 // void Filter_free(struct LDKFilter this_ptr);
6276 export function Filter_free(this_ptr: number): void {
6277 if(!isWasmInitialized) {
6278 throw new Error("initializeWasm() must be awaited first!");
6280 const nativeResponseValue = wasm.Filter_free(this_ptr);
6281 // debug statements here
6283 // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
6284 export function WatchedOutput_free(this_obj: number): void {
6285 if(!isWasmInitialized) {
6286 throw new Error("initializeWasm() must be awaited first!");
6288 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
6289 // debug statements here
6291 // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6292 export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
6293 if(!isWasmInitialized) {
6294 throw new Error("initializeWasm() must be awaited first!");
6296 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
6297 return decodeArray(nativeResponseValue);
6299 // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6300 export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
6301 if(!isWasmInitialized) {
6302 throw new Error("initializeWasm() must be awaited first!");
6304 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
6305 // debug statements here
6307 // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6308 export function WatchedOutput_get_outpoint(this_ptr: number): number {
6309 if(!isWasmInitialized) {
6310 throw new Error("initializeWasm() must be awaited first!");
6312 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
6313 return nativeResponseValue;
6315 // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
6316 export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
6317 if(!isWasmInitialized) {
6318 throw new Error("initializeWasm() must be awaited first!");
6320 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
6321 // debug statements here
6323 // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6324 export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
6325 if(!isWasmInitialized) {
6326 throw new Error("initializeWasm() must be awaited first!");
6328 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
6329 return decodeArray(nativeResponseValue);
6331 // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
6332 export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
6333 if(!isWasmInitialized) {
6334 throw new Error("initializeWasm() must be awaited first!");
6336 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
6337 // debug statements here
6339 // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
6340 export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
6341 if(!isWasmInitialized) {
6342 throw new Error("initializeWasm() must be awaited first!");
6344 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
6345 return nativeResponseValue;
6347 // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
6348 export function WatchedOutput_clone(orig: number): number {
6349 if(!isWasmInitialized) {
6350 throw new Error("initializeWasm() must be awaited first!");
6352 const nativeResponseValue = wasm.WatchedOutput_clone(orig);
6353 return nativeResponseValue;
6355 // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
6356 export function WatchedOutput_hash(o: number): number {
6357 if(!isWasmInitialized) {
6358 throw new Error("initializeWasm() must be awaited first!");
6360 const nativeResponseValue = wasm.WatchedOutput_hash(o);
6361 return nativeResponseValue;
6363 // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
6364 export function BroadcasterInterface_free(this_ptr: number): void {
6365 if(!isWasmInitialized) {
6366 throw new Error("initializeWasm() must be awaited first!");
6368 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
6369 // debug statements here
6371 // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
6372 export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
6373 if(!isWasmInitialized) {
6374 throw new Error("initializeWasm() must be awaited first!");
6376 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
6377 return nativeResponseValue;
6379 // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
6380 export function FeeEstimator_free(this_ptr: number): void {
6381 if(!isWasmInitialized) {
6382 throw new Error("initializeWasm() must be awaited first!");
6384 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
6385 // debug statements here
6387 // void ChainMonitor_free(struct LDKChainMonitor this_obj);
6388 export function ChainMonitor_free(this_obj: number): void {
6389 if(!isWasmInitialized) {
6390 throw new Error("initializeWasm() must be awaited first!");
6392 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
6393 // debug statements here
6395 // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
6396 export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
6397 if(!isWasmInitialized) {
6398 throw new Error("initializeWasm() must be awaited first!");
6400 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
6401 return nativeResponseValue;
6403 // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6404 export function ChainMonitor_as_Listen(this_arg: number): number {
6405 if(!isWasmInitialized) {
6406 throw new Error("initializeWasm() must be awaited first!");
6408 const nativeResponseValue = wasm.ChainMonitor_as_Listen(this_arg);
6409 return nativeResponseValue;
6411 // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6412 export function ChainMonitor_as_Confirm(this_arg: number): number {
6413 if(!isWasmInitialized) {
6414 throw new Error("initializeWasm() must be awaited first!");
6416 const nativeResponseValue = wasm.ChainMonitor_as_Confirm(this_arg);
6417 return nativeResponseValue;
6419 // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6420 export function ChainMonitor_as_Watch(this_arg: number): number {
6421 if(!isWasmInitialized) {
6422 throw new Error("initializeWasm() must be awaited first!");
6424 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
6425 return nativeResponseValue;
6427 // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6428 export function ChainMonitor_as_EventsProvider(this_arg: number): number {
6429 if(!isWasmInitialized) {
6430 throw new Error("initializeWasm() must be awaited first!");
6432 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
6433 return nativeResponseValue;
6435 // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
6436 export function ChannelMonitorUpdate_free(this_obj: number): void {
6437 if(!isWasmInitialized) {
6438 throw new Error("initializeWasm() must be awaited first!");
6440 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
6441 // debug statements here
6443 // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
6444 export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
6445 if(!isWasmInitialized) {
6446 throw new Error("initializeWasm() must be awaited first!");
6448 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
6449 return nativeResponseValue;
6451 // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
6452 export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
6453 if(!isWasmInitialized) {
6454 throw new Error("initializeWasm() must be awaited first!");
6456 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
6457 // debug statements here
6459 // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
6460 export function ChannelMonitorUpdate_clone(orig: number): number {
6461 if(!isWasmInitialized) {
6462 throw new Error("initializeWasm() must be awaited first!");
6464 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
6465 return nativeResponseValue;
6467 // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
6468 export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
6469 if(!isWasmInitialized) {
6470 throw new Error("initializeWasm() must be awaited first!");
6472 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
6473 return decodeArray(nativeResponseValue);
6475 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
6476 export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
6477 if(!isWasmInitialized) {
6478 throw new Error("initializeWasm() must be awaited first!");
6480 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
6481 return nativeResponseValue;
6483 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
6484 export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
6485 if(!isWasmInitialized) {
6486 throw new Error("initializeWasm() must be awaited first!");
6488 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
6489 return nativeResponseValue;
6491 // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
6492 export function MonitorUpdateError_free(this_obj: number): void {
6493 if(!isWasmInitialized) {
6494 throw new Error("initializeWasm() must be awaited first!");
6496 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
6497 // debug statements here
6499 // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
6500 export function MonitorUpdateError_clone(orig: number): number {
6501 if(!isWasmInitialized) {
6502 throw new Error("initializeWasm() must be awaited first!");
6504 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
6505 return nativeResponseValue;
6507 // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
6508 export function MonitorEvent_free(this_ptr: number): void {
6509 if(!isWasmInitialized) {
6510 throw new Error("initializeWasm() must be awaited first!");
6512 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
6513 // debug statements here
6515 // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
6516 export function MonitorEvent_clone(orig: number): number {
6517 if(!isWasmInitialized) {
6518 throw new Error("initializeWasm() must be awaited first!");
6520 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
6521 return nativeResponseValue;
6523 // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
6524 export function HTLCUpdate_free(this_obj: number): void {
6525 if(!isWasmInitialized) {
6526 throw new Error("initializeWasm() must be awaited first!");
6528 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
6529 // debug statements here
6531 // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
6532 export function HTLCUpdate_clone(orig: number): number {
6533 if(!isWasmInitialized) {
6534 throw new Error("initializeWasm() must be awaited first!");
6536 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
6537 return nativeResponseValue;
6539 // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
6540 export function HTLCUpdate_write(obj: number): Uint8Array {
6541 if(!isWasmInitialized) {
6542 throw new Error("initializeWasm() must be awaited first!");
6544 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
6545 return decodeArray(nativeResponseValue);
6547 // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
6548 export function HTLCUpdate_read(ser: Uint8Array): number {
6549 if(!isWasmInitialized) {
6550 throw new Error("initializeWasm() must be awaited first!");
6552 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
6553 return nativeResponseValue;
6555 // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
6556 export function ChannelMonitor_free(this_obj: number): void {
6557 if(!isWasmInitialized) {
6558 throw new Error("initializeWasm() must be awaited first!");
6560 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
6561 // debug statements here
6563 // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
6564 export function ChannelMonitor_clone(orig: number): number {
6565 if(!isWasmInitialized) {
6566 throw new Error("initializeWasm() must be awaited first!");
6568 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
6569 return nativeResponseValue;
6571 // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
6572 export function ChannelMonitor_write(obj: number): Uint8Array {
6573 if(!isWasmInitialized) {
6574 throw new Error("initializeWasm() must be awaited first!");
6576 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
6577 return decodeArray(nativeResponseValue);
6579 // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
6580 export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
6581 if(!isWasmInitialized) {
6582 throw new Error("initializeWasm() must be awaited first!");
6584 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
6585 return nativeResponseValue;
6587 // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6588 export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
6589 if(!isWasmInitialized) {
6590 throw new Error("initializeWasm() must be awaited first!");
6592 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
6593 return nativeResponseValue;
6595 // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6596 export function ChannelMonitor_get_funding_txo(this_arg: number): number {
6597 if(!isWasmInitialized) {
6598 throw new Error("initializeWasm() must be awaited first!");
6600 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
6601 return nativeResponseValue;
6603 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6604 export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
6605 if(!isWasmInitialized) {
6606 throw new Error("initializeWasm() must be awaited first!");
6608 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
6609 return nativeResponseValue;
6611 // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
6612 export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
6613 if(!isWasmInitialized) {
6614 throw new Error("initializeWasm() must be awaited first!");
6616 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
6617 // debug statements here
6619 // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6620 export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
6621 if(!isWasmInitialized) {
6622 throw new Error("initializeWasm() must be awaited first!");
6624 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
6625 return nativeResponseValue;
6627 // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6628 export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
6629 if(!isWasmInitialized) {
6630 throw new Error("initializeWasm() must be awaited first!");
6632 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
6633 return nativeResponseValue;
6635 // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
6636 export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
6637 if(!isWasmInitialized) {
6638 throw new Error("initializeWasm() must be awaited first!");
6640 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
6641 return nativeResponseValue;
6643 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
6644 export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
6645 if(!isWasmInitialized) {
6646 throw new Error("initializeWasm() must be awaited first!");
6648 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
6649 return nativeResponseValue;
6651 // void ChannelMonitor_block_disconnected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
6652 export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
6653 if(!isWasmInitialized) {
6654 throw new Error("initializeWasm() must be awaited first!");
6656 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
6657 // debug statements here
6659 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_transactions_confirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
6660 export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
6661 if(!isWasmInitialized) {
6662 throw new Error("initializeWasm() must be awaited first!");
6664 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
6665 return nativeResponseValue;
6667 // void ChannelMonitor_transaction_unconfirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
6668 export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
6669 if(!isWasmInitialized) {
6670 throw new Error("initializeWasm() must be awaited first!");
6672 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
6673 // debug statements here
6675 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_best_block_updated(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
6676 export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
6677 if(!isWasmInitialized) {
6678 throw new Error("initializeWasm() must be awaited first!");
6680 const nativeResponseValue = wasm.ChannelMonitor_best_block_updated(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
6681 return nativeResponseValue;
6683 // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6684 export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
6685 if(!isWasmInitialized) {
6686 throw new Error("initializeWasm() must be awaited first!");
6688 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
6689 return nativeResponseValue;
6691 // void Persist_free(struct LDKPersist this_ptr);
6692 export function Persist_free(this_ptr: number): void {
6693 if(!isWasmInitialized) {
6694 throw new Error("initializeWasm() must be awaited first!");
6696 const nativeResponseValue = wasm.Persist_free(this_ptr);
6697 // debug statements here
6699 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
6700 export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
6701 if(!isWasmInitialized) {
6702 throw new Error("initializeWasm() must be awaited first!");
6704 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
6705 return nativeResponseValue;
6707 // void OutPoint_free(struct LDKOutPoint this_obj);
6708 export function OutPoint_free(this_obj: number): void {
6709 if(!isWasmInitialized) {
6710 throw new Error("initializeWasm() must be awaited first!");
6712 const nativeResponseValue = wasm.OutPoint_free(this_obj);
6713 // debug statements here
6715 // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
6716 export function OutPoint_get_txid(this_ptr: number): Uint8Array {
6717 if(!isWasmInitialized) {
6718 throw new Error("initializeWasm() must be awaited first!");
6720 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
6721 return decodeArray(nativeResponseValue);
6723 // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6724 export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
6725 if(!isWasmInitialized) {
6726 throw new Error("initializeWasm() must be awaited first!");
6728 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
6729 // debug statements here
6731 // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
6732 export function OutPoint_get_index(this_ptr: number): number {
6733 if(!isWasmInitialized) {
6734 throw new Error("initializeWasm() must be awaited first!");
6736 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
6737 return nativeResponseValue;
6739 // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
6740 export function OutPoint_set_index(this_ptr: number, val: number): void {
6741 if(!isWasmInitialized) {
6742 throw new Error("initializeWasm() must be awaited first!");
6744 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
6745 // debug statements here
6747 // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
6748 export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
6749 if(!isWasmInitialized) {
6750 throw new Error("initializeWasm() must be awaited first!");
6752 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
6753 return nativeResponseValue;
6755 // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
6756 export function OutPoint_clone(orig: number): number {
6757 if(!isWasmInitialized) {
6758 throw new Error("initializeWasm() must be awaited first!");
6760 const nativeResponseValue = wasm.OutPoint_clone(orig);
6761 return nativeResponseValue;
6763 // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
6764 export function OutPoint_eq(a: number, b: number): boolean {
6765 if(!isWasmInitialized) {
6766 throw new Error("initializeWasm() must be awaited first!");
6768 const nativeResponseValue = wasm.OutPoint_eq(a, b);
6769 return nativeResponseValue;
6771 // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
6772 export function OutPoint_hash(o: number): number {
6773 if(!isWasmInitialized) {
6774 throw new Error("initializeWasm() must be awaited first!");
6776 const nativeResponseValue = wasm.OutPoint_hash(o);
6777 return nativeResponseValue;
6779 // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
6780 export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
6781 if(!isWasmInitialized) {
6782 throw new Error("initializeWasm() must be awaited first!");
6784 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
6785 return decodeArray(nativeResponseValue);
6787 // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
6788 export function OutPoint_write(obj: number): Uint8Array {
6789 if(!isWasmInitialized) {
6790 throw new Error("initializeWasm() must be awaited first!");
6792 const nativeResponseValue = wasm.OutPoint_write(obj);
6793 return decodeArray(nativeResponseValue);
6795 // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
6796 export function OutPoint_read(ser: Uint8Array): number {
6797 if(!isWasmInitialized) {
6798 throw new Error("initializeWasm() must be awaited first!");
6800 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
6801 return nativeResponseValue;
6803 // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
6804 export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
6805 if(!isWasmInitialized) {
6806 throw new Error("initializeWasm() must be awaited first!");
6808 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
6809 // debug statements here
6811 // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6812 export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
6813 if(!isWasmInitialized) {
6814 throw new Error("initializeWasm() must be awaited first!");
6816 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
6817 return nativeResponseValue;
6819 // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
6820 export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
6821 if(!isWasmInitialized) {
6822 throw new Error("initializeWasm() must be awaited first!");
6824 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
6825 // debug statements here
6827 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6828 export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
6829 if(!isWasmInitialized) {
6830 throw new Error("initializeWasm() must be awaited first!");
6832 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
6833 return decodeArray(nativeResponseValue);
6835 // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6836 export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
6837 if(!isWasmInitialized) {
6838 throw new Error("initializeWasm() must be awaited first!");
6840 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
6841 // debug statements here
6843 // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6844 export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
6845 if(!isWasmInitialized) {
6846 throw new Error("initializeWasm() must be awaited first!");
6848 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
6849 return nativeResponseValue;
6851 // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
6852 export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
6853 if(!isWasmInitialized) {
6854 throw new Error("initializeWasm() must be awaited first!");
6856 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
6857 // debug statements here
6859 // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
6860 export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
6861 if(!isWasmInitialized) {
6862 throw new Error("initializeWasm() must be awaited first!");
6864 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
6865 // debug statements here
6867 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6868 export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
6869 if(!isWasmInitialized) {
6870 throw new Error("initializeWasm() must be awaited first!");
6872 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
6873 return decodeArray(nativeResponseValue);
6875 // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6876 export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
6877 if(!isWasmInitialized) {
6878 throw new Error("initializeWasm() must be awaited first!");
6880 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
6881 // debug statements here
6883 // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
6884 export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
6885 if(!isWasmInitialized) {
6886 throw new Error("initializeWasm() must be awaited first!");
6888 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
6889 return decodeArray(nativeResponseValue);
6891 // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6892 export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
6893 if(!isWasmInitialized) {
6894 throw new Error("initializeWasm() must be awaited first!");
6896 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
6897 // debug statements here
6899 // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6900 export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
6901 if(!isWasmInitialized) {
6902 throw new Error("initializeWasm() must be awaited first!");
6904 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
6905 return nativeResponseValue;
6907 // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
6908 export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
6909 if(!isWasmInitialized) {
6910 throw new Error("initializeWasm() must be awaited first!");
6912 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
6913 // debug statements here
6915 // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKPublicKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
6916 export function DelayedPaymentOutputDescriptor_new(outpoint_arg: number, per_commitment_point_arg: Uint8Array, to_self_delay_arg: number, output_arg: number, revocation_pubkey_arg: Uint8Array, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
6917 if(!isWasmInitialized) {
6918 throw new Error("initializeWasm() must be awaited first!");
6920 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_new(outpoint_arg, encodeArray(per_commitment_point_arg), to_self_delay_arg, output_arg, encodeArray(revocation_pubkey_arg), encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
6921 return nativeResponseValue;
6923 // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
6924 export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
6925 if(!isWasmInitialized) {
6926 throw new Error("initializeWasm() must be awaited first!");
6928 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
6929 return nativeResponseValue;
6931 // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
6932 export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
6933 if(!isWasmInitialized) {
6934 throw new Error("initializeWasm() must be awaited first!");
6936 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_write(obj);
6937 return decodeArray(nativeResponseValue);
6939 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
6940 export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
6941 if(!isWasmInitialized) {
6942 throw new Error("initializeWasm() must be awaited first!");
6944 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_read(encodeArray(ser));
6945 return nativeResponseValue;
6947 // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
6948 export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
6949 if(!isWasmInitialized) {
6950 throw new Error("initializeWasm() must be awaited first!");
6952 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
6953 // debug statements here
6955 // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6956 export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
6957 if(!isWasmInitialized) {
6958 throw new Error("initializeWasm() must be awaited first!");
6960 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
6961 return nativeResponseValue;
6963 // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
6964 export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
6965 if(!isWasmInitialized) {
6966 throw new Error("initializeWasm() must be awaited first!");
6968 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
6969 // debug statements here
6971 // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
6972 export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
6973 if(!isWasmInitialized) {
6974 throw new Error("initializeWasm() must be awaited first!");
6976 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
6977 // debug statements here
6979 // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
6980 export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
6981 if(!isWasmInitialized) {
6982 throw new Error("initializeWasm() must be awaited first!");
6984 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
6985 return decodeArray(nativeResponseValue);
6987 // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6988 export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
6989 if(!isWasmInitialized) {
6990 throw new Error("initializeWasm() must be awaited first!");
6992 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
6993 // debug statements here
6995 // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6996 export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
6997 if(!isWasmInitialized) {
6998 throw new Error("initializeWasm() must be awaited first!");
7000 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
7001 return nativeResponseValue;
7003 // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
7004 export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
7005 if(!isWasmInitialized) {
7006 throw new Error("initializeWasm() must be awaited first!");
7008 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
7009 // debug statements here
7011 // MUST_USE_RES struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKTxOut output_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
7012 export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
7013 if(!isWasmInitialized) {
7014 throw new Error("initializeWasm() must be awaited first!");
7016 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
7017 return nativeResponseValue;
7019 // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
7020 export function StaticPaymentOutputDescriptor_clone(orig: number): number {
7021 if(!isWasmInitialized) {
7022 throw new Error("initializeWasm() must be awaited first!");
7024 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
7025 return nativeResponseValue;
7027 // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
7028 export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
7029 if(!isWasmInitialized) {
7030 throw new Error("initializeWasm() must be awaited first!");
7032 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_write(obj);
7033 return decodeArray(nativeResponseValue);
7035 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
7036 export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
7037 if(!isWasmInitialized) {
7038 throw new Error("initializeWasm() must be awaited first!");
7040 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_read(encodeArray(ser));
7041 return nativeResponseValue;
7043 // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
7044 export function SpendableOutputDescriptor_free(this_ptr: number): void {
7045 if(!isWasmInitialized) {
7046 throw new Error("initializeWasm() must be awaited first!");
7048 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
7049 // debug statements here
7051 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
7052 export function SpendableOutputDescriptor_clone(orig: number): number {
7053 if(!isWasmInitialized) {
7054 throw new Error("initializeWasm() must be awaited first!");
7056 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
7057 return nativeResponseValue;
7059 // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
7060 export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
7061 if(!isWasmInitialized) {
7062 throw new Error("initializeWasm() must be awaited first!");
7064 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
7065 return decodeArray(nativeResponseValue);
7067 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
7068 export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
7069 if(!isWasmInitialized) {
7070 throw new Error("initializeWasm() must be awaited first!");
7072 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
7073 return nativeResponseValue;
7075 // void BaseSign_free(struct LDKBaseSign this_ptr);
7076 export function BaseSign_free(this_ptr: number): void {
7077 if(!isWasmInitialized) {
7078 throw new Error("initializeWasm() must be awaited first!");
7080 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
7081 // debug statements here
7083 // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
7084 export function Sign_clone(orig: number): number {
7085 if(!isWasmInitialized) {
7086 throw new Error("initializeWasm() must be awaited first!");
7088 const nativeResponseValue = wasm.Sign_clone(orig);
7089 return nativeResponseValue;
7091 // void Sign_free(struct LDKSign this_ptr);
7092 export function Sign_free(this_ptr: number): void {
7093 if(!isWasmInitialized) {
7094 throw new Error("initializeWasm() must be awaited first!");
7096 const nativeResponseValue = wasm.Sign_free(this_ptr);
7097 // debug statements here
7099 // void KeysInterface_free(struct LDKKeysInterface this_ptr);
7100 export function KeysInterface_free(this_ptr: number): void {
7101 if(!isWasmInitialized) {
7102 throw new Error("initializeWasm() must be awaited first!");
7104 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
7105 // debug statements here
7107 // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
7108 export function InMemorySigner_free(this_obj: number): void {
7109 if(!isWasmInitialized) {
7110 throw new Error("initializeWasm() must be awaited first!");
7112 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
7113 // debug statements here
7115 // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7116 export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
7117 if(!isWasmInitialized) {
7118 throw new Error("initializeWasm() must be awaited first!");
7120 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
7121 return decodeArray(nativeResponseValue);
7123 // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7124 export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
7125 if(!isWasmInitialized) {
7126 throw new Error("initializeWasm() must be awaited first!");
7128 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
7129 // debug statements here
7131 // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7132 export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
7133 if(!isWasmInitialized) {
7134 throw new Error("initializeWasm() must be awaited first!");
7136 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
7137 return decodeArray(nativeResponseValue);
7139 // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7140 export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
7141 if(!isWasmInitialized) {
7142 throw new Error("initializeWasm() must be awaited first!");
7144 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
7145 // debug statements here
7147 // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7148 export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
7149 if(!isWasmInitialized) {
7150 throw new Error("initializeWasm() must be awaited first!");
7152 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
7153 return decodeArray(nativeResponseValue);
7155 // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7156 export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
7157 if(!isWasmInitialized) {
7158 throw new Error("initializeWasm() must be awaited first!");
7160 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
7161 // debug statements here
7163 // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7164 export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
7165 if(!isWasmInitialized) {
7166 throw new Error("initializeWasm() must be awaited first!");
7168 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
7169 return decodeArray(nativeResponseValue);
7171 // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7172 export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
7173 if(!isWasmInitialized) {
7174 throw new Error("initializeWasm() must be awaited first!");
7176 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
7177 // debug statements here
7179 // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7180 export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
7181 if(!isWasmInitialized) {
7182 throw new Error("initializeWasm() must be awaited first!");
7184 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
7185 return decodeArray(nativeResponseValue);
7187 // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7188 export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
7189 if(!isWasmInitialized) {
7190 throw new Error("initializeWasm() must be awaited first!");
7192 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
7193 // debug statements here
7195 // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7196 export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
7197 if(!isWasmInitialized) {
7198 throw new Error("initializeWasm() must be awaited first!");
7200 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
7201 return decodeArray(nativeResponseValue);
7203 // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7204 export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
7205 if(!isWasmInitialized) {
7206 throw new Error("initializeWasm() must be awaited first!");
7208 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
7209 // debug statements here
7211 // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
7212 export function InMemorySigner_clone(orig: number): number {
7213 if(!isWasmInitialized) {
7214 throw new Error("initializeWasm() must be awaited first!");
7216 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
7217 return nativeResponseValue;
7219 // MUST_USE_RES struct LDKInMemorySigner InMemorySigner_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKThirtyTwoBytes channel_keys_id);
7220 export function InMemorySigner_new(funding_key: Uint8Array, revocation_base_key: Uint8Array, payment_key: Uint8Array, delayed_payment_base_key: Uint8Array, htlc_base_key: Uint8Array, commitment_seed: Uint8Array, channel_value_satoshis: number, channel_keys_id: Uint8Array): number {
7221 if(!isWasmInitialized) {
7222 throw new Error("initializeWasm() must be awaited first!");
7224 const nativeResponseValue = wasm.InMemorySigner_new(encodeArray(funding_key), encodeArray(revocation_base_key), encodeArray(payment_key), encodeArray(delayed_payment_base_key), encodeArray(htlc_base_key), encodeArray(commitment_seed), channel_value_satoshis, encodeArray(channel_keys_id));
7225 return nativeResponseValue;
7227 // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7228 export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
7229 if(!isWasmInitialized) {
7230 throw new Error("initializeWasm() must be awaited first!");
7232 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
7233 return nativeResponseValue;
7235 // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7236 export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
7237 if(!isWasmInitialized) {
7238 throw new Error("initializeWasm() must be awaited first!");
7240 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
7241 return nativeResponseValue;
7243 // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7244 export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
7245 if(!isWasmInitialized) {
7246 throw new Error("initializeWasm() must be awaited first!");
7248 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
7249 return nativeResponseValue;
7251 // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7252 export function InMemorySigner_is_outbound(this_arg: number): boolean {
7253 if(!isWasmInitialized) {
7254 throw new Error("initializeWasm() must be awaited first!");
7256 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
7257 return nativeResponseValue;
7259 // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7260 export function InMemorySigner_funding_outpoint(this_arg: number): number {
7261 if(!isWasmInitialized) {
7262 throw new Error("initializeWasm() must be awaited first!");
7264 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
7265 return nativeResponseValue;
7267 // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7268 export function InMemorySigner_get_channel_parameters(this_arg: number): number {
7269 if(!isWasmInitialized) {
7270 throw new Error("initializeWasm() must be awaited first!");
7272 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
7273 return nativeResponseValue;
7275 // MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_counterparty_payment_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR descriptor);
7276 export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
7277 if(!isWasmInitialized) {
7278 throw new Error("initializeWasm() must be awaited first!");
7280 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
7281 return nativeResponseValue;
7283 // MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_dynamic_p2wsh_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR descriptor);
7284 export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
7285 if(!isWasmInitialized) {
7286 throw new Error("initializeWasm() must be awaited first!");
7288 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
7289 return nativeResponseValue;
7291 // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7292 export function InMemorySigner_as_BaseSign(this_arg: number): number {
7293 if(!isWasmInitialized) {
7294 throw new Error("initializeWasm() must be awaited first!");
7296 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
7297 return nativeResponseValue;
7299 // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7300 export function InMemorySigner_as_Sign(this_arg: number): number {
7301 if(!isWasmInitialized) {
7302 throw new Error("initializeWasm() must be awaited first!");
7304 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
7305 return nativeResponseValue;
7307 // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
7308 export function InMemorySigner_write(obj: number): Uint8Array {
7309 if(!isWasmInitialized) {
7310 throw new Error("initializeWasm() must be awaited first!");
7312 const nativeResponseValue = wasm.InMemorySigner_write(obj);
7313 return decodeArray(nativeResponseValue);
7315 // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
7316 export function InMemorySigner_read(ser: Uint8Array): number {
7317 if(!isWasmInitialized) {
7318 throw new Error("initializeWasm() must be awaited first!");
7320 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
7321 return nativeResponseValue;
7323 // void KeysManager_free(struct LDKKeysManager this_obj);
7324 export function KeysManager_free(this_obj: number): void {
7325 if(!isWasmInitialized) {
7326 throw new Error("initializeWasm() must be awaited first!");
7328 const nativeResponseValue = wasm.KeysManager_free(this_obj);
7329 // debug statements here
7331 // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
7332 export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
7333 if(!isWasmInitialized) {
7334 throw new Error("initializeWasm() must be awaited first!");
7336 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
7337 return nativeResponseValue;
7339 // MUST_USE_RES struct LDKInMemorySigner KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
7340 export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
7341 if(!isWasmInitialized) {
7342 throw new Error("initializeWasm() must be awaited first!");
7344 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
7345 return nativeResponseValue;
7347 // MUST_USE_RES struct LDKCResult_TransactionNoneZ KeysManager_spend_spendable_outputs(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight);
7348 export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
7349 if(!isWasmInitialized) {
7350 throw new Error("initializeWasm() must be awaited first!");
7352 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
7353 return nativeResponseValue;
7355 // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
7356 export function KeysManager_as_KeysInterface(this_arg: number): number {
7357 if(!isWasmInitialized) {
7358 throw new Error("initializeWasm() must be awaited first!");
7360 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
7361 return nativeResponseValue;
7363 // void ChannelManager_free(struct LDKChannelManager this_obj);
7364 export function ChannelManager_free(this_obj: number): void {
7365 if(!isWasmInitialized) {
7366 throw new Error("initializeWasm() must be awaited first!");
7368 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
7369 // debug statements here
7371 // void ChainParameters_free(struct LDKChainParameters this_obj);
7372 export function ChainParameters_free(this_obj: number): void {
7373 if(!isWasmInitialized) {
7374 throw new Error("initializeWasm() must be awaited first!");
7376 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
7377 // debug statements here
7379 // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
7380 export function ChainParameters_get_network(this_ptr: number): Network {
7381 if(!isWasmInitialized) {
7382 throw new Error("initializeWasm() must be awaited first!");
7384 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
7385 return nativeResponseValue;
7387 // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
7388 export function ChainParameters_set_network(this_ptr: number, val: Network): void {
7389 if(!isWasmInitialized) {
7390 throw new Error("initializeWasm() must be awaited first!");
7392 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
7393 // debug statements here
7395 // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
7396 export function ChainParameters_get_best_block(this_ptr: number): number {
7397 if(!isWasmInitialized) {
7398 throw new Error("initializeWasm() must be awaited first!");
7400 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
7401 return nativeResponseValue;
7403 // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
7404 export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
7405 if(!isWasmInitialized) {
7406 throw new Error("initializeWasm() must be awaited first!");
7408 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
7409 // debug statements here
7411 // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
7412 export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
7413 if(!isWasmInitialized) {
7414 throw new Error("initializeWasm() must be awaited first!");
7416 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
7417 return nativeResponseValue;
7419 // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
7420 export function ChainParameters_clone(orig: number): number {
7421 if(!isWasmInitialized) {
7422 throw new Error("initializeWasm() must be awaited first!");
7424 const nativeResponseValue = wasm.ChainParameters_clone(orig);
7425 return nativeResponseValue;
7427 // void BestBlock_free(struct LDKBestBlock this_obj);
7428 export function BestBlock_free(this_obj: number): void {
7429 if(!isWasmInitialized) {
7430 throw new Error("initializeWasm() must be awaited first!");
7432 const nativeResponseValue = wasm.BestBlock_free(this_obj);
7433 // debug statements here
7435 // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
7436 export function BestBlock_clone(orig: number): number {
7437 if(!isWasmInitialized) {
7438 throw new Error("initializeWasm() must be awaited first!");
7440 const nativeResponseValue = wasm.BestBlock_clone(orig);
7441 return nativeResponseValue;
7443 // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
7444 export function BestBlock_from_genesis(network: Network): number {
7445 if(!isWasmInitialized) {
7446 throw new Error("initializeWasm() must be awaited first!");
7448 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
7449 return nativeResponseValue;
7451 // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
7452 export function BestBlock_new(block_hash: Uint8Array, height: number): number {
7453 if(!isWasmInitialized) {
7454 throw new Error("initializeWasm() must be awaited first!");
7456 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
7457 return nativeResponseValue;
7459 // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
7460 export function BestBlock_block_hash(this_arg: number): Uint8Array {
7461 if(!isWasmInitialized) {
7462 throw new Error("initializeWasm() must be awaited first!");
7464 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
7465 return decodeArray(nativeResponseValue);
7467 // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
7468 export function BestBlock_height(this_arg: number): number {
7469 if(!isWasmInitialized) {
7470 throw new Error("initializeWasm() must be awaited first!");
7472 const nativeResponseValue = wasm.BestBlock_height(this_arg);
7473 return nativeResponseValue;
7475 // void ChannelDetails_free(struct LDKChannelDetails this_obj);
7476 export function ChannelDetails_free(this_obj: number): void {
7477 if(!isWasmInitialized) {
7478 throw new Error("initializeWasm() must be awaited first!");
7480 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
7481 // debug statements here
7483 // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
7484 export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
7485 if(!isWasmInitialized) {
7486 throw new Error("initializeWasm() must be awaited first!");
7488 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
7489 return decodeArray(nativeResponseValue);
7491 // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7492 export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
7493 if(!isWasmInitialized) {
7494 throw new Error("initializeWasm() must be awaited first!");
7496 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
7497 // debug statements here
7499 // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7500 export function ChannelDetails_get_funding_txo(this_ptr: number): number {
7501 if(!isWasmInitialized) {
7502 throw new Error("initializeWasm() must be awaited first!");
7504 const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
7505 return nativeResponseValue;
7507 // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
7508 export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
7509 if(!isWasmInitialized) {
7510 throw new Error("initializeWasm() must be awaited first!");
7512 const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
7513 // debug statements here
7515 // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7516 export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
7517 if(!isWasmInitialized) {
7518 throw new Error("initializeWasm() must be awaited first!");
7520 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
7521 return nativeResponseValue;
7523 // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
7524 export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
7525 if(!isWasmInitialized) {
7526 throw new Error("initializeWasm() must be awaited first!");
7528 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
7529 // debug statements here
7531 // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7532 export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
7533 if(!isWasmInitialized) {
7534 throw new Error("initializeWasm() must be awaited first!");
7536 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
7537 return decodeArray(nativeResponseValue);
7539 // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7540 export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
7541 if(!isWasmInitialized) {
7542 throw new Error("initializeWasm() must be awaited first!");
7544 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
7545 // debug statements here
7547 // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7548 export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
7549 if(!isWasmInitialized) {
7550 throw new Error("initializeWasm() must be awaited first!");
7552 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
7553 return nativeResponseValue;
7555 // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
7556 export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
7557 if(!isWasmInitialized) {
7558 throw new Error("initializeWasm() must be awaited first!");
7560 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
7561 // debug statements here
7563 // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7564 export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
7565 if(!isWasmInitialized) {
7566 throw new Error("initializeWasm() must be awaited first!");
7568 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
7569 return nativeResponseValue;
7571 // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
7572 export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
7573 if(!isWasmInitialized) {
7574 throw new Error("initializeWasm() must be awaited first!");
7576 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
7577 // debug statements here
7579 // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7580 export function ChannelDetails_get_user_id(this_ptr: number): number {
7581 if(!isWasmInitialized) {
7582 throw new Error("initializeWasm() must be awaited first!");
7584 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
7585 return nativeResponseValue;
7587 // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
7588 export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
7589 if(!isWasmInitialized) {
7590 throw new Error("initializeWasm() must be awaited first!");
7592 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
7593 // debug statements here
7595 // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7596 export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
7597 if(!isWasmInitialized) {
7598 throw new Error("initializeWasm() must be awaited first!");
7600 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
7601 return nativeResponseValue;
7603 // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
7604 export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
7605 if(!isWasmInitialized) {
7606 throw new Error("initializeWasm() must be awaited first!");
7608 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
7609 // debug statements here
7611 // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7612 export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
7613 if(!isWasmInitialized) {
7614 throw new Error("initializeWasm() must be awaited first!");
7616 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
7617 return nativeResponseValue;
7619 // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
7620 export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
7621 if(!isWasmInitialized) {
7622 throw new Error("initializeWasm() must be awaited first!");
7624 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
7625 // debug statements here
7627 // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7628 export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
7629 if(!isWasmInitialized) {
7630 throw new Error("initializeWasm() must be awaited first!");
7632 const nativeResponseValue = wasm.ChannelDetails_get_is_outbound(this_ptr);
7633 return nativeResponseValue;
7635 // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
7636 export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
7637 if(!isWasmInitialized) {
7638 throw new Error("initializeWasm() must be awaited first!");
7640 const nativeResponseValue = wasm.ChannelDetails_set_is_outbound(this_ptr, val);
7641 // debug statements here
7643 // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7644 export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
7645 if(!isWasmInitialized) {
7646 throw new Error("initializeWasm() must be awaited first!");
7648 const nativeResponseValue = wasm.ChannelDetails_get_is_funding_locked(this_ptr);
7649 return nativeResponseValue;
7651 // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
7652 export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
7653 if(!isWasmInitialized) {
7654 throw new Error("initializeWasm() must be awaited first!");
7656 const nativeResponseValue = wasm.ChannelDetails_set_is_funding_locked(this_ptr, val);
7657 // debug statements here
7659 // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7660 export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
7661 if(!isWasmInitialized) {
7662 throw new Error("initializeWasm() must be awaited first!");
7664 const nativeResponseValue = wasm.ChannelDetails_get_is_usable(this_ptr);
7665 return nativeResponseValue;
7667 // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
7668 export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
7669 if(!isWasmInitialized) {
7670 throw new Error("initializeWasm() must be awaited first!");
7672 const nativeResponseValue = wasm.ChannelDetails_set_is_usable(this_ptr, val);
7673 // debug statements here
7675 // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7676 export function ChannelDetails_get_is_public(this_ptr: number): boolean {
7677 if(!isWasmInitialized) {
7678 throw new Error("initializeWasm() must be awaited first!");
7680 const nativeResponseValue = wasm.ChannelDetails_get_is_public(this_ptr);
7681 return nativeResponseValue;
7683 // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
7684 export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
7685 if(!isWasmInitialized) {
7686 throw new Error("initializeWasm() must be awaited first!");
7688 const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
7689 // debug statements here
7691 // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
7692 export function ChannelDetails_clone(orig: number): number {
7693 if(!isWasmInitialized) {
7694 throw new Error("initializeWasm() must be awaited first!");
7696 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
7697 return nativeResponseValue;
7699 // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
7700 export function PaymentSendFailure_free(this_ptr: number): void {
7701 if(!isWasmInitialized) {
7702 throw new Error("initializeWasm() must be awaited first!");
7704 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
7705 // debug statements here
7707 // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
7708 export function PaymentSendFailure_clone(orig: number): number {
7709 if(!isWasmInitialized) {
7710 throw new Error("initializeWasm() must be awaited first!");
7712 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
7713 return nativeResponseValue;
7715 // MUST_USE_RES struct LDKChannelManager ChannelManager_new(struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, struct LDKChainParameters params);
7716 export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
7717 if(!isWasmInitialized) {
7718 throw new Error("initializeWasm() must be awaited first!");
7720 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
7721 return nativeResponseValue;
7723 // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
7724 export function ChannelManager_get_current_default_configuration(this_arg: number): number {
7725 if(!isWasmInitialized) {
7726 throw new Error("initializeWasm() must be awaited first!");
7728 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
7729 return nativeResponseValue;
7731 // 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);
7732 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 {
7733 if(!isWasmInitialized) {
7734 throw new Error("initializeWasm() must be awaited first!");
7736 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
7737 return nativeResponseValue;
7739 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
7740 export function ChannelManager_list_channels(this_arg: number): number[] {
7741 if(!isWasmInitialized) {
7742 throw new Error("initializeWasm() must be awaited first!");
7744 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
7745 return nativeResponseValue;
7747 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
7748 export function ChannelManager_list_usable_channels(this_arg: number): number[] {
7749 if(!isWasmInitialized) {
7750 throw new Error("initializeWasm() must be awaited first!");
7752 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
7753 return nativeResponseValue;
7755 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
7756 export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
7757 if(!isWasmInitialized) {
7758 throw new Error("initializeWasm() must be awaited first!");
7760 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
7761 return nativeResponseValue;
7763 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
7764 export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
7765 if(!isWasmInitialized) {
7766 throw new Error("initializeWasm() must be awaited first!");
7768 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
7769 return nativeResponseValue;
7771 // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
7772 export function ChannelManager_force_close_all_channels(this_arg: number): void {
7773 if(!isWasmInitialized) {
7774 throw new Error("initializeWasm() must be awaited first!");
7776 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
7777 // debug statements here
7779 // 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);
7780 export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
7781 if(!isWasmInitialized) {
7782 throw new Error("initializeWasm() must be awaited first!");
7784 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
7785 return nativeResponseValue;
7787 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKTransaction funding_transaction);
7788 export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
7789 if(!isWasmInitialized) {
7790 throw new Error("initializeWasm() must be awaited first!");
7792 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
7793 return nativeResponseValue;
7795 // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
7796 export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
7797 if(!isWasmInitialized) {
7798 throw new Error("initializeWasm() must be awaited first!");
7800 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
7801 // debug statements here
7803 // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
7804 export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
7805 if(!isWasmInitialized) {
7806 throw new Error("initializeWasm() must be awaited first!");
7808 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
7809 // debug statements here
7811 // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
7812 export function ChannelManager_timer_tick_occurred(this_arg: number): void {
7813 if(!isWasmInitialized) {
7814 throw new Error("initializeWasm() must be awaited first!");
7816 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
7817 // debug statements here
7819 // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
7820 export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
7821 if(!isWasmInitialized) {
7822 throw new Error("initializeWasm() must be awaited first!");
7824 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash));
7825 return nativeResponseValue;
7827 // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
7828 export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
7829 if(!isWasmInitialized) {
7830 throw new Error("initializeWasm() must be awaited first!");
7832 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage));
7833 return nativeResponseValue;
7835 // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
7836 export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
7837 if(!isWasmInitialized) {
7838 throw new Error("initializeWasm() must be awaited first!");
7840 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
7841 return decodeArray(nativeResponseValue);
7843 // 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);
7844 export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
7845 if(!isWasmInitialized) {
7846 throw new Error("initializeWasm() must be awaited first!");
7848 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
7849 // debug statements here
7851 // MUST_USE_RES struct LDKC2Tuple_PaymentHashPaymentSecretZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, uint64_t user_payment_id);
7852 export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
7853 if(!isWasmInitialized) {
7854 throw new Error("initializeWasm() must be awaited first!");
7856 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs, user_payment_id);
7857 return nativeResponseValue;
7859 // MUST_USE_RES struct LDKCResult_PaymentSecretAPIErrorZ ChannelManager_create_inbound_payment_for_hash(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, uint64_t user_payment_id);
7860 export function ChannelManager_create_inbound_payment_for_hash(this_arg: number, payment_hash: Uint8Array, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
7861 if(!isWasmInitialized) {
7862 throw new Error("initializeWasm() must be awaited first!");
7864 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs, user_payment_id);
7865 return nativeResponseValue;
7867 // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
7868 export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
7869 if(!isWasmInitialized) {
7870 throw new Error("initializeWasm() must be awaited first!");
7872 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
7873 return nativeResponseValue;
7875 // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
7876 export function ChannelManager_as_EventsProvider(this_arg: number): number {
7877 if(!isWasmInitialized) {
7878 throw new Error("initializeWasm() must be awaited first!");
7880 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
7881 return nativeResponseValue;
7883 // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
7884 export function ChannelManager_as_Listen(this_arg: number): number {
7885 if(!isWasmInitialized) {
7886 throw new Error("initializeWasm() must be awaited first!");
7888 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
7889 return nativeResponseValue;
7891 // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
7892 export function ChannelManager_as_Confirm(this_arg: number): number {
7893 if(!isWasmInitialized) {
7894 throw new Error("initializeWasm() must be awaited first!");
7896 const nativeResponseValue = wasm.ChannelManager_as_Confirm(this_arg);
7897 return nativeResponseValue;
7899 // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
7900 export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
7901 if(!isWasmInitialized) {
7902 throw new Error("initializeWasm() must be awaited first!");
7904 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
7905 return nativeResponseValue;
7907 // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
7908 export function ChannelManager_await_persistable_update(this_arg: number): void {
7909 if(!isWasmInitialized) {
7910 throw new Error("initializeWasm() must be awaited first!");
7912 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
7913 // debug statements here
7915 // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
7916 export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
7917 if(!isWasmInitialized) {
7918 throw new Error("initializeWasm() must be awaited first!");
7920 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
7921 return nativeResponseValue;
7923 // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
7924 export function ChannelManager_write(obj: number): Uint8Array {
7925 if(!isWasmInitialized) {
7926 throw new Error("initializeWasm() must be awaited first!");
7928 const nativeResponseValue = wasm.ChannelManager_write(obj);
7929 return decodeArray(nativeResponseValue);
7931 // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
7932 export function ChannelManagerReadArgs_free(this_obj: number): void {
7933 if(!isWasmInitialized) {
7934 throw new Error("initializeWasm() must be awaited first!");
7936 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
7937 // debug statements here
7939 // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
7940 export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
7941 if(!isWasmInitialized) {
7942 throw new Error("initializeWasm() must be awaited first!");
7944 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
7945 return nativeResponseValue;
7947 // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
7948 export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
7949 if(!isWasmInitialized) {
7950 throw new Error("initializeWasm() must be awaited first!");
7952 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
7953 // debug statements here
7955 // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
7956 export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
7957 if(!isWasmInitialized) {
7958 throw new Error("initializeWasm() must be awaited first!");
7960 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
7961 return nativeResponseValue;
7963 // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
7964 export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
7965 if(!isWasmInitialized) {
7966 throw new Error("initializeWasm() must be awaited first!");
7968 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
7969 // debug statements here
7971 // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
7972 export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
7973 if(!isWasmInitialized) {
7974 throw new Error("initializeWasm() must be awaited first!");
7976 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
7977 return nativeResponseValue;
7979 // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
7980 export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
7981 if(!isWasmInitialized) {
7982 throw new Error("initializeWasm() must be awaited first!");
7984 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
7985 // debug statements here
7987 // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
7988 export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
7989 if(!isWasmInitialized) {
7990 throw new Error("initializeWasm() must be awaited first!");
7992 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
7993 return nativeResponseValue;
7995 // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
7996 export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
7997 if(!isWasmInitialized) {
7998 throw new Error("initializeWasm() must be awaited first!");
8000 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
8001 // debug statements here
8003 // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8004 export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
8005 if(!isWasmInitialized) {
8006 throw new Error("initializeWasm() must be awaited first!");
8008 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
8009 return nativeResponseValue;
8011 // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
8012 export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
8013 if(!isWasmInitialized) {
8014 throw new Error("initializeWasm() must be awaited first!");
8016 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
8017 // debug statements here
8019 // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8020 export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
8021 if(!isWasmInitialized) {
8022 throw new Error("initializeWasm() must be awaited first!");
8024 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
8025 return nativeResponseValue;
8027 // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
8028 export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
8029 if(!isWasmInitialized) {
8030 throw new Error("initializeWasm() must be awaited first!");
8032 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
8033 // debug statements here
8035 // 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);
8036 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 {
8037 if(!isWasmInitialized) {
8038 throw new Error("initializeWasm() must be awaited first!");
8040 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
8041 return nativeResponseValue;
8043 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
8044 export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
8045 if(!isWasmInitialized) {
8046 throw new Error("initializeWasm() must be awaited first!");
8048 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
8049 return nativeResponseValue;
8051 // void DecodeError_free(struct LDKDecodeError this_obj);
8052 export function DecodeError_free(this_obj: number): void {
8053 if(!isWasmInitialized) {
8054 throw new Error("initializeWasm() must be awaited first!");
8056 const nativeResponseValue = wasm.DecodeError_free(this_obj);
8057 // debug statements here
8059 // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
8060 export function DecodeError_clone(orig: number): number {
8061 if(!isWasmInitialized) {
8062 throw new Error("initializeWasm() must be awaited first!");
8064 const nativeResponseValue = wasm.DecodeError_clone(orig);
8065 return nativeResponseValue;
8067 // void Init_free(struct LDKInit this_obj);
8068 export function Init_free(this_obj: number): void {
8069 if(!isWasmInitialized) {
8070 throw new Error("initializeWasm() must be awaited first!");
8072 const nativeResponseValue = wasm.Init_free(this_obj);
8073 // debug statements here
8075 // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
8076 export function Init_get_features(this_ptr: number): number {
8077 if(!isWasmInitialized) {
8078 throw new Error("initializeWasm() must be awaited first!");
8080 const nativeResponseValue = wasm.Init_get_features(this_ptr);
8081 return nativeResponseValue;
8083 // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
8084 export function Init_set_features(this_ptr: number, val: number): void {
8085 if(!isWasmInitialized) {
8086 throw new Error("initializeWasm() must be awaited first!");
8088 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
8089 // debug statements here
8091 // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
8092 export function Init_new(features_arg: number): number {
8093 if(!isWasmInitialized) {
8094 throw new Error("initializeWasm() must be awaited first!");
8096 const nativeResponseValue = wasm.Init_new(features_arg);
8097 return nativeResponseValue;
8099 // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
8100 export function Init_clone(orig: number): number {
8101 if(!isWasmInitialized) {
8102 throw new Error("initializeWasm() must be awaited first!");
8104 const nativeResponseValue = wasm.Init_clone(orig);
8105 return nativeResponseValue;
8107 // void ErrorMessage_free(struct LDKErrorMessage this_obj);
8108 export function ErrorMessage_free(this_obj: number): void {
8109 if(!isWasmInitialized) {
8110 throw new Error("initializeWasm() must be awaited first!");
8112 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
8113 // debug statements here
8115 // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
8116 export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
8117 if(!isWasmInitialized) {
8118 throw new Error("initializeWasm() must be awaited first!");
8120 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
8121 return decodeArray(nativeResponseValue);
8123 // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8124 export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
8125 if(!isWasmInitialized) {
8126 throw new Error("initializeWasm() must be awaited first!");
8128 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
8129 // debug statements here
8131 // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
8132 export function ErrorMessage_get_data(this_ptr: number): String {
8133 if(!isWasmInitialized) {
8134 throw new Error("initializeWasm() must be awaited first!");
8136 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
8137 return nativeResponseValue;
8139 // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
8140 export function ErrorMessage_set_data(this_ptr: number, val: String): void {
8141 if(!isWasmInitialized) {
8142 throw new Error("initializeWasm() must be awaited first!");
8144 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, val);
8145 // debug statements here
8147 // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
8148 export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
8149 if(!isWasmInitialized) {
8150 throw new Error("initializeWasm() must be awaited first!");
8152 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), data_arg);
8153 return nativeResponseValue;
8155 // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
8156 export function ErrorMessage_clone(orig: number): number {
8157 if(!isWasmInitialized) {
8158 throw new Error("initializeWasm() must be awaited first!");
8160 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
8161 return nativeResponseValue;
8163 // void Ping_free(struct LDKPing this_obj);
8164 export function Ping_free(this_obj: number): void {
8165 if(!isWasmInitialized) {
8166 throw new Error("initializeWasm() must be awaited first!");
8168 const nativeResponseValue = wasm.Ping_free(this_obj);
8169 // debug statements here
8171 // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
8172 export function Ping_get_ponglen(this_ptr: number): number {
8173 if(!isWasmInitialized) {
8174 throw new Error("initializeWasm() must be awaited first!");
8176 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
8177 return nativeResponseValue;
8179 // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
8180 export function Ping_set_ponglen(this_ptr: number, val: number): void {
8181 if(!isWasmInitialized) {
8182 throw new Error("initializeWasm() must be awaited first!");
8184 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
8185 // debug statements here
8187 // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
8188 export function Ping_get_byteslen(this_ptr: number): number {
8189 if(!isWasmInitialized) {
8190 throw new Error("initializeWasm() must be awaited first!");
8192 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
8193 return nativeResponseValue;
8195 // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
8196 export function Ping_set_byteslen(this_ptr: number, val: number): void {
8197 if(!isWasmInitialized) {
8198 throw new Error("initializeWasm() must be awaited first!");
8200 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
8201 // debug statements here
8203 // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
8204 export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
8205 if(!isWasmInitialized) {
8206 throw new Error("initializeWasm() must be awaited first!");
8208 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
8209 return nativeResponseValue;
8211 // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
8212 export function Ping_clone(orig: number): number {
8213 if(!isWasmInitialized) {
8214 throw new Error("initializeWasm() must be awaited first!");
8216 const nativeResponseValue = wasm.Ping_clone(orig);
8217 return nativeResponseValue;
8219 // void Pong_free(struct LDKPong this_obj);
8220 export function Pong_free(this_obj: number): void {
8221 if(!isWasmInitialized) {
8222 throw new Error("initializeWasm() must be awaited first!");
8224 const nativeResponseValue = wasm.Pong_free(this_obj);
8225 // debug statements here
8227 // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
8228 export function Pong_get_byteslen(this_ptr: number): number {
8229 if(!isWasmInitialized) {
8230 throw new Error("initializeWasm() must be awaited first!");
8232 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
8233 return nativeResponseValue;
8235 // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
8236 export function Pong_set_byteslen(this_ptr: number, val: number): void {
8237 if(!isWasmInitialized) {
8238 throw new Error("initializeWasm() must be awaited first!");
8240 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
8241 // debug statements here
8243 // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
8244 export function Pong_new(byteslen_arg: number): number {
8245 if(!isWasmInitialized) {
8246 throw new Error("initializeWasm() must be awaited first!");
8248 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
8249 return nativeResponseValue;
8251 // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
8252 export function Pong_clone(orig: number): number {
8253 if(!isWasmInitialized) {
8254 throw new Error("initializeWasm() must be awaited first!");
8256 const nativeResponseValue = wasm.Pong_clone(orig);
8257 return nativeResponseValue;
8259 // void OpenChannel_free(struct LDKOpenChannel this_obj);
8260 export function OpenChannel_free(this_obj: number): void {
8261 if(!isWasmInitialized) {
8262 throw new Error("initializeWasm() must be awaited first!");
8264 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
8265 // debug statements here
8267 // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
8268 export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
8269 if(!isWasmInitialized) {
8270 throw new Error("initializeWasm() must be awaited first!");
8272 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
8273 return decodeArray(nativeResponseValue);
8275 // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8276 export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8277 if(!isWasmInitialized) {
8278 throw new Error("initializeWasm() must be awaited first!");
8280 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
8281 // debug statements here
8283 // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
8284 export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
8285 if(!isWasmInitialized) {
8286 throw new Error("initializeWasm() must be awaited first!");
8288 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
8289 return decodeArray(nativeResponseValue);
8291 // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8292 export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
8293 if(!isWasmInitialized) {
8294 throw new Error("initializeWasm() must be awaited first!");
8296 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
8297 // debug statements here
8299 // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8300 export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
8301 if(!isWasmInitialized) {
8302 throw new Error("initializeWasm() must be awaited first!");
8304 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
8305 return nativeResponseValue;
8307 // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8308 export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
8309 if(!isWasmInitialized) {
8310 throw new Error("initializeWasm() must be awaited first!");
8312 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
8313 // debug statements here
8315 // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8316 export function OpenChannel_get_push_msat(this_ptr: number): number {
8317 if(!isWasmInitialized) {
8318 throw new Error("initializeWasm() must be awaited first!");
8320 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
8321 return nativeResponseValue;
8323 // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8324 export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
8325 if(!isWasmInitialized) {
8326 throw new Error("initializeWasm() must be awaited first!");
8328 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
8329 // debug statements here
8331 // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8332 export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
8333 if(!isWasmInitialized) {
8334 throw new Error("initializeWasm() must be awaited first!");
8336 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
8337 return nativeResponseValue;
8339 // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8340 export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
8341 if(!isWasmInitialized) {
8342 throw new Error("initializeWasm() must be awaited first!");
8344 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
8345 // debug statements here
8347 // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8348 export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
8349 if(!isWasmInitialized) {
8350 throw new Error("initializeWasm() must be awaited first!");
8352 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
8353 return nativeResponseValue;
8355 // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8356 export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
8357 if(!isWasmInitialized) {
8358 throw new Error("initializeWasm() must be awaited first!");
8360 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
8361 // debug statements here
8363 // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8364 export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
8365 if(!isWasmInitialized) {
8366 throw new Error("initializeWasm() must be awaited first!");
8368 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
8369 return nativeResponseValue;
8371 // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8372 export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
8373 if(!isWasmInitialized) {
8374 throw new Error("initializeWasm() must be awaited first!");
8376 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
8377 // debug statements here
8379 // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8380 export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
8381 if(!isWasmInitialized) {
8382 throw new Error("initializeWasm() must be awaited first!");
8384 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
8385 return nativeResponseValue;
8387 // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8388 export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
8389 if(!isWasmInitialized) {
8390 throw new Error("initializeWasm() must be awaited first!");
8392 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
8393 // debug statements here
8395 // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8396 export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
8397 if(!isWasmInitialized) {
8398 throw new Error("initializeWasm() must be awaited first!");
8400 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
8401 return nativeResponseValue;
8403 // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
8404 export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
8405 if(!isWasmInitialized) {
8406 throw new Error("initializeWasm() must be awaited first!");
8408 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
8409 // debug statements here
8411 // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8412 export function OpenChannel_get_to_self_delay(this_ptr: number): number {
8413 if(!isWasmInitialized) {
8414 throw new Error("initializeWasm() must be awaited first!");
8416 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
8417 return nativeResponseValue;
8419 // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
8420 export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
8421 if(!isWasmInitialized) {
8422 throw new Error("initializeWasm() must be awaited first!");
8424 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
8425 // debug statements here
8427 // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8428 export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
8429 if(!isWasmInitialized) {
8430 throw new Error("initializeWasm() must be awaited first!");
8432 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
8433 return nativeResponseValue;
8435 // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
8436 export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
8437 if(!isWasmInitialized) {
8438 throw new Error("initializeWasm() must be awaited first!");
8440 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
8441 // debug statements here
8443 // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8444 export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
8445 if(!isWasmInitialized) {
8446 throw new Error("initializeWasm() must be awaited first!");
8448 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
8449 return decodeArray(nativeResponseValue);
8451 // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8452 export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
8453 if(!isWasmInitialized) {
8454 throw new Error("initializeWasm() must be awaited first!");
8456 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
8457 // debug statements here
8459 // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8460 export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
8461 if(!isWasmInitialized) {
8462 throw new Error("initializeWasm() must be awaited first!");
8464 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
8465 return decodeArray(nativeResponseValue);
8467 // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8468 export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
8469 if(!isWasmInitialized) {
8470 throw new Error("initializeWasm() must be awaited first!");
8472 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
8473 // debug statements here
8475 // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8476 export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
8477 if(!isWasmInitialized) {
8478 throw new Error("initializeWasm() must be awaited first!");
8480 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
8481 return decodeArray(nativeResponseValue);
8483 // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8484 export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
8485 if(!isWasmInitialized) {
8486 throw new Error("initializeWasm() must be awaited first!");
8488 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
8489 // debug statements here
8491 // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8492 export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
8493 if(!isWasmInitialized) {
8494 throw new Error("initializeWasm() must be awaited first!");
8496 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
8497 return decodeArray(nativeResponseValue);
8499 // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8500 export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
8501 if(!isWasmInitialized) {
8502 throw new Error("initializeWasm() must be awaited first!");
8504 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
8505 // debug statements here
8507 // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8508 export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
8509 if(!isWasmInitialized) {
8510 throw new Error("initializeWasm() must be awaited first!");
8512 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
8513 return decodeArray(nativeResponseValue);
8515 // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8516 export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
8517 if(!isWasmInitialized) {
8518 throw new Error("initializeWasm() must be awaited first!");
8520 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
8521 // debug statements here
8523 // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8524 export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
8525 if(!isWasmInitialized) {
8526 throw new Error("initializeWasm() must be awaited first!");
8528 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
8529 return decodeArray(nativeResponseValue);
8531 // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8532 export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8533 if(!isWasmInitialized) {
8534 throw new Error("initializeWasm() must be awaited first!");
8536 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
8537 // debug statements here
8539 // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8540 export function OpenChannel_get_channel_flags(this_ptr: number): number {
8541 if(!isWasmInitialized) {
8542 throw new Error("initializeWasm() must be awaited first!");
8544 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
8545 return nativeResponseValue;
8547 // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
8548 export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
8549 if(!isWasmInitialized) {
8550 throw new Error("initializeWasm() must be awaited first!");
8552 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
8553 // debug statements here
8555 // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
8556 export function OpenChannel_clone(orig: number): number {
8557 if(!isWasmInitialized) {
8558 throw new Error("initializeWasm() must be awaited first!");
8560 const nativeResponseValue = wasm.OpenChannel_clone(orig);
8561 return nativeResponseValue;
8563 // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
8564 export function AcceptChannel_free(this_obj: number): void {
8565 if(!isWasmInitialized) {
8566 throw new Error("initializeWasm() must be awaited first!");
8568 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
8569 // debug statements here
8571 // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
8572 export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
8573 if(!isWasmInitialized) {
8574 throw new Error("initializeWasm() must be awaited first!");
8576 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
8577 return decodeArray(nativeResponseValue);
8579 // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8580 export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
8581 if(!isWasmInitialized) {
8582 throw new Error("initializeWasm() must be awaited first!");
8584 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
8585 // debug statements here
8587 // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8588 export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
8589 if(!isWasmInitialized) {
8590 throw new Error("initializeWasm() must be awaited first!");
8592 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
8593 return nativeResponseValue;
8595 // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
8596 export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
8597 if(!isWasmInitialized) {
8598 throw new Error("initializeWasm() must be awaited first!");
8600 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
8601 // debug statements here
8603 // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8604 export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
8605 if(!isWasmInitialized) {
8606 throw new Error("initializeWasm() must be awaited first!");
8608 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
8609 return nativeResponseValue;
8611 // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
8612 export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
8613 if(!isWasmInitialized) {
8614 throw new Error("initializeWasm() must be awaited first!");
8616 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
8617 // debug statements here
8619 // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8620 export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
8621 if(!isWasmInitialized) {
8622 throw new Error("initializeWasm() must be awaited first!");
8624 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
8625 return nativeResponseValue;
8627 // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
8628 export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
8629 if(!isWasmInitialized) {
8630 throw new Error("initializeWasm() must be awaited first!");
8632 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
8633 // debug statements here
8635 // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8636 export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
8637 if(!isWasmInitialized) {
8638 throw new Error("initializeWasm() must be awaited first!");
8640 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
8641 return nativeResponseValue;
8643 // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
8644 export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
8645 if(!isWasmInitialized) {
8646 throw new Error("initializeWasm() must be awaited first!");
8648 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
8649 // debug statements here
8651 // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8652 export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
8653 if(!isWasmInitialized) {
8654 throw new Error("initializeWasm() must be awaited first!");
8656 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
8657 return nativeResponseValue;
8659 // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
8660 export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
8661 if(!isWasmInitialized) {
8662 throw new Error("initializeWasm() must be awaited first!");
8664 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
8665 // debug statements here
8667 // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8668 export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
8669 if(!isWasmInitialized) {
8670 throw new Error("initializeWasm() must be awaited first!");
8672 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
8673 return nativeResponseValue;
8675 // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
8676 export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
8677 if(!isWasmInitialized) {
8678 throw new Error("initializeWasm() must be awaited first!");
8680 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
8681 // debug statements here
8683 // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8684 export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
8685 if(!isWasmInitialized) {
8686 throw new Error("initializeWasm() must be awaited first!");
8688 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
8689 return nativeResponseValue;
8691 // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
8692 export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
8693 if(!isWasmInitialized) {
8694 throw new Error("initializeWasm() must be awaited first!");
8696 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
8697 // debug statements here
8699 // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8700 export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
8701 if(!isWasmInitialized) {
8702 throw new Error("initializeWasm() must be awaited first!");
8704 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
8705 return decodeArray(nativeResponseValue);
8707 // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8708 export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
8709 if(!isWasmInitialized) {
8710 throw new Error("initializeWasm() must be awaited first!");
8712 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
8713 // debug statements here
8715 // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8716 export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
8717 if(!isWasmInitialized) {
8718 throw new Error("initializeWasm() must be awaited first!");
8720 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
8721 return decodeArray(nativeResponseValue);
8723 // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8724 export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
8725 if(!isWasmInitialized) {
8726 throw new Error("initializeWasm() must be awaited first!");
8728 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
8729 // debug statements here
8731 // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8732 export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
8733 if(!isWasmInitialized) {
8734 throw new Error("initializeWasm() must be awaited first!");
8736 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
8737 return decodeArray(nativeResponseValue);
8739 // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8740 export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
8741 if(!isWasmInitialized) {
8742 throw new Error("initializeWasm() must be awaited first!");
8744 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
8745 // debug statements here
8747 // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8748 export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
8749 if(!isWasmInitialized) {
8750 throw new Error("initializeWasm() must be awaited first!");
8752 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
8753 return decodeArray(nativeResponseValue);
8755 // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8756 export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
8757 if(!isWasmInitialized) {
8758 throw new Error("initializeWasm() must be awaited first!");
8760 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
8761 // debug statements here
8763 // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8764 export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
8765 if(!isWasmInitialized) {
8766 throw new Error("initializeWasm() must be awaited first!");
8768 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
8769 return decodeArray(nativeResponseValue);
8771 // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8772 export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
8773 if(!isWasmInitialized) {
8774 throw new Error("initializeWasm() must be awaited first!");
8776 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
8777 // debug statements here
8779 // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8780 export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
8781 if(!isWasmInitialized) {
8782 throw new Error("initializeWasm() must be awaited first!");
8784 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
8785 return decodeArray(nativeResponseValue);
8787 // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8788 export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8789 if(!isWasmInitialized) {
8790 throw new Error("initializeWasm() must be awaited first!");
8792 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
8793 // debug statements here
8795 // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
8796 export function AcceptChannel_clone(orig: number): number {
8797 if(!isWasmInitialized) {
8798 throw new Error("initializeWasm() must be awaited first!");
8800 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
8801 return nativeResponseValue;
8803 // void FundingCreated_free(struct LDKFundingCreated this_obj);
8804 export function FundingCreated_free(this_obj: number): void {
8805 if(!isWasmInitialized) {
8806 throw new Error("initializeWasm() must be awaited first!");
8808 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
8809 // debug statements here
8811 // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
8812 export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
8813 if(!isWasmInitialized) {
8814 throw new Error("initializeWasm() must be awaited first!");
8816 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
8817 return decodeArray(nativeResponseValue);
8819 // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8820 export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
8821 if(!isWasmInitialized) {
8822 throw new Error("initializeWasm() must be awaited first!");
8824 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
8825 // debug statements here
8827 // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
8828 export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
8829 if(!isWasmInitialized) {
8830 throw new Error("initializeWasm() must be awaited first!");
8832 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
8833 return decodeArray(nativeResponseValue);
8835 // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8836 export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
8837 if(!isWasmInitialized) {
8838 throw new Error("initializeWasm() must be awaited first!");
8840 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
8841 // debug statements here
8843 // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
8844 export function FundingCreated_get_funding_output_index(this_ptr: number): number {
8845 if(!isWasmInitialized) {
8846 throw new Error("initializeWasm() must be awaited first!");
8848 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
8849 return nativeResponseValue;
8851 // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
8852 export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
8853 if(!isWasmInitialized) {
8854 throw new Error("initializeWasm() must be awaited first!");
8856 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
8857 // debug statements here
8859 // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
8860 export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
8861 if(!isWasmInitialized) {
8862 throw new Error("initializeWasm() must be awaited first!");
8864 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
8865 return decodeArray(nativeResponseValue);
8867 // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
8868 export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
8869 if(!isWasmInitialized) {
8870 throw new Error("initializeWasm() must be awaited first!");
8872 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
8873 // debug statements here
8875 // 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);
8876 export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
8877 if(!isWasmInitialized) {
8878 throw new Error("initializeWasm() must be awaited first!");
8880 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
8881 return nativeResponseValue;
8883 // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
8884 export function FundingCreated_clone(orig: number): number {
8885 if(!isWasmInitialized) {
8886 throw new Error("initializeWasm() must be awaited first!");
8888 const nativeResponseValue = wasm.FundingCreated_clone(orig);
8889 return nativeResponseValue;
8891 // void FundingSigned_free(struct LDKFundingSigned this_obj);
8892 export function FundingSigned_free(this_obj: number): void {
8893 if(!isWasmInitialized) {
8894 throw new Error("initializeWasm() must be awaited first!");
8896 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
8897 // debug statements here
8899 // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
8900 export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
8901 if(!isWasmInitialized) {
8902 throw new Error("initializeWasm() must be awaited first!");
8904 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
8905 return decodeArray(nativeResponseValue);
8907 // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8908 export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
8909 if(!isWasmInitialized) {
8910 throw new Error("initializeWasm() must be awaited first!");
8912 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
8913 // debug statements here
8915 // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
8916 export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
8917 if(!isWasmInitialized) {
8918 throw new Error("initializeWasm() must be awaited first!");
8920 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
8921 return decodeArray(nativeResponseValue);
8923 // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
8924 export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
8925 if(!isWasmInitialized) {
8926 throw new Error("initializeWasm() must be awaited first!");
8928 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
8929 // debug statements here
8931 // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
8932 export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
8933 if(!isWasmInitialized) {
8934 throw new Error("initializeWasm() must be awaited first!");
8936 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
8937 return nativeResponseValue;
8939 // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
8940 export function FundingSigned_clone(orig: number): number {
8941 if(!isWasmInitialized) {
8942 throw new Error("initializeWasm() must be awaited first!");
8944 const nativeResponseValue = wasm.FundingSigned_clone(orig);
8945 return nativeResponseValue;
8947 // void FundingLocked_free(struct LDKFundingLocked this_obj);
8948 export function FundingLocked_free(this_obj: number): void {
8949 if(!isWasmInitialized) {
8950 throw new Error("initializeWasm() must be awaited first!");
8952 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
8953 // debug statements here
8955 // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
8956 export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
8957 if(!isWasmInitialized) {
8958 throw new Error("initializeWasm() must be awaited first!");
8960 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
8961 return decodeArray(nativeResponseValue);
8963 // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8964 export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
8965 if(!isWasmInitialized) {
8966 throw new Error("initializeWasm() must be awaited first!");
8968 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
8969 // debug statements here
8971 // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
8972 export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
8973 if(!isWasmInitialized) {
8974 throw new Error("initializeWasm() must be awaited first!");
8976 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
8977 return decodeArray(nativeResponseValue);
8979 // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8980 export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8981 if(!isWasmInitialized) {
8982 throw new Error("initializeWasm() must be awaited first!");
8984 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
8985 // debug statements here
8987 // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
8988 export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
8989 if(!isWasmInitialized) {
8990 throw new Error("initializeWasm() must be awaited first!");
8992 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
8993 return nativeResponseValue;
8995 // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
8996 export function FundingLocked_clone(orig: number): number {
8997 if(!isWasmInitialized) {
8998 throw new Error("initializeWasm() must be awaited first!");
9000 const nativeResponseValue = wasm.FundingLocked_clone(orig);
9001 return nativeResponseValue;
9003 // void Shutdown_free(struct LDKShutdown this_obj);
9004 export function Shutdown_free(this_obj: number): void {
9005 if(!isWasmInitialized) {
9006 throw new Error("initializeWasm() must be awaited first!");
9008 const nativeResponseValue = wasm.Shutdown_free(this_obj);
9009 // debug statements here
9011 // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
9012 export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
9013 if(!isWasmInitialized) {
9014 throw new Error("initializeWasm() must be awaited first!");
9016 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
9017 return decodeArray(nativeResponseValue);
9019 // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9020 export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
9021 if(!isWasmInitialized) {
9022 throw new Error("initializeWasm() must be awaited first!");
9024 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
9025 // debug statements here
9027 // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
9028 export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
9029 if(!isWasmInitialized) {
9030 throw new Error("initializeWasm() must be awaited first!");
9032 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
9033 return decodeArray(nativeResponseValue);
9035 // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9036 export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
9037 if(!isWasmInitialized) {
9038 throw new Error("initializeWasm() must be awaited first!");
9040 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
9041 // debug statements here
9043 // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
9044 export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
9045 if(!isWasmInitialized) {
9046 throw new Error("initializeWasm() must be awaited first!");
9048 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
9049 return nativeResponseValue;
9051 // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
9052 export function Shutdown_clone(orig: number): number {
9053 if(!isWasmInitialized) {
9054 throw new Error("initializeWasm() must be awaited first!");
9056 const nativeResponseValue = wasm.Shutdown_clone(orig);
9057 return nativeResponseValue;
9059 // void ClosingSigned_free(struct LDKClosingSigned this_obj);
9060 export function ClosingSigned_free(this_obj: number): void {
9061 if(!isWasmInitialized) {
9062 throw new Error("initializeWasm() must be awaited first!");
9064 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
9065 // debug statements here
9067 // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
9068 export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
9069 if(!isWasmInitialized) {
9070 throw new Error("initializeWasm() must be awaited first!");
9072 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
9073 return decodeArray(nativeResponseValue);
9075 // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9076 export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
9077 if(!isWasmInitialized) {
9078 throw new Error("initializeWasm() must be awaited first!");
9080 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
9081 // debug statements here
9083 // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
9084 export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
9085 if(!isWasmInitialized) {
9086 throw new Error("initializeWasm() must be awaited first!");
9088 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
9089 return nativeResponseValue;
9091 // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
9092 export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
9093 if(!isWasmInitialized) {
9094 throw new Error("initializeWasm() must be awaited first!");
9096 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
9097 // debug statements here
9099 // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
9100 export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
9101 if(!isWasmInitialized) {
9102 throw new Error("initializeWasm() must be awaited first!");
9104 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
9105 return decodeArray(nativeResponseValue);
9107 // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
9108 export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
9109 if(!isWasmInitialized) {
9110 throw new Error("initializeWasm() must be awaited first!");
9112 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
9113 // debug statements here
9115 // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
9116 export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
9117 if(!isWasmInitialized) {
9118 throw new Error("initializeWasm() must be awaited first!");
9120 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
9121 return nativeResponseValue;
9123 // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
9124 export function ClosingSigned_clone(orig: number): number {
9125 if(!isWasmInitialized) {
9126 throw new Error("initializeWasm() must be awaited first!");
9128 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
9129 return nativeResponseValue;
9131 // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
9132 export function UpdateAddHTLC_free(this_obj: number): void {
9133 if(!isWasmInitialized) {
9134 throw new Error("initializeWasm() must be awaited first!");
9136 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
9137 // debug statements here
9139 // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
9140 export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
9141 if(!isWasmInitialized) {
9142 throw new Error("initializeWasm() must be awaited first!");
9144 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
9145 return decodeArray(nativeResponseValue);
9147 // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9148 export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9149 if(!isWasmInitialized) {
9150 throw new Error("initializeWasm() must be awaited first!");
9152 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
9153 // debug statements here
9155 // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
9156 export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
9157 if(!isWasmInitialized) {
9158 throw new Error("initializeWasm() must be awaited first!");
9160 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
9161 return nativeResponseValue;
9163 // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
9164 export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
9165 if(!isWasmInitialized) {
9166 throw new Error("initializeWasm() must be awaited first!");
9168 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
9169 // debug statements here
9171 // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
9172 export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
9173 if(!isWasmInitialized) {
9174 throw new Error("initializeWasm() must be awaited first!");
9176 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
9177 return nativeResponseValue;
9179 // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
9180 export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
9181 if(!isWasmInitialized) {
9182 throw new Error("initializeWasm() must be awaited first!");
9184 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
9185 // debug statements here
9187 // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
9188 export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
9189 if(!isWasmInitialized) {
9190 throw new Error("initializeWasm() must be awaited first!");
9192 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
9193 return decodeArray(nativeResponseValue);
9195 // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9196 export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
9197 if(!isWasmInitialized) {
9198 throw new Error("initializeWasm() must be awaited first!");
9200 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
9201 // debug statements here
9203 // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
9204 export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
9205 if(!isWasmInitialized) {
9206 throw new Error("initializeWasm() must be awaited first!");
9208 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
9209 return nativeResponseValue;
9211 // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
9212 export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
9213 if(!isWasmInitialized) {
9214 throw new Error("initializeWasm() must be awaited first!");
9216 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
9217 // debug statements here
9219 // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
9220 export function UpdateAddHTLC_clone(orig: number): number {
9221 if(!isWasmInitialized) {
9222 throw new Error("initializeWasm() must be awaited first!");
9224 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
9225 return nativeResponseValue;
9227 // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
9228 export function UpdateFulfillHTLC_free(this_obj: number): void {
9229 if(!isWasmInitialized) {
9230 throw new Error("initializeWasm() must be awaited first!");
9232 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
9233 // debug statements here
9235 // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
9236 export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
9237 if(!isWasmInitialized) {
9238 throw new Error("initializeWasm() must be awaited first!");
9240 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
9241 return decodeArray(nativeResponseValue);
9243 // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9244 export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9245 if(!isWasmInitialized) {
9246 throw new Error("initializeWasm() must be awaited first!");
9248 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
9249 // debug statements here
9251 // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
9252 export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
9253 if(!isWasmInitialized) {
9254 throw new Error("initializeWasm() must be awaited first!");
9256 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
9257 return nativeResponseValue;
9259 // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
9260 export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
9261 if(!isWasmInitialized) {
9262 throw new Error("initializeWasm() must be awaited first!");
9264 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
9265 // debug statements here
9267 // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
9268 export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
9269 if(!isWasmInitialized) {
9270 throw new Error("initializeWasm() must be awaited first!");
9272 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
9273 return decodeArray(nativeResponseValue);
9275 // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9276 export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
9277 if(!isWasmInitialized) {
9278 throw new Error("initializeWasm() must be awaited first!");
9280 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
9281 // debug statements here
9283 // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
9284 export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
9285 if(!isWasmInitialized) {
9286 throw new Error("initializeWasm() must be awaited first!");
9288 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
9289 return nativeResponseValue;
9291 // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
9292 export function UpdateFulfillHTLC_clone(orig: number): number {
9293 if(!isWasmInitialized) {
9294 throw new Error("initializeWasm() must be awaited first!");
9296 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
9297 return nativeResponseValue;
9299 // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
9300 export function UpdateFailHTLC_free(this_obj: number): void {
9301 if(!isWasmInitialized) {
9302 throw new Error("initializeWasm() must be awaited first!");
9304 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
9305 // debug statements here
9307 // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
9308 export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
9309 if(!isWasmInitialized) {
9310 throw new Error("initializeWasm() must be awaited first!");
9312 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
9313 return decodeArray(nativeResponseValue);
9315 // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9316 export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9317 if(!isWasmInitialized) {
9318 throw new Error("initializeWasm() must be awaited first!");
9320 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
9321 // debug statements here
9323 // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
9324 export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
9325 if(!isWasmInitialized) {
9326 throw new Error("initializeWasm() must be awaited first!");
9328 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
9329 return nativeResponseValue;
9331 // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
9332 export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
9333 if(!isWasmInitialized) {
9334 throw new Error("initializeWasm() must be awaited first!");
9336 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
9337 // debug statements here
9339 // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
9340 export function UpdateFailHTLC_clone(orig: number): number {
9341 if(!isWasmInitialized) {
9342 throw new Error("initializeWasm() must be awaited first!");
9344 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
9345 return nativeResponseValue;
9347 // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
9348 export function UpdateFailMalformedHTLC_free(this_obj: number): void {
9349 if(!isWasmInitialized) {
9350 throw new Error("initializeWasm() must be awaited first!");
9352 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
9353 // debug statements here
9355 // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
9356 export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
9357 if(!isWasmInitialized) {
9358 throw new Error("initializeWasm() must be awaited first!");
9360 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
9361 return decodeArray(nativeResponseValue);
9363 // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9364 export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9365 if(!isWasmInitialized) {
9366 throw new Error("initializeWasm() must be awaited first!");
9368 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
9369 // debug statements here
9371 // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
9372 export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
9373 if(!isWasmInitialized) {
9374 throw new Error("initializeWasm() must be awaited first!");
9376 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
9377 return nativeResponseValue;
9379 // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
9380 export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
9381 if(!isWasmInitialized) {
9382 throw new Error("initializeWasm() must be awaited first!");
9384 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
9385 // debug statements here
9387 // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
9388 export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
9389 if(!isWasmInitialized) {
9390 throw new Error("initializeWasm() must be awaited first!");
9392 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
9393 return nativeResponseValue;
9395 // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
9396 export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
9397 if(!isWasmInitialized) {
9398 throw new Error("initializeWasm() must be awaited first!");
9400 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
9401 // debug statements here
9403 // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
9404 export function UpdateFailMalformedHTLC_clone(orig: number): number {
9405 if(!isWasmInitialized) {
9406 throw new Error("initializeWasm() must be awaited first!");
9408 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
9409 return nativeResponseValue;
9411 // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
9412 export function CommitmentSigned_free(this_obj: number): void {
9413 if(!isWasmInitialized) {
9414 throw new Error("initializeWasm() must be awaited first!");
9416 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
9417 // debug statements here
9419 // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
9420 export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
9421 if(!isWasmInitialized) {
9422 throw new Error("initializeWasm() must be awaited first!");
9424 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
9425 return decodeArray(nativeResponseValue);
9427 // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9428 export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
9429 if(!isWasmInitialized) {
9430 throw new Error("initializeWasm() must be awaited first!");
9432 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
9433 // debug statements here
9435 // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
9436 export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
9437 if(!isWasmInitialized) {
9438 throw new Error("initializeWasm() must be awaited first!");
9440 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
9441 return decodeArray(nativeResponseValue);
9443 // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
9444 export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
9445 if(!isWasmInitialized) {
9446 throw new Error("initializeWasm() must be awaited first!");
9448 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
9449 // debug statements here
9451 // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
9452 export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
9453 if(!isWasmInitialized) {
9454 throw new Error("initializeWasm() must be awaited first!");
9456 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
9457 // debug statements here
9459 // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
9460 export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
9461 if(!isWasmInitialized) {
9462 throw new Error("initializeWasm() must be awaited first!");
9464 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
9465 return nativeResponseValue;
9467 // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
9468 export function CommitmentSigned_clone(orig: number): number {
9469 if(!isWasmInitialized) {
9470 throw new Error("initializeWasm() must be awaited first!");
9472 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
9473 return nativeResponseValue;
9475 // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
9476 export function RevokeAndACK_free(this_obj: number): void {
9477 if(!isWasmInitialized) {
9478 throw new Error("initializeWasm() must be awaited first!");
9480 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
9481 // debug statements here
9483 // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
9484 export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
9485 if(!isWasmInitialized) {
9486 throw new Error("initializeWasm() must be awaited first!");
9488 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
9489 return decodeArray(nativeResponseValue);
9491 // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9492 export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
9493 if(!isWasmInitialized) {
9494 throw new Error("initializeWasm() must be awaited first!");
9496 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
9497 // debug statements here
9499 // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
9500 export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
9501 if(!isWasmInitialized) {
9502 throw new Error("initializeWasm() must be awaited first!");
9504 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
9505 return decodeArray(nativeResponseValue);
9507 // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9508 export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
9509 if(!isWasmInitialized) {
9510 throw new Error("initializeWasm() must be awaited first!");
9512 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
9513 // debug statements here
9515 // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
9516 export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
9517 if(!isWasmInitialized) {
9518 throw new Error("initializeWasm() must be awaited first!");
9520 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
9521 return decodeArray(nativeResponseValue);
9523 // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9524 export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9525 if(!isWasmInitialized) {
9526 throw new Error("initializeWasm() must be awaited first!");
9528 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
9529 // debug statements here
9531 // 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);
9532 export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
9533 if(!isWasmInitialized) {
9534 throw new Error("initializeWasm() must be awaited first!");
9536 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
9537 return nativeResponseValue;
9539 // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
9540 export function RevokeAndACK_clone(orig: number): number {
9541 if(!isWasmInitialized) {
9542 throw new Error("initializeWasm() must be awaited first!");
9544 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
9545 return nativeResponseValue;
9547 // void UpdateFee_free(struct LDKUpdateFee this_obj);
9548 export function UpdateFee_free(this_obj: number): void {
9549 if(!isWasmInitialized) {
9550 throw new Error("initializeWasm() must be awaited first!");
9552 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
9553 // debug statements here
9555 // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
9556 export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
9557 if(!isWasmInitialized) {
9558 throw new Error("initializeWasm() must be awaited first!");
9560 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
9561 return decodeArray(nativeResponseValue);
9563 // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9564 export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
9565 if(!isWasmInitialized) {
9566 throw new Error("initializeWasm() must be awaited first!");
9568 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
9569 // debug statements here
9571 // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
9572 export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
9573 if(!isWasmInitialized) {
9574 throw new Error("initializeWasm() must be awaited first!");
9576 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
9577 return nativeResponseValue;
9579 // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
9580 export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
9581 if(!isWasmInitialized) {
9582 throw new Error("initializeWasm() must be awaited first!");
9584 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
9585 // debug statements here
9587 // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
9588 export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
9589 if(!isWasmInitialized) {
9590 throw new Error("initializeWasm() must be awaited first!");
9592 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
9593 return nativeResponseValue;
9595 // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
9596 export function UpdateFee_clone(orig: number): number {
9597 if(!isWasmInitialized) {
9598 throw new Error("initializeWasm() must be awaited first!");
9600 const nativeResponseValue = wasm.UpdateFee_clone(orig);
9601 return nativeResponseValue;
9603 // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
9604 export function DataLossProtect_free(this_obj: number): void {
9605 if(!isWasmInitialized) {
9606 throw new Error("initializeWasm() must be awaited first!");
9608 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
9609 // debug statements here
9611 // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
9612 export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
9613 if(!isWasmInitialized) {
9614 throw new Error("initializeWasm() must be awaited first!");
9616 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
9617 return decodeArray(nativeResponseValue);
9619 // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9620 export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
9621 if(!isWasmInitialized) {
9622 throw new Error("initializeWasm() must be awaited first!");
9624 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
9625 // debug statements here
9627 // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
9628 export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
9629 if(!isWasmInitialized) {
9630 throw new Error("initializeWasm() must be awaited first!");
9632 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
9633 return decodeArray(nativeResponseValue);
9635 // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9636 export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9637 if(!isWasmInitialized) {
9638 throw new Error("initializeWasm() must be awaited first!");
9640 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
9641 // debug statements here
9643 // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
9644 export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
9645 if(!isWasmInitialized) {
9646 throw new Error("initializeWasm() must be awaited first!");
9648 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
9649 return nativeResponseValue;
9651 // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
9652 export function DataLossProtect_clone(orig: number): number {
9653 if(!isWasmInitialized) {
9654 throw new Error("initializeWasm() must be awaited first!");
9656 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
9657 return nativeResponseValue;
9659 // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
9660 export function ChannelReestablish_free(this_obj: number): void {
9661 if(!isWasmInitialized) {
9662 throw new Error("initializeWasm() must be awaited first!");
9664 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
9665 // debug statements here
9667 // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
9668 export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
9669 if(!isWasmInitialized) {
9670 throw new Error("initializeWasm() must be awaited first!");
9672 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
9673 return decodeArray(nativeResponseValue);
9675 // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9676 export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
9677 if(!isWasmInitialized) {
9678 throw new Error("initializeWasm() must be awaited first!");
9680 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
9681 // debug statements here
9683 // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
9684 export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
9685 if(!isWasmInitialized) {
9686 throw new Error("initializeWasm() must be awaited first!");
9688 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
9689 return nativeResponseValue;
9691 // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
9692 export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
9693 if(!isWasmInitialized) {
9694 throw new Error("initializeWasm() must be awaited first!");
9696 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
9697 // debug statements here
9699 // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
9700 export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
9701 if(!isWasmInitialized) {
9702 throw new Error("initializeWasm() must be awaited first!");
9704 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
9705 return nativeResponseValue;
9707 // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
9708 export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
9709 if(!isWasmInitialized) {
9710 throw new Error("initializeWasm() must be awaited first!");
9712 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
9713 // debug statements here
9715 // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
9716 export function ChannelReestablish_clone(orig: number): number {
9717 if(!isWasmInitialized) {
9718 throw new Error("initializeWasm() must be awaited first!");
9720 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
9721 return nativeResponseValue;
9723 // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
9724 export function AnnouncementSignatures_free(this_obj: number): void {
9725 if(!isWasmInitialized) {
9726 throw new Error("initializeWasm() must be awaited first!");
9728 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
9729 // debug statements here
9731 // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
9732 export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
9733 if(!isWasmInitialized) {
9734 throw new Error("initializeWasm() must be awaited first!");
9736 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
9737 return decodeArray(nativeResponseValue);
9739 // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9740 export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
9741 if(!isWasmInitialized) {
9742 throw new Error("initializeWasm() must be awaited first!");
9744 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
9745 // debug statements here
9747 // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
9748 export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
9749 if(!isWasmInitialized) {
9750 throw new Error("initializeWasm() must be awaited first!");
9752 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
9753 return nativeResponseValue;
9755 // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
9756 export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
9757 if(!isWasmInitialized) {
9758 throw new Error("initializeWasm() must be awaited first!");
9760 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
9761 // debug statements here
9763 // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
9764 export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
9765 if(!isWasmInitialized) {
9766 throw new Error("initializeWasm() must be awaited first!");
9768 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
9769 return decodeArray(nativeResponseValue);
9771 // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
9772 export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
9773 if(!isWasmInitialized) {
9774 throw new Error("initializeWasm() must be awaited first!");
9776 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
9777 // debug statements here
9779 // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
9780 export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
9781 if(!isWasmInitialized) {
9782 throw new Error("initializeWasm() must be awaited first!");
9784 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
9785 return decodeArray(nativeResponseValue);
9787 // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
9788 export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
9789 if(!isWasmInitialized) {
9790 throw new Error("initializeWasm() must be awaited first!");
9792 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
9793 // debug statements here
9795 // 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);
9796 export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
9797 if(!isWasmInitialized) {
9798 throw new Error("initializeWasm() must be awaited first!");
9800 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
9801 return nativeResponseValue;
9803 // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
9804 export function AnnouncementSignatures_clone(orig: number): number {
9805 if(!isWasmInitialized) {
9806 throw new Error("initializeWasm() must be awaited first!");
9808 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
9809 return nativeResponseValue;
9811 // void NetAddress_free(struct LDKNetAddress this_ptr);
9812 export function NetAddress_free(this_ptr: number): void {
9813 if(!isWasmInitialized) {
9814 throw new Error("initializeWasm() must be awaited first!");
9816 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
9817 // debug statements here
9819 // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
9820 export function NetAddress_clone(orig: number): number {
9821 if(!isWasmInitialized) {
9822 throw new Error("initializeWasm() must be awaited first!");
9824 const nativeResponseValue = wasm.NetAddress_clone(orig);
9825 return nativeResponseValue;
9827 // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
9828 export function NetAddress_write(obj: number): Uint8Array {
9829 if(!isWasmInitialized) {
9830 throw new Error("initializeWasm() must be awaited first!");
9832 const nativeResponseValue = wasm.NetAddress_write(obj);
9833 return decodeArray(nativeResponseValue);
9835 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
9836 export function Result_read(ser: Uint8Array): number {
9837 if(!isWasmInitialized) {
9838 throw new Error("initializeWasm() must be awaited first!");
9840 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
9841 return nativeResponseValue;
9843 // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
9844 export function NetAddress_read(ser: Uint8Array): number {
9845 if(!isWasmInitialized) {
9846 throw new Error("initializeWasm() must be awaited first!");
9848 const nativeResponseValue = wasm.NetAddress_read(encodeArray(ser));
9849 return nativeResponseValue;
9851 // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
9852 export function UnsignedNodeAnnouncement_free(this_obj: number): void {
9853 if(!isWasmInitialized) {
9854 throw new Error("initializeWasm() must be awaited first!");
9856 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
9857 // debug statements here
9859 // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
9860 export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
9861 if(!isWasmInitialized) {
9862 throw new Error("initializeWasm() must be awaited first!");
9864 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
9865 return nativeResponseValue;
9867 // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
9868 export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
9869 if(!isWasmInitialized) {
9870 throw new Error("initializeWasm() must be awaited first!");
9872 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
9873 // debug statements here
9875 // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
9876 export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
9877 if(!isWasmInitialized) {
9878 throw new Error("initializeWasm() must be awaited first!");
9880 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
9881 return nativeResponseValue;
9883 // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
9884 export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
9885 if(!isWasmInitialized) {
9886 throw new Error("initializeWasm() must be awaited first!");
9888 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
9889 // debug statements here
9891 // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
9892 export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
9893 if(!isWasmInitialized) {
9894 throw new Error("initializeWasm() must be awaited first!");
9896 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
9897 return decodeArray(nativeResponseValue);
9899 // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9900 export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
9901 if(!isWasmInitialized) {
9902 throw new Error("initializeWasm() must be awaited first!");
9904 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
9905 // debug statements here
9907 // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
9908 export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
9909 if(!isWasmInitialized) {
9910 throw new Error("initializeWasm() must be awaited first!");
9912 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
9913 return decodeArray(nativeResponseValue);
9915 // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
9916 export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
9917 if(!isWasmInitialized) {
9918 throw new Error("initializeWasm() must be awaited first!");
9920 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
9921 // debug statements here
9923 // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
9924 export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
9925 if(!isWasmInitialized) {
9926 throw new Error("initializeWasm() must be awaited first!");
9928 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
9929 return decodeArray(nativeResponseValue);
9931 // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9932 export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
9933 if(!isWasmInitialized) {
9934 throw new Error("initializeWasm() must be awaited first!");
9936 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
9937 // debug statements here
9939 // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
9940 export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
9941 if(!isWasmInitialized) {
9942 throw new Error("initializeWasm() must be awaited first!");
9944 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
9945 // debug statements here
9947 // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
9948 export function UnsignedNodeAnnouncement_clone(orig: number): number {
9949 if(!isWasmInitialized) {
9950 throw new Error("initializeWasm() must be awaited first!");
9952 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
9953 return nativeResponseValue;
9955 // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
9956 export function NodeAnnouncement_free(this_obj: number): void {
9957 if(!isWasmInitialized) {
9958 throw new Error("initializeWasm() must be awaited first!");
9960 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
9961 // debug statements here
9963 // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
9964 export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
9965 if(!isWasmInitialized) {
9966 throw new Error("initializeWasm() must be awaited first!");
9968 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
9969 return decodeArray(nativeResponseValue);
9971 // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
9972 export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
9973 if(!isWasmInitialized) {
9974 throw new Error("initializeWasm() must be awaited first!");
9976 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
9977 // debug statements here
9979 // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
9980 export function NodeAnnouncement_get_contents(this_ptr: number): number {
9981 if(!isWasmInitialized) {
9982 throw new Error("initializeWasm() must be awaited first!");
9984 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
9985 return nativeResponseValue;
9987 // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
9988 export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
9989 if(!isWasmInitialized) {
9990 throw new Error("initializeWasm() must be awaited first!");
9992 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
9993 // debug statements here
9995 // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
9996 export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
9997 if(!isWasmInitialized) {
9998 throw new Error("initializeWasm() must be awaited first!");
10000 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
10001 return nativeResponseValue;
10003 // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
10004 export function NodeAnnouncement_clone(orig: number): number {
10005 if(!isWasmInitialized) {
10006 throw new Error("initializeWasm() must be awaited first!");
10008 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
10009 return nativeResponseValue;
10011 // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
10012 export function UnsignedChannelAnnouncement_free(this_obj: number): void {
10013 if(!isWasmInitialized) {
10014 throw new Error("initializeWasm() must be awaited first!");
10016 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
10017 // debug statements here
10019 // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10020 export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
10021 if(!isWasmInitialized) {
10022 throw new Error("initializeWasm() must be awaited first!");
10024 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
10025 return nativeResponseValue;
10027 // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
10028 export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
10029 if(!isWasmInitialized) {
10030 throw new Error("initializeWasm() must be awaited first!");
10032 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
10033 // debug statements here
10035 // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
10036 export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
10037 if(!isWasmInitialized) {
10038 throw new Error("initializeWasm() must be awaited first!");
10040 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
10041 return decodeArray(nativeResponseValue);
10043 // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10044 export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10045 if(!isWasmInitialized) {
10046 throw new Error("initializeWasm() must be awaited first!");
10048 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
10049 // debug statements here
10051 // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10052 export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
10053 if(!isWasmInitialized) {
10054 throw new Error("initializeWasm() must be awaited first!");
10056 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
10057 return nativeResponseValue;
10059 // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
10060 export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
10061 if(!isWasmInitialized) {
10062 throw new Error("initializeWasm() must be awaited first!");
10064 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
10065 // debug statements here
10067 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10068 export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
10069 if(!isWasmInitialized) {
10070 throw new Error("initializeWasm() must be awaited first!");
10072 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
10073 return decodeArray(nativeResponseValue);
10075 // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10076 export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
10077 if(!isWasmInitialized) {
10078 throw new Error("initializeWasm() must be awaited first!");
10080 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
10081 // debug statements here
10083 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10084 export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
10085 if(!isWasmInitialized) {
10086 throw new Error("initializeWasm() must be awaited first!");
10088 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
10089 return decodeArray(nativeResponseValue);
10091 // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10092 export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
10093 if(!isWasmInitialized) {
10094 throw new Error("initializeWasm() must be awaited first!");
10096 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
10097 // debug statements here
10099 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10100 export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
10101 if(!isWasmInitialized) {
10102 throw new Error("initializeWasm() must be awaited first!");
10104 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
10105 return decodeArray(nativeResponseValue);
10107 // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10108 export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
10109 if(!isWasmInitialized) {
10110 throw new Error("initializeWasm() must be awaited first!");
10112 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
10113 // debug statements here
10115 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10116 export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
10117 if(!isWasmInitialized) {
10118 throw new Error("initializeWasm() must be awaited first!");
10120 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
10121 return decodeArray(nativeResponseValue);
10123 // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10124 export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
10125 if(!isWasmInitialized) {
10126 throw new Error("initializeWasm() must be awaited first!");
10128 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
10129 // debug statements here
10131 // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
10132 export function UnsignedChannelAnnouncement_clone(orig: number): number {
10133 if(!isWasmInitialized) {
10134 throw new Error("initializeWasm() must be awaited first!");
10136 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
10137 return nativeResponseValue;
10139 // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
10140 export function ChannelAnnouncement_free(this_obj: number): void {
10141 if(!isWasmInitialized) {
10142 throw new Error("initializeWasm() must be awaited first!");
10144 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
10145 // debug statements here
10147 // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10148 export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
10149 if(!isWasmInitialized) {
10150 throw new Error("initializeWasm() must be awaited first!");
10152 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
10153 return decodeArray(nativeResponseValue);
10155 // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10156 export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
10157 if(!isWasmInitialized) {
10158 throw new Error("initializeWasm() must be awaited first!");
10160 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
10161 // debug statements here
10163 // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10164 export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
10165 if(!isWasmInitialized) {
10166 throw new Error("initializeWasm() must be awaited first!");
10168 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
10169 return decodeArray(nativeResponseValue);
10171 // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10172 export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
10173 if(!isWasmInitialized) {
10174 throw new Error("initializeWasm() must be awaited first!");
10176 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
10177 // debug statements here
10179 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10180 export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
10181 if(!isWasmInitialized) {
10182 throw new Error("initializeWasm() must be awaited first!");
10184 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
10185 return decodeArray(nativeResponseValue);
10187 // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10188 export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
10189 if(!isWasmInitialized) {
10190 throw new Error("initializeWasm() must be awaited first!");
10192 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
10193 // debug statements here
10195 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10196 export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
10197 if(!isWasmInitialized) {
10198 throw new Error("initializeWasm() must be awaited first!");
10200 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
10201 return decodeArray(nativeResponseValue);
10203 // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10204 export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
10205 if(!isWasmInitialized) {
10206 throw new Error("initializeWasm() must be awaited first!");
10208 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
10209 // debug statements here
10211 // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10212 export function ChannelAnnouncement_get_contents(this_ptr: number): number {
10213 if(!isWasmInitialized) {
10214 throw new Error("initializeWasm() must be awaited first!");
10216 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
10217 return nativeResponseValue;
10219 // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
10220 export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
10221 if(!isWasmInitialized) {
10222 throw new Error("initializeWasm() must be awaited first!");
10224 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
10225 // debug statements here
10227 // 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);
10228 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 {
10229 if(!isWasmInitialized) {
10230 throw new Error("initializeWasm() must be awaited first!");
10232 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);
10233 return nativeResponseValue;
10235 // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
10236 export function ChannelAnnouncement_clone(orig: number): number {
10237 if(!isWasmInitialized) {
10238 throw new Error("initializeWasm() must be awaited first!");
10240 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
10241 return nativeResponseValue;
10243 // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
10244 export function UnsignedChannelUpdate_free(this_obj: number): void {
10245 if(!isWasmInitialized) {
10246 throw new Error("initializeWasm() must be awaited first!");
10248 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
10249 // debug statements here
10251 // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
10252 export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
10253 if(!isWasmInitialized) {
10254 throw new Error("initializeWasm() must be awaited first!");
10256 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
10257 return decodeArray(nativeResponseValue);
10259 // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10260 export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10261 if(!isWasmInitialized) {
10262 throw new Error("initializeWasm() must be awaited first!");
10264 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
10265 // debug statements here
10267 // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10268 export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
10269 if(!isWasmInitialized) {
10270 throw new Error("initializeWasm() must be awaited first!");
10272 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
10273 return nativeResponseValue;
10275 // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
10276 export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
10277 if(!isWasmInitialized) {
10278 throw new Error("initializeWasm() must be awaited first!");
10280 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
10281 // debug statements here
10283 // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10284 export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
10285 if(!isWasmInitialized) {
10286 throw new Error("initializeWasm() must be awaited first!");
10288 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
10289 return nativeResponseValue;
10291 // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
10292 export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
10293 if(!isWasmInitialized) {
10294 throw new Error("initializeWasm() must be awaited first!");
10296 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
10297 // debug statements here
10299 // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10300 export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
10301 if(!isWasmInitialized) {
10302 throw new Error("initializeWasm() must be awaited first!");
10304 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
10305 return nativeResponseValue;
10307 // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
10308 export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
10309 if(!isWasmInitialized) {
10310 throw new Error("initializeWasm() must be awaited first!");
10312 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
10313 // debug statements here
10315 // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10316 export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
10317 if(!isWasmInitialized) {
10318 throw new Error("initializeWasm() must be awaited first!");
10320 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
10321 return nativeResponseValue;
10323 // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
10324 export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
10325 if(!isWasmInitialized) {
10326 throw new Error("initializeWasm() must be awaited first!");
10328 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
10329 // debug statements here
10331 // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10332 export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
10333 if(!isWasmInitialized) {
10334 throw new Error("initializeWasm() must be awaited first!");
10336 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
10337 return nativeResponseValue;
10339 // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
10340 export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10341 if(!isWasmInitialized) {
10342 throw new Error("initializeWasm() must be awaited first!");
10344 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
10345 // debug statements here
10347 // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10348 export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
10349 if(!isWasmInitialized) {
10350 throw new Error("initializeWasm() must be awaited first!");
10352 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
10353 return nativeResponseValue;
10355 // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
10356 export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
10357 if(!isWasmInitialized) {
10358 throw new Error("initializeWasm() must be awaited first!");
10360 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
10361 // debug statements here
10363 // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10364 export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
10365 if(!isWasmInitialized) {
10366 throw new Error("initializeWasm() must be awaited first!");
10368 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
10369 return nativeResponseValue;
10371 // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
10372 export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
10373 if(!isWasmInitialized) {
10374 throw new Error("initializeWasm() must be awaited first!");
10376 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
10377 // debug statements here
10379 // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
10380 export function UnsignedChannelUpdate_clone(orig: number): number {
10381 if(!isWasmInitialized) {
10382 throw new Error("initializeWasm() must be awaited first!");
10384 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
10385 return nativeResponseValue;
10387 // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
10388 export function ChannelUpdate_free(this_obj: number): void {
10389 if(!isWasmInitialized) {
10390 throw new Error("initializeWasm() must be awaited first!");
10392 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
10393 // debug statements here
10395 // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
10396 export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
10397 if(!isWasmInitialized) {
10398 throw new Error("initializeWasm() must be awaited first!");
10400 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
10401 return decodeArray(nativeResponseValue);
10403 // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
10404 export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
10405 if(!isWasmInitialized) {
10406 throw new Error("initializeWasm() must be awaited first!");
10408 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
10409 // debug statements here
10411 // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
10412 export function ChannelUpdate_get_contents(this_ptr: number): number {
10413 if(!isWasmInitialized) {
10414 throw new Error("initializeWasm() must be awaited first!");
10416 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
10417 return nativeResponseValue;
10419 // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
10420 export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
10421 if(!isWasmInitialized) {
10422 throw new Error("initializeWasm() must be awaited first!");
10424 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
10425 // debug statements here
10427 // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
10428 export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
10429 if(!isWasmInitialized) {
10430 throw new Error("initializeWasm() must be awaited first!");
10432 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
10433 return nativeResponseValue;
10435 // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
10436 export function ChannelUpdate_clone(orig: number): number {
10437 if(!isWasmInitialized) {
10438 throw new Error("initializeWasm() must be awaited first!");
10440 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
10441 return nativeResponseValue;
10443 // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
10444 export function QueryChannelRange_free(this_obj: number): void {
10445 if(!isWasmInitialized) {
10446 throw new Error("initializeWasm() must be awaited first!");
10448 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
10449 // debug statements here
10451 // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
10452 export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
10453 if(!isWasmInitialized) {
10454 throw new Error("initializeWasm() must be awaited first!");
10456 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
10457 return decodeArray(nativeResponseValue);
10459 // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10460 export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10461 if(!isWasmInitialized) {
10462 throw new Error("initializeWasm() must be awaited first!");
10464 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
10465 // debug statements here
10467 // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
10468 export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
10469 if(!isWasmInitialized) {
10470 throw new Error("initializeWasm() must be awaited first!");
10472 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
10473 return nativeResponseValue;
10475 // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
10476 export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
10477 if(!isWasmInitialized) {
10478 throw new Error("initializeWasm() must be awaited first!");
10480 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
10481 // debug statements here
10483 // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
10484 export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
10485 if(!isWasmInitialized) {
10486 throw new Error("initializeWasm() must be awaited first!");
10488 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
10489 return nativeResponseValue;
10491 // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
10492 export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
10493 if(!isWasmInitialized) {
10494 throw new Error("initializeWasm() must be awaited first!");
10496 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
10497 // debug statements here
10499 // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
10500 export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
10501 if(!isWasmInitialized) {
10502 throw new Error("initializeWasm() must be awaited first!");
10504 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
10505 return nativeResponseValue;
10507 // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
10508 export function QueryChannelRange_clone(orig: number): number {
10509 if(!isWasmInitialized) {
10510 throw new Error("initializeWasm() must be awaited first!");
10512 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
10513 return nativeResponseValue;
10515 // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
10516 export function ReplyChannelRange_free(this_obj: number): void {
10517 if(!isWasmInitialized) {
10518 throw new Error("initializeWasm() must be awaited first!");
10520 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
10521 // debug statements here
10523 // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
10524 export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
10525 if(!isWasmInitialized) {
10526 throw new Error("initializeWasm() must be awaited first!");
10528 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
10529 return decodeArray(nativeResponseValue);
10531 // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10532 export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10533 if(!isWasmInitialized) {
10534 throw new Error("initializeWasm() must be awaited first!");
10536 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
10537 // debug statements here
10539 // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
10540 export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
10541 if(!isWasmInitialized) {
10542 throw new Error("initializeWasm() must be awaited first!");
10544 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
10545 return nativeResponseValue;
10547 // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
10548 export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
10549 if(!isWasmInitialized) {
10550 throw new Error("initializeWasm() must be awaited first!");
10552 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
10553 // debug statements here
10555 // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
10556 export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
10557 if(!isWasmInitialized) {
10558 throw new Error("initializeWasm() must be awaited first!");
10560 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
10561 return nativeResponseValue;
10563 // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
10564 export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
10565 if(!isWasmInitialized) {
10566 throw new Error("initializeWasm() must be awaited first!");
10568 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
10569 // debug statements here
10571 // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
10572 export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
10573 if(!isWasmInitialized) {
10574 throw new Error("initializeWasm() must be awaited first!");
10576 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
10577 return nativeResponseValue;
10579 // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
10580 export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
10581 if(!isWasmInitialized) {
10582 throw new Error("initializeWasm() must be awaited first!");
10584 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
10585 // debug statements here
10587 // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
10588 export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
10589 if(!isWasmInitialized) {
10590 throw new Error("initializeWasm() must be awaited first!");
10592 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
10593 // debug statements here
10595 // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool sync_complete_arg, struct LDKCVec_u64Z short_channel_ids_arg);
10596 export function ReplyChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number, sync_complete_arg: boolean, short_channel_ids_arg: number[]): number {
10597 if(!isWasmInitialized) {
10598 throw new Error("initializeWasm() must be awaited first!");
10600 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
10601 return nativeResponseValue;
10603 // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
10604 export function ReplyChannelRange_clone(orig: number): number {
10605 if(!isWasmInitialized) {
10606 throw new Error("initializeWasm() must be awaited first!");
10608 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
10609 return nativeResponseValue;
10611 // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
10612 export function QueryShortChannelIds_free(this_obj: number): void {
10613 if(!isWasmInitialized) {
10614 throw new Error("initializeWasm() must be awaited first!");
10616 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
10617 // debug statements here
10619 // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
10620 export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
10621 if(!isWasmInitialized) {
10622 throw new Error("initializeWasm() must be awaited first!");
10624 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
10625 return decodeArray(nativeResponseValue);
10627 // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10628 export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10629 if(!isWasmInitialized) {
10630 throw new Error("initializeWasm() must be awaited first!");
10632 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
10633 // debug statements here
10635 // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
10636 export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
10637 if(!isWasmInitialized) {
10638 throw new Error("initializeWasm() must be awaited first!");
10640 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
10641 // debug statements here
10643 // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
10644 export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
10645 if(!isWasmInitialized) {
10646 throw new Error("initializeWasm() must be awaited first!");
10648 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
10649 return nativeResponseValue;
10651 // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
10652 export function QueryShortChannelIds_clone(orig: number): number {
10653 if(!isWasmInitialized) {
10654 throw new Error("initializeWasm() must be awaited first!");
10656 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
10657 return nativeResponseValue;
10659 // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
10660 export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
10661 if(!isWasmInitialized) {
10662 throw new Error("initializeWasm() must be awaited first!");
10664 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
10665 // debug statements here
10667 // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
10668 export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
10669 if(!isWasmInitialized) {
10670 throw new Error("initializeWasm() must be awaited first!");
10672 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
10673 return decodeArray(nativeResponseValue);
10675 // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10676 export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10677 if(!isWasmInitialized) {
10678 throw new Error("initializeWasm() must be awaited first!");
10680 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
10681 // debug statements here
10683 // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
10684 export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
10685 if(!isWasmInitialized) {
10686 throw new Error("initializeWasm() must be awaited first!");
10688 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
10689 return nativeResponseValue;
10691 // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
10692 export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
10693 if(!isWasmInitialized) {
10694 throw new Error("initializeWasm() must be awaited first!");
10696 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
10697 // debug statements here
10699 // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
10700 export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
10701 if(!isWasmInitialized) {
10702 throw new Error("initializeWasm() must be awaited first!");
10704 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
10705 return nativeResponseValue;
10707 // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
10708 export function ReplyShortChannelIdsEnd_clone(orig: number): number {
10709 if(!isWasmInitialized) {
10710 throw new Error("initializeWasm() must be awaited first!");
10712 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
10713 return nativeResponseValue;
10715 // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
10716 export function GossipTimestampFilter_free(this_obj: number): void {
10717 if(!isWasmInitialized) {
10718 throw new Error("initializeWasm() must be awaited first!");
10720 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
10721 // debug statements here
10723 // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
10724 export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
10725 if(!isWasmInitialized) {
10726 throw new Error("initializeWasm() must be awaited first!");
10728 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
10729 return decodeArray(nativeResponseValue);
10731 // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10732 export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10733 if(!isWasmInitialized) {
10734 throw new Error("initializeWasm() must be awaited first!");
10736 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
10737 // debug statements here
10739 // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
10740 export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
10741 if(!isWasmInitialized) {
10742 throw new Error("initializeWasm() must be awaited first!");
10744 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
10745 return nativeResponseValue;
10747 // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
10748 export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
10749 if(!isWasmInitialized) {
10750 throw new Error("initializeWasm() must be awaited first!");
10752 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
10753 // debug statements here
10755 // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
10756 export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
10757 if(!isWasmInitialized) {
10758 throw new Error("initializeWasm() must be awaited first!");
10760 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
10761 return nativeResponseValue;
10763 // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
10764 export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
10765 if(!isWasmInitialized) {
10766 throw new Error("initializeWasm() must be awaited first!");
10768 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
10769 // debug statements here
10771 // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
10772 export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
10773 if(!isWasmInitialized) {
10774 throw new Error("initializeWasm() must be awaited first!");
10776 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
10777 return nativeResponseValue;
10779 // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
10780 export function GossipTimestampFilter_clone(orig: number): number {
10781 if(!isWasmInitialized) {
10782 throw new Error("initializeWasm() must be awaited first!");
10784 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
10785 return nativeResponseValue;
10787 // void ErrorAction_free(struct LDKErrorAction this_ptr);
10788 export function ErrorAction_free(this_ptr: number): void {
10789 if(!isWasmInitialized) {
10790 throw new Error("initializeWasm() must be awaited first!");
10792 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
10793 // debug statements here
10795 // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
10796 export function ErrorAction_clone(orig: number): number {
10797 if(!isWasmInitialized) {
10798 throw new Error("initializeWasm() must be awaited first!");
10800 const nativeResponseValue = wasm.ErrorAction_clone(orig);
10801 return nativeResponseValue;
10803 // void LightningError_free(struct LDKLightningError this_obj);
10804 export function LightningError_free(this_obj: number): void {
10805 if(!isWasmInitialized) {
10806 throw new Error("initializeWasm() must be awaited first!");
10808 const nativeResponseValue = wasm.LightningError_free(this_obj);
10809 // debug statements here
10811 // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
10812 export function LightningError_get_err(this_ptr: number): String {
10813 if(!isWasmInitialized) {
10814 throw new Error("initializeWasm() must be awaited first!");
10816 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
10817 return nativeResponseValue;
10819 // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
10820 export function LightningError_set_err(this_ptr: number, val: String): void {
10821 if(!isWasmInitialized) {
10822 throw new Error("initializeWasm() must be awaited first!");
10824 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, val);
10825 // debug statements here
10827 // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
10828 export function LightningError_get_action(this_ptr: number): number {
10829 if(!isWasmInitialized) {
10830 throw new Error("initializeWasm() must be awaited first!");
10832 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
10833 return nativeResponseValue;
10835 // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
10836 export function LightningError_set_action(this_ptr: number, val: number): void {
10837 if(!isWasmInitialized) {
10838 throw new Error("initializeWasm() must be awaited first!");
10840 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
10841 // debug statements here
10843 // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
10844 export function LightningError_new(err_arg: String, action_arg: number): number {
10845 if(!isWasmInitialized) {
10846 throw new Error("initializeWasm() must be awaited first!");
10848 const nativeResponseValue = wasm.LightningError_new(err_arg, action_arg);
10849 return nativeResponseValue;
10851 // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
10852 export function LightningError_clone(orig: number): number {
10853 if(!isWasmInitialized) {
10854 throw new Error("initializeWasm() must be awaited first!");
10856 const nativeResponseValue = wasm.LightningError_clone(orig);
10857 return nativeResponseValue;
10859 // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
10860 export function CommitmentUpdate_free(this_obj: number): void {
10861 if(!isWasmInitialized) {
10862 throw new Error("initializeWasm() must be awaited first!");
10864 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
10865 // debug statements here
10867 // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
10868 export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
10869 if(!isWasmInitialized) {
10870 throw new Error("initializeWasm() must be awaited first!");
10872 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
10873 // debug statements here
10875 // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
10876 export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
10877 if(!isWasmInitialized) {
10878 throw new Error("initializeWasm() must be awaited first!");
10880 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
10881 // debug statements here
10883 // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
10884 export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
10885 if(!isWasmInitialized) {
10886 throw new Error("initializeWasm() must be awaited first!");
10888 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
10889 // debug statements here
10891 // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
10892 export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
10893 if(!isWasmInitialized) {
10894 throw new Error("initializeWasm() must be awaited first!");
10896 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
10897 // debug statements here
10899 // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
10900 export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
10901 if(!isWasmInitialized) {
10902 throw new Error("initializeWasm() must be awaited first!");
10904 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
10905 return nativeResponseValue;
10907 // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
10908 export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
10909 if(!isWasmInitialized) {
10910 throw new Error("initializeWasm() must be awaited first!");
10912 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
10913 // debug statements here
10915 // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
10916 export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
10917 if(!isWasmInitialized) {
10918 throw new Error("initializeWasm() must be awaited first!");
10920 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
10921 return nativeResponseValue;
10923 // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
10924 export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
10925 if(!isWasmInitialized) {
10926 throw new Error("initializeWasm() must be awaited first!");
10928 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
10929 // debug statements here
10931 // 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);
10932 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 {
10933 if(!isWasmInitialized) {
10934 throw new Error("initializeWasm() must be awaited first!");
10936 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);
10937 return nativeResponseValue;
10939 // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
10940 export function CommitmentUpdate_clone(orig: number): number {
10941 if(!isWasmInitialized) {
10942 throw new Error("initializeWasm() must be awaited first!");
10944 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
10945 return nativeResponseValue;
10947 // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
10948 export function HTLCFailChannelUpdate_free(this_ptr: number): void {
10949 if(!isWasmInitialized) {
10950 throw new Error("initializeWasm() must be awaited first!");
10952 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
10953 // debug statements here
10955 // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
10956 export function HTLCFailChannelUpdate_clone(orig: number): number {
10957 if(!isWasmInitialized) {
10958 throw new Error("initializeWasm() must be awaited first!");
10960 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
10961 return nativeResponseValue;
10963 // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
10964 export function ChannelMessageHandler_free(this_ptr: number): void {
10965 if(!isWasmInitialized) {
10966 throw new Error("initializeWasm() must be awaited first!");
10968 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
10969 // debug statements here
10971 // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
10972 export function RoutingMessageHandler_free(this_ptr: number): void {
10973 if(!isWasmInitialized) {
10974 throw new Error("initializeWasm() must be awaited first!");
10976 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
10977 // debug statements here
10979 // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
10980 export function AcceptChannel_write(obj: number): Uint8Array {
10981 if(!isWasmInitialized) {
10982 throw new Error("initializeWasm() must be awaited first!");
10984 const nativeResponseValue = wasm.AcceptChannel_write(obj);
10985 return decodeArray(nativeResponseValue);
10987 // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
10988 export function AcceptChannel_read(ser: Uint8Array): number {
10989 if(!isWasmInitialized) {
10990 throw new Error("initializeWasm() must be awaited first!");
10992 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
10993 return nativeResponseValue;
10995 // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
10996 export function AnnouncementSignatures_write(obj: number): Uint8Array {
10997 if(!isWasmInitialized) {
10998 throw new Error("initializeWasm() must be awaited first!");
11000 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
11001 return decodeArray(nativeResponseValue);
11003 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
11004 export function AnnouncementSignatures_read(ser: Uint8Array): number {
11005 if(!isWasmInitialized) {
11006 throw new Error("initializeWasm() must be awaited first!");
11008 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
11009 return nativeResponseValue;
11011 // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
11012 export function ChannelReestablish_write(obj: number): Uint8Array {
11013 if(!isWasmInitialized) {
11014 throw new Error("initializeWasm() must be awaited first!");
11016 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
11017 return decodeArray(nativeResponseValue);
11019 // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
11020 export function ChannelReestablish_read(ser: Uint8Array): number {
11021 if(!isWasmInitialized) {
11022 throw new Error("initializeWasm() must be awaited first!");
11024 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
11025 return nativeResponseValue;
11027 // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
11028 export function ClosingSigned_write(obj: number): Uint8Array {
11029 if(!isWasmInitialized) {
11030 throw new Error("initializeWasm() must be awaited first!");
11032 const nativeResponseValue = wasm.ClosingSigned_write(obj);
11033 return decodeArray(nativeResponseValue);
11035 // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
11036 export function ClosingSigned_read(ser: Uint8Array): number {
11037 if(!isWasmInitialized) {
11038 throw new Error("initializeWasm() must be awaited first!");
11040 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
11041 return nativeResponseValue;
11043 // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
11044 export function CommitmentSigned_write(obj: number): Uint8Array {
11045 if(!isWasmInitialized) {
11046 throw new Error("initializeWasm() must be awaited first!");
11048 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
11049 return decodeArray(nativeResponseValue);
11051 // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
11052 export function CommitmentSigned_read(ser: Uint8Array): number {
11053 if(!isWasmInitialized) {
11054 throw new Error("initializeWasm() must be awaited first!");
11056 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
11057 return nativeResponseValue;
11059 // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
11060 export function FundingCreated_write(obj: number): Uint8Array {
11061 if(!isWasmInitialized) {
11062 throw new Error("initializeWasm() must be awaited first!");
11064 const nativeResponseValue = wasm.FundingCreated_write(obj);
11065 return decodeArray(nativeResponseValue);
11067 // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
11068 export function FundingCreated_read(ser: Uint8Array): number {
11069 if(!isWasmInitialized) {
11070 throw new Error("initializeWasm() must be awaited first!");
11072 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
11073 return nativeResponseValue;
11075 // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
11076 export function FundingSigned_write(obj: number): Uint8Array {
11077 if(!isWasmInitialized) {
11078 throw new Error("initializeWasm() must be awaited first!");
11080 const nativeResponseValue = wasm.FundingSigned_write(obj);
11081 return decodeArray(nativeResponseValue);
11083 // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
11084 export function FundingSigned_read(ser: Uint8Array): number {
11085 if(!isWasmInitialized) {
11086 throw new Error("initializeWasm() must be awaited first!");
11088 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
11089 return nativeResponseValue;
11091 // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
11092 export function FundingLocked_write(obj: number): Uint8Array {
11093 if(!isWasmInitialized) {
11094 throw new Error("initializeWasm() must be awaited first!");
11096 const nativeResponseValue = wasm.FundingLocked_write(obj);
11097 return decodeArray(nativeResponseValue);
11099 // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
11100 export function FundingLocked_read(ser: Uint8Array): number {
11101 if(!isWasmInitialized) {
11102 throw new Error("initializeWasm() must be awaited first!");
11104 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
11105 return nativeResponseValue;
11107 // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
11108 export function Init_write(obj: number): Uint8Array {
11109 if(!isWasmInitialized) {
11110 throw new Error("initializeWasm() must be awaited first!");
11112 const nativeResponseValue = wasm.Init_write(obj);
11113 return decodeArray(nativeResponseValue);
11115 // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
11116 export function Init_read(ser: Uint8Array): number {
11117 if(!isWasmInitialized) {
11118 throw new Error("initializeWasm() must be awaited first!");
11120 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
11121 return nativeResponseValue;
11123 // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
11124 export function OpenChannel_write(obj: number): Uint8Array {
11125 if(!isWasmInitialized) {
11126 throw new Error("initializeWasm() must be awaited first!");
11128 const nativeResponseValue = wasm.OpenChannel_write(obj);
11129 return decodeArray(nativeResponseValue);
11131 // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
11132 export function OpenChannel_read(ser: Uint8Array): number {
11133 if(!isWasmInitialized) {
11134 throw new Error("initializeWasm() must be awaited first!");
11136 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
11137 return nativeResponseValue;
11139 // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
11140 export function RevokeAndACK_write(obj: number): Uint8Array {
11141 if(!isWasmInitialized) {
11142 throw new Error("initializeWasm() must be awaited first!");
11144 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
11145 return decodeArray(nativeResponseValue);
11147 // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
11148 export function RevokeAndACK_read(ser: Uint8Array): number {
11149 if(!isWasmInitialized) {
11150 throw new Error("initializeWasm() must be awaited first!");
11152 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
11153 return nativeResponseValue;
11155 // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
11156 export function Shutdown_write(obj: number): Uint8Array {
11157 if(!isWasmInitialized) {
11158 throw new Error("initializeWasm() must be awaited first!");
11160 const nativeResponseValue = wasm.Shutdown_write(obj);
11161 return decodeArray(nativeResponseValue);
11163 // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
11164 export function Shutdown_read(ser: Uint8Array): number {
11165 if(!isWasmInitialized) {
11166 throw new Error("initializeWasm() must be awaited first!");
11168 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
11169 return nativeResponseValue;
11171 // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
11172 export function UpdateFailHTLC_write(obj: number): Uint8Array {
11173 if(!isWasmInitialized) {
11174 throw new Error("initializeWasm() must be awaited first!");
11176 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
11177 return decodeArray(nativeResponseValue);
11179 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
11180 export function UpdateFailHTLC_read(ser: Uint8Array): number {
11181 if(!isWasmInitialized) {
11182 throw new Error("initializeWasm() must be awaited first!");
11184 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
11185 return nativeResponseValue;
11187 // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
11188 export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
11189 if(!isWasmInitialized) {
11190 throw new Error("initializeWasm() must be awaited first!");
11192 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
11193 return decodeArray(nativeResponseValue);
11195 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
11196 export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
11197 if(!isWasmInitialized) {
11198 throw new Error("initializeWasm() must be awaited first!");
11200 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
11201 return nativeResponseValue;
11203 // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
11204 export function UpdateFee_write(obj: number): Uint8Array {
11205 if(!isWasmInitialized) {
11206 throw new Error("initializeWasm() must be awaited first!");
11208 const nativeResponseValue = wasm.UpdateFee_write(obj);
11209 return decodeArray(nativeResponseValue);
11211 // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
11212 export function UpdateFee_read(ser: Uint8Array): number {
11213 if(!isWasmInitialized) {
11214 throw new Error("initializeWasm() must be awaited first!");
11216 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
11217 return nativeResponseValue;
11219 // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
11220 export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
11221 if(!isWasmInitialized) {
11222 throw new Error("initializeWasm() must be awaited first!");
11224 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
11225 return decodeArray(nativeResponseValue);
11227 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
11228 export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
11229 if(!isWasmInitialized) {
11230 throw new Error("initializeWasm() must be awaited first!");
11232 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
11233 return nativeResponseValue;
11235 // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
11236 export function UpdateAddHTLC_write(obj: number): Uint8Array {
11237 if(!isWasmInitialized) {
11238 throw new Error("initializeWasm() must be awaited first!");
11240 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
11241 return decodeArray(nativeResponseValue);
11243 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
11244 export function UpdateAddHTLC_read(ser: Uint8Array): number {
11245 if(!isWasmInitialized) {
11246 throw new Error("initializeWasm() must be awaited first!");
11248 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
11249 return nativeResponseValue;
11251 // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
11252 export function Ping_write(obj: number): Uint8Array {
11253 if(!isWasmInitialized) {
11254 throw new Error("initializeWasm() must be awaited first!");
11256 const nativeResponseValue = wasm.Ping_write(obj);
11257 return decodeArray(nativeResponseValue);
11259 // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
11260 export function Ping_read(ser: Uint8Array): number {
11261 if(!isWasmInitialized) {
11262 throw new Error("initializeWasm() must be awaited first!");
11264 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
11265 return nativeResponseValue;
11267 // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
11268 export function Pong_write(obj: number): Uint8Array {
11269 if(!isWasmInitialized) {
11270 throw new Error("initializeWasm() must be awaited first!");
11272 const nativeResponseValue = wasm.Pong_write(obj);
11273 return decodeArray(nativeResponseValue);
11275 // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
11276 export function Pong_read(ser: Uint8Array): number {
11277 if(!isWasmInitialized) {
11278 throw new Error("initializeWasm() must be awaited first!");
11280 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
11281 return nativeResponseValue;
11283 // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
11284 export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
11285 if(!isWasmInitialized) {
11286 throw new Error("initializeWasm() must be awaited first!");
11288 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
11289 return decodeArray(nativeResponseValue);
11291 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
11292 export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
11293 if(!isWasmInitialized) {
11294 throw new Error("initializeWasm() must be awaited first!");
11296 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
11297 return nativeResponseValue;
11299 // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
11300 export function ChannelAnnouncement_write(obj: number): Uint8Array {
11301 if(!isWasmInitialized) {
11302 throw new Error("initializeWasm() must be awaited first!");
11304 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
11305 return decodeArray(nativeResponseValue);
11307 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
11308 export function ChannelAnnouncement_read(ser: Uint8Array): number {
11309 if(!isWasmInitialized) {
11310 throw new Error("initializeWasm() must be awaited first!");
11312 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
11313 return nativeResponseValue;
11315 // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
11316 export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
11317 if(!isWasmInitialized) {
11318 throw new Error("initializeWasm() must be awaited first!");
11320 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
11321 return decodeArray(nativeResponseValue);
11323 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
11324 export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
11325 if(!isWasmInitialized) {
11326 throw new Error("initializeWasm() must be awaited first!");
11328 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
11329 return nativeResponseValue;
11331 // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
11332 export function ChannelUpdate_write(obj: number): Uint8Array {
11333 if(!isWasmInitialized) {
11334 throw new Error("initializeWasm() must be awaited first!");
11336 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
11337 return decodeArray(nativeResponseValue);
11339 // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
11340 export function ChannelUpdate_read(ser: Uint8Array): number {
11341 if(!isWasmInitialized) {
11342 throw new Error("initializeWasm() must be awaited first!");
11344 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
11345 return nativeResponseValue;
11347 // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
11348 export function ErrorMessage_write(obj: number): Uint8Array {
11349 if(!isWasmInitialized) {
11350 throw new Error("initializeWasm() must be awaited first!");
11352 const nativeResponseValue = wasm.ErrorMessage_write(obj);
11353 return decodeArray(nativeResponseValue);
11355 // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
11356 export function ErrorMessage_read(ser: Uint8Array): number {
11357 if(!isWasmInitialized) {
11358 throw new Error("initializeWasm() must be awaited first!");
11360 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
11361 return nativeResponseValue;
11363 // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
11364 export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
11365 if(!isWasmInitialized) {
11366 throw new Error("initializeWasm() must be awaited first!");
11368 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
11369 return decodeArray(nativeResponseValue);
11371 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
11372 export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
11373 if(!isWasmInitialized) {
11374 throw new Error("initializeWasm() must be awaited first!");
11376 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
11377 return nativeResponseValue;
11379 // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
11380 export function NodeAnnouncement_write(obj: number): Uint8Array {
11381 if(!isWasmInitialized) {
11382 throw new Error("initializeWasm() must be awaited first!");
11384 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
11385 return decodeArray(nativeResponseValue);
11387 // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
11388 export function NodeAnnouncement_read(ser: Uint8Array): number {
11389 if(!isWasmInitialized) {
11390 throw new Error("initializeWasm() must be awaited first!");
11392 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
11393 return nativeResponseValue;
11395 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
11396 export function QueryShortChannelIds_read(ser: Uint8Array): number {
11397 if(!isWasmInitialized) {
11398 throw new Error("initializeWasm() must be awaited first!");
11400 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
11401 return nativeResponseValue;
11403 // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
11404 export function QueryShortChannelIds_write(obj: number): Uint8Array {
11405 if(!isWasmInitialized) {
11406 throw new Error("initializeWasm() must be awaited first!");
11408 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
11409 return decodeArray(nativeResponseValue);
11411 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
11412 export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
11413 if(!isWasmInitialized) {
11414 throw new Error("initializeWasm() must be awaited first!");
11416 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
11417 return nativeResponseValue;
11419 // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
11420 export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
11421 if(!isWasmInitialized) {
11422 throw new Error("initializeWasm() must be awaited first!");
11424 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
11425 return decodeArray(nativeResponseValue);
11427 // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
11428 export function QueryChannelRange_end_blocknum(this_arg: number): number {
11429 if(!isWasmInitialized) {
11430 throw new Error("initializeWasm() must be awaited first!");
11432 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
11433 return nativeResponseValue;
11435 // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
11436 export function QueryChannelRange_read(ser: Uint8Array): number {
11437 if(!isWasmInitialized) {
11438 throw new Error("initializeWasm() must be awaited first!");
11440 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
11441 return nativeResponseValue;
11443 // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
11444 export function QueryChannelRange_write(obj: number): Uint8Array {
11445 if(!isWasmInitialized) {
11446 throw new Error("initializeWasm() must be awaited first!");
11448 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
11449 return decodeArray(nativeResponseValue);
11451 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
11452 export function ReplyChannelRange_read(ser: Uint8Array): number {
11453 if(!isWasmInitialized) {
11454 throw new Error("initializeWasm() must be awaited first!");
11456 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
11457 return nativeResponseValue;
11459 // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
11460 export function ReplyChannelRange_write(obj: number): Uint8Array {
11461 if(!isWasmInitialized) {
11462 throw new Error("initializeWasm() must be awaited first!");
11464 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
11465 return decodeArray(nativeResponseValue);
11467 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
11468 export function GossipTimestampFilter_read(ser: Uint8Array): number {
11469 if(!isWasmInitialized) {
11470 throw new Error("initializeWasm() must be awaited first!");
11472 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
11473 return nativeResponseValue;
11475 // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
11476 export function GossipTimestampFilter_write(obj: number): Uint8Array {
11477 if(!isWasmInitialized) {
11478 throw new Error("initializeWasm() must be awaited first!");
11480 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
11481 return decodeArray(nativeResponseValue);
11483 // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
11484 export function IgnoringMessageHandler_free(this_obj: number): void {
11485 if(!isWasmInitialized) {
11486 throw new Error("initializeWasm() must be awaited first!");
11488 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
11489 // debug statements here
11491 // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
11492 export function IgnoringMessageHandler_new(): number {
11493 if(!isWasmInitialized) {
11494 throw new Error("initializeWasm() must be awaited first!");
11496 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
11497 return nativeResponseValue;
11499 // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
11500 export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
11501 if(!isWasmInitialized) {
11502 throw new Error("initializeWasm() must be awaited first!");
11504 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
11505 return nativeResponseValue;
11507 // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
11508 export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
11509 if(!isWasmInitialized) {
11510 throw new Error("initializeWasm() must be awaited first!");
11512 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
11513 return nativeResponseValue;
11515 // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
11516 export function ErroringMessageHandler_free(this_obj: number): void {
11517 if(!isWasmInitialized) {
11518 throw new Error("initializeWasm() must be awaited first!");
11520 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
11521 // debug statements here
11523 // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
11524 export function ErroringMessageHandler_new(): number {
11525 if(!isWasmInitialized) {
11526 throw new Error("initializeWasm() must be awaited first!");
11528 const nativeResponseValue = wasm.ErroringMessageHandler_new();
11529 return nativeResponseValue;
11531 // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
11532 export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
11533 if(!isWasmInitialized) {
11534 throw new Error("initializeWasm() must be awaited first!");
11536 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
11537 return nativeResponseValue;
11539 // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
11540 export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
11541 if(!isWasmInitialized) {
11542 throw new Error("initializeWasm() must be awaited first!");
11544 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
11545 return nativeResponseValue;
11547 // void MessageHandler_free(struct LDKMessageHandler this_obj);
11548 export function MessageHandler_free(this_obj: number): void {
11549 if(!isWasmInitialized) {
11550 throw new Error("initializeWasm() must be awaited first!");
11552 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
11553 // debug statements here
11555 // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
11556 export function MessageHandler_get_chan_handler(this_ptr: number): number {
11557 if(!isWasmInitialized) {
11558 throw new Error("initializeWasm() must be awaited first!");
11560 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
11561 return nativeResponseValue;
11563 // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
11564 export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
11565 if(!isWasmInitialized) {
11566 throw new Error("initializeWasm() must be awaited first!");
11568 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
11569 // debug statements here
11571 // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
11572 export function MessageHandler_get_route_handler(this_ptr: number): number {
11573 if(!isWasmInitialized) {
11574 throw new Error("initializeWasm() must be awaited first!");
11576 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
11577 return nativeResponseValue;
11579 // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
11580 export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
11581 if(!isWasmInitialized) {
11582 throw new Error("initializeWasm() must be awaited first!");
11584 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
11585 // debug statements here
11587 // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
11588 export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
11589 if(!isWasmInitialized) {
11590 throw new Error("initializeWasm() must be awaited first!");
11592 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
11593 return nativeResponseValue;
11595 // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
11596 export function SocketDescriptor_clone(orig: number): number {
11597 if(!isWasmInitialized) {
11598 throw new Error("initializeWasm() must be awaited first!");
11600 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
11601 return nativeResponseValue;
11603 // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
11604 export function SocketDescriptor_free(this_ptr: number): void {
11605 if(!isWasmInitialized) {
11606 throw new Error("initializeWasm() must be awaited first!");
11608 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
11609 // debug statements here
11611 // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
11612 export function PeerHandleError_free(this_obj: number): void {
11613 if(!isWasmInitialized) {
11614 throw new Error("initializeWasm() must be awaited first!");
11616 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
11617 // debug statements here
11619 // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
11620 export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
11621 if(!isWasmInitialized) {
11622 throw new Error("initializeWasm() must be awaited first!");
11624 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
11625 return nativeResponseValue;
11627 // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
11628 export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
11629 if(!isWasmInitialized) {
11630 throw new Error("initializeWasm() must be awaited first!");
11632 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
11633 // debug statements here
11635 // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
11636 export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
11637 if(!isWasmInitialized) {
11638 throw new Error("initializeWasm() must be awaited first!");
11640 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
11641 return nativeResponseValue;
11643 // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
11644 export function PeerHandleError_clone(orig: number): number {
11645 if(!isWasmInitialized) {
11646 throw new Error("initializeWasm() must be awaited first!");
11648 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
11649 return nativeResponseValue;
11651 // void PeerManager_free(struct LDKPeerManager this_obj);
11652 export function PeerManager_free(this_obj: number): void {
11653 if(!isWasmInitialized) {
11654 throw new Error("initializeWasm() must be awaited first!");
11656 const nativeResponseValue = wasm.PeerManager_free(this_obj);
11657 // debug statements here
11659 // 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);
11660 export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
11661 if(!isWasmInitialized) {
11662 throw new Error("initializeWasm() must be awaited first!");
11664 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
11665 return nativeResponseValue;
11667 // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
11668 export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
11669 if(!isWasmInitialized) {
11670 throw new Error("initializeWasm() must be awaited first!");
11672 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
11673 return nativeResponseValue;
11675 // 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);
11676 export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
11677 if(!isWasmInitialized) {
11678 throw new Error("initializeWasm() must be awaited first!");
11680 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
11681 return nativeResponseValue;
11683 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
11684 export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
11685 if(!isWasmInitialized) {
11686 throw new Error("initializeWasm() must be awaited first!");
11688 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
11689 return nativeResponseValue;
11691 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
11692 export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
11693 if(!isWasmInitialized) {
11694 throw new Error("initializeWasm() must be awaited first!");
11696 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
11697 return nativeResponseValue;
11699 // 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);
11700 export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
11701 if(!isWasmInitialized) {
11702 throw new Error("initializeWasm() must be awaited first!");
11704 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
11705 return nativeResponseValue;
11707 // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
11708 export function PeerManager_process_events(this_arg: number): void {
11709 if(!isWasmInitialized) {
11710 throw new Error("initializeWasm() must be awaited first!");
11712 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
11713 // debug statements here
11715 // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
11716 export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
11717 if(!isWasmInitialized) {
11718 throw new Error("initializeWasm() must be awaited first!");
11720 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
11721 // debug statements here
11723 // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
11724 export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
11725 if(!isWasmInitialized) {
11726 throw new Error("initializeWasm() must be awaited first!");
11728 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
11729 // debug statements here
11731 // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
11732 export function PeerManager_timer_tick_occurred(this_arg: number): void {
11733 if(!isWasmInitialized) {
11734 throw new Error("initializeWasm() must be awaited first!");
11736 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
11737 // debug statements here
11739 // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
11740 export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
11741 if(!isWasmInitialized) {
11742 throw new Error("initializeWasm() must be awaited first!");
11744 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
11745 return decodeArray(nativeResponseValue);
11747 // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
11748 export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
11749 if(!isWasmInitialized) {
11750 throw new Error("initializeWasm() must be awaited first!");
11752 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
11753 return nativeResponseValue;
11755 // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
11756 export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
11757 if(!isWasmInitialized) {
11758 throw new Error("initializeWasm() must be awaited first!");
11760 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
11761 return nativeResponseValue;
11763 // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
11764 export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
11765 if(!isWasmInitialized) {
11766 throw new Error("initializeWasm() must be awaited first!");
11768 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
11769 return nativeResponseValue;
11771 // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
11772 export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
11773 if(!isWasmInitialized) {
11774 throw new Error("initializeWasm() must be awaited first!");
11776 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
11777 return nativeResponseValue;
11779 // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
11780 export function TxCreationKeys_free(this_obj: number): void {
11781 if(!isWasmInitialized) {
11782 throw new Error("initializeWasm() must be awaited first!");
11784 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
11785 // debug statements here
11787 // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
11788 export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
11789 if(!isWasmInitialized) {
11790 throw new Error("initializeWasm() must be awaited first!");
11792 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
11793 return decodeArray(nativeResponseValue);
11795 // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11796 export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11797 if(!isWasmInitialized) {
11798 throw new Error("initializeWasm() must be awaited first!");
11800 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
11801 // debug statements here
11803 // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
11804 export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
11805 if(!isWasmInitialized) {
11806 throw new Error("initializeWasm() must be awaited first!");
11808 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
11809 return decodeArray(nativeResponseValue);
11811 // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11812 export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
11813 if(!isWasmInitialized) {
11814 throw new Error("initializeWasm() must be awaited first!");
11816 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
11817 // debug statements here
11819 // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
11820 export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
11821 if(!isWasmInitialized) {
11822 throw new Error("initializeWasm() must be awaited first!");
11824 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
11825 return decodeArray(nativeResponseValue);
11827 // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11828 export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
11829 if(!isWasmInitialized) {
11830 throw new Error("initializeWasm() must be awaited first!");
11832 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
11833 // debug statements here
11835 // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
11836 export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
11837 if(!isWasmInitialized) {
11838 throw new Error("initializeWasm() must be awaited first!");
11840 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
11841 return decodeArray(nativeResponseValue);
11843 // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11844 export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
11845 if(!isWasmInitialized) {
11846 throw new Error("initializeWasm() must be awaited first!");
11848 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
11849 // debug statements here
11851 // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
11852 export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
11853 if(!isWasmInitialized) {
11854 throw new Error("initializeWasm() must be awaited first!");
11856 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
11857 return decodeArray(nativeResponseValue);
11859 // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11860 export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
11861 if(!isWasmInitialized) {
11862 throw new Error("initializeWasm() must be awaited first!");
11864 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
11865 // debug statements here
11867 // 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);
11868 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 {
11869 if(!isWasmInitialized) {
11870 throw new Error("initializeWasm() must be awaited first!");
11872 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));
11873 return nativeResponseValue;
11875 // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
11876 export function TxCreationKeys_clone(orig: number): number {
11877 if(!isWasmInitialized) {
11878 throw new Error("initializeWasm() must be awaited first!");
11880 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
11881 return nativeResponseValue;
11883 // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
11884 export function TxCreationKeys_write(obj: number): Uint8Array {
11885 if(!isWasmInitialized) {
11886 throw new Error("initializeWasm() must be awaited first!");
11888 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
11889 return decodeArray(nativeResponseValue);
11891 // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
11892 export function TxCreationKeys_read(ser: Uint8Array): number {
11893 if(!isWasmInitialized) {
11894 throw new Error("initializeWasm() must be awaited first!");
11896 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
11897 return nativeResponseValue;
11899 // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
11900 export function ChannelPublicKeys_free(this_obj: number): void {
11901 if(!isWasmInitialized) {
11902 throw new Error("initializeWasm() must be awaited first!");
11904 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
11905 // debug statements here
11907 // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
11908 export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
11909 if(!isWasmInitialized) {
11910 throw new Error("initializeWasm() must be awaited first!");
11912 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
11913 return decodeArray(nativeResponseValue);
11915 // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11916 export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
11917 if(!isWasmInitialized) {
11918 throw new Error("initializeWasm() must be awaited first!");
11920 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
11921 // debug statements here
11923 // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
11924 export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
11925 if(!isWasmInitialized) {
11926 throw new Error("initializeWasm() must be awaited first!");
11928 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
11929 return decodeArray(nativeResponseValue);
11931 // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11932 export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
11933 if(!isWasmInitialized) {
11934 throw new Error("initializeWasm() must be awaited first!");
11936 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
11937 // debug statements here
11939 // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
11940 export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
11941 if(!isWasmInitialized) {
11942 throw new Error("initializeWasm() must be awaited first!");
11944 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
11945 return decodeArray(nativeResponseValue);
11947 // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11948 export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
11949 if(!isWasmInitialized) {
11950 throw new Error("initializeWasm() must be awaited first!");
11952 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
11953 // debug statements here
11955 // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
11956 export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
11957 if(!isWasmInitialized) {
11958 throw new Error("initializeWasm() must be awaited first!");
11960 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
11961 return decodeArray(nativeResponseValue);
11963 // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11964 export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
11965 if(!isWasmInitialized) {
11966 throw new Error("initializeWasm() must be awaited first!");
11968 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
11969 // debug statements here
11971 // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
11972 export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
11973 if(!isWasmInitialized) {
11974 throw new Error("initializeWasm() must be awaited first!");
11976 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
11977 return decodeArray(nativeResponseValue);
11979 // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11980 export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
11981 if(!isWasmInitialized) {
11982 throw new Error("initializeWasm() must be awaited first!");
11984 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
11985 // debug statements here
11987 // 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);
11988 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 {
11989 if(!isWasmInitialized) {
11990 throw new Error("initializeWasm() must be awaited first!");
11992 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));
11993 return nativeResponseValue;
11995 // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
11996 export function ChannelPublicKeys_clone(orig: number): number {
11997 if(!isWasmInitialized) {
11998 throw new Error("initializeWasm() must be awaited first!");
12000 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
12001 return nativeResponseValue;
12003 // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
12004 export function ChannelPublicKeys_write(obj: number): Uint8Array {
12005 if(!isWasmInitialized) {
12006 throw new Error("initializeWasm() must be awaited first!");
12008 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
12009 return decodeArray(nativeResponseValue);
12011 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
12012 export function ChannelPublicKeys_read(ser: Uint8Array): number {
12013 if(!isWasmInitialized) {
12014 throw new Error("initializeWasm() must be awaited first!");
12016 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
12017 return nativeResponseValue;
12019 // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
12020 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 {
12021 if(!isWasmInitialized) {
12022 throw new Error("initializeWasm() must be awaited first!");
12024 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));
12025 return nativeResponseValue;
12027 // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
12028 export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
12029 if(!isWasmInitialized) {
12030 throw new Error("initializeWasm() must be awaited first!");
12032 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
12033 return nativeResponseValue;
12035 // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
12036 export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
12037 if(!isWasmInitialized) {
12038 throw new Error("initializeWasm() must be awaited first!");
12040 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
12041 return decodeArray(nativeResponseValue);
12043 // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
12044 export function HTLCOutputInCommitment_free(this_obj: number): void {
12045 if(!isWasmInitialized) {
12046 throw new Error("initializeWasm() must be awaited first!");
12048 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
12049 // debug statements here
12051 // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12052 export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
12053 if(!isWasmInitialized) {
12054 throw new Error("initializeWasm() must be awaited first!");
12056 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
12057 return nativeResponseValue;
12059 // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
12060 export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
12061 if(!isWasmInitialized) {
12062 throw new Error("initializeWasm() must be awaited first!");
12064 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
12065 // debug statements here
12067 // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12068 export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
12069 if(!isWasmInitialized) {
12070 throw new Error("initializeWasm() must be awaited first!");
12072 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
12073 return nativeResponseValue;
12075 // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
12076 export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
12077 if(!isWasmInitialized) {
12078 throw new Error("initializeWasm() must be awaited first!");
12080 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
12081 // debug statements here
12083 // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12084 export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
12085 if(!isWasmInitialized) {
12086 throw new Error("initializeWasm() must be awaited first!");
12088 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
12089 return nativeResponseValue;
12091 // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
12092 export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
12093 if(!isWasmInitialized) {
12094 throw new Error("initializeWasm() must be awaited first!");
12096 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
12097 // debug statements here
12099 // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
12100 export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
12101 if(!isWasmInitialized) {
12102 throw new Error("initializeWasm() must be awaited first!");
12104 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
12105 return decodeArray(nativeResponseValue);
12107 // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12108 export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
12109 if(!isWasmInitialized) {
12110 throw new Error("initializeWasm() must be awaited first!");
12112 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
12113 // debug statements here
12115 // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12116 export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
12117 if(!isWasmInitialized) {
12118 throw new Error("initializeWasm() must be awaited first!");
12120 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
12121 return nativeResponseValue;
12123 // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
12124 export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
12125 if(!isWasmInitialized) {
12126 throw new Error("initializeWasm() must be awaited first!");
12128 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
12129 // debug statements here
12131 // MUST_USE_RES struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_new(bool offered_arg, uint64_t amount_msat_arg, uint32_t cltv_expiry_arg, struct LDKThirtyTwoBytes payment_hash_arg, struct LDKCOption_u32Z transaction_output_index_arg);
12132 export function HTLCOutputInCommitment_new(offered_arg: boolean, amount_msat_arg: number, cltv_expiry_arg: number, payment_hash_arg: Uint8Array, transaction_output_index_arg: number): number {
12133 if(!isWasmInitialized) {
12134 throw new Error("initializeWasm() must be awaited first!");
12136 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
12137 return nativeResponseValue;
12139 // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
12140 export function HTLCOutputInCommitment_clone(orig: number): number {
12141 if(!isWasmInitialized) {
12142 throw new Error("initializeWasm() must be awaited first!");
12144 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
12145 return nativeResponseValue;
12147 // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
12148 export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
12149 if(!isWasmInitialized) {
12150 throw new Error("initializeWasm() must be awaited first!");
12152 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
12153 return decodeArray(nativeResponseValue);
12155 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
12156 export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
12157 if(!isWasmInitialized) {
12158 throw new Error("initializeWasm() must be awaited first!");
12160 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
12161 return nativeResponseValue;
12163 // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
12164 export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
12165 if(!isWasmInitialized) {
12166 throw new Error("initializeWasm() must be awaited first!");
12168 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
12169 return decodeArray(nativeResponseValue);
12171 // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
12172 export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
12173 if(!isWasmInitialized) {
12174 throw new Error("initializeWasm() must be awaited first!");
12176 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
12177 return decodeArray(nativeResponseValue);
12179 // struct LDKTransaction build_htlc_transaction(const uint8_t (*commitment_txid)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, struct LDKPublicKey broadcaster_delayed_payment_key, struct LDKPublicKey revocation_key);
12180 export function build_htlc_transaction(commitment_txid: Uint8Array, feerate_per_kw: number, contest_delay: number, htlc: number, broadcaster_delayed_payment_key: Uint8Array, revocation_key: Uint8Array): Uint8Array {
12181 if(!isWasmInitialized) {
12182 throw new Error("initializeWasm() must be awaited first!");
12184 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(commitment_txid), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
12185 return decodeArray(nativeResponseValue);
12187 // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
12188 export function ChannelTransactionParameters_free(this_obj: number): void {
12189 if(!isWasmInitialized) {
12190 throw new Error("initializeWasm() must be awaited first!");
12192 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
12193 // debug statements here
12195 // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12196 export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
12197 if(!isWasmInitialized) {
12198 throw new Error("initializeWasm() must be awaited first!");
12200 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
12201 return nativeResponseValue;
12203 // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
12204 export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
12205 if(!isWasmInitialized) {
12206 throw new Error("initializeWasm() must be awaited first!");
12208 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
12209 // debug statements here
12211 // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12212 export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
12213 if(!isWasmInitialized) {
12214 throw new Error("initializeWasm() must be awaited first!");
12216 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
12217 return nativeResponseValue;
12219 // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
12220 export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
12221 if(!isWasmInitialized) {
12222 throw new Error("initializeWasm() must be awaited first!");
12224 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
12225 // debug statements here
12227 // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12228 export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
12229 if(!isWasmInitialized) {
12230 throw new Error("initializeWasm() must be awaited first!");
12232 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
12233 return nativeResponseValue;
12235 // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
12236 export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
12237 if(!isWasmInitialized) {
12238 throw new Error("initializeWasm() must be awaited first!");
12240 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
12241 // debug statements here
12243 // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12244 export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
12245 if(!isWasmInitialized) {
12246 throw new Error("initializeWasm() must be awaited first!");
12248 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
12249 return nativeResponseValue;
12251 // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
12252 export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
12253 if(!isWasmInitialized) {
12254 throw new Error("initializeWasm() must be awaited first!");
12256 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
12257 // debug statements here
12259 // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12260 export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
12261 if(!isWasmInitialized) {
12262 throw new Error("initializeWasm() must be awaited first!");
12264 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
12265 return nativeResponseValue;
12267 // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
12268 export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
12269 if(!isWasmInitialized) {
12270 throw new Error("initializeWasm() must be awaited first!");
12272 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
12273 // debug statements here
12275 // 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);
12276 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 {
12277 if(!isWasmInitialized) {
12278 throw new Error("initializeWasm() must be awaited first!");
12280 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
12281 return nativeResponseValue;
12283 // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
12284 export function ChannelTransactionParameters_clone(orig: number): number {
12285 if(!isWasmInitialized) {
12286 throw new Error("initializeWasm() must be awaited first!");
12288 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
12289 return nativeResponseValue;
12291 // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
12292 export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
12293 if(!isWasmInitialized) {
12294 throw new Error("initializeWasm() must be awaited first!");
12296 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
12297 // debug statements here
12299 // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
12300 export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
12301 if(!isWasmInitialized) {
12302 throw new Error("initializeWasm() must be awaited first!");
12304 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
12305 return nativeResponseValue;
12307 // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
12308 export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
12309 if(!isWasmInitialized) {
12310 throw new Error("initializeWasm() must be awaited first!");
12312 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
12313 // debug statements here
12315 // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
12316 export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
12317 if(!isWasmInitialized) {
12318 throw new Error("initializeWasm() must be awaited first!");
12320 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
12321 return nativeResponseValue;
12323 // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
12324 export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
12325 if(!isWasmInitialized) {
12326 throw new Error("initializeWasm() must be awaited first!");
12328 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
12329 // debug statements here
12331 // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
12332 export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
12333 if(!isWasmInitialized) {
12334 throw new Error("initializeWasm() must be awaited first!");
12336 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
12337 return nativeResponseValue;
12339 // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
12340 export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
12341 if(!isWasmInitialized) {
12342 throw new Error("initializeWasm() must be awaited first!");
12344 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
12345 return nativeResponseValue;
12347 // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
12348 export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
12349 if(!isWasmInitialized) {
12350 throw new Error("initializeWasm() must be awaited first!");
12352 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
12353 return nativeResponseValue;
12355 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
12356 export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
12357 if(!isWasmInitialized) {
12358 throw new Error("initializeWasm() must be awaited first!");
12360 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
12361 return nativeResponseValue;
12363 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
12364 export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
12365 if(!isWasmInitialized) {
12366 throw new Error("initializeWasm() must be awaited first!");
12368 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
12369 return nativeResponseValue;
12371 // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
12372 export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
12373 if(!isWasmInitialized) {
12374 throw new Error("initializeWasm() must be awaited first!");
12376 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
12377 return decodeArray(nativeResponseValue);
12379 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
12380 export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
12381 if(!isWasmInitialized) {
12382 throw new Error("initializeWasm() must be awaited first!");
12384 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
12385 return nativeResponseValue;
12387 // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
12388 export function ChannelTransactionParameters_write(obj: number): Uint8Array {
12389 if(!isWasmInitialized) {
12390 throw new Error("initializeWasm() must be awaited first!");
12392 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
12393 return decodeArray(nativeResponseValue);
12395 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
12396 export function ChannelTransactionParameters_read(ser: Uint8Array): number {
12397 if(!isWasmInitialized) {
12398 throw new Error("initializeWasm() must be awaited first!");
12400 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
12401 return nativeResponseValue;
12403 // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
12404 export function DirectedChannelTransactionParameters_free(this_obj: number): void {
12405 if(!isWasmInitialized) {
12406 throw new Error("initializeWasm() must be awaited first!");
12408 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
12409 // debug statements here
12411 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12412 export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
12413 if(!isWasmInitialized) {
12414 throw new Error("initializeWasm() must be awaited first!");
12416 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
12417 return nativeResponseValue;
12419 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12420 export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
12421 if(!isWasmInitialized) {
12422 throw new Error("initializeWasm() must be awaited first!");
12424 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
12425 return nativeResponseValue;
12427 // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12428 export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
12429 if(!isWasmInitialized) {
12430 throw new Error("initializeWasm() must be awaited first!");
12432 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
12433 return nativeResponseValue;
12435 // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12436 export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
12437 if(!isWasmInitialized) {
12438 throw new Error("initializeWasm() must be awaited first!");
12440 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
12441 return nativeResponseValue;
12443 // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12444 export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
12445 if(!isWasmInitialized) {
12446 throw new Error("initializeWasm() must be awaited first!");
12448 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
12449 return nativeResponseValue;
12451 // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
12452 export function HolderCommitmentTransaction_free(this_obj: number): void {
12453 if(!isWasmInitialized) {
12454 throw new Error("initializeWasm() must be awaited first!");
12456 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
12457 // debug statements here
12459 // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
12460 export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
12461 if(!isWasmInitialized) {
12462 throw new Error("initializeWasm() must be awaited first!");
12464 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
12465 return decodeArray(nativeResponseValue);
12467 // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
12468 export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
12469 if(!isWasmInitialized) {
12470 throw new Error("initializeWasm() must be awaited first!");
12472 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
12473 // debug statements here
12475 // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
12476 export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
12477 if(!isWasmInitialized) {
12478 throw new Error("initializeWasm() must be awaited first!");
12480 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
12481 // debug statements here
12483 // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
12484 export function HolderCommitmentTransaction_clone(orig: number): number {
12485 if(!isWasmInitialized) {
12486 throw new Error("initializeWasm() must be awaited first!");
12488 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
12489 return nativeResponseValue;
12491 // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
12492 export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
12493 if(!isWasmInitialized) {
12494 throw new Error("initializeWasm() must be awaited first!");
12496 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
12497 return decodeArray(nativeResponseValue);
12499 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
12500 export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
12501 if(!isWasmInitialized) {
12502 throw new Error("initializeWasm() must be awaited first!");
12504 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
12505 return nativeResponseValue;
12507 // 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);
12508 export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
12509 if(!isWasmInitialized) {
12510 throw new Error("initializeWasm() must be awaited first!");
12512 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
12513 return nativeResponseValue;
12515 // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
12516 export function BuiltCommitmentTransaction_free(this_obj: number): void {
12517 if(!isWasmInitialized) {
12518 throw new Error("initializeWasm() must be awaited first!");
12520 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
12521 // debug statements here
12523 // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
12524 export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
12525 if(!isWasmInitialized) {
12526 throw new Error("initializeWasm() must be awaited first!");
12528 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
12529 return decodeArray(nativeResponseValue);
12531 // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
12532 export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
12533 if(!isWasmInitialized) {
12534 throw new Error("initializeWasm() must be awaited first!");
12536 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
12537 // debug statements here
12539 // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
12540 export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
12541 if(!isWasmInitialized) {
12542 throw new Error("initializeWasm() must be awaited first!");
12544 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
12545 return decodeArray(nativeResponseValue);
12547 // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12548 export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
12549 if(!isWasmInitialized) {
12550 throw new Error("initializeWasm() must be awaited first!");
12552 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
12553 // debug statements here
12555 // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
12556 export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
12557 if(!isWasmInitialized) {
12558 throw new Error("initializeWasm() must be awaited first!");
12560 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
12561 return nativeResponseValue;
12563 // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
12564 export function BuiltCommitmentTransaction_clone(orig: number): number {
12565 if(!isWasmInitialized) {
12566 throw new Error("initializeWasm() must be awaited first!");
12568 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
12569 return nativeResponseValue;
12571 // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
12572 export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
12573 if(!isWasmInitialized) {
12574 throw new Error("initializeWasm() must be awaited first!");
12576 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
12577 return decodeArray(nativeResponseValue);
12579 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
12580 export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
12581 if(!isWasmInitialized) {
12582 throw new Error("initializeWasm() must be awaited first!");
12584 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
12585 return nativeResponseValue;
12587 // 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);
12588 export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
12589 if(!isWasmInitialized) {
12590 throw new Error("initializeWasm() must be awaited first!");
12592 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
12593 return decodeArray(nativeResponseValue);
12595 // 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);
12596 export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
12597 if(!isWasmInitialized) {
12598 throw new Error("initializeWasm() must be awaited first!");
12600 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
12601 return decodeArray(nativeResponseValue);
12603 // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
12604 export function CommitmentTransaction_free(this_obj: number): void {
12605 if(!isWasmInitialized) {
12606 throw new Error("initializeWasm() must be awaited first!");
12608 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
12609 // debug statements here
12611 // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
12612 export function CommitmentTransaction_clone(orig: number): number {
12613 if(!isWasmInitialized) {
12614 throw new Error("initializeWasm() must be awaited first!");
12616 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
12617 return nativeResponseValue;
12619 // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
12620 export function CommitmentTransaction_write(obj: number): Uint8Array {
12621 if(!isWasmInitialized) {
12622 throw new Error("initializeWasm() must be awaited first!");
12624 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
12625 return decodeArray(nativeResponseValue);
12627 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
12628 export function CommitmentTransaction_read(ser: Uint8Array): number {
12629 if(!isWasmInitialized) {
12630 throw new Error("initializeWasm() must be awaited first!");
12632 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
12633 return nativeResponseValue;
12635 // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12636 export function CommitmentTransaction_commitment_number(this_arg: number): number {
12637 if(!isWasmInitialized) {
12638 throw new Error("initializeWasm() must be awaited first!");
12640 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
12641 return nativeResponseValue;
12643 // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12644 export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
12645 if(!isWasmInitialized) {
12646 throw new Error("initializeWasm() must be awaited first!");
12648 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
12649 return nativeResponseValue;
12651 // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12652 export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
12653 if(!isWasmInitialized) {
12654 throw new Error("initializeWasm() must be awaited first!");
12656 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
12657 return nativeResponseValue;
12659 // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12660 export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
12661 if(!isWasmInitialized) {
12662 throw new Error("initializeWasm() must be awaited first!");
12664 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
12665 return nativeResponseValue;
12667 // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12668 export function CommitmentTransaction_trust(this_arg: number): number {
12669 if(!isWasmInitialized) {
12670 throw new Error("initializeWasm() must be awaited first!");
12672 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
12673 return nativeResponseValue;
12675 // 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);
12676 export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
12677 if(!isWasmInitialized) {
12678 throw new Error("initializeWasm() must be awaited first!");
12680 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
12681 return nativeResponseValue;
12683 // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
12684 export function TrustedCommitmentTransaction_free(this_obj: number): void {
12685 if(!isWasmInitialized) {
12686 throw new Error("initializeWasm() must be awaited first!");
12688 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
12689 // debug statements here
12691 // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
12692 export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
12693 if(!isWasmInitialized) {
12694 throw new Error("initializeWasm() must be awaited first!");
12696 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
12697 return decodeArray(nativeResponseValue);
12699 // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
12700 export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
12701 if(!isWasmInitialized) {
12702 throw new Error("initializeWasm() must be awaited first!");
12704 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
12705 return nativeResponseValue;
12707 // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
12708 export function TrustedCommitmentTransaction_keys(this_arg: number): number {
12709 if(!isWasmInitialized) {
12710 throw new Error("initializeWasm() must be awaited first!");
12712 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
12713 return nativeResponseValue;
12715 // 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);
12716 export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
12717 if(!isWasmInitialized) {
12718 throw new Error("initializeWasm() must be awaited first!");
12720 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
12721 return nativeResponseValue;
12723 // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
12724 export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
12725 if(!isWasmInitialized) {
12726 throw new Error("initializeWasm() must be awaited first!");
12728 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
12729 return nativeResponseValue;
12731 // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
12732 export function InitFeatures_eq(a: number, b: number): boolean {
12733 if(!isWasmInitialized) {
12734 throw new Error("initializeWasm() must be awaited first!");
12736 const nativeResponseValue = wasm.InitFeatures_eq(a, b);
12737 return nativeResponseValue;
12739 // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
12740 export function NodeFeatures_eq(a: number, b: number): boolean {
12741 if(!isWasmInitialized) {
12742 throw new Error("initializeWasm() must be awaited first!");
12744 const nativeResponseValue = wasm.NodeFeatures_eq(a, b);
12745 return nativeResponseValue;
12747 // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
12748 export function ChannelFeatures_eq(a: number, b: number): boolean {
12749 if(!isWasmInitialized) {
12750 throw new Error("initializeWasm() must be awaited first!");
12752 const nativeResponseValue = wasm.ChannelFeatures_eq(a, b);
12753 return nativeResponseValue;
12755 // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
12756 export function InvoiceFeatures_eq(a: number, b: number): boolean {
12757 if(!isWasmInitialized) {
12758 throw new Error("initializeWasm() must be awaited first!");
12760 const nativeResponseValue = wasm.InvoiceFeatures_eq(a, b);
12761 return nativeResponseValue;
12763 // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
12764 export function InitFeatures_clone(orig: number): number {
12765 if(!isWasmInitialized) {
12766 throw new Error("initializeWasm() must be awaited first!");
12768 const nativeResponseValue = wasm.InitFeatures_clone(orig);
12769 return nativeResponseValue;
12771 // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
12772 export function NodeFeatures_clone(orig: number): number {
12773 if(!isWasmInitialized) {
12774 throw new Error("initializeWasm() must be awaited first!");
12776 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
12777 return nativeResponseValue;
12779 // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
12780 export function ChannelFeatures_clone(orig: number): number {
12781 if(!isWasmInitialized) {
12782 throw new Error("initializeWasm() must be awaited first!");
12784 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
12785 return nativeResponseValue;
12787 // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
12788 export function InvoiceFeatures_clone(orig: number): number {
12789 if(!isWasmInitialized) {
12790 throw new Error("initializeWasm() must be awaited first!");
12792 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
12793 return nativeResponseValue;
12795 // void InitFeatures_free(struct LDKInitFeatures this_obj);
12796 export function InitFeatures_free(this_obj: number): void {
12797 if(!isWasmInitialized) {
12798 throw new Error("initializeWasm() must be awaited first!");
12800 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
12801 // debug statements here
12803 // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
12804 export function NodeFeatures_free(this_obj: number): void {
12805 if(!isWasmInitialized) {
12806 throw new Error("initializeWasm() must be awaited first!");
12808 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
12809 // debug statements here
12811 // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
12812 export function ChannelFeatures_free(this_obj: number): void {
12813 if(!isWasmInitialized) {
12814 throw new Error("initializeWasm() must be awaited first!");
12816 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
12817 // debug statements here
12819 // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
12820 export function InvoiceFeatures_free(this_obj: number): void {
12821 if(!isWasmInitialized) {
12822 throw new Error("initializeWasm() must be awaited first!");
12824 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
12825 // debug statements here
12827 // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
12828 export function InitFeatures_empty(): number {
12829 if(!isWasmInitialized) {
12830 throw new Error("initializeWasm() must be awaited first!");
12832 const nativeResponseValue = wasm.InitFeatures_empty();
12833 return nativeResponseValue;
12835 // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
12836 export function InitFeatures_known(): number {
12837 if(!isWasmInitialized) {
12838 throw new Error("initializeWasm() must be awaited first!");
12840 const nativeResponseValue = wasm.InitFeatures_known();
12841 return nativeResponseValue;
12843 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
12844 export function NodeFeatures_empty(): number {
12845 if(!isWasmInitialized) {
12846 throw new Error("initializeWasm() must be awaited first!");
12848 const nativeResponseValue = wasm.NodeFeatures_empty();
12849 return nativeResponseValue;
12851 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
12852 export function NodeFeatures_known(): number {
12853 if(!isWasmInitialized) {
12854 throw new Error("initializeWasm() must be awaited first!");
12856 const nativeResponseValue = wasm.NodeFeatures_known();
12857 return nativeResponseValue;
12859 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
12860 export function ChannelFeatures_empty(): number {
12861 if(!isWasmInitialized) {
12862 throw new Error("initializeWasm() must be awaited first!");
12864 const nativeResponseValue = wasm.ChannelFeatures_empty();
12865 return nativeResponseValue;
12867 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
12868 export function ChannelFeatures_known(): number {
12869 if(!isWasmInitialized) {
12870 throw new Error("initializeWasm() must be awaited first!");
12872 const nativeResponseValue = wasm.ChannelFeatures_known();
12873 return nativeResponseValue;
12875 // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
12876 export function InvoiceFeatures_empty(): number {
12877 if(!isWasmInitialized) {
12878 throw new Error("initializeWasm() must be awaited first!");
12880 const nativeResponseValue = wasm.InvoiceFeatures_empty();
12881 return nativeResponseValue;
12883 // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
12884 export function InvoiceFeatures_known(): number {
12885 if(!isWasmInitialized) {
12886 throw new Error("initializeWasm() must be awaited first!");
12888 const nativeResponseValue = wasm.InvoiceFeatures_known();
12889 return nativeResponseValue;
12891 // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
12892 export function InitFeatures_supports_payment_secret(this_arg: number): boolean {
12893 if(!isWasmInitialized) {
12894 throw new Error("initializeWasm() must be awaited first!");
12896 const nativeResponseValue = wasm.InitFeatures_supports_payment_secret(this_arg);
12897 return nativeResponseValue;
12899 // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
12900 export function NodeFeatures_supports_payment_secret(this_arg: number): boolean {
12901 if(!isWasmInitialized) {
12902 throw new Error("initializeWasm() must be awaited first!");
12904 const nativeResponseValue = wasm.NodeFeatures_supports_payment_secret(this_arg);
12905 return nativeResponseValue;
12907 // MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
12908 export function InvoiceFeatures_supports_payment_secret(this_arg: number): boolean {
12909 if(!isWasmInitialized) {
12910 throw new Error("initializeWasm() must be awaited first!");
12912 const nativeResponseValue = wasm.InvoiceFeatures_supports_payment_secret(this_arg);
12913 return nativeResponseValue;
12915 // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
12916 export function InitFeatures_write(obj: number): Uint8Array {
12917 if(!isWasmInitialized) {
12918 throw new Error("initializeWasm() must be awaited first!");
12920 const nativeResponseValue = wasm.InitFeatures_write(obj);
12921 return decodeArray(nativeResponseValue);
12923 // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
12924 export function NodeFeatures_write(obj: number): Uint8Array {
12925 if(!isWasmInitialized) {
12926 throw new Error("initializeWasm() must be awaited first!");
12928 const nativeResponseValue = wasm.NodeFeatures_write(obj);
12929 return decodeArray(nativeResponseValue);
12931 // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
12932 export function ChannelFeatures_write(obj: number): Uint8Array {
12933 if(!isWasmInitialized) {
12934 throw new Error("initializeWasm() must be awaited first!");
12936 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
12937 return decodeArray(nativeResponseValue);
12939 // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
12940 export function InvoiceFeatures_write(obj: number): Uint8Array {
12941 if(!isWasmInitialized) {
12942 throw new Error("initializeWasm() must be awaited first!");
12944 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
12945 return decodeArray(nativeResponseValue);
12947 // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
12948 export function InitFeatures_read(ser: Uint8Array): number {
12949 if(!isWasmInitialized) {
12950 throw new Error("initializeWasm() must be awaited first!");
12952 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
12953 return nativeResponseValue;
12955 // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
12956 export function NodeFeatures_read(ser: Uint8Array): number {
12957 if(!isWasmInitialized) {
12958 throw new Error("initializeWasm() must be awaited first!");
12960 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
12961 return nativeResponseValue;
12963 // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
12964 export function ChannelFeatures_read(ser: Uint8Array): number {
12965 if(!isWasmInitialized) {
12966 throw new Error("initializeWasm() must be awaited first!");
12968 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
12969 return nativeResponseValue;
12971 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
12972 export function InvoiceFeatures_read(ser: Uint8Array): number {
12973 if(!isWasmInitialized) {
12974 throw new Error("initializeWasm() must be awaited first!");
12976 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
12977 return nativeResponseValue;
12979 // void RouteHop_free(struct LDKRouteHop this_obj);
12980 export function RouteHop_free(this_obj: number): void {
12981 if(!isWasmInitialized) {
12982 throw new Error("initializeWasm() must be awaited first!");
12984 const nativeResponseValue = wasm.RouteHop_free(this_obj);
12985 // debug statements here
12987 // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
12988 export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
12989 if(!isWasmInitialized) {
12990 throw new Error("initializeWasm() must be awaited first!");
12992 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
12993 return decodeArray(nativeResponseValue);
12995 // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12996 export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
12997 if(!isWasmInitialized) {
12998 throw new Error("initializeWasm() must be awaited first!");
13000 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
13001 // debug statements here
13003 // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13004 export function RouteHop_get_node_features(this_ptr: number): number {
13005 if(!isWasmInitialized) {
13006 throw new Error("initializeWasm() must be awaited first!");
13008 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
13009 return nativeResponseValue;
13011 // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
13012 export function RouteHop_set_node_features(this_ptr: number, val: number): void {
13013 if(!isWasmInitialized) {
13014 throw new Error("initializeWasm() must be awaited first!");
13016 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
13017 // debug statements here
13019 // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13020 export function RouteHop_get_short_channel_id(this_ptr: number): number {
13021 if(!isWasmInitialized) {
13022 throw new Error("initializeWasm() must be awaited first!");
13024 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
13025 return nativeResponseValue;
13027 // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
13028 export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
13029 if(!isWasmInitialized) {
13030 throw new Error("initializeWasm() must be awaited first!");
13032 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
13033 // debug statements here
13035 // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13036 export function RouteHop_get_channel_features(this_ptr: number): number {
13037 if(!isWasmInitialized) {
13038 throw new Error("initializeWasm() must be awaited first!");
13040 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
13041 return nativeResponseValue;
13043 // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
13044 export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
13045 if(!isWasmInitialized) {
13046 throw new Error("initializeWasm() must be awaited first!");
13048 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
13049 // debug statements here
13051 // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13052 export function RouteHop_get_fee_msat(this_ptr: number): number {
13053 if(!isWasmInitialized) {
13054 throw new Error("initializeWasm() must be awaited first!");
13056 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
13057 return nativeResponseValue;
13059 // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
13060 export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
13061 if(!isWasmInitialized) {
13062 throw new Error("initializeWasm() must be awaited first!");
13064 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
13065 // debug statements here
13067 // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13068 export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
13069 if(!isWasmInitialized) {
13070 throw new Error("initializeWasm() must be awaited first!");
13072 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
13073 return nativeResponseValue;
13075 // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
13076 export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13077 if(!isWasmInitialized) {
13078 throw new Error("initializeWasm() must be awaited first!");
13080 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
13081 // debug statements here
13083 // 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);
13084 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 {
13085 if(!isWasmInitialized) {
13086 throw new Error("initializeWasm() must be awaited first!");
13088 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);
13089 return nativeResponseValue;
13091 // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
13092 export function RouteHop_clone(orig: number): number {
13093 if(!isWasmInitialized) {
13094 throw new Error("initializeWasm() must be awaited first!");
13096 const nativeResponseValue = wasm.RouteHop_clone(orig);
13097 return nativeResponseValue;
13099 // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
13100 export function RouteHop_write(obj: number): Uint8Array {
13101 if(!isWasmInitialized) {
13102 throw new Error("initializeWasm() must be awaited first!");
13104 const nativeResponseValue = wasm.RouteHop_write(obj);
13105 return decodeArray(nativeResponseValue);
13107 // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
13108 export function RouteHop_read(ser: Uint8Array): number {
13109 if(!isWasmInitialized) {
13110 throw new Error("initializeWasm() must be awaited first!");
13112 const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
13113 return nativeResponseValue;
13115 // void Route_free(struct LDKRoute this_obj);
13116 export function Route_free(this_obj: number): void {
13117 if(!isWasmInitialized) {
13118 throw new Error("initializeWasm() must be awaited first!");
13120 const nativeResponseValue = wasm.Route_free(this_obj);
13121 // debug statements here
13123 // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
13124 export function Route_set_paths(this_ptr: number, val: number[][]): void {
13125 if(!isWasmInitialized) {
13126 throw new Error("initializeWasm() must be awaited first!");
13128 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
13129 // debug statements here
13131 // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
13132 export function Route_new(paths_arg: number[][]): number {
13133 if(!isWasmInitialized) {
13134 throw new Error("initializeWasm() must be awaited first!");
13136 const nativeResponseValue = wasm.Route_new(paths_arg);
13137 return nativeResponseValue;
13139 // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
13140 export function Route_clone(orig: number): number {
13141 if(!isWasmInitialized) {
13142 throw new Error("initializeWasm() must be awaited first!");
13144 const nativeResponseValue = wasm.Route_clone(orig);
13145 return nativeResponseValue;
13147 // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
13148 export function Route_write(obj: number): Uint8Array {
13149 if(!isWasmInitialized) {
13150 throw new Error("initializeWasm() must be awaited first!");
13152 const nativeResponseValue = wasm.Route_write(obj);
13153 return decodeArray(nativeResponseValue);
13155 // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
13156 export function Route_read(ser: Uint8Array): number {
13157 if(!isWasmInitialized) {
13158 throw new Error("initializeWasm() must be awaited first!");
13160 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
13161 return nativeResponseValue;
13163 // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
13164 export function RouteHintHop_free(this_obj: number): void {
13165 if(!isWasmInitialized) {
13166 throw new Error("initializeWasm() must be awaited first!");
13168 const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
13169 // debug statements here
13171 // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13172 export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
13173 if(!isWasmInitialized) {
13174 throw new Error("initializeWasm() must be awaited first!");
13176 const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
13177 return decodeArray(nativeResponseValue);
13179 // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13180 export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
13181 if(!isWasmInitialized) {
13182 throw new Error("initializeWasm() must be awaited first!");
13184 const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
13185 // debug statements here
13187 // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13188 export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
13189 if(!isWasmInitialized) {
13190 throw new Error("initializeWasm() must be awaited first!");
13192 const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
13193 return nativeResponseValue;
13195 // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
13196 export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
13197 if(!isWasmInitialized) {
13198 throw new Error("initializeWasm() must be awaited first!");
13200 const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
13201 // debug statements here
13203 // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13204 export function RouteHintHop_get_fees(this_ptr: number): number {
13205 if(!isWasmInitialized) {
13206 throw new Error("initializeWasm() must be awaited first!");
13208 const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
13209 return nativeResponseValue;
13211 // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
13212 export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
13213 if(!isWasmInitialized) {
13214 throw new Error("initializeWasm() must be awaited first!");
13216 const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
13217 // debug statements here
13219 // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13220 export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
13221 if(!isWasmInitialized) {
13222 throw new Error("initializeWasm() must be awaited first!");
13224 const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
13225 return nativeResponseValue;
13227 // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
13228 export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13229 if(!isWasmInitialized) {
13230 throw new Error("initializeWasm() must be awaited first!");
13232 const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
13233 // debug statements here
13235 // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13236 export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
13237 if(!isWasmInitialized) {
13238 throw new Error("initializeWasm() must be awaited first!");
13240 const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
13241 return nativeResponseValue;
13243 // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13244 export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
13245 if(!isWasmInitialized) {
13246 throw new Error("initializeWasm() must be awaited first!");
13248 const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
13249 // debug statements here
13251 // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13252 export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
13253 if(!isWasmInitialized) {
13254 throw new Error("initializeWasm() must be awaited first!");
13256 const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
13257 return nativeResponseValue;
13259 // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13260 export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
13261 if(!isWasmInitialized) {
13262 throw new Error("initializeWasm() must be awaited first!");
13264 const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
13265 // debug statements here
13267 // MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
13268 export function RouteHintHop_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number): number {
13269 if(!isWasmInitialized) {
13270 throw new Error("initializeWasm() must be awaited first!");
13272 const nativeResponseValue = wasm.RouteHintHop_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
13273 return nativeResponseValue;
13275 // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
13276 export function RouteHintHop_eq(a: number, b: number): boolean {
13277 if(!isWasmInitialized) {
13278 throw new Error("initializeWasm() must be awaited first!");
13280 const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
13281 return nativeResponseValue;
13283 // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
13284 export function RouteHintHop_clone(orig: number): number {
13285 if(!isWasmInitialized) {
13286 throw new Error("initializeWasm() must be awaited first!");
13288 const nativeResponseValue = wasm.RouteHintHop_clone(orig);
13289 return nativeResponseValue;
13291 // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintHopZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
13292 export function get_route(our_node_id: Uint8Array, network: number, payee: Uint8Array, payee_features: number, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
13293 if(!isWasmInitialized) {
13294 throw new Error("initializeWasm() must be awaited first!");
13296 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
13297 return nativeResponseValue;
13299 // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
13300 export function NetworkGraph_free(this_obj: number): void {
13301 if(!isWasmInitialized) {
13302 throw new Error("initializeWasm() must be awaited first!");
13304 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
13305 // debug statements here
13307 // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
13308 export function NetworkGraph_clone(orig: number): number {
13309 if(!isWasmInitialized) {
13310 throw new Error("initializeWasm() must be awaited first!");
13312 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
13313 return nativeResponseValue;
13315 // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
13316 export function LockedNetworkGraph_free(this_obj: number): void {
13317 if(!isWasmInitialized) {
13318 throw new Error("initializeWasm() must be awaited first!");
13320 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_obj);
13321 // debug statements here
13323 // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
13324 export function NetGraphMsgHandler_free(this_obj: number): void {
13325 if(!isWasmInitialized) {
13326 throw new Error("initializeWasm() must be awaited first!");
13328 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
13329 // debug statements here
13331 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
13332 export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
13333 if(!isWasmInitialized) {
13334 throw new Error("initializeWasm() must be awaited first!");
13336 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
13337 return nativeResponseValue;
13339 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
13340 export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
13341 if(!isWasmInitialized) {
13342 throw new Error("initializeWasm() must be awaited first!");
13344 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
13345 return nativeResponseValue;
13347 // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
13348 export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
13349 if(!isWasmInitialized) {
13350 throw new Error("initializeWasm() must be awaited first!");
13352 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
13353 // debug statements here
13355 // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
13356 export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
13357 if(!isWasmInitialized) {
13358 throw new Error("initializeWasm() must be awaited first!");
13360 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
13361 return nativeResponseValue;
13363 // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
13364 export function LockedNetworkGraph_graph(this_arg: number): number {
13365 if(!isWasmInitialized) {
13366 throw new Error("initializeWasm() must be awaited first!");
13368 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
13369 return nativeResponseValue;
13371 // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
13372 export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
13373 if(!isWasmInitialized) {
13374 throw new Error("initializeWasm() must be awaited first!");
13376 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
13377 return nativeResponseValue;
13379 // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
13380 export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
13381 if(!isWasmInitialized) {
13382 throw new Error("initializeWasm() must be awaited first!");
13384 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
13385 return nativeResponseValue;
13387 // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
13388 export function DirectionalChannelInfo_free(this_obj: number): void {
13389 if(!isWasmInitialized) {
13390 throw new Error("initializeWasm() must be awaited first!");
13392 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
13393 // debug statements here
13395 // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13396 export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
13397 if(!isWasmInitialized) {
13398 throw new Error("initializeWasm() must be awaited first!");
13400 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
13401 return nativeResponseValue;
13403 // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
13404 export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
13405 if(!isWasmInitialized) {
13406 throw new Error("initializeWasm() must be awaited first!");
13408 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
13409 // debug statements here
13411 // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13412 export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
13413 if(!isWasmInitialized) {
13414 throw new Error("initializeWasm() must be awaited first!");
13416 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
13417 return nativeResponseValue;
13419 // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
13420 export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
13421 if(!isWasmInitialized) {
13422 throw new Error("initializeWasm() must be awaited first!");
13424 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
13425 // debug statements here
13427 // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13428 export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
13429 if(!isWasmInitialized) {
13430 throw new Error("initializeWasm() must be awaited first!");
13432 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
13433 return nativeResponseValue;
13435 // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
13436 export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13437 if(!isWasmInitialized) {
13438 throw new Error("initializeWasm() must be awaited first!");
13440 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
13441 // debug statements here
13443 // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13444 export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
13445 if(!isWasmInitialized) {
13446 throw new Error("initializeWasm() must be awaited first!");
13448 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
13449 return nativeResponseValue;
13451 // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
13452 export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
13453 if(!isWasmInitialized) {
13454 throw new Error("initializeWasm() must be awaited first!");
13456 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
13457 // debug statements here
13459 // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13460 export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
13461 if(!isWasmInitialized) {
13462 throw new Error("initializeWasm() must be awaited first!");
13464 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
13465 return nativeResponseValue;
13467 // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13468 export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
13469 if(!isWasmInitialized) {
13470 throw new Error("initializeWasm() must be awaited first!");
13472 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
13473 // debug statements here
13475 // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13476 export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
13477 if(!isWasmInitialized) {
13478 throw new Error("initializeWasm() must be awaited first!");
13480 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
13481 return nativeResponseValue;
13483 // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
13484 export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
13485 if(!isWasmInitialized) {
13486 throw new Error("initializeWasm() must be awaited first!");
13488 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
13489 // debug statements here
13491 // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13492 export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
13493 if(!isWasmInitialized) {
13494 throw new Error("initializeWasm() must be awaited first!");
13496 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
13497 return nativeResponseValue;
13499 // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
13500 export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
13501 if(!isWasmInitialized) {
13502 throw new Error("initializeWasm() must be awaited first!");
13504 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
13505 // debug statements here
13507 // MUST_USE_RES struct LDKDirectionalChannelInfo DirectionalChannelInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
13508 export function DirectionalChannelInfo_new(last_update_arg: number, enabled_arg: boolean, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number, fees_arg: number, last_update_message_arg: number): number {
13509 if(!isWasmInitialized) {
13510 throw new Error("initializeWasm() must be awaited first!");
13512 const nativeResponseValue = wasm.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg, last_update_message_arg);
13513 return nativeResponseValue;
13515 // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
13516 export function DirectionalChannelInfo_clone(orig: number): number {
13517 if(!isWasmInitialized) {
13518 throw new Error("initializeWasm() must be awaited first!");
13520 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
13521 return nativeResponseValue;
13523 // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
13524 export function DirectionalChannelInfo_write(obj: number): Uint8Array {
13525 if(!isWasmInitialized) {
13526 throw new Error("initializeWasm() must be awaited first!");
13528 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
13529 return decodeArray(nativeResponseValue);
13531 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
13532 export function DirectionalChannelInfo_read(ser: Uint8Array): number {
13533 if(!isWasmInitialized) {
13534 throw new Error("initializeWasm() must be awaited first!");
13536 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
13537 return nativeResponseValue;
13539 // void ChannelInfo_free(struct LDKChannelInfo this_obj);
13540 export function ChannelInfo_free(this_obj: number): void {
13541 if(!isWasmInitialized) {
13542 throw new Error("initializeWasm() must be awaited first!");
13544 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
13545 // debug statements here
13547 // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13548 export function ChannelInfo_get_features(this_ptr: number): number {
13549 if(!isWasmInitialized) {
13550 throw new Error("initializeWasm() must be awaited first!");
13552 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
13553 return nativeResponseValue;
13555 // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
13556 export function ChannelInfo_set_features(this_ptr: number, val: number): void {
13557 if(!isWasmInitialized) {
13558 throw new Error("initializeWasm() must be awaited first!");
13560 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
13561 // debug statements here
13563 // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13564 export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
13565 if(!isWasmInitialized) {
13566 throw new Error("initializeWasm() must be awaited first!");
13568 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
13569 return decodeArray(nativeResponseValue);
13571 // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13572 export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
13573 if(!isWasmInitialized) {
13574 throw new Error("initializeWasm() must be awaited first!");
13576 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
13577 // debug statements here
13579 // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13580 export function ChannelInfo_get_one_to_two(this_ptr: number): number {
13581 if(!isWasmInitialized) {
13582 throw new Error("initializeWasm() must be awaited first!");
13584 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
13585 return nativeResponseValue;
13587 // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
13588 export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
13589 if(!isWasmInitialized) {
13590 throw new Error("initializeWasm() must be awaited first!");
13592 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
13593 // debug statements here
13595 // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13596 export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
13597 if(!isWasmInitialized) {
13598 throw new Error("initializeWasm() must be awaited first!");
13600 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
13601 return decodeArray(nativeResponseValue);
13603 // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13604 export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
13605 if(!isWasmInitialized) {
13606 throw new Error("initializeWasm() must be awaited first!");
13608 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
13609 // debug statements here
13611 // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13612 export function ChannelInfo_get_two_to_one(this_ptr: number): number {
13613 if(!isWasmInitialized) {
13614 throw new Error("initializeWasm() must be awaited first!");
13616 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
13617 return nativeResponseValue;
13619 // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
13620 export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
13621 if(!isWasmInitialized) {
13622 throw new Error("initializeWasm() must be awaited first!");
13624 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
13625 // debug statements here
13627 // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13628 export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
13629 if(!isWasmInitialized) {
13630 throw new Error("initializeWasm() must be awaited first!");
13632 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
13633 return nativeResponseValue;
13635 // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13636 export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
13637 if(!isWasmInitialized) {
13638 throw new Error("initializeWasm() must be awaited first!");
13640 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
13641 // debug statements here
13643 // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13644 export function ChannelInfo_get_announcement_message(this_ptr: number): number {
13645 if(!isWasmInitialized) {
13646 throw new Error("initializeWasm() must be awaited first!");
13648 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
13649 return nativeResponseValue;
13651 // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
13652 export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
13653 if(!isWasmInitialized) {
13654 throw new Error("initializeWasm() must be awaited first!");
13656 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
13657 // debug statements here
13659 // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKPublicKey node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKPublicKey node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
13660 export function ChannelInfo_new(features_arg: number, node_one_arg: Uint8Array, one_to_two_arg: number, node_two_arg: Uint8Array, two_to_one_arg: number, capacity_sats_arg: number, announcement_message_arg: number): number {
13661 if(!isWasmInitialized) {
13662 throw new Error("initializeWasm() must be awaited first!");
13664 const nativeResponseValue = wasm.ChannelInfo_new(features_arg, encodeArray(node_one_arg), one_to_two_arg, encodeArray(node_two_arg), two_to_one_arg, capacity_sats_arg, announcement_message_arg);
13665 return nativeResponseValue;
13667 // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
13668 export function ChannelInfo_clone(orig: number): number {
13669 if(!isWasmInitialized) {
13670 throw new Error("initializeWasm() must be awaited first!");
13672 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
13673 return nativeResponseValue;
13675 // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
13676 export function ChannelInfo_write(obj: number): Uint8Array {
13677 if(!isWasmInitialized) {
13678 throw new Error("initializeWasm() must be awaited first!");
13680 const nativeResponseValue = wasm.ChannelInfo_write(obj);
13681 return decodeArray(nativeResponseValue);
13683 // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
13684 export function ChannelInfo_read(ser: Uint8Array): number {
13685 if(!isWasmInitialized) {
13686 throw new Error("initializeWasm() must be awaited first!");
13688 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
13689 return nativeResponseValue;
13691 // void RoutingFees_free(struct LDKRoutingFees this_obj);
13692 export function RoutingFees_free(this_obj: number): void {
13693 if(!isWasmInitialized) {
13694 throw new Error("initializeWasm() must be awaited first!");
13696 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
13697 // debug statements here
13699 // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
13700 export function RoutingFees_get_base_msat(this_ptr: number): number {
13701 if(!isWasmInitialized) {
13702 throw new Error("initializeWasm() must be awaited first!");
13704 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
13705 return nativeResponseValue;
13707 // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
13708 export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
13709 if(!isWasmInitialized) {
13710 throw new Error("initializeWasm() must be awaited first!");
13712 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
13713 // debug statements here
13715 // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
13716 export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
13717 if(!isWasmInitialized) {
13718 throw new Error("initializeWasm() must be awaited first!");
13720 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
13721 return nativeResponseValue;
13723 // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
13724 export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
13725 if(!isWasmInitialized) {
13726 throw new Error("initializeWasm() must be awaited first!");
13728 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
13729 // debug statements here
13731 // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
13732 export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
13733 if(!isWasmInitialized) {
13734 throw new Error("initializeWasm() must be awaited first!");
13736 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
13737 return nativeResponseValue;
13739 // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
13740 export function RoutingFees_eq(a: number, b: number): boolean {
13741 if(!isWasmInitialized) {
13742 throw new Error("initializeWasm() must be awaited first!");
13744 const nativeResponseValue = wasm.RoutingFees_eq(a, b);
13745 return nativeResponseValue;
13747 // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
13748 export function RoutingFees_clone(orig: number): number {
13749 if(!isWasmInitialized) {
13750 throw new Error("initializeWasm() must be awaited first!");
13752 const nativeResponseValue = wasm.RoutingFees_clone(orig);
13753 return nativeResponseValue;
13755 // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
13756 export function RoutingFees_write(obj: number): Uint8Array {
13757 if(!isWasmInitialized) {
13758 throw new Error("initializeWasm() must be awaited first!");
13760 const nativeResponseValue = wasm.RoutingFees_write(obj);
13761 return decodeArray(nativeResponseValue);
13763 // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
13764 export function RoutingFees_read(ser: Uint8Array): number {
13765 if(!isWasmInitialized) {
13766 throw new Error("initializeWasm() must be awaited first!");
13768 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
13769 return nativeResponseValue;
13771 // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
13772 export function NodeAnnouncementInfo_free(this_obj: number): void {
13773 if(!isWasmInitialized) {
13774 throw new Error("initializeWasm() must be awaited first!");
13776 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
13777 // debug statements here
13779 // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
13780 export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
13781 if(!isWasmInitialized) {
13782 throw new Error("initializeWasm() must be awaited first!");
13784 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
13785 return nativeResponseValue;
13787 // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
13788 export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
13789 if(!isWasmInitialized) {
13790 throw new Error("initializeWasm() must be awaited first!");
13792 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
13793 // debug statements here
13795 // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
13796 export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
13797 if(!isWasmInitialized) {
13798 throw new Error("initializeWasm() must be awaited first!");
13800 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
13801 return nativeResponseValue;
13803 // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
13804 export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
13805 if(!isWasmInitialized) {
13806 throw new Error("initializeWasm() must be awaited first!");
13808 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
13809 // debug statements here
13811 // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
13812 export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
13813 if(!isWasmInitialized) {
13814 throw new Error("initializeWasm() must be awaited first!");
13816 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
13817 return decodeArray(nativeResponseValue);
13819 // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
13820 export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
13821 if(!isWasmInitialized) {
13822 throw new Error("initializeWasm() must be awaited first!");
13824 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
13825 // debug statements here
13827 // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
13828 export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
13829 if(!isWasmInitialized) {
13830 throw new Error("initializeWasm() must be awaited first!");
13832 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
13833 return decodeArray(nativeResponseValue);
13835 // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13836 export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
13837 if(!isWasmInitialized) {
13838 throw new Error("initializeWasm() must be awaited first!");
13840 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
13841 // debug statements here
13843 // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
13844 export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
13845 if(!isWasmInitialized) {
13846 throw new Error("initializeWasm() must be awaited first!");
13848 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
13849 // debug statements here
13851 // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
13852 export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
13853 if(!isWasmInitialized) {
13854 throw new Error("initializeWasm() must be awaited first!");
13856 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
13857 return nativeResponseValue;
13859 // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
13860 export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
13861 if(!isWasmInitialized) {
13862 throw new Error("initializeWasm() must be awaited first!");
13864 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
13865 // debug statements here
13867 // 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);
13868 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 {
13869 if(!isWasmInitialized) {
13870 throw new Error("initializeWasm() must be awaited first!");
13872 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
13873 return nativeResponseValue;
13875 // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
13876 export function NodeAnnouncementInfo_clone(orig: number): number {
13877 if(!isWasmInitialized) {
13878 throw new Error("initializeWasm() must be awaited first!");
13880 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
13881 return nativeResponseValue;
13883 // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
13884 export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
13885 if(!isWasmInitialized) {
13886 throw new Error("initializeWasm() must be awaited first!");
13888 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
13889 return decodeArray(nativeResponseValue);
13891 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
13892 export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
13893 if(!isWasmInitialized) {
13894 throw new Error("initializeWasm() must be awaited first!");
13896 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
13897 return nativeResponseValue;
13899 // void NodeInfo_free(struct LDKNodeInfo this_obj);
13900 export function NodeInfo_free(this_obj: number): void {
13901 if(!isWasmInitialized) {
13902 throw new Error("initializeWasm() must be awaited first!");
13904 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
13905 // debug statements here
13907 // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
13908 export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
13909 if(!isWasmInitialized) {
13910 throw new Error("initializeWasm() must be awaited first!");
13912 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
13913 // debug statements here
13915 // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
13916 export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
13917 if(!isWasmInitialized) {
13918 throw new Error("initializeWasm() must be awaited first!");
13920 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
13921 return nativeResponseValue;
13923 // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
13924 export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
13925 if(!isWasmInitialized) {
13926 throw new Error("initializeWasm() must be awaited first!");
13928 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
13929 // debug statements here
13931 // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
13932 export function NodeInfo_get_announcement_info(this_ptr: number): number {
13933 if(!isWasmInitialized) {
13934 throw new Error("initializeWasm() must be awaited first!");
13936 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
13937 return nativeResponseValue;
13939 // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
13940 export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
13941 if(!isWasmInitialized) {
13942 throw new Error("initializeWasm() must be awaited first!");
13944 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
13945 // debug statements here
13947 // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
13948 export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
13949 if(!isWasmInitialized) {
13950 throw new Error("initializeWasm() must be awaited first!");
13952 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
13953 return nativeResponseValue;
13955 // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
13956 export function NodeInfo_clone(orig: number): number {
13957 if(!isWasmInitialized) {
13958 throw new Error("initializeWasm() must be awaited first!");
13960 const nativeResponseValue = wasm.NodeInfo_clone(orig);
13961 return nativeResponseValue;
13963 // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
13964 export function NodeInfo_write(obj: number): Uint8Array {
13965 if(!isWasmInitialized) {
13966 throw new Error("initializeWasm() must be awaited first!");
13968 const nativeResponseValue = wasm.NodeInfo_write(obj);
13969 return decodeArray(nativeResponseValue);
13971 // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
13972 export function NodeInfo_read(ser: Uint8Array): number {
13973 if(!isWasmInitialized) {
13974 throw new Error("initializeWasm() must be awaited first!");
13976 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
13977 return nativeResponseValue;
13979 // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
13980 export function NetworkGraph_write(obj: number): Uint8Array {
13981 if(!isWasmInitialized) {
13982 throw new Error("initializeWasm() must be awaited first!");
13984 const nativeResponseValue = wasm.NetworkGraph_write(obj);
13985 return decodeArray(nativeResponseValue);
13987 // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
13988 export function NetworkGraph_read(ser: Uint8Array): number {
13989 if(!isWasmInitialized) {
13990 throw new Error("initializeWasm() must be awaited first!");
13992 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
13993 return nativeResponseValue;
13995 // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
13996 export function NetworkGraph_new(genesis_hash: Uint8Array): number {
13997 if(!isWasmInitialized) {
13998 throw new Error("initializeWasm() must be awaited first!");
14000 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
14001 return nativeResponseValue;
14003 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
14004 export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
14005 if(!isWasmInitialized) {
14006 throw new Error("initializeWasm() must be awaited first!");
14008 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
14009 return nativeResponseValue;
14011 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
14012 export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
14013 if(!isWasmInitialized) {
14014 throw new Error("initializeWasm() must be awaited first!");
14016 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
14017 return nativeResponseValue;
14019 // 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);
14020 export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
14021 if(!isWasmInitialized) {
14022 throw new Error("initializeWasm() must be awaited first!");
14024 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
14025 return nativeResponseValue;
14027 // 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);
14028 export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
14029 if(!isWasmInitialized) {
14030 throw new Error("initializeWasm() must be awaited first!");
14032 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
14033 return nativeResponseValue;
14035 // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
14036 export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
14037 if(!isWasmInitialized) {
14038 throw new Error("initializeWasm() must be awaited first!");
14040 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
14041 // debug statements here
14043 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
14044 export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
14045 if(!isWasmInitialized) {
14046 throw new Error("initializeWasm() must be awaited first!");
14048 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
14049 return nativeResponseValue;
14051 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
14052 export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
14053 if(!isWasmInitialized) {
14054 throw new Error("initializeWasm() must be awaited first!");
14056 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
14057 return nativeResponseValue;
14059 // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
14060 export function FilesystemPersister_free(this_obj: number): void {
14061 if(!isWasmInitialized) {
14062 throw new Error("initializeWasm() must be awaited first!");
14064 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
14065 // debug statements here
14067 // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
14068 export function FilesystemPersister_new(path_to_channel_data: String): number {
14069 if(!isWasmInitialized) {
14070 throw new Error("initializeWasm() must be awaited first!");
14072 const nativeResponseValue = wasm.FilesystemPersister_new(path_to_channel_data);
14073 return nativeResponseValue;
14075 // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
14076 export function FilesystemPersister_get_data_dir(this_arg: number): String {
14077 if(!isWasmInitialized) {
14078 throw new Error("initializeWasm() must be awaited first!");
14080 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
14081 return nativeResponseValue;
14083 // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
14084 export function FilesystemPersister_persist_manager(data_dir: String, manager: number): number {
14085 if(!isWasmInitialized) {
14086 throw new Error("initializeWasm() must be awaited first!");
14088 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(data_dir, manager);
14089 return nativeResponseValue;
14091 // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
14092 export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
14093 if(!isWasmInitialized) {
14094 throw new Error("initializeWasm() must be awaited first!");
14096 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
14097 return nativeResponseValue;
14099 // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
14100 export function FilesystemPersister_as_Persist(this_arg: number): number {
14101 if(!isWasmInitialized) {
14102 throw new Error("initializeWasm() must be awaited first!");
14104 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
14105 return nativeResponseValue;
14107 // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
14108 export function BackgroundProcessor_free(this_obj: number): void {
14109 if(!isWasmInitialized) {
14110 throw new Error("initializeWasm() must be awaited first!");
14112 const nativeResponseValue = wasm.BackgroundProcessor_free(this_obj);
14113 // debug statements here
14115 // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
14116 export function ChannelManagerPersister_free(this_ptr: number): void {
14117 if(!isWasmInitialized) {
14118 throw new Error("initializeWasm() must be awaited first!");
14120 const nativeResponseValue = wasm.ChannelManagerPersister_free(this_ptr);
14121 // debug statements here
14123 // MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKChannelManagerPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger);
14124 export function BackgroundProcessor_start(persister: number, event_handler: number, chain_monitor: number, channel_manager: number, peer_manager: number, logger: number): number {
14125 if(!isWasmInitialized) {
14126 throw new Error("initializeWasm() must be awaited first!");
14128 const nativeResponseValue = wasm.BackgroundProcessor_start(persister, event_handler, chain_monitor, channel_manager, peer_manager, logger);
14129 return nativeResponseValue;
14131 // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
14132 export function BackgroundProcessor_stop(this_arg: number): number {
14133 if(!isWasmInitialized) {
14134 throw new Error("initializeWasm() must be awaited first!");
14136 const nativeResponseValue = wasm.BackgroundProcessor_stop(this_arg);
14137 return nativeResponseValue;
14139 // void check_platform(void);
14140 export function check_platform(): void {
14141 if(!isWasmInitialized) {
14142 throw new Error("initializeWasm() must be awaited first!");
14144 const nativeResponseValue = wasm.check_platform();
14145 // debug statements here
14147 // void Invoice_free(struct LDKInvoice this_obj);
14148 export function Invoice_free(this_obj: number): void {
14149 if(!isWasmInitialized) {
14150 throw new Error("initializeWasm() must be awaited first!");
14152 const nativeResponseValue = wasm.Invoice_free(this_obj);
14153 // debug statements here
14155 // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
14156 export function Invoice_eq(a: number, b: number): boolean {
14157 if(!isWasmInitialized) {
14158 throw new Error("initializeWasm() must be awaited first!");
14160 const nativeResponseValue = wasm.Invoice_eq(a, b);
14161 return nativeResponseValue;
14163 // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
14164 export function Invoice_clone(orig: number): number {
14165 if(!isWasmInitialized) {
14166 throw new Error("initializeWasm() must be awaited first!");
14168 const nativeResponseValue = wasm.Invoice_clone(orig);
14169 return nativeResponseValue;
14171 // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
14172 export function SignedRawInvoice_free(this_obj: number): void {
14173 if(!isWasmInitialized) {
14174 throw new Error("initializeWasm() must be awaited first!");
14176 const nativeResponseValue = wasm.SignedRawInvoice_free(this_obj);
14177 // debug statements here
14179 // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
14180 export function SignedRawInvoice_eq(a: number, b: number): boolean {
14181 if(!isWasmInitialized) {
14182 throw new Error("initializeWasm() must be awaited first!");
14184 const nativeResponseValue = wasm.SignedRawInvoice_eq(a, b);
14185 return nativeResponseValue;
14187 // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
14188 export function SignedRawInvoice_clone(orig: number): number {
14189 if(!isWasmInitialized) {
14190 throw new Error("initializeWasm() must be awaited first!");
14192 const nativeResponseValue = wasm.SignedRawInvoice_clone(orig);
14193 return nativeResponseValue;
14195 // void RawInvoice_free(struct LDKRawInvoice this_obj);
14196 export function RawInvoice_free(this_obj: number): void {
14197 if(!isWasmInitialized) {
14198 throw new Error("initializeWasm() must be awaited first!");
14200 const nativeResponseValue = wasm.RawInvoice_free(this_obj);
14201 // debug statements here
14203 // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
14204 export function RawInvoice_get_data(this_ptr: number): number {
14205 if(!isWasmInitialized) {
14206 throw new Error("initializeWasm() must be awaited first!");
14208 const nativeResponseValue = wasm.RawInvoice_get_data(this_ptr);
14209 return nativeResponseValue;
14211 // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
14212 export function RawInvoice_set_data(this_ptr: number, val: number): void {
14213 if(!isWasmInitialized) {
14214 throw new Error("initializeWasm() must be awaited first!");
14216 const nativeResponseValue = wasm.RawInvoice_set_data(this_ptr, val);
14217 // debug statements here
14219 // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
14220 export function RawInvoice_eq(a: number, b: number): boolean {
14221 if(!isWasmInitialized) {
14222 throw new Error("initializeWasm() must be awaited first!");
14224 const nativeResponseValue = wasm.RawInvoice_eq(a, b);
14225 return nativeResponseValue;
14227 // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
14228 export function RawInvoice_clone(orig: number): number {
14229 if(!isWasmInitialized) {
14230 throw new Error("initializeWasm() must be awaited first!");
14232 const nativeResponseValue = wasm.RawInvoice_clone(orig);
14233 return nativeResponseValue;
14235 // void RawDataPart_free(struct LDKRawDataPart this_obj);
14236 export function RawDataPart_free(this_obj: number): void {
14237 if(!isWasmInitialized) {
14238 throw new Error("initializeWasm() must be awaited first!");
14240 const nativeResponseValue = wasm.RawDataPart_free(this_obj);
14241 // debug statements here
14243 // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
14244 export function RawDataPart_get_timestamp(this_ptr: number): number {
14245 if(!isWasmInitialized) {
14246 throw new Error("initializeWasm() must be awaited first!");
14248 const nativeResponseValue = wasm.RawDataPart_get_timestamp(this_ptr);
14249 return nativeResponseValue;
14251 // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
14252 export function RawDataPart_set_timestamp(this_ptr: number, val: number): void {
14253 if(!isWasmInitialized) {
14254 throw new Error("initializeWasm() must be awaited first!");
14256 const nativeResponseValue = wasm.RawDataPart_set_timestamp(this_ptr, val);
14257 // debug statements here
14259 // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
14260 export function RawDataPart_eq(a: number, b: number): boolean {
14261 if(!isWasmInitialized) {
14262 throw new Error("initializeWasm() must be awaited first!");
14264 const nativeResponseValue = wasm.RawDataPart_eq(a, b);
14265 return nativeResponseValue;
14267 // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
14268 export function RawDataPart_clone(orig: number): number {
14269 if(!isWasmInitialized) {
14270 throw new Error("initializeWasm() must be awaited first!");
14272 const nativeResponseValue = wasm.RawDataPart_clone(orig);
14273 return nativeResponseValue;
14275 // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
14276 export function PositiveTimestamp_free(this_obj: number): void {
14277 if(!isWasmInitialized) {
14278 throw new Error("initializeWasm() must be awaited first!");
14280 const nativeResponseValue = wasm.PositiveTimestamp_free(this_obj);
14281 // debug statements here
14283 // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
14284 export function PositiveTimestamp_eq(a: number, b: number): boolean {
14285 if(!isWasmInitialized) {
14286 throw new Error("initializeWasm() must be awaited first!");
14288 const nativeResponseValue = wasm.PositiveTimestamp_eq(a, b);
14289 return nativeResponseValue;
14291 // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
14292 export function PositiveTimestamp_clone(orig: number): number {
14293 if(!isWasmInitialized) {
14294 throw new Error("initializeWasm() must be awaited first!");
14296 const nativeResponseValue = wasm.PositiveTimestamp_clone(orig);
14297 return nativeResponseValue;
14299 // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
14300 export function SiPrefix_clone(orig: number): SiPrefix {
14301 if(!isWasmInitialized) {
14302 throw new Error("initializeWasm() must be awaited first!");
14304 const nativeResponseValue = wasm.SiPrefix_clone(orig);
14305 return nativeResponseValue;
14307 // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
14308 export function SiPrefix_eq(a: number, b: number): boolean {
14309 if(!isWasmInitialized) {
14310 throw new Error("initializeWasm() must be awaited first!");
14312 const nativeResponseValue = wasm.SiPrefix_eq(a, b);
14313 return nativeResponseValue;
14315 // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
14316 export function SiPrefix_multiplier(this_arg: number): number {
14317 if(!isWasmInitialized) {
14318 throw new Error("initializeWasm() must be awaited first!");
14320 const nativeResponseValue = wasm.SiPrefix_multiplier(this_arg);
14321 return nativeResponseValue;
14323 // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
14324 export function Currency_clone(orig: number): Currency {
14325 if(!isWasmInitialized) {
14326 throw new Error("initializeWasm() must be awaited first!");
14328 const nativeResponseValue = wasm.Currency_clone(orig);
14329 return nativeResponseValue;
14331 // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
14332 export function Currency_eq(a: number, b: number): boolean {
14333 if(!isWasmInitialized) {
14334 throw new Error("initializeWasm() must be awaited first!");
14336 const nativeResponseValue = wasm.Currency_eq(a, b);
14337 return nativeResponseValue;
14339 // void Sha256_free(struct LDKSha256 this_obj);
14340 export function Sha256_free(this_obj: number): void {
14341 if(!isWasmInitialized) {
14342 throw new Error("initializeWasm() must be awaited first!");
14344 const nativeResponseValue = wasm.Sha256_free(this_obj);
14345 // debug statements here
14347 // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
14348 export function Sha256_eq(a: number, b: number): boolean {
14349 if(!isWasmInitialized) {
14350 throw new Error("initializeWasm() must be awaited first!");
14352 const nativeResponseValue = wasm.Sha256_eq(a, b);
14353 return nativeResponseValue;
14355 // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
14356 export function Sha256_clone(orig: number): number {
14357 if(!isWasmInitialized) {
14358 throw new Error("initializeWasm() must be awaited first!");
14360 const nativeResponseValue = wasm.Sha256_clone(orig);
14361 return nativeResponseValue;
14363 // void Description_free(struct LDKDescription this_obj);
14364 export function Description_free(this_obj: number): void {
14365 if(!isWasmInitialized) {
14366 throw new Error("initializeWasm() must be awaited first!");
14368 const nativeResponseValue = wasm.Description_free(this_obj);
14369 // debug statements here
14371 // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
14372 export function Description_eq(a: number, b: number): boolean {
14373 if(!isWasmInitialized) {
14374 throw new Error("initializeWasm() must be awaited first!");
14376 const nativeResponseValue = wasm.Description_eq(a, b);
14377 return nativeResponseValue;
14379 // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
14380 export function Description_clone(orig: number): number {
14381 if(!isWasmInitialized) {
14382 throw new Error("initializeWasm() must be awaited first!");
14384 const nativeResponseValue = wasm.Description_clone(orig);
14385 return nativeResponseValue;
14387 // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
14388 export function PayeePubKey_free(this_obj: number): void {
14389 if(!isWasmInitialized) {
14390 throw new Error("initializeWasm() must be awaited first!");
14392 const nativeResponseValue = wasm.PayeePubKey_free(this_obj);
14393 // debug statements here
14395 // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
14396 export function PayeePubKey_eq(a: number, b: number): boolean {
14397 if(!isWasmInitialized) {
14398 throw new Error("initializeWasm() must be awaited first!");
14400 const nativeResponseValue = wasm.PayeePubKey_eq(a, b);
14401 return nativeResponseValue;
14403 // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
14404 export function PayeePubKey_clone(orig: number): number {
14405 if(!isWasmInitialized) {
14406 throw new Error("initializeWasm() must be awaited first!");
14408 const nativeResponseValue = wasm.PayeePubKey_clone(orig);
14409 return nativeResponseValue;
14411 // void ExpiryTime_free(struct LDKExpiryTime this_obj);
14412 export function ExpiryTime_free(this_obj: number): void {
14413 if(!isWasmInitialized) {
14414 throw new Error("initializeWasm() must be awaited first!");
14416 const nativeResponseValue = wasm.ExpiryTime_free(this_obj);
14417 // debug statements here
14419 // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
14420 export function ExpiryTime_eq(a: number, b: number): boolean {
14421 if(!isWasmInitialized) {
14422 throw new Error("initializeWasm() must be awaited first!");
14424 const nativeResponseValue = wasm.ExpiryTime_eq(a, b);
14425 return nativeResponseValue;
14427 // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
14428 export function ExpiryTime_clone(orig: number): number {
14429 if(!isWasmInitialized) {
14430 throw new Error("initializeWasm() must be awaited first!");
14432 const nativeResponseValue = wasm.ExpiryTime_clone(orig);
14433 return nativeResponseValue;
14435 // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
14436 export function MinFinalCltvExpiry_free(this_obj: number): void {
14437 if(!isWasmInitialized) {
14438 throw new Error("initializeWasm() must be awaited first!");
14440 const nativeResponseValue = wasm.MinFinalCltvExpiry_free(this_obj);
14441 // debug statements here
14443 // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
14444 export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
14445 if(!isWasmInitialized) {
14446 throw new Error("initializeWasm() must be awaited first!");
14448 const nativeResponseValue = wasm.MinFinalCltvExpiry_eq(a, b);
14449 return nativeResponseValue;
14451 // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
14452 export function MinFinalCltvExpiry_clone(orig: number): number {
14453 if(!isWasmInitialized) {
14454 throw new Error("initializeWasm() must be awaited first!");
14456 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone(orig);
14457 return nativeResponseValue;
14459 // void Fallback_free(struct LDKFallback this_ptr);
14460 export function Fallback_free(this_ptr: number): void {
14461 if(!isWasmInitialized) {
14462 throw new Error("initializeWasm() must be awaited first!");
14464 const nativeResponseValue = wasm.Fallback_free(this_ptr);
14465 // debug statements here
14467 // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
14468 export function Fallback_clone(orig: number): number {
14469 if(!isWasmInitialized) {
14470 throw new Error("initializeWasm() must be awaited first!");
14472 const nativeResponseValue = wasm.Fallback_clone(orig);
14473 return nativeResponseValue;
14475 // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
14476 export function Fallback_eq(a: number, b: number): boolean {
14477 if(!isWasmInitialized) {
14478 throw new Error("initializeWasm() must be awaited first!");
14480 const nativeResponseValue = wasm.Fallback_eq(a, b);
14481 return nativeResponseValue;
14483 // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
14484 export function InvoiceSignature_free(this_obj: number): void {
14485 if(!isWasmInitialized) {
14486 throw new Error("initializeWasm() must be awaited first!");
14488 const nativeResponseValue = wasm.InvoiceSignature_free(this_obj);
14489 // debug statements here
14491 // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
14492 export function InvoiceSignature_eq(a: number, b: number): boolean {
14493 if(!isWasmInitialized) {
14494 throw new Error("initializeWasm() must be awaited first!");
14496 const nativeResponseValue = wasm.InvoiceSignature_eq(a, b);
14497 return nativeResponseValue;
14499 // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
14500 export function InvoiceSignature_clone(orig: number): number {
14501 if(!isWasmInitialized) {
14502 throw new Error("initializeWasm() must be awaited first!");
14504 const nativeResponseValue = wasm.InvoiceSignature_clone(orig);
14505 return nativeResponseValue;
14507 // void RouteHint_free(struct LDKRouteHint this_obj);
14508 export function RouteHint_free(this_obj: number): void {
14509 if(!isWasmInitialized) {
14510 throw new Error("initializeWasm() must be awaited first!");
14512 const nativeResponseValue = wasm.RouteHint_free(this_obj);
14513 // debug statements here
14515 // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
14516 export function RouteHint_eq(a: number, b: number): boolean {
14517 if(!isWasmInitialized) {
14518 throw new Error("initializeWasm() must be awaited first!");
14520 const nativeResponseValue = wasm.RouteHint_eq(a, b);
14521 return nativeResponseValue;
14523 // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
14524 export function RouteHint_clone(orig: number): number {
14525 if(!isWasmInitialized) {
14526 throw new Error("initializeWasm() must be awaited first!");
14528 const nativeResponseValue = wasm.RouteHint_clone(orig);
14529 return nativeResponseValue;
14531 // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
14532 export function SignedRawInvoice_into_parts(this_arg: number): number {
14533 if(!isWasmInitialized) {
14534 throw new Error("initializeWasm() must be awaited first!");
14536 const nativeResponseValue = wasm.SignedRawInvoice_into_parts(this_arg);
14537 return nativeResponseValue;
14539 // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
14540 export function SignedRawInvoice_raw_invoice(this_arg: number): number {
14541 if(!isWasmInitialized) {
14542 throw new Error("initializeWasm() must be awaited first!");
14544 const nativeResponseValue = wasm.SignedRawInvoice_raw_invoice(this_arg);
14545 return nativeResponseValue;
14547 // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
14548 export function SignedRawInvoice_hash(this_arg: number): Uint8Array {
14549 if(!isWasmInitialized) {
14550 throw new Error("initializeWasm() must be awaited first!");
14552 const nativeResponseValue = wasm.SignedRawInvoice_hash(this_arg);
14553 return decodeArray(nativeResponseValue);
14555 // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
14556 export function SignedRawInvoice_signature(this_arg: number): number {
14557 if(!isWasmInitialized) {
14558 throw new Error("initializeWasm() must be awaited first!");
14560 const nativeResponseValue = wasm.SignedRawInvoice_signature(this_arg);
14561 return nativeResponseValue;
14563 // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
14564 export function SignedRawInvoice_recover_payee_pub_key(this_arg: number): number {
14565 if(!isWasmInitialized) {
14566 throw new Error("initializeWasm() must be awaited first!");
14568 const nativeResponseValue = wasm.SignedRawInvoice_recover_payee_pub_key(this_arg);
14569 return nativeResponseValue;
14571 // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
14572 export function SignedRawInvoice_check_signature(this_arg: number): boolean {
14573 if(!isWasmInitialized) {
14574 throw new Error("initializeWasm() must be awaited first!");
14576 const nativeResponseValue = wasm.SignedRawInvoice_check_signature(this_arg);
14577 return nativeResponseValue;
14579 // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14580 export function RawInvoice_hash(this_arg: number): Uint8Array {
14581 if(!isWasmInitialized) {
14582 throw new Error("initializeWasm() must be awaited first!");
14584 const nativeResponseValue = wasm.RawInvoice_hash(this_arg);
14585 return decodeArray(nativeResponseValue);
14587 // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14588 export function RawInvoice_payment_hash(this_arg: number): number {
14589 if(!isWasmInitialized) {
14590 throw new Error("initializeWasm() must be awaited first!");
14592 const nativeResponseValue = wasm.RawInvoice_payment_hash(this_arg);
14593 return nativeResponseValue;
14595 // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14596 export function RawInvoice_description(this_arg: number): number {
14597 if(!isWasmInitialized) {
14598 throw new Error("initializeWasm() must be awaited first!");
14600 const nativeResponseValue = wasm.RawInvoice_description(this_arg);
14601 return nativeResponseValue;
14603 // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14604 export function RawInvoice_payee_pub_key(this_arg: number): number {
14605 if(!isWasmInitialized) {
14606 throw new Error("initializeWasm() must be awaited first!");
14608 const nativeResponseValue = wasm.RawInvoice_payee_pub_key(this_arg);
14609 return nativeResponseValue;
14611 // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14612 export function RawInvoice_description_hash(this_arg: number): number {
14613 if(!isWasmInitialized) {
14614 throw new Error("initializeWasm() must be awaited first!");
14616 const nativeResponseValue = wasm.RawInvoice_description_hash(this_arg);
14617 return nativeResponseValue;
14619 // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14620 export function RawInvoice_expiry_time(this_arg: number): number {
14621 if(!isWasmInitialized) {
14622 throw new Error("initializeWasm() must be awaited first!");
14624 const nativeResponseValue = wasm.RawInvoice_expiry_time(this_arg);
14625 return nativeResponseValue;
14627 // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14628 export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
14629 if(!isWasmInitialized) {
14630 throw new Error("initializeWasm() must be awaited first!");
14632 const nativeResponseValue = wasm.RawInvoice_min_final_cltv_expiry(this_arg);
14633 return nativeResponseValue;
14635 // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14636 export function RawInvoice_payment_secret(this_arg: number): Uint8Array {
14637 if(!isWasmInitialized) {
14638 throw new Error("initializeWasm() must be awaited first!");
14640 const nativeResponseValue = wasm.RawInvoice_payment_secret(this_arg);
14641 return decodeArray(nativeResponseValue);
14643 // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14644 export function RawInvoice_features(this_arg: number): number {
14645 if(!isWasmInitialized) {
14646 throw new Error("initializeWasm() must be awaited first!");
14648 const nativeResponseValue = wasm.RawInvoice_features(this_arg);
14649 return nativeResponseValue;
14651 // MUST_USE_RES struct LDKCVec_RouteHintZ RawInvoice_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14652 export function RawInvoice_routes(this_arg: number): number[] {
14653 if(!isWasmInitialized) {
14654 throw new Error("initializeWasm() must be awaited first!");
14656 const nativeResponseValue = wasm.RawInvoice_routes(this_arg);
14657 return nativeResponseValue;
14659 // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14660 export function RawInvoice_amount_pico_btc(this_arg: number): number {
14661 if(!isWasmInitialized) {
14662 throw new Error("initializeWasm() must be awaited first!");
14664 const nativeResponseValue = wasm.RawInvoice_amount_pico_btc(this_arg);
14665 return nativeResponseValue;
14667 // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14668 export function RawInvoice_currency(this_arg: number): Currency {
14669 if(!isWasmInitialized) {
14670 throw new Error("initializeWasm() must be awaited first!");
14672 const nativeResponseValue = wasm.RawInvoice_currency(this_arg);
14673 return nativeResponseValue;
14675 // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
14676 export function PositiveTimestamp_from_unix_timestamp(unix_seconds: number): number {
14677 if(!isWasmInitialized) {
14678 throw new Error("initializeWasm() must be awaited first!");
14680 const nativeResponseValue = wasm.PositiveTimestamp_from_unix_timestamp(unix_seconds);
14681 return nativeResponseValue;
14683 // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
14684 export function PositiveTimestamp_from_system_time(time: number): number {
14685 if(!isWasmInitialized) {
14686 throw new Error("initializeWasm() must be awaited first!");
14688 const nativeResponseValue = wasm.PositiveTimestamp_from_system_time(time);
14689 return nativeResponseValue;
14691 // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
14692 export function PositiveTimestamp_as_unix_timestamp(this_arg: number): number {
14693 if(!isWasmInitialized) {
14694 throw new Error("initializeWasm() must be awaited first!");
14696 const nativeResponseValue = wasm.PositiveTimestamp_as_unix_timestamp(this_arg);
14697 return nativeResponseValue;
14699 // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
14700 export function PositiveTimestamp_as_time(this_arg: number): number {
14701 if(!isWasmInitialized) {
14702 throw new Error("initializeWasm() must be awaited first!");
14704 const nativeResponseValue = wasm.PositiveTimestamp_as_time(this_arg);
14705 return nativeResponseValue;
14707 // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
14708 export function Invoice_into_signed_raw(this_arg: number): number {
14709 if(!isWasmInitialized) {
14710 throw new Error("initializeWasm() must be awaited first!");
14712 const nativeResponseValue = wasm.Invoice_into_signed_raw(this_arg);
14713 return nativeResponseValue;
14715 // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
14716 export function Invoice_check_signature(this_arg: number): number {
14717 if(!isWasmInitialized) {
14718 throw new Error("initializeWasm() must be awaited first!");
14720 const nativeResponseValue = wasm.Invoice_check_signature(this_arg);
14721 return nativeResponseValue;
14723 // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
14724 export function Invoice_from_signed(signed_invoice: number): number {
14725 if(!isWasmInitialized) {
14726 throw new Error("initializeWasm() must be awaited first!");
14728 const nativeResponseValue = wasm.Invoice_from_signed(signed_invoice);
14729 return nativeResponseValue;
14731 // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
14732 export function Invoice_timestamp(this_arg: number): number {
14733 if(!isWasmInitialized) {
14734 throw new Error("initializeWasm() must be awaited first!");
14736 const nativeResponseValue = wasm.Invoice_timestamp(this_arg);
14737 return nativeResponseValue;
14739 // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
14740 export function Invoice_payment_hash(this_arg: number): Uint8Array {
14741 if(!isWasmInitialized) {
14742 throw new Error("initializeWasm() must be awaited first!");
14744 const nativeResponseValue = wasm.Invoice_payment_hash(this_arg);
14745 return decodeArray(nativeResponseValue);
14747 // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
14748 export function Invoice_payee_pub_key(this_arg: number): Uint8Array {
14749 if(!isWasmInitialized) {
14750 throw new Error("initializeWasm() must be awaited first!");
14752 const nativeResponseValue = wasm.Invoice_payee_pub_key(this_arg);
14753 return decodeArray(nativeResponseValue);
14755 // MUST_USE_RES struct LDKThirtyTwoBytes Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg);
14756 export function Invoice_payment_secret(this_arg: number): Uint8Array {
14757 if(!isWasmInitialized) {
14758 throw new Error("initializeWasm() must be awaited first!");
14760 const nativeResponseValue = wasm.Invoice_payment_secret(this_arg);
14761 return decodeArray(nativeResponseValue);
14763 // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
14764 export function Invoice_features(this_arg: number): number {
14765 if(!isWasmInitialized) {
14766 throw new Error("initializeWasm() must be awaited first!");
14768 const nativeResponseValue = wasm.Invoice_features(this_arg);
14769 return nativeResponseValue;
14771 // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
14772 export function Invoice_recover_payee_pub_key(this_arg: number): Uint8Array {
14773 if(!isWasmInitialized) {
14774 throw new Error("initializeWasm() must be awaited first!");
14776 const nativeResponseValue = wasm.Invoice_recover_payee_pub_key(this_arg);
14777 return decodeArray(nativeResponseValue);
14779 // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
14780 export function Invoice_expiry_time(this_arg: number): number {
14781 if(!isWasmInitialized) {
14782 throw new Error("initializeWasm() must be awaited first!");
14784 const nativeResponseValue = wasm.Invoice_expiry_time(this_arg);
14785 return nativeResponseValue;
14787 // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
14788 export function Invoice_min_final_cltv_expiry(this_arg: number): number {
14789 if(!isWasmInitialized) {
14790 throw new Error("initializeWasm() must be awaited first!");
14792 const nativeResponseValue = wasm.Invoice_min_final_cltv_expiry(this_arg);
14793 return nativeResponseValue;
14795 // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
14796 export function Invoice_routes(this_arg: number): number[] {
14797 if(!isWasmInitialized) {
14798 throw new Error("initializeWasm() must be awaited first!");
14800 const nativeResponseValue = wasm.Invoice_routes(this_arg);
14801 return nativeResponseValue;
14803 // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
14804 export function Invoice_currency(this_arg: number): Currency {
14805 if(!isWasmInitialized) {
14806 throw new Error("initializeWasm() must be awaited first!");
14808 const nativeResponseValue = wasm.Invoice_currency(this_arg);
14809 return nativeResponseValue;
14811 // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_pico_btc(const struct LDKInvoice *NONNULL_PTR this_arg);
14812 export function Invoice_amount_pico_btc(this_arg: number): number {
14813 if(!isWasmInitialized) {
14814 throw new Error("initializeWasm() must be awaited first!");
14816 const nativeResponseValue = wasm.Invoice_amount_pico_btc(this_arg);
14817 return nativeResponseValue;
14819 // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
14820 export function Description_new(description: String): number {
14821 if(!isWasmInitialized) {
14822 throw new Error("initializeWasm() must be awaited first!");
14824 const nativeResponseValue = wasm.Description_new(description);
14825 return nativeResponseValue;
14827 // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
14828 export function Description_into_inner(this_arg: number): String {
14829 if(!isWasmInitialized) {
14830 throw new Error("initializeWasm() must be awaited first!");
14832 const nativeResponseValue = wasm.Description_into_inner(this_arg);
14833 return nativeResponseValue;
14835 // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
14836 export function ExpiryTime_from_seconds(seconds: number): number {
14837 if(!isWasmInitialized) {
14838 throw new Error("initializeWasm() must be awaited first!");
14840 const nativeResponseValue = wasm.ExpiryTime_from_seconds(seconds);
14841 return nativeResponseValue;
14843 // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
14844 export function ExpiryTime_from_duration(duration: number): number {
14845 if(!isWasmInitialized) {
14846 throw new Error("initializeWasm() must be awaited first!");
14848 const nativeResponseValue = wasm.ExpiryTime_from_duration(duration);
14849 return nativeResponseValue;
14851 // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
14852 export function ExpiryTime_as_seconds(this_arg: number): number {
14853 if(!isWasmInitialized) {
14854 throw new Error("initializeWasm() must be awaited first!");
14856 const nativeResponseValue = wasm.ExpiryTime_as_seconds(this_arg);
14857 return nativeResponseValue;
14859 // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
14860 export function ExpiryTime_as_duration(this_arg: number): number {
14861 if(!isWasmInitialized) {
14862 throw new Error("initializeWasm() must be awaited first!");
14864 const nativeResponseValue = wasm.ExpiryTime_as_duration(this_arg);
14865 return nativeResponseValue;
14867 // MUST_USE_RES struct LDKCResult_RouteHintCreationErrorZ RouteHint_new(struct LDKCVec_RouteHintHopZ hops);
14868 export function RouteHint_new(hops: number[]): number {
14869 if(!isWasmInitialized) {
14870 throw new Error("initializeWasm() must be awaited first!");
14872 const nativeResponseValue = wasm.RouteHint_new(hops);
14873 return nativeResponseValue;
14875 // MUST_USE_RES struct LDKCVec_RouteHintHopZ RouteHint_into_inner(struct LDKRouteHint this_arg);
14876 export function RouteHint_into_inner(this_arg: number): number[] {
14877 if(!isWasmInitialized) {
14878 throw new Error("initializeWasm() must be awaited first!");
14880 const nativeResponseValue = wasm.RouteHint_into_inner(this_arg);
14881 return nativeResponseValue;
14883 // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
14884 export function CreationError_clone(orig: number): CreationError {
14885 if(!isWasmInitialized) {
14886 throw new Error("initializeWasm() must be awaited first!");
14888 const nativeResponseValue = wasm.CreationError_clone(orig);
14889 return nativeResponseValue;
14891 // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
14892 export function CreationError_eq(a: number, b: number): boolean {
14893 if(!isWasmInitialized) {
14894 throw new Error("initializeWasm() must be awaited first!");
14896 const nativeResponseValue = wasm.CreationError_eq(a, b);
14897 return nativeResponseValue;
14899 // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
14900 export function CreationError_to_str(o: number): String {
14901 if(!isWasmInitialized) {
14902 throw new Error("initializeWasm() must be awaited first!");
14904 const nativeResponseValue = wasm.CreationError_to_str(o);
14905 return nativeResponseValue;
14907 // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
14908 export function SemanticError_clone(orig: number): SemanticError {
14909 if(!isWasmInitialized) {
14910 throw new Error("initializeWasm() must be awaited first!");
14912 const nativeResponseValue = wasm.SemanticError_clone(orig);
14913 return nativeResponseValue;
14915 // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
14916 export function SemanticError_eq(a: number, b: number): boolean {
14917 if(!isWasmInitialized) {
14918 throw new Error("initializeWasm() must be awaited first!");
14920 const nativeResponseValue = wasm.SemanticError_eq(a, b);
14921 return nativeResponseValue;
14923 // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
14924 export function SemanticError_to_str(o: number): String {
14925 if(!isWasmInitialized) {
14926 throw new Error("initializeWasm() must be awaited first!");
14928 const nativeResponseValue = wasm.SemanticError_to_str(o);
14929 return nativeResponseValue;
14931 // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
14932 export function SignOrCreationError_free(this_ptr: number): void {
14933 if(!isWasmInitialized) {
14934 throw new Error("initializeWasm() must be awaited first!");
14936 const nativeResponseValue = wasm.SignOrCreationError_free(this_ptr);
14937 // debug statements here
14939 // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
14940 export function SignOrCreationError_clone(orig: number): number {
14941 if(!isWasmInitialized) {
14942 throw new Error("initializeWasm() must be awaited first!");
14944 const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
14945 return nativeResponseValue;
14947 // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
14948 export function SignOrCreationError_eq(a: number, b: number): boolean {
14949 if(!isWasmInitialized) {
14950 throw new Error("initializeWasm() must be awaited first!");
14952 const nativeResponseValue = wasm.SignOrCreationError_eq(a, b);
14953 return nativeResponseValue;
14955 // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
14956 export function SignOrCreationError_to_str(o: number): String {
14957 if(!isWasmInitialized) {
14958 throw new Error("initializeWasm() must be awaited first!");
14960 const nativeResponseValue = wasm.SignOrCreationError_to_str(o);
14961 return nativeResponseValue;
14963 // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description);
14964 export function create_invoice_from_channelmanager(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: String): number {
14965 if(!isWasmInitialized) {
14966 throw new Error("initializeWasm() must be awaited first!");
14968 const nativeResponseValue = wasm.create_invoice_from_channelmanager(channelmanager, keys_manager, network, amt_msat, description);
14969 return nativeResponseValue;
14971 // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
14972 export function SiPrefix_from_str(s: String): number {
14973 if(!isWasmInitialized) {
14974 throw new Error("initializeWasm() must be awaited first!");
14976 const nativeResponseValue = wasm.SiPrefix_from_str(s);
14977 return nativeResponseValue;
14979 // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
14980 export function Invoice_from_str(s: String): number {
14981 if(!isWasmInitialized) {
14982 throw new Error("initializeWasm() must be awaited first!");
14984 const nativeResponseValue = wasm.Invoice_from_str(s);
14985 return nativeResponseValue;
14987 // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
14988 export function SignedRawInvoice_from_str(s: String): number {
14989 if(!isWasmInitialized) {
14990 throw new Error("initializeWasm() must be awaited first!");
14992 const nativeResponseValue = wasm.SignedRawInvoice_from_str(s);
14993 return nativeResponseValue;
14995 // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
14996 export function Invoice_to_str(o: number): String {
14997 if(!isWasmInitialized) {
14998 throw new Error("initializeWasm() must be awaited first!");
15000 const nativeResponseValue = wasm.Invoice_to_str(o);
15001 return nativeResponseValue;
15003 // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
15004 export function SignedRawInvoice_to_str(o: number): String {
15005 if(!isWasmInitialized) {
15006 throw new Error("initializeWasm() must be awaited first!");
15008 const nativeResponseValue = wasm.SignedRawInvoice_to_str(o);
15009 return nativeResponseValue;
15011 // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
15012 export function Currency_to_str(o: number): String {
15013 if(!isWasmInitialized) {
15014 throw new Error("initializeWasm() must be awaited first!");
15016 const nativeResponseValue = wasm.Currency_to_str(o);
15017 return nativeResponseValue;
15019 // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
15020 export function SiPrefix_to_str(o: number): String {
15021 if(!isWasmInitialized) {
15022 throw new Error("initializeWasm() must be awaited first!");
15024 const nativeResponseValue = wasm.SiPrefix_to_str(o);
15025 return nativeResponseValue;
15028 export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
15029 if(isWasmInitialized && !allowDoubleInitialization) {
15032 const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
15033 wasm = wasmInstance.exports;
15034 isWasmInitialized = true;