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 LDKSecp256k1Error 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 LDKSecp256k1Error 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 LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
170 public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
171 public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
172 public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
173 public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
174 public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
175 public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
176 public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
177 public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
178 public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
179 public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
180 public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
181 public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
182 public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
183 public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
184 public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
185 public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
186 public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
187 public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
188 public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
189 public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
190 public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
191 public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
192 public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
193 public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
194 public static class LDKErrorAction {
195 private LDKErrorAction() {}
196 export class DisconnectPeer extends LDKErrorAction {
198 DisconnectPeer(number msg) { this.msg = msg; }
200 export class IgnoreError extends LDKErrorAction {
203 export class SendErrorMessage extends LDKErrorAction {
205 SendErrorMessage(number msg) { this.msg = msg; }
207 static native void init();
209 static { LDKErrorAction.init(); }
210 public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
211 public static class LDKHTLCFailChannelUpdate {
212 private LDKHTLCFailChannelUpdate() {}
213 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
215 ChannelUpdateMessage(number msg) { this.msg = msg; }
217 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
218 public number short_channel_id;
219 public boolean is_permanent;
220 ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
222 export class NodeFailure extends LDKHTLCFailChannelUpdate {
223 public Uint8Array node_id;
224 public boolean is_permanent;
225 NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
227 static native void init();
229 static { LDKHTLCFailChannelUpdate.init(); }
230 public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
231 public static class LDKMessageSendEvent {
232 private LDKMessageSendEvent() {}
233 export class SendAcceptChannel extends LDKMessageSendEvent {
234 public Uint8Array node_id;
236 SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
238 export class SendOpenChannel extends LDKMessageSendEvent {
239 public Uint8Array node_id;
241 SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
243 export class SendFundingCreated extends LDKMessageSendEvent {
244 public Uint8Array node_id;
246 SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
248 export class SendFundingSigned extends LDKMessageSendEvent {
249 public Uint8Array node_id;
251 SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
253 export class SendFundingLocked extends LDKMessageSendEvent {
254 public Uint8Array node_id;
256 SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
258 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
259 public Uint8Array node_id;
261 SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
263 export class UpdateHTLCs extends LDKMessageSendEvent {
264 public Uint8Array node_id;
265 public number updates;
266 UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
268 export class SendRevokeAndACK extends LDKMessageSendEvent {
269 public Uint8Array node_id;
271 SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
273 export class SendClosingSigned extends LDKMessageSendEvent {
274 public Uint8Array node_id;
276 SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
278 export class SendShutdown extends LDKMessageSendEvent {
279 public Uint8Array node_id;
281 SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
283 export class SendChannelReestablish extends LDKMessageSendEvent {
284 public Uint8Array node_id;
286 SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
288 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
290 public number update_msg;
291 BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
293 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
295 BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
297 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
299 BroadcastChannelUpdate(number msg) { this.msg = msg; }
301 export class HandleError extends LDKMessageSendEvent {
302 public Uint8Array node_id;
303 public number action;
304 HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
306 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
307 public number update;
308 PaymentFailureNetworkUpdate(number update) { this.update = update; }
310 export class SendChannelRangeQuery extends LDKMessageSendEvent {
311 public Uint8Array node_id;
313 SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
315 export class SendShortIdsQuery extends LDKMessageSendEvent {
316 public Uint8Array node_id;
318 SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
320 static native void init();
322 static { LDKMessageSendEvent.init(); }
323 public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
324 public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
325 public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
326 public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
327 public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
328 public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
329 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
330 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
331 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
332 public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
333 public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
334 public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
335 public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
336 public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
337 public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
338 public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
339 public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
340 public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
341 public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
342 public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
343 public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
344 public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
345 public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
346 public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
347 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
348 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
349 public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
350 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
351 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
352 public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
353 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
354 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
355 public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
356 public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
357 public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
358 public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
359 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
360 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
361 public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
362 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
363 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
364 public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
365 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
366 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
367 public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
368 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
369 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
370 public static class LDKNetAddress {
371 private LDKNetAddress() {}
372 export class IPv4 extends LDKNetAddress {
373 public Uint8Array addr;
375 IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
377 export class IPv6 extends LDKNetAddress {
378 public Uint8Array addr;
380 IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
382 export class OnionV2 extends LDKNetAddress {
383 public Uint8Array addr;
385 OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
387 export class OnionV3 extends LDKNetAddress {
388 public Uint8Array ed25519_pubkey;
389 public number checksum;
390 public number version;
392 OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
394 static native void init();
396 static { LDKNetAddress.init(); }
397 public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
398 public static native long LDKCVec_NetAddressZ_new(number[] elems);
399 public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
400 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
401 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
402 public static native long LDKCVec_u64Z_new(number[] elems);
403 public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
404 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
405 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
406 public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
407 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
408 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
409 public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
410 public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
411 public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
412 public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
413 public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
414 public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
415 public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
416 public static class LDKMonitorEvent {
417 private LDKMonitorEvent() {}
418 export class HTLCEvent extends LDKMonitorEvent {
421 export class CommitmentTxBroadcasted extends LDKMonitorEvent {
422 CommitmentTxBroadcasted() { }
424 static native void init();
426 static { LDKMonitorEvent.init(); }
427 public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
428 public static native long LDKCVec_MonitorEventZ_new(number[] elems);
429 public static class LDKSpendableOutputDescriptor {
430 private LDKSpendableOutputDescriptor() {}
431 export class StaticOutput extends LDKSpendableOutputDescriptor {
432 public number outpoint;
433 public number output;
434 StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
436 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
437 DelayedPaymentOutput() { }
439 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
440 StaticPaymentOutput() { }
442 static native void init();
444 static { LDKSpendableOutputDescriptor.init(); }
445 public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
446 public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
447 public static class LDKEvent {
448 private LDKEvent() {}
449 export class FundingGenerationReady extends LDKEvent {
450 public Uint8Array temporary_channel_id;
451 public number channel_value_satoshis;
452 public Uint8Array output_script;
453 public number user_channel_id;
454 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; }
456 export class FundingBroadcastSafe extends LDKEvent {
457 public number funding_txo;
458 public number user_channel_id;
459 FundingBroadcastSafe(number funding_txo, number user_channel_id) { this.funding_txo = funding_txo; this.user_channel_id = user_channel_id; }
461 export class PaymentReceived extends LDKEvent {
462 public Uint8Array payment_hash;
463 public Uint8Array payment_secret;
465 PaymentReceived(Uint8Array payment_hash, Uint8Array payment_secret, number amt) { this.payment_hash = payment_hash; this.payment_secret = payment_secret; this.amt = amt; }
467 export class PaymentSent extends LDKEvent {
468 public Uint8Array payment_preimage;
469 PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
471 export class PaymentFailed extends LDKEvent {
472 public Uint8Array payment_hash;
473 public boolean rejected_by_dest;
474 PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
476 export class PendingHTLCsForwardable extends LDKEvent {
477 public number time_forwardable;
478 PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
480 export class SpendableOutputs extends LDKEvent {
481 public number[] outputs;
482 SpendableOutputs(number[] outputs) { this.outputs = outputs; }
484 static native void init();
486 static { LDKEvent.init(); }
487 public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
488 public static native long LDKCVec_EventZ_new(number[] elems);
489 public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
490 public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
491 public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
492 public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
493 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
494 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
495 public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
496 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
497 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
498 public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
499 public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
500 public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
501 public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
502 public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
503 public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
504 public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
505 public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
506 public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
507 public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
508 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
509 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
510 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
511 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
512 public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
513 public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
514 public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
515 public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
516 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
517 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
518 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
519 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
520 public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
521 public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
522 public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
523 public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
524 public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
525 public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
526 public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
527 public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
528 public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
532 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
534 export interface LDKSign {
535 get_per_commitment_point (idx: number): Uint8Array;
536 release_commitment_secret (idx: number): Uint8Array;
537 channel_keys_id (): Uint8Array;
538 sign_counterparty_commitment (commitment_tx: number): number;
539 sign_holder_commitment_and_htlcs (commitment_tx: number): number;
540 sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
541 sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
542 sign_closing_transaction (closing_tx: Uint8Array): number;
543 sign_channel_announcement (msg: number): number;
544 ready_channel (channel_parameters: number): void;
545 write (): Uint8Array;
548 export function LDKSign_new(impl: LDKSign, pubkeys: number): number {
549 throw new Error('unimplemented'); // TODO: bind to WASM
552 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
555 // LDKPublicKey Sign_get_per_commitment_point LDKSign *NONNULL_PTR this_arg, uint64_t idx
556 export function Sign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
557 if(!isWasmInitialized) {
558 throw new Error("initializeWasm() must be awaited first!");
560 const nativeResponseValue = wasm.Sign_get_per_commitment_point(this_arg, idx);
561 return decodeArray(nativeResponseValue);
563 // LDKThirtyTwoBytes Sign_release_commitment_secret LDKSign *NONNULL_PTR this_arg, uint64_t idx
564 export function Sign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
565 if(!isWasmInitialized) {
566 throw new Error("initializeWasm() must be awaited first!");
568 const nativeResponseValue = wasm.Sign_release_commitment_secret(this_arg, idx);
569 return decodeArray(nativeResponseValue);
571 // LDKThirtyTwoBytes Sign_channel_keys_id LDKSign *NONNULL_PTR this_arg
572 export function Sign_channel_keys_id(this_arg: number): Uint8Array {
573 if(!isWasmInitialized) {
574 throw new Error("initializeWasm() must be awaited first!");
576 const nativeResponseValue = wasm.Sign_channel_keys_id(this_arg);
577 return decodeArray(nativeResponseValue);
579 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_counterparty_commitment LDKSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
580 export function Sign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
581 if(!isWasmInitialized) {
582 throw new Error("initializeWasm() must be awaited first!");
584 const nativeResponseValue = wasm.Sign_sign_counterparty_commitment(this_arg, commitment_tx);
585 return nativeResponseValue;
587 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_holder_commitment_and_htlcs LDKSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
588 export function Sign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
589 if(!isWasmInitialized) {
590 throw new Error("initializeWasm() must be awaited first!");
592 const nativeResponseValue = wasm.Sign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
593 return nativeResponseValue;
595 // LDKCResult_SignatureNoneZ Sign_sign_justice_transaction LDKSign *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
596 export function Sign_sign_justice_transaction(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
597 if(!isWasmInitialized) {
598 throw new Error("initializeWasm() must be awaited first!");
600 const nativeResponseValue = wasm.Sign_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
601 return nativeResponseValue;
603 // LDKCResult_SignatureNoneZ Sign_sign_counterparty_htlc_transaction LDKSign *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
604 export function Sign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
605 if(!isWasmInitialized) {
606 throw new Error("initializeWasm() must be awaited first!");
608 const nativeResponseValue = wasm.Sign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
609 return nativeResponseValue;
611 // LDKCResult_SignatureNoneZ Sign_sign_closing_transaction LDKSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
612 export function Sign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
613 if(!isWasmInitialized) {
614 throw new Error("initializeWasm() must be awaited first!");
616 const nativeResponseValue = wasm.Sign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
617 return nativeResponseValue;
619 // LDKCResult_SignatureNoneZ Sign_sign_channel_announcement LDKSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
620 export function Sign_sign_channel_announcement(this_arg: number, msg: number): number {
621 if(!isWasmInitialized) {
622 throw new Error("initializeWasm() must be awaited first!");
624 const nativeResponseValue = wasm.Sign_sign_channel_announcement(this_arg, msg);
625 return nativeResponseValue;
627 // void Sign_ready_channel LDKSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
628 export function Sign_ready_channel(this_arg: number, channel_parameters: number): void {
629 if(!isWasmInitialized) {
630 throw new Error("initializeWasm() must be awaited first!");
632 const nativeResponseValue = wasm.Sign_ready_channel(this_arg, channel_parameters);
633 // debug statements here
635 // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
636 export function Sign_write(this_arg: number): Uint8Array {
637 if(!isWasmInitialized) {
638 throw new Error("initializeWasm() must be awaited first!");
640 const nativeResponseValue = wasm.Sign_write(this_arg);
641 return decodeArray(nativeResponseValue);
643 // LDKChannelPublicKeys Sign_get_pubkeys LDKSign *NONNULL_PTR this_arg
644 export function Sign_get_pubkeys(this_arg: number): number {
645 if(!isWasmInitialized) {
646 throw new Error("initializeWasm() must be awaited first!");
648 const nativeResponseValue = wasm.Sign_get_pubkeys(this_arg);
649 return nativeResponseValue;
651 public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
652 public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
653 public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
654 public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
655 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
656 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
657 public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
658 public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
659 public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
660 public static class LDKAPIError {
661 private LDKAPIError() {}
662 export class APIMisuseError extends LDKAPIError {
663 public Uint8Array err;
664 APIMisuseError(Uint8Array err) { this.err = err; }
666 export class FeeRateTooHigh extends LDKAPIError {
667 public Uint8Array err;
668 public number feerate;
669 FeeRateTooHigh(Uint8Array err, number feerate) { this.err = err; this.feerate = feerate; }
671 export class RouteError extends LDKAPIError {
673 RouteError(String err) { this.err = err; }
675 export class ChannelUnavailable extends LDKAPIError {
676 public Uint8Array err;
677 ChannelUnavailable(Uint8Array err) { this.err = err; }
679 export class MonitorUpdateFailed extends LDKAPIError {
680 MonitorUpdateFailed() { }
682 static native void init();
684 static { LDKAPIError.init(); }
685 public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
686 public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
687 public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
688 public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
689 public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
690 public static native long LDKCVec_APIErrorZ_new(number[] elems);
691 public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
692 public static class LDKPaymentSendFailure {
693 private LDKPaymentSendFailure() {}
694 export class ParameterError extends LDKPaymentSendFailure {
697 export class PathParameterError extends LDKPaymentSendFailure {
698 PathParameterError() { }
700 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
701 AllFailedRetrySafe() { }
703 export class PartialFailure extends LDKPaymentSendFailure {
706 static native void init();
708 static { LDKPaymentSendFailure.init(); }
709 public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
710 public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
711 public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
712 public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
713 public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
717 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
719 export interface LDKWatch {
720 watch_channel (funding_txo: number, monitor: number): number;
721 update_channel (funding_txo: number, update: number): number;
722 release_pending_monitor_events (): number[];
725 export function LDKWatch_new(impl: LDKWatch): number {
726 throw new Error('unimplemented'); // TODO: bind to WASM
729 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
732 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
733 export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
734 if(!isWasmInitialized) {
735 throw new Error("initializeWasm() must be awaited first!");
737 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
738 return nativeResponseValue;
740 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
741 export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
742 if(!isWasmInitialized) {
743 throw new Error("initializeWasm() must be awaited first!");
745 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
746 return nativeResponseValue;
748 // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
749 export function Watch_release_pending_monitor_events(this_arg: number): number[] {
750 if(!isWasmInitialized) {
751 throw new Error("initializeWasm() must be awaited first!");
753 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
754 return nativeResponseValue;
759 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
761 export interface LDKBroadcasterInterface {
762 broadcast_transaction (tx: Uint8Array): void;
765 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
766 throw new Error('unimplemented'); // TODO: bind to WASM
769 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
772 // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
773 export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
774 if(!isWasmInitialized) {
775 throw new Error("initializeWasm() must be awaited first!");
777 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
778 // debug statements here
780 public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
781 public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
782 public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
786 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
788 export interface LDKKeysInterface {
789 get_node_secret (): Uint8Array;
790 get_destination_script (): Uint8Array;
791 get_shutdown_pubkey (): Uint8Array;
792 get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
793 get_secure_random_bytes (): Uint8Array;
794 read_chan_signer (reader: Uint8Array): number;
797 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
798 throw new Error('unimplemented'); // TODO: bind to WASM
801 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
804 // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
805 export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
806 if(!isWasmInitialized) {
807 throw new Error("initializeWasm() must be awaited first!");
809 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
810 return decodeArray(nativeResponseValue);
812 // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
813 export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
814 if(!isWasmInitialized) {
815 throw new Error("initializeWasm() must be awaited first!");
817 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
818 return decodeArray(nativeResponseValue);
820 // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
821 export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
822 if(!isWasmInitialized) {
823 throw new Error("initializeWasm() must be awaited first!");
825 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
826 return decodeArray(nativeResponseValue);
828 // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
829 export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
830 if(!isWasmInitialized) {
831 throw new Error("initializeWasm() must be awaited first!");
833 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
834 return nativeResponseValue;
836 // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
837 export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
838 if(!isWasmInitialized) {
839 throw new Error("initializeWasm() must be awaited first!");
841 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
842 return decodeArray(nativeResponseValue);
844 // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
845 export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
846 if(!isWasmInitialized) {
847 throw new Error("initializeWasm() must be awaited first!");
849 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
850 return nativeResponseValue;
855 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
857 export interface LDKFeeEstimator {
858 get_est_sat_per_1000_weight (confirmation_target: LDKConfirmationTarget): number;
861 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
862 throw new Error('unimplemented'); // TODO: bind to WASM
865 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
868 // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
869 export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: LDKConfirmationTarget): number {
870 if(!isWasmInitialized) {
871 throw new Error("initializeWasm() must be awaited first!");
873 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
874 return nativeResponseValue;
879 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
881 export interface LDKLogger {
882 log (record: String): void;
885 export function LDKLogger_new(impl: LDKLogger): number {
886 throw new Error('unimplemented'); // TODO: bind to WASM
889 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
892 public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
893 public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
894 public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
895 public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
896 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
897 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
898 public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
899 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
900 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
901 public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
902 public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
903 public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
904 public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
905 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
906 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
907 public static native long LDKCVec_TxOutZ_new(number[] elems);
908 public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
909 public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
910 public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
911 public static native long LDKCVec_RouteHopZ_new(number[] elems);
912 public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
913 public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
914 public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
915 public static native long LDKCVec_RouteHintZ_new(number[] elems);
916 public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
917 public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
918 public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
919 public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
920 public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
921 public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
922 public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
923 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
924 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
925 public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
926 public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
927 public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
928 public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
929 public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
930 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
931 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
932 public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
933 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
934 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
935 public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
936 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
937 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
938 public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
939 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
940 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
941 public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
942 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
943 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
944 public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
945 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
946 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
947 public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
948 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
949 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
950 public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
951 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
952 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
953 public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
954 public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
955 public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
956 public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
957 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
958 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
959 public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
960 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
961 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
962 public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
963 public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
964 public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
965 public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
966 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
967 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
968 public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
969 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
970 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
971 public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
972 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
973 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
974 public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
975 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
976 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
977 public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
978 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
979 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
980 public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
981 public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
982 public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
983 public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
984 public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
985 public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
986 public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
987 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
988 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
989 public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
990 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
991 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
992 public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
993 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
994 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
995 public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
996 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
997 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
998 public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
999 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1000 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1001 public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1002 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1003 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1004 public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1005 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1006 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1007 public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1008 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1009 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1010 public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1011 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1012 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1013 public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1014 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1015 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1016 public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1017 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1018 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1019 public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1020 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1021 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1025 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1027 export interface LDKMessageSendEventsProvider {
1028 get_and_clear_pending_msg_events (): number[];
1031 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1032 throw new Error('unimplemented'); // TODO: bind to WASM
1035 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1038 // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1039 export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1040 if(!isWasmInitialized) {
1041 throw new Error("initializeWasm() must be awaited first!");
1043 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1044 return nativeResponseValue;
1049 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1051 export interface LDKEventsProvider {
1052 get_and_clear_pending_events (): number[];
1055 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1056 throw new Error('unimplemented'); // TODO: bind to WASM
1059 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1062 // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider *NONNULL_PTR this_arg
1063 export function EventsProvider_get_and_clear_pending_events(this_arg: number): number[] {
1064 if(!isWasmInitialized) {
1065 throw new Error("initializeWasm() must be awaited first!");
1067 const nativeResponseValue = wasm.EventsProvider_get_and_clear_pending_events(this_arg);
1068 return nativeResponseValue;
1073 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1075 export interface LDKAccess {
1076 get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1079 export function LDKAccess_new(impl: LDKAccess): number {
1080 throw new Error('unimplemented'); // TODO: bind to WASM
1083 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1086 // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1087 export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1088 if(!isWasmInitialized) {
1089 throw new Error("initializeWasm() must be awaited first!");
1091 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1092 return nativeResponseValue;
1097 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1099 export interface LDKListen {
1100 block_connected (block: Uint8Array, height: number): void;
1101 block_disconnected (header: Uint8Array, height: number): void;
1104 export function LDKListen_new(impl: LDKListen): number {
1105 throw new Error('unimplemented'); // TODO: bind to WASM
1108 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1111 // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1112 export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1113 if(!isWasmInitialized) {
1114 throw new Error("initializeWasm() must be awaited first!");
1116 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1117 // debug statements here
1119 // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1120 export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1121 if(!isWasmInitialized) {
1122 throw new Error("initializeWasm() must be awaited first!");
1124 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1125 // debug statements here
1130 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1132 export interface LDKFilter {
1133 register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1134 register_output (outpoint: number, script_pubkey: Uint8Array): void;
1137 export function LDKFilter_new(impl: LDKFilter): number {
1138 throw new Error('unimplemented'); // TODO: bind to WASM
1141 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1144 // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1145 export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1146 if(!isWasmInitialized) {
1147 throw new Error("initializeWasm() must be awaited first!");
1149 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1150 // debug statements here
1152 // void Filter_register_output LDKFilter *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
1153 export function Filter_register_output(this_arg: number, outpoint: number, script_pubkey: Uint8Array): void {
1154 if(!isWasmInitialized) {
1155 throw new Error("initializeWasm() must be awaited first!");
1157 const nativeResponseValue = wasm.Filter_register_output(this_arg, outpoint, encodeArray(script_pubkey));
1158 // debug statements here
1163 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1165 export interface LDKPersist {
1166 persist_new_channel (id: number, data: number): number;
1167 update_persisted_channel (id: number, update: number, data: number): number;
1170 export function LDKPersist_new(impl: LDKPersist): number {
1171 throw new Error('unimplemented'); // TODO: bind to WASM
1174 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1177 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1178 export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1179 if(!isWasmInitialized) {
1180 throw new Error("initializeWasm() must be awaited first!");
1182 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1183 return nativeResponseValue;
1185 // 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
1186 export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1187 if(!isWasmInitialized) {
1188 throw new Error("initializeWasm() must be awaited first!");
1190 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1191 return nativeResponseValue;
1196 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1198 export interface LDKChannelMessageHandler {
1199 handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1200 handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1201 handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1202 handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1203 handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1204 handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1205 handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1206 handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1207 handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1208 handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1209 handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1210 handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1211 handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1212 handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1213 handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1214 peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1215 peer_connected (their_node_id: Uint8Array, msg: number): void;
1216 handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1217 handle_error (their_node_id: Uint8Array, msg: number): void;
1220 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1221 throw new Error('unimplemented'); // TODO: bind to WASM
1224 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1227 // 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
1228 export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1229 if(!isWasmInitialized) {
1230 throw new Error("initializeWasm() must be awaited first!");
1232 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1233 // debug statements here
1235 // 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
1236 export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1237 if(!isWasmInitialized) {
1238 throw new Error("initializeWasm() must be awaited first!");
1240 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1241 // debug statements here
1243 // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1244 export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1245 if(!isWasmInitialized) {
1246 throw new Error("initializeWasm() must be awaited first!");
1248 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1249 // debug statements here
1251 // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1252 export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1253 if(!isWasmInitialized) {
1254 throw new Error("initializeWasm() must be awaited first!");
1256 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1257 // debug statements here
1259 // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1260 export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1261 if(!isWasmInitialized) {
1262 throw new Error("initializeWasm() must be awaited first!");
1264 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1265 // debug statements here
1267 // 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
1268 export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1269 if(!isWasmInitialized) {
1270 throw new Error("initializeWasm() must be awaited first!");
1272 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1273 // debug statements here
1275 // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1276 export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1277 if(!isWasmInitialized) {
1278 throw new Error("initializeWasm() must be awaited first!");
1280 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1281 // debug statements here
1283 // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1284 export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1285 if(!isWasmInitialized) {
1286 throw new Error("initializeWasm() must be awaited first!");
1288 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1289 // debug statements here
1291 // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1292 export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1293 if(!isWasmInitialized) {
1294 throw new Error("initializeWasm() must be awaited first!");
1296 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1297 // debug statements here
1299 // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1300 export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1301 if(!isWasmInitialized) {
1302 throw new Error("initializeWasm() must be awaited first!");
1304 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1305 // debug statements here
1307 // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1308 export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1309 if(!isWasmInitialized) {
1310 throw new Error("initializeWasm() must be awaited first!");
1312 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1313 // debug statements here
1315 // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1316 export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1317 if(!isWasmInitialized) {
1318 throw new Error("initializeWasm() must be awaited first!");
1320 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1321 // debug statements here
1323 // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1324 export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1325 if(!isWasmInitialized) {
1326 throw new Error("initializeWasm() must be awaited first!");
1328 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1329 // debug statements here
1331 // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1332 export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1333 if(!isWasmInitialized) {
1334 throw new Error("initializeWasm() must be awaited first!");
1336 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1337 // debug statements here
1339 // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1340 export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1341 if(!isWasmInitialized) {
1342 throw new Error("initializeWasm() must be awaited first!");
1344 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1345 // debug statements here
1347 // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1348 export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1349 if(!isWasmInitialized) {
1350 throw new Error("initializeWasm() must be awaited first!");
1352 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1353 // debug statements here
1355 // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1356 export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1357 if(!isWasmInitialized) {
1358 throw new Error("initializeWasm() must be awaited first!");
1360 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1361 // debug statements here
1363 // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1364 export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1365 if(!isWasmInitialized) {
1366 throw new Error("initializeWasm() must be awaited first!");
1368 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1369 // debug statements here
1371 // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1372 export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1373 if(!isWasmInitialized) {
1374 throw new Error("initializeWasm() must be awaited first!");
1376 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1377 // debug statements here
1382 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1384 export interface LDKRoutingMessageHandler {
1385 handle_node_announcement (msg: number): number;
1386 handle_channel_announcement (msg: number): number;
1387 handle_channel_update (msg: number): number;
1388 handle_htlc_fail_channel_update (update: number): void;
1389 get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1390 get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1391 sync_routing_table (their_node_id: Uint8Array, init: number): void;
1392 handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1393 handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1394 handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1395 handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1398 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1399 throw new Error('unimplemented'); // TODO: bind to WASM
1402 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1405 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1406 export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1407 if(!isWasmInitialized) {
1408 throw new Error("initializeWasm() must be awaited first!");
1410 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1411 return nativeResponseValue;
1413 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1414 export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1415 if(!isWasmInitialized) {
1416 throw new Error("initializeWasm() must be awaited first!");
1418 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1419 return nativeResponseValue;
1421 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1422 export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1423 if(!isWasmInitialized) {
1424 throw new Error("initializeWasm() must be awaited first!");
1426 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1427 return nativeResponseValue;
1429 // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1430 export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1431 if(!isWasmInitialized) {
1432 throw new Error("initializeWasm() must be awaited first!");
1434 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1435 // debug statements here
1437 // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1438 export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1439 if(!isWasmInitialized) {
1440 throw new Error("initializeWasm() must be awaited first!");
1442 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1443 return nativeResponseValue;
1445 // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1446 export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1447 if(!isWasmInitialized) {
1448 throw new Error("initializeWasm() must be awaited first!");
1450 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1451 return nativeResponseValue;
1453 // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1454 export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1455 if(!isWasmInitialized) {
1456 throw new Error("initializeWasm() must be awaited first!");
1458 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1459 // debug statements here
1461 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1462 export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1463 if(!isWasmInitialized) {
1464 throw new Error("initializeWasm() must be awaited first!");
1466 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1467 return nativeResponseValue;
1469 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1470 export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1471 if(!isWasmInitialized) {
1472 throw new Error("initializeWasm() must be awaited first!");
1474 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1475 return nativeResponseValue;
1477 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1478 export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1479 if(!isWasmInitialized) {
1480 throw new Error("initializeWasm() must be awaited first!");
1482 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1483 return nativeResponseValue;
1485 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1486 export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1487 if(!isWasmInitialized) {
1488 throw new Error("initializeWasm() must be awaited first!");
1490 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1491 return nativeResponseValue;
1496 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1498 export interface LDKSocketDescriptor {
1499 send_data (data: Uint8Array, resume_read: boolean): number;
1500 disconnect_socket (): void;
1501 eq (other_arg: number): boolean;
1505 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1506 throw new Error('unimplemented'); // TODO: bind to WASM
1509 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1512 // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1513 export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1514 if(!isWasmInitialized) {
1515 throw new Error("initializeWasm() must be awaited first!");
1517 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1518 return nativeResponseValue;
1520 // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1521 export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1522 if(!isWasmInitialized) {
1523 throw new Error("initializeWasm() must be awaited first!");
1525 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1526 // debug statements here
1528 // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1529 export function SocketDescriptor_hash(this_arg: number): number {
1530 if(!isWasmInitialized) {
1531 throw new Error("initializeWasm() must be awaited first!");
1533 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1534 return nativeResponseValue;
1536 // void Transaction_free(struct LDKTransaction _res);
1537 export function Transaction_free(_res: Uint8Array): void {
1538 if(!isWasmInitialized) {
1539 throw new Error("initializeWasm() must be awaited first!");
1541 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1542 // debug statements here
1544 // void TxOut_free(struct LDKTxOut _res);
1545 export function TxOut_free(_res: number): void {
1546 if(!isWasmInitialized) {
1547 throw new Error("initializeWasm() must be awaited first!");
1549 const nativeResponseValue = wasm.TxOut_free(_res);
1550 // debug statements here
1552 // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1553 export function TxOut_clone(orig: number): number {
1554 if(!isWasmInitialized) {
1555 throw new Error("initializeWasm() must be awaited first!");
1557 const nativeResponseValue = wasm.TxOut_clone(orig);
1558 return nativeResponseValue;
1560 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1561 export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1562 if(!isWasmInitialized) {
1563 throw new Error("initializeWasm() must be awaited first!");
1565 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1566 return nativeResponseValue;
1568 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1569 export function CResult_SecretKeyErrorZ_err(e: LDKSecp256k1Error): number {
1570 if(!isWasmInitialized) {
1571 throw new Error("initializeWasm() must be awaited first!");
1573 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1574 return nativeResponseValue;
1576 // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1577 export function CResult_SecretKeyErrorZ_free(_res: number): void {
1578 if(!isWasmInitialized) {
1579 throw new Error("initializeWasm() must be awaited first!");
1581 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1582 // debug statements here
1584 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1585 export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1586 if(!isWasmInitialized) {
1587 throw new Error("initializeWasm() must be awaited first!");
1589 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1590 return nativeResponseValue;
1592 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1593 export function CResult_PublicKeyErrorZ_err(e: LDKSecp256k1Error): number {
1594 if(!isWasmInitialized) {
1595 throw new Error("initializeWasm() must be awaited first!");
1597 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1598 return nativeResponseValue;
1600 // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1601 export function CResult_PublicKeyErrorZ_free(_res: number): void {
1602 if(!isWasmInitialized) {
1603 throw new Error("initializeWasm() must be awaited first!");
1605 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1606 // debug statements here
1608 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1609 export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1610 if(!isWasmInitialized) {
1611 throw new Error("initializeWasm() must be awaited first!");
1613 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1614 return nativeResponseValue;
1616 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1617 export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1618 if(!isWasmInitialized) {
1619 throw new Error("initializeWasm() must be awaited first!");
1621 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1622 return nativeResponseValue;
1624 // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1625 export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1626 if(!isWasmInitialized) {
1627 throw new Error("initializeWasm() must be awaited first!");
1629 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1630 // debug statements here
1632 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1633 export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
1634 if(!isWasmInitialized) {
1635 throw new Error("initializeWasm() must be awaited first!");
1637 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
1638 return nativeResponseValue;
1640 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1641 export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
1642 if(!isWasmInitialized) {
1643 throw new Error("initializeWasm() must be awaited first!");
1645 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
1646 return nativeResponseValue;
1648 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1649 export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
1650 if(!isWasmInitialized) {
1651 throw new Error("initializeWasm() must be awaited first!");
1653 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
1654 return nativeResponseValue;
1656 // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1657 export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
1658 if(!isWasmInitialized) {
1659 throw new Error("initializeWasm() must be awaited first!");
1661 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
1662 // debug statements here
1664 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1665 export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
1666 if(!isWasmInitialized) {
1667 throw new Error("initializeWasm() must be awaited first!");
1669 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
1670 return nativeResponseValue;
1672 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1673 export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
1674 if(!isWasmInitialized) {
1675 throw new Error("initializeWasm() must be awaited first!");
1677 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
1678 return nativeResponseValue;
1680 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
1681 export function CResult_TxCreationKeysErrorZ_err(e: LDKSecp256k1Error): number {
1682 if(!isWasmInitialized) {
1683 throw new Error("initializeWasm() must be awaited first!");
1685 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
1686 return nativeResponseValue;
1688 // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
1689 export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
1690 if(!isWasmInitialized) {
1691 throw new Error("initializeWasm() must be awaited first!");
1693 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
1694 // debug statements here
1696 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
1697 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
1698 if(!isWasmInitialized) {
1699 throw new Error("initializeWasm() must be awaited first!");
1701 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
1702 return nativeResponseValue;
1704 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
1705 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
1706 if(!isWasmInitialized) {
1707 throw new Error("initializeWasm() must be awaited first!");
1709 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
1710 return nativeResponseValue;
1712 // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
1713 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
1714 if(!isWasmInitialized) {
1715 throw new Error("initializeWasm() must be awaited first!");
1717 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
1718 // debug statements here
1720 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
1721 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
1722 if(!isWasmInitialized) {
1723 throw new Error("initializeWasm() must be awaited first!");
1725 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
1726 return nativeResponseValue;
1728 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
1729 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1730 if(!isWasmInitialized) {
1731 throw new Error("initializeWasm() must be awaited first!");
1733 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
1734 return nativeResponseValue;
1736 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1737 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1738 if(!isWasmInitialized) {
1739 throw new Error("initializeWasm() must be awaited first!");
1741 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
1742 return nativeResponseValue;
1744 // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
1745 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1746 if(!isWasmInitialized) {
1747 throw new Error("initializeWasm() must be awaited first!");
1749 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
1750 // debug statements here
1752 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1753 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1754 if(!isWasmInitialized) {
1755 throw new Error("initializeWasm() must be awaited first!");
1757 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
1758 return nativeResponseValue;
1760 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
1761 export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1762 if(!isWasmInitialized) {
1763 throw new Error("initializeWasm() must be awaited first!");
1765 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
1766 return nativeResponseValue;
1768 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1769 export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1770 if(!isWasmInitialized) {
1771 throw new Error("initializeWasm() must be awaited first!");
1773 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
1774 return nativeResponseValue;
1776 // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
1777 export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1778 if(!isWasmInitialized) {
1779 throw new Error("initializeWasm() must be awaited first!");
1781 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
1782 // debug statements here
1784 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1785 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1786 if(!isWasmInitialized) {
1787 throw new Error("initializeWasm() must be awaited first!");
1789 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
1790 return nativeResponseValue;
1792 // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1793 export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
1794 if(!isWasmInitialized) {
1795 throw new Error("initializeWasm() must be awaited first!");
1797 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
1798 // debug statements here
1800 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
1801 export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1802 if(!isWasmInitialized) {
1803 throw new Error("initializeWasm() must be awaited first!");
1805 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
1806 return nativeResponseValue;
1808 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1809 export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
1810 if(!isWasmInitialized) {
1811 throw new Error("initializeWasm() must be awaited first!");
1813 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
1814 return nativeResponseValue;
1816 // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
1817 export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1818 if(!isWasmInitialized) {
1819 throw new Error("initializeWasm() must be awaited first!");
1821 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
1822 // debug statements here
1824 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1825 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1826 if(!isWasmInitialized) {
1827 throw new Error("initializeWasm() must be awaited first!");
1829 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
1830 return nativeResponseValue;
1832 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
1833 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1834 if(!isWasmInitialized) {
1835 throw new Error("initializeWasm() must be awaited first!");
1837 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
1838 return nativeResponseValue;
1840 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1841 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
1842 if(!isWasmInitialized) {
1843 throw new Error("initializeWasm() must be awaited first!");
1845 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
1846 return nativeResponseValue;
1848 // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
1849 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1850 if(!isWasmInitialized) {
1851 throw new Error("initializeWasm() must be awaited first!");
1853 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
1854 // debug statements here
1856 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1857 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1858 if(!isWasmInitialized) {
1859 throw new Error("initializeWasm() must be awaited first!");
1861 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
1862 return nativeResponseValue;
1864 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
1865 export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
1866 if(!isWasmInitialized) {
1867 throw new Error("initializeWasm() must be awaited first!");
1869 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
1870 return nativeResponseValue;
1872 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1873 export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
1874 if(!isWasmInitialized) {
1875 throw new Error("initializeWasm() must be awaited first!");
1877 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
1878 return nativeResponseValue;
1880 // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
1881 export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
1882 if(!isWasmInitialized) {
1883 throw new Error("initializeWasm() must be awaited first!");
1885 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
1886 // debug statements here
1888 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1889 export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1890 if(!isWasmInitialized) {
1891 throw new Error("initializeWasm() must be awaited first!");
1893 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
1894 return nativeResponseValue;
1896 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
1897 export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
1898 if(!isWasmInitialized) {
1899 throw new Error("initializeWasm() must be awaited first!");
1901 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
1902 return nativeResponseValue;
1904 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
1905 export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
1906 if(!isWasmInitialized) {
1907 throw new Error("initializeWasm() must be awaited first!");
1909 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
1910 return nativeResponseValue;
1912 // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
1913 export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
1914 if(!isWasmInitialized) {
1915 throw new Error("initializeWasm() must be awaited first!");
1917 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
1918 // debug statements here
1920 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
1921 export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
1922 if(!isWasmInitialized) {
1923 throw new Error("initializeWasm() must be awaited first!");
1925 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
1926 return nativeResponseValue;
1928 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
1929 export function CResult_CVec_SignatureZNoneZ_err(): number {
1930 if(!isWasmInitialized) {
1931 throw new Error("initializeWasm() must be awaited first!");
1933 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
1934 return nativeResponseValue;
1936 // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
1937 export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
1938 if(!isWasmInitialized) {
1939 throw new Error("initializeWasm() must be awaited first!");
1941 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
1942 // debug statements here
1944 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
1945 export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
1946 if(!isWasmInitialized) {
1947 throw new Error("initializeWasm() must be awaited first!");
1949 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
1950 return nativeResponseValue;
1952 // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
1953 export function CVec_MessageSendEventZ_free(_res: number[]): void {
1954 if(!isWasmInitialized) {
1955 throw new Error("initializeWasm() must be awaited first!");
1957 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
1958 // debug statements here
1960 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
1961 export function CResult_boolLightningErrorZ_ok(o: boolean): number {
1962 if(!isWasmInitialized) {
1963 throw new Error("initializeWasm() must be awaited first!");
1965 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
1966 return nativeResponseValue;
1968 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
1969 export function CResult_boolLightningErrorZ_err(e: number): number {
1970 if(!isWasmInitialized) {
1971 throw new Error("initializeWasm() must be awaited first!");
1973 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
1974 return nativeResponseValue;
1976 // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
1977 export function CResult_boolLightningErrorZ_free(_res: number): void {
1978 if(!isWasmInitialized) {
1979 throw new Error("initializeWasm() must be awaited first!");
1981 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
1982 // debug statements here
1984 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
1985 export function CResult_boolLightningErrorZ_clone(orig: number): number {
1986 if(!isWasmInitialized) {
1987 throw new Error("initializeWasm() must be awaited first!");
1989 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
1990 return nativeResponseValue;
1992 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
1993 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
1994 if(!isWasmInitialized) {
1995 throw new Error("initializeWasm() must be awaited first!");
1997 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
1998 return nativeResponseValue;
2000 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
2001 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
2002 if(!isWasmInitialized) {
2003 throw new Error("initializeWasm() must be awaited first!");
2005 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
2006 return nativeResponseValue;
2008 // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
2009 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
2010 if(!isWasmInitialized) {
2011 throw new Error("initializeWasm() must be awaited first!");
2013 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
2014 // debug statements here
2016 // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2017 export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
2018 if(!isWasmInitialized) {
2019 throw new Error("initializeWasm() must be awaited first!");
2021 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
2022 // debug statements here
2024 // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2025 export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
2026 if(!isWasmInitialized) {
2027 throw new Error("initializeWasm() must be awaited first!");
2029 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
2030 // debug statements here
2032 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2033 export function CResult_NoneLightningErrorZ_ok(): number {
2034 if(!isWasmInitialized) {
2035 throw new Error("initializeWasm() must be awaited first!");
2037 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
2038 return nativeResponseValue;
2040 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2041 export function CResult_NoneLightningErrorZ_err(e: number): number {
2042 if(!isWasmInitialized) {
2043 throw new Error("initializeWasm() must be awaited first!");
2045 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
2046 return nativeResponseValue;
2048 // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2049 export function CResult_NoneLightningErrorZ_free(_res: number): void {
2050 if(!isWasmInitialized) {
2051 throw new Error("initializeWasm() must be awaited first!");
2053 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
2054 // debug statements here
2056 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
2057 export function CResult_NoneLightningErrorZ_clone(orig: number): number {
2058 if(!isWasmInitialized) {
2059 throw new Error("initializeWasm() must be awaited first!");
2061 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
2062 return nativeResponseValue;
2064 // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
2065 export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
2066 if(!isWasmInitialized) {
2067 throw new Error("initializeWasm() must be awaited first!");
2069 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
2070 // debug statements here
2072 // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2073 export function CVec_u8Z_free(_res: Uint8Array): void {
2074 if(!isWasmInitialized) {
2075 throw new Error("initializeWasm() must be awaited first!");
2077 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
2078 // debug statements here
2080 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
2081 export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
2082 if(!isWasmInitialized) {
2083 throw new Error("initializeWasm() must be awaited first!");
2085 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
2086 return nativeResponseValue;
2088 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2089 export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
2090 if(!isWasmInitialized) {
2091 throw new Error("initializeWasm() must be awaited first!");
2093 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
2094 return nativeResponseValue;
2096 // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
2097 export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
2098 if(!isWasmInitialized) {
2099 throw new Error("initializeWasm() must be awaited first!");
2101 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
2102 // debug statements here
2104 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
2105 export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
2106 if(!isWasmInitialized) {
2107 throw new Error("initializeWasm() must be awaited first!");
2109 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
2110 return nativeResponseValue;
2112 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
2113 export function CResult_NonePeerHandleErrorZ_ok(): number {
2114 if(!isWasmInitialized) {
2115 throw new Error("initializeWasm() must be awaited first!");
2117 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
2118 return nativeResponseValue;
2120 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
2121 export function CResult_NonePeerHandleErrorZ_err(e: number): number {
2122 if(!isWasmInitialized) {
2123 throw new Error("initializeWasm() must be awaited first!");
2125 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
2126 return nativeResponseValue;
2128 // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
2129 export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
2130 if(!isWasmInitialized) {
2131 throw new Error("initializeWasm() must be awaited first!");
2133 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
2134 // debug statements here
2136 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
2137 export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
2138 if(!isWasmInitialized) {
2139 throw new Error("initializeWasm() must be awaited first!");
2141 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
2142 return nativeResponseValue;
2144 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
2145 export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
2146 if(!isWasmInitialized) {
2147 throw new Error("initializeWasm() must be awaited first!");
2149 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
2150 return nativeResponseValue;
2152 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2153 export function CResult_boolPeerHandleErrorZ_err(e: number): number {
2154 if(!isWasmInitialized) {
2155 throw new Error("initializeWasm() must be awaited first!");
2157 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
2158 return nativeResponseValue;
2160 // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
2161 export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
2162 if(!isWasmInitialized) {
2163 throw new Error("initializeWasm() must be awaited first!");
2165 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
2166 // debug statements here
2168 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
2169 export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
2170 if(!isWasmInitialized) {
2171 throw new Error("initializeWasm() must be awaited first!");
2173 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
2174 return nativeResponseValue;
2176 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
2177 export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
2178 if(!isWasmInitialized) {
2179 throw new Error("initializeWasm() must be awaited first!");
2181 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
2182 return nativeResponseValue;
2184 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2185 export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
2186 if(!isWasmInitialized) {
2187 throw new Error("initializeWasm() must be awaited first!");
2189 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
2190 return nativeResponseValue;
2192 // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2193 export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
2194 if(!isWasmInitialized) {
2195 throw new Error("initializeWasm() must be awaited first!");
2197 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
2198 // debug statements here
2200 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2201 export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
2202 if(!isWasmInitialized) {
2203 throw new Error("initializeWasm() must be awaited first!");
2205 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
2206 return nativeResponseValue;
2208 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2209 export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
2210 if(!isWasmInitialized) {
2211 throw new Error("initializeWasm() must be awaited first!");
2213 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
2214 return nativeResponseValue;
2216 // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2217 export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
2218 if(!isWasmInitialized) {
2219 throw new Error("initializeWasm() must be awaited first!");
2221 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
2222 // debug statements here
2224 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2225 export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
2226 if(!isWasmInitialized) {
2227 throw new Error("initializeWasm() must be awaited first!");
2229 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
2230 return nativeResponseValue;
2232 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2233 export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
2234 if(!isWasmInitialized) {
2235 throw new Error("initializeWasm() must be awaited first!");
2237 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
2238 return nativeResponseValue;
2240 // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2241 export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
2242 if(!isWasmInitialized) {
2243 throw new Error("initializeWasm() must be awaited first!");
2245 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
2246 // debug statements here
2248 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
2249 export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
2250 if(!isWasmInitialized) {
2251 throw new Error("initializeWasm() must be awaited first!");
2253 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
2254 return nativeResponseValue;
2256 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2257 export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
2258 if(!isWasmInitialized) {
2259 throw new Error("initializeWasm() must be awaited first!");
2261 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
2262 return nativeResponseValue;
2264 // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
2265 export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
2266 if(!isWasmInitialized) {
2267 throw new Error("initializeWasm() must be awaited first!");
2269 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
2270 // debug statements here
2272 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
2273 export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
2274 if(!isWasmInitialized) {
2275 throw new Error("initializeWasm() must be awaited first!");
2277 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
2278 return nativeResponseValue;
2280 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
2281 export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
2282 if(!isWasmInitialized) {
2283 throw new Error("initializeWasm() must be awaited first!");
2285 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
2286 return nativeResponseValue;
2288 // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
2289 export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
2290 if(!isWasmInitialized) {
2291 throw new Error("initializeWasm() must be awaited first!");
2293 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
2294 // debug statements here
2296 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
2297 export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
2298 if(!isWasmInitialized) {
2299 throw new Error("initializeWasm() must be awaited first!");
2301 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
2302 return nativeResponseValue;
2304 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
2305 export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
2306 if(!isWasmInitialized) {
2307 throw new Error("initializeWasm() must be awaited first!");
2309 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
2310 return nativeResponseValue;
2312 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2313 export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
2314 if(!isWasmInitialized) {
2315 throw new Error("initializeWasm() must be awaited first!");
2317 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
2318 return nativeResponseValue;
2320 // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
2321 export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
2322 if(!isWasmInitialized) {
2323 throw new Error("initializeWasm() must be awaited first!");
2325 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
2326 // debug statements here
2328 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2329 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
2330 if(!isWasmInitialized) {
2331 throw new Error("initializeWasm() must be awaited first!");
2333 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
2334 return nativeResponseValue;
2336 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
2337 export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
2338 if(!isWasmInitialized) {
2339 throw new Error("initializeWasm() must be awaited first!");
2341 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
2342 return nativeResponseValue;
2344 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2345 export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
2346 if(!isWasmInitialized) {
2347 throw new Error("initializeWasm() must be awaited first!");
2349 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
2350 return nativeResponseValue;
2352 // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
2353 export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
2354 if(!isWasmInitialized) {
2355 throw new Error("initializeWasm() must be awaited first!");
2357 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
2358 // debug statements here
2360 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2361 export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
2362 if(!isWasmInitialized) {
2363 throw new Error("initializeWasm() must be awaited first!");
2365 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
2366 return nativeResponseValue;
2368 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2369 export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
2370 if(!isWasmInitialized) {
2371 throw new Error("initializeWasm() must be awaited first!");
2373 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
2374 return nativeResponseValue;
2376 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2377 export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
2378 if(!isWasmInitialized) {
2379 throw new Error("initializeWasm() must be awaited first!");
2381 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
2382 return nativeResponseValue;
2384 // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2385 export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
2386 if(!isWasmInitialized) {
2387 throw new Error("initializeWasm() must be awaited first!");
2389 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
2390 // debug statements here
2392 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
2393 export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
2394 if(!isWasmInitialized) {
2395 throw new Error("initializeWasm() must be awaited first!");
2397 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
2398 return nativeResponseValue;
2400 // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
2401 export function CVec_NetAddressZ_free(_res: number[]): void {
2402 if(!isWasmInitialized) {
2403 throw new Error("initializeWasm() must be awaited first!");
2405 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
2406 // debug statements here
2408 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2409 export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
2410 if(!isWasmInitialized) {
2411 throw new Error("initializeWasm() must be awaited first!");
2413 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
2414 return nativeResponseValue;
2416 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2417 export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
2418 if(!isWasmInitialized) {
2419 throw new Error("initializeWasm() must be awaited first!");
2421 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
2422 return nativeResponseValue;
2424 // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
2425 export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
2426 if(!isWasmInitialized) {
2427 throw new Error("initializeWasm() must be awaited first!");
2429 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
2430 // debug statements here
2432 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
2433 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
2434 if(!isWasmInitialized) {
2435 throw new Error("initializeWasm() must be awaited first!");
2437 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
2438 return nativeResponseValue;
2440 // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
2441 export function CVec_u64Z_free(_res: number[]): void {
2442 if(!isWasmInitialized) {
2443 throw new Error("initializeWasm() must be awaited first!");
2445 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
2446 // debug statements here
2448 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
2449 export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
2450 if(!isWasmInitialized) {
2451 throw new Error("initializeWasm() must be awaited first!");
2453 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
2454 return nativeResponseValue;
2456 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
2457 export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
2458 if(!isWasmInitialized) {
2459 throw new Error("initializeWasm() must be awaited first!");
2461 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
2462 return nativeResponseValue;
2464 // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
2465 export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
2466 if(!isWasmInitialized) {
2467 throw new Error("initializeWasm() must be awaited first!");
2469 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
2470 // debug statements here
2472 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
2473 export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
2474 if(!isWasmInitialized) {
2475 throw new Error("initializeWasm() must be awaited first!");
2477 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
2478 return nativeResponseValue;
2480 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
2481 export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
2482 if(!isWasmInitialized) {
2483 throw new Error("initializeWasm() must be awaited first!");
2485 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
2486 return nativeResponseValue;
2488 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
2489 export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
2490 if(!isWasmInitialized) {
2491 throw new Error("initializeWasm() must be awaited first!");
2493 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
2494 return nativeResponseValue;
2496 // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
2497 export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
2498 if(!isWasmInitialized) {
2499 throw new Error("initializeWasm() must be awaited first!");
2501 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
2502 // debug statements here
2504 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
2505 export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
2506 if(!isWasmInitialized) {
2507 throw new Error("initializeWasm() must be awaited first!");
2509 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
2510 return nativeResponseValue;
2512 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2513 export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2514 if(!isWasmInitialized) {
2515 throw new Error("initializeWasm() must be awaited first!");
2517 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2518 return nativeResponseValue;
2520 // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2521 export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2522 if(!isWasmInitialized) {
2523 throw new Error("initializeWasm() must be awaited first!");
2525 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2526 // debug statements here
2528 // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2529 export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2530 if(!isWasmInitialized) {
2531 throw new Error("initializeWasm() must be awaited first!");
2533 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2534 // debug statements here
2536 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2537 export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2538 if(!isWasmInitialized) {
2539 throw new Error("initializeWasm() must be awaited first!");
2541 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2542 return nativeResponseValue;
2544 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2545 export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
2546 if(!isWasmInitialized) {
2547 throw new Error("initializeWasm() must be awaited first!");
2549 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2550 return nativeResponseValue;
2552 // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2553 export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2554 if(!isWasmInitialized) {
2555 throw new Error("initializeWasm() must be awaited first!");
2557 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2558 // debug statements here
2560 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2561 export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2562 if(!isWasmInitialized) {
2563 throw new Error("initializeWasm() must be awaited first!");
2565 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2566 return nativeResponseValue;
2568 // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2569 export function CVec_MonitorEventZ_free(_res: number[]): void {
2570 if(!isWasmInitialized) {
2571 throw new Error("initializeWasm() must be awaited first!");
2573 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2574 // debug statements here
2576 // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
2577 export function CVec_EventZ_free(_res: number[]): void {
2578 if(!isWasmInitialized) {
2579 throw new Error("initializeWasm() must be awaited first!");
2581 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
2582 // debug statements here
2584 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
2585 export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
2586 if(!isWasmInitialized) {
2587 throw new Error("initializeWasm() must be awaited first!");
2589 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
2590 return nativeResponseValue;
2592 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
2593 export function CResult_OutPointDecodeErrorZ_err(e: number): number {
2594 if(!isWasmInitialized) {
2595 throw new Error("initializeWasm() must be awaited first!");
2597 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
2598 return nativeResponseValue;
2600 // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
2601 export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
2602 if(!isWasmInitialized) {
2603 throw new Error("initializeWasm() must be awaited first!");
2605 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
2606 // debug statements here
2608 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
2609 export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
2610 if(!isWasmInitialized) {
2611 throw new Error("initializeWasm() must be awaited first!");
2613 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
2614 return nativeResponseValue;
2616 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
2617 export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
2618 if(!isWasmInitialized) {
2619 throw new Error("initializeWasm() must be awaited first!");
2621 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
2622 return nativeResponseValue;
2624 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2625 export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
2626 if(!isWasmInitialized) {
2627 throw new Error("initializeWasm() must be awaited first!");
2629 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
2630 return nativeResponseValue;
2632 // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
2633 export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
2634 if(!isWasmInitialized) {
2635 throw new Error("initializeWasm() must be awaited first!");
2637 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
2638 // debug statements here
2640 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
2641 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
2642 if(!isWasmInitialized) {
2643 throw new Error("initializeWasm() must be awaited first!");
2645 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
2646 return nativeResponseValue;
2648 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
2649 export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
2650 if(!isWasmInitialized) {
2651 throw new Error("initializeWasm() must be awaited first!");
2653 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
2654 return nativeResponseValue;
2656 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2657 export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
2658 if(!isWasmInitialized) {
2659 throw new Error("initializeWasm() must be awaited first!");
2661 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
2662 return nativeResponseValue;
2664 // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
2665 export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
2666 if(!isWasmInitialized) {
2667 throw new Error("initializeWasm() must be awaited first!");
2669 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
2670 // debug statements here
2672 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
2673 export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
2674 if(!isWasmInitialized) {
2675 throw new Error("initializeWasm() must be awaited first!");
2677 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
2678 return nativeResponseValue;
2680 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
2681 export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
2682 if(!isWasmInitialized) {
2683 throw new Error("initializeWasm() must be awaited first!");
2685 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
2686 return nativeResponseValue;
2688 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
2689 export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
2690 if(!isWasmInitialized) {
2691 throw new Error("initializeWasm() must be awaited first!");
2693 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
2694 return nativeResponseValue;
2696 // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
2697 export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
2698 if(!isWasmInitialized) {
2699 throw new Error("initializeWasm() must be awaited first!");
2701 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
2702 // debug statements here
2704 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
2705 export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
2706 if(!isWasmInitialized) {
2707 throw new Error("initializeWasm() must be awaited first!");
2709 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
2710 return nativeResponseValue;
2712 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
2713 export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
2714 if(!isWasmInitialized) {
2715 throw new Error("initializeWasm() must be awaited first!");
2717 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
2718 return nativeResponseValue;
2720 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
2721 export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
2722 if(!isWasmInitialized) {
2723 throw new Error("initializeWasm() must be awaited first!");
2725 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
2726 return nativeResponseValue;
2728 // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
2729 export function C2Tuple_OutPointScriptZ_free(_res: number): void {
2730 if(!isWasmInitialized) {
2731 throw new Error("initializeWasm() must be awaited first!");
2733 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
2734 // debug statements here
2736 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
2737 export function C2Tuple_u32ScriptZ_clone(orig: number): number {
2738 if(!isWasmInitialized) {
2739 throw new Error("initializeWasm() must be awaited first!");
2741 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
2742 return nativeResponseValue;
2744 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
2745 export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
2746 if(!isWasmInitialized) {
2747 throw new Error("initializeWasm() must be awaited first!");
2749 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
2750 return nativeResponseValue;
2752 // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
2753 export function C2Tuple_u32ScriptZ_free(_res: number): void {
2754 if(!isWasmInitialized) {
2755 throw new Error("initializeWasm() must be awaited first!");
2757 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
2758 // debug statements here
2760 // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
2761 export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
2762 if(!isWasmInitialized) {
2763 throw new Error("initializeWasm() must be awaited first!");
2765 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
2766 // debug statements here
2768 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
2769 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
2770 if(!isWasmInitialized) {
2771 throw new Error("initializeWasm() must be awaited first!");
2773 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
2774 return nativeResponseValue;
2776 // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
2777 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
2778 if(!isWasmInitialized) {
2779 throw new Error("initializeWasm() must be awaited first!");
2781 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
2782 // debug statements here
2784 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
2785 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
2786 if(!isWasmInitialized) {
2787 throw new Error("initializeWasm() must be awaited first!");
2789 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
2790 // debug statements here
2792 // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
2793 export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
2794 if(!isWasmInitialized) {
2795 throw new Error("initializeWasm() must be awaited first!");
2797 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
2798 // debug statements here
2800 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
2801 export function C2Tuple_u32TxOutZ_clone(orig: number): number {
2802 if(!isWasmInitialized) {
2803 throw new Error("initializeWasm() must be awaited first!");
2805 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
2806 return nativeResponseValue;
2808 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
2809 export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
2810 if(!isWasmInitialized) {
2811 throw new Error("initializeWasm() must be awaited first!");
2813 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
2814 return nativeResponseValue;
2816 // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
2817 export function C2Tuple_u32TxOutZ_free(_res: number): void {
2818 if(!isWasmInitialized) {
2819 throw new Error("initializeWasm() must be awaited first!");
2821 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
2822 // debug statements here
2824 // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
2825 export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
2826 if(!isWasmInitialized) {
2827 throw new Error("initializeWasm() must be awaited first!");
2829 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
2830 // debug statements here
2832 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
2833 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
2834 if(!isWasmInitialized) {
2835 throw new Error("initializeWasm() must be awaited first!");
2837 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
2838 return nativeResponseValue;
2840 // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
2841 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
2842 if(!isWasmInitialized) {
2843 throw new Error("initializeWasm() must be awaited first!");
2845 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
2846 // debug statements here
2848 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
2849 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
2850 if(!isWasmInitialized) {
2851 throw new Error("initializeWasm() must be awaited first!");
2853 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
2854 // debug statements here
2856 // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
2857 export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
2858 if(!isWasmInitialized) {
2859 throw new Error("initializeWasm() must be awaited first!");
2861 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
2862 return nativeResponseValue;
2864 // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
2865 export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
2866 if(!isWasmInitialized) {
2867 throw new Error("initializeWasm() must be awaited first!");
2869 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
2870 // debug statements here
2872 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
2873 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
2874 if(!isWasmInitialized) {
2875 throw new Error("initializeWasm() must be awaited first!");
2877 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
2878 return nativeResponseValue;
2880 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
2881 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
2882 if(!isWasmInitialized) {
2883 throw new Error("initializeWasm() must be awaited first!");
2885 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
2886 return nativeResponseValue;
2888 // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
2889 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
2890 if(!isWasmInitialized) {
2891 throw new Error("initializeWasm() must be awaited first!");
2893 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
2894 // debug statements here
2896 // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2897 export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2898 if(!isWasmInitialized) {
2899 throw new Error("initializeWasm() must be awaited first!");
2901 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2902 // debug statements here
2904 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2905 export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2906 if(!isWasmInitialized) {
2907 throw new Error("initializeWasm() must be awaited first!");
2909 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2910 return nativeResponseValue;
2912 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2913 export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
2914 if(!isWasmInitialized) {
2915 throw new Error("initializeWasm() must be awaited first!");
2917 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2918 return nativeResponseValue;
2920 // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2921 export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2922 if(!isWasmInitialized) {
2923 throw new Error("initializeWasm() must be awaited first!");
2925 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2926 // debug statements here
2928 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2929 export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2930 if(!isWasmInitialized) {
2931 throw new Error("initializeWasm() must be awaited first!");
2933 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2934 return nativeResponseValue;
2936 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
2937 export function CResult_NoneAPIErrorZ_ok(): number {
2938 if(!isWasmInitialized) {
2939 throw new Error("initializeWasm() must be awaited first!");
2941 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
2942 return nativeResponseValue;
2944 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
2945 export function CResult_NoneAPIErrorZ_err(e: number): number {
2946 if(!isWasmInitialized) {
2947 throw new Error("initializeWasm() must be awaited first!");
2949 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
2950 return nativeResponseValue;
2952 // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
2953 export function CResult_NoneAPIErrorZ_free(_res: number): void {
2954 if(!isWasmInitialized) {
2955 throw new Error("initializeWasm() must be awaited first!");
2957 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
2958 // debug statements here
2960 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
2961 export function CResult_NoneAPIErrorZ_clone(orig: number): number {
2962 if(!isWasmInitialized) {
2963 throw new Error("initializeWasm() must be awaited first!");
2965 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
2966 return nativeResponseValue;
2968 // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
2969 export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
2970 if(!isWasmInitialized) {
2971 throw new Error("initializeWasm() must be awaited first!");
2973 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
2974 // debug statements here
2976 // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
2977 export function CVec_APIErrorZ_free(_res: number[]): void {
2978 if(!isWasmInitialized) {
2979 throw new Error("initializeWasm() must be awaited first!");
2981 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
2982 // debug statements here
2984 // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2985 export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2986 if(!isWasmInitialized) {
2987 throw new Error("initializeWasm() must be awaited first!");
2989 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2990 // debug statements here
2992 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
2993 export function CResult_NonePaymentSendFailureZ_ok(): number {
2994 if(!isWasmInitialized) {
2995 throw new Error("initializeWasm() must be awaited first!");
2997 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
2998 return nativeResponseValue;
3000 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3001 export function CResult_NonePaymentSendFailureZ_err(e: number): number {
3002 if(!isWasmInitialized) {
3003 throw new Error("initializeWasm() must be awaited first!");
3005 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
3006 return nativeResponseValue;
3008 // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
3009 export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
3010 if(!isWasmInitialized) {
3011 throw new Error("initializeWasm() must be awaited first!");
3013 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
3014 // debug statements here
3016 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
3017 export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
3018 if(!isWasmInitialized) {
3019 throw new Error("initializeWasm() must be awaited first!");
3021 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
3022 return nativeResponseValue;
3024 // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
3025 export function CVec_ChannelMonitorZ_free(_res: number[]): void {
3026 if(!isWasmInitialized) {
3027 throw new Error("initializeWasm() must be awaited first!");
3029 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
3030 // debug statements here
3032 // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
3033 export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
3034 if(!isWasmInitialized) {
3035 throw new Error("initializeWasm() must be awaited first!");
3037 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
3038 return nativeResponseValue;
3040 // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
3041 export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
3042 if(!isWasmInitialized) {
3043 throw new Error("initializeWasm() must be awaited first!");
3045 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
3046 // debug statements here
3048 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
3049 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
3050 if(!isWasmInitialized) {
3051 throw new Error("initializeWasm() must be awaited first!");
3053 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
3054 return nativeResponseValue;
3056 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
3057 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
3058 if(!isWasmInitialized) {
3059 throw new Error("initializeWasm() must be awaited first!");
3061 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
3062 return nativeResponseValue;
3064 // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
3065 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
3066 if(!isWasmInitialized) {
3067 throw new Error("initializeWasm() must be awaited first!");
3069 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
3070 // debug statements here
3072 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
3073 export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
3074 if(!isWasmInitialized) {
3075 throw new Error("initializeWasm() must be awaited first!");
3077 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
3078 return nativeResponseValue;
3080 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3081 export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
3082 if(!isWasmInitialized) {
3083 throw new Error("initializeWasm() must be awaited first!");
3085 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
3086 return nativeResponseValue;
3088 // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
3089 export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
3090 if(!isWasmInitialized) {
3091 throw new Error("initializeWasm() must be awaited first!");
3093 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
3094 // debug statements here
3096 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3097 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3098 if(!isWasmInitialized) {
3099 throw new Error("initializeWasm() must be awaited first!");
3101 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
3102 return nativeResponseValue;
3104 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
3105 export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
3106 if(!isWasmInitialized) {
3107 throw new Error("initializeWasm() must be awaited first!");
3109 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
3110 return nativeResponseValue;
3112 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
3113 export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
3114 if(!isWasmInitialized) {
3115 throw new Error("initializeWasm() must be awaited first!");
3117 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
3118 return nativeResponseValue;
3120 // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
3121 export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
3122 if(!isWasmInitialized) {
3123 throw new Error("initializeWasm() must be awaited first!");
3125 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
3126 // debug statements here
3128 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
3129 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
3130 if(!isWasmInitialized) {
3131 throw new Error("initializeWasm() must be awaited first!");
3133 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
3134 return nativeResponseValue;
3136 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
3137 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
3138 if(!isWasmInitialized) {
3139 throw new Error("initializeWasm() must be awaited first!");
3141 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
3142 return nativeResponseValue;
3144 // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
3145 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
3146 if(!isWasmInitialized) {
3147 throw new Error("initializeWasm() must be awaited first!");
3149 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
3150 // debug statements here
3152 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
3153 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
3154 if(!isWasmInitialized) {
3155 throw new Error("initializeWasm() must be awaited first!");
3157 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
3158 return nativeResponseValue;
3160 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3161 export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3162 if(!isWasmInitialized) {
3163 throw new Error("initializeWasm() must be awaited first!");
3165 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3166 return nativeResponseValue;
3168 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3169 export function CResult_SignatureNoneZ_err(): number {
3170 if(!isWasmInitialized) {
3171 throw new Error("initializeWasm() must be awaited first!");
3173 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3174 return nativeResponseValue;
3176 // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3177 export function CResult_SignatureNoneZ_free(_res: number): void {
3178 if(!isWasmInitialized) {
3179 throw new Error("initializeWasm() must be awaited first!");
3181 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3182 // debug statements here
3184 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3185 export function CResult_SignatureNoneZ_clone(orig: number): number {
3186 if(!isWasmInitialized) {
3187 throw new Error("initializeWasm() must be awaited first!");
3189 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3190 return nativeResponseValue;
3192 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
3193 export function CResult_SignDecodeErrorZ_ok(o: number): number {
3194 if(!isWasmInitialized) {
3195 throw new Error("initializeWasm() must be awaited first!");
3197 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
3198 return nativeResponseValue;
3200 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
3201 export function CResult_SignDecodeErrorZ_err(e: number): number {
3202 if(!isWasmInitialized) {
3203 throw new Error("initializeWasm() must be awaited first!");
3205 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
3206 return nativeResponseValue;
3208 // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
3209 export function CResult_SignDecodeErrorZ_free(_res: number): void {
3210 if(!isWasmInitialized) {
3211 throw new Error("initializeWasm() must be awaited first!");
3213 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
3214 // debug statements here
3216 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
3217 export function CResult_SignDecodeErrorZ_clone(orig: number): number {
3218 if(!isWasmInitialized) {
3219 throw new Error("initializeWasm() must be awaited first!");
3221 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
3222 return nativeResponseValue;
3224 // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3225 export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3226 if(!isWasmInitialized) {
3227 throw new Error("initializeWasm() must be awaited first!");
3229 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3230 // debug statements here
3232 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3233 export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3234 if(!isWasmInitialized) {
3235 throw new Error("initializeWasm() must be awaited first!");
3237 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3238 return nativeResponseValue;
3240 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3241 export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3242 if(!isWasmInitialized) {
3243 throw new Error("initializeWasm() must be awaited first!");
3245 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3246 return nativeResponseValue;
3248 // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3249 export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3250 if(!isWasmInitialized) {
3251 throw new Error("initializeWasm() must be awaited first!");
3253 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3254 // debug statements here
3256 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3257 export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3258 if(!isWasmInitialized) {
3259 throw new Error("initializeWasm() must be awaited first!");
3261 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3262 return nativeResponseValue;
3264 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3265 export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3266 if(!isWasmInitialized) {
3267 throw new Error("initializeWasm() must be awaited first!");
3269 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3270 return nativeResponseValue;
3272 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3273 export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3274 if(!isWasmInitialized) {
3275 throw new Error("initializeWasm() must be awaited first!");
3277 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3278 return nativeResponseValue;
3280 // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3281 export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3282 if(!isWasmInitialized) {
3283 throw new Error("initializeWasm() must be awaited first!");
3285 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3286 // debug statements here
3288 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3289 export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3290 if(!isWasmInitialized) {
3291 throw new Error("initializeWasm() must be awaited first!");
3293 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3294 return nativeResponseValue;
3296 // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3297 export function CVec_TxOutZ_free(_res: number[]): void {
3298 if(!isWasmInitialized) {
3299 throw new Error("initializeWasm() must be awaited first!");
3301 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3302 // debug statements here
3304 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3305 export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3306 if(!isWasmInitialized) {
3307 throw new Error("initializeWasm() must be awaited first!");
3309 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3310 return nativeResponseValue;
3312 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3313 export function CResult_TransactionNoneZ_err(): number {
3314 if(!isWasmInitialized) {
3315 throw new Error("initializeWasm() must be awaited first!");
3317 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3318 return nativeResponseValue;
3320 // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3321 export function CResult_TransactionNoneZ_free(_res: number): void {
3322 if(!isWasmInitialized) {
3323 throw new Error("initializeWasm() must be awaited first!");
3325 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3326 // debug statements here
3328 // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
3329 export function CVec_RouteHopZ_free(_res: number[]): void {
3330 if(!isWasmInitialized) {
3331 throw new Error("initializeWasm() must be awaited first!");
3333 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
3334 // debug statements here
3336 // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
3337 export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
3338 if(!isWasmInitialized) {
3339 throw new Error("initializeWasm() must be awaited first!");
3341 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
3342 // debug statements here
3344 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
3345 export function CResult_RouteDecodeErrorZ_ok(o: number): number {
3346 if(!isWasmInitialized) {
3347 throw new Error("initializeWasm() must be awaited first!");
3349 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
3350 return nativeResponseValue;
3352 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
3353 export function CResult_RouteDecodeErrorZ_err(e: number): number {
3354 if(!isWasmInitialized) {
3355 throw new Error("initializeWasm() must be awaited first!");
3357 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
3358 return nativeResponseValue;
3360 // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3361 export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3362 if(!isWasmInitialized) {
3363 throw new Error("initializeWasm() must be awaited first!");
3365 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3366 // debug statements here
3368 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3369 export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3370 if(!isWasmInitialized) {
3371 throw new Error("initializeWasm() must be awaited first!");
3373 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3374 return nativeResponseValue;
3376 // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3377 export function CVec_RouteHintZ_free(_res: number[]): void {
3378 if(!isWasmInitialized) {
3379 throw new Error("initializeWasm() must be awaited first!");
3381 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3382 // debug statements here
3384 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3385 export function CResult_RouteLightningErrorZ_ok(o: number): number {
3386 if(!isWasmInitialized) {
3387 throw new Error("initializeWasm() must be awaited first!");
3389 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3390 return nativeResponseValue;
3392 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3393 export function CResult_RouteLightningErrorZ_err(e: number): number {
3394 if(!isWasmInitialized) {
3395 throw new Error("initializeWasm() must be awaited first!");
3397 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3398 return nativeResponseValue;
3400 // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3401 export function CResult_RouteLightningErrorZ_free(_res: number): void {
3402 if(!isWasmInitialized) {
3403 throw new Error("initializeWasm() must be awaited first!");
3405 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3406 // debug statements here
3408 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3409 export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3410 if(!isWasmInitialized) {
3411 throw new Error("initializeWasm() must be awaited first!");
3413 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3414 return nativeResponseValue;
3416 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
3417 export function CResult_NetAddressu8Z_ok(o: number): number {
3418 if(!isWasmInitialized) {
3419 throw new Error("initializeWasm() must be awaited first!");
3421 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
3422 return nativeResponseValue;
3424 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
3425 export function CResult_NetAddressu8Z_err(e: number): number {
3426 if(!isWasmInitialized) {
3427 throw new Error("initializeWasm() must be awaited first!");
3429 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
3430 return nativeResponseValue;
3432 // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
3433 export function CResult_NetAddressu8Z_free(_res: number): void {
3434 if(!isWasmInitialized) {
3435 throw new Error("initializeWasm() must be awaited first!");
3437 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
3438 // debug statements here
3440 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
3441 export function CResult_NetAddressu8Z_clone(orig: number): number {
3442 if(!isWasmInitialized) {
3443 throw new Error("initializeWasm() must be awaited first!");
3445 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
3446 return nativeResponseValue;
3448 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
3449 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
3450 if(!isWasmInitialized) {
3451 throw new Error("initializeWasm() must be awaited first!");
3453 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
3454 return nativeResponseValue;
3456 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
3457 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
3458 if(!isWasmInitialized) {
3459 throw new Error("initializeWasm() must be awaited first!");
3461 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
3462 return nativeResponseValue;
3464 // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
3465 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
3466 if(!isWasmInitialized) {
3467 throw new Error("initializeWasm() must be awaited first!");
3469 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
3470 // debug statements here
3472 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
3473 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
3474 if(!isWasmInitialized) {
3475 throw new Error("initializeWasm() must be awaited first!");
3477 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
3478 return nativeResponseValue;
3480 // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
3481 export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
3482 if(!isWasmInitialized) {
3483 throw new Error("initializeWasm() must be awaited first!");
3485 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
3486 // debug statements here
3488 // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
3489 export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
3490 if(!isWasmInitialized) {
3491 throw new Error("initializeWasm() must be awaited first!");
3493 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
3494 // debug statements here
3496 // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
3497 export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
3498 if(!isWasmInitialized) {
3499 throw new Error("initializeWasm() must be awaited first!");
3501 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
3502 // debug statements here
3504 // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
3505 export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
3506 if(!isWasmInitialized) {
3507 throw new Error("initializeWasm() must be awaited first!");
3509 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
3510 // debug statements here
3512 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
3513 export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
3514 if(!isWasmInitialized) {
3515 throw new Error("initializeWasm() must be awaited first!");
3517 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
3518 return nativeResponseValue;
3520 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
3521 export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
3522 if(!isWasmInitialized) {
3523 throw new Error("initializeWasm() must be awaited first!");
3525 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
3526 return nativeResponseValue;
3528 // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
3529 export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
3530 if(!isWasmInitialized) {
3531 throw new Error("initializeWasm() must be awaited first!");
3533 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
3534 // debug statements here
3536 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
3537 export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
3538 if(!isWasmInitialized) {
3539 throw new Error("initializeWasm() must be awaited first!");
3541 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
3542 return nativeResponseValue;
3544 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
3545 export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
3546 if(!isWasmInitialized) {
3547 throw new Error("initializeWasm() must be awaited first!");
3549 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
3550 return nativeResponseValue;
3552 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
3553 export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
3554 if(!isWasmInitialized) {
3555 throw new Error("initializeWasm() must be awaited first!");
3557 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
3558 return nativeResponseValue;
3560 // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
3561 export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
3562 if(!isWasmInitialized) {
3563 throw new Error("initializeWasm() must be awaited first!");
3565 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
3566 // debug statements here
3568 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
3569 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
3570 if(!isWasmInitialized) {
3571 throw new Error("initializeWasm() must be awaited first!");
3573 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
3574 return nativeResponseValue;
3576 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
3577 export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
3578 if(!isWasmInitialized) {
3579 throw new Error("initializeWasm() must be awaited first!");
3581 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
3582 return nativeResponseValue;
3584 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
3585 export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
3586 if(!isWasmInitialized) {
3587 throw new Error("initializeWasm() must be awaited first!");
3589 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
3590 return nativeResponseValue;
3592 // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
3593 export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
3594 if(!isWasmInitialized) {
3595 throw new Error("initializeWasm() must be awaited first!");
3597 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
3598 // debug statements here
3600 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
3601 export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
3602 if(!isWasmInitialized) {
3603 throw new Error("initializeWasm() must be awaited first!");
3605 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
3606 return nativeResponseValue;
3608 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
3609 export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
3610 if(!isWasmInitialized) {
3611 throw new Error("initializeWasm() must be awaited first!");
3613 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
3614 return nativeResponseValue;
3616 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3617 export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
3618 if(!isWasmInitialized) {
3619 throw new Error("initializeWasm() must be awaited first!");
3621 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
3622 return nativeResponseValue;
3624 // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
3625 export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
3626 if(!isWasmInitialized) {
3627 throw new Error("initializeWasm() must be awaited first!");
3629 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
3630 // debug statements here
3632 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
3633 export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
3634 if(!isWasmInitialized) {
3635 throw new Error("initializeWasm() must be awaited first!");
3637 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
3638 return nativeResponseValue;
3640 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
3641 export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
3642 if(!isWasmInitialized) {
3643 throw new Error("initializeWasm() must be awaited first!");
3645 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
3646 return nativeResponseValue;
3648 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
3649 export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
3650 if(!isWasmInitialized) {
3651 throw new Error("initializeWasm() must be awaited first!");
3653 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
3654 return nativeResponseValue;
3656 // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
3657 export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
3658 if(!isWasmInitialized) {
3659 throw new Error("initializeWasm() must be awaited first!");
3661 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
3662 // debug statements here
3664 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
3665 export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
3666 if(!isWasmInitialized) {
3667 throw new Error("initializeWasm() must be awaited first!");
3669 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
3670 return nativeResponseValue;
3672 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
3673 export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
3674 if(!isWasmInitialized) {
3675 throw new Error("initializeWasm() must be awaited first!");
3677 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
3678 return nativeResponseValue;
3680 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
3681 export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
3682 if(!isWasmInitialized) {
3683 throw new Error("initializeWasm() must be awaited first!");
3685 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
3686 return nativeResponseValue;
3688 // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
3689 export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
3690 if(!isWasmInitialized) {
3691 throw new Error("initializeWasm() must be awaited first!");
3693 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
3694 // debug statements here
3696 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
3697 export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
3698 if(!isWasmInitialized) {
3699 throw new Error("initializeWasm() must be awaited first!");
3701 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
3702 return nativeResponseValue;
3704 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
3705 export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
3706 if(!isWasmInitialized) {
3707 throw new Error("initializeWasm() must be awaited first!");
3709 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
3710 return nativeResponseValue;
3712 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3713 export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
3714 if(!isWasmInitialized) {
3715 throw new Error("initializeWasm() must be awaited first!");
3717 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
3718 return nativeResponseValue;
3720 // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
3721 export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
3722 if(!isWasmInitialized) {
3723 throw new Error("initializeWasm() must be awaited first!");
3725 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
3726 // debug statements here
3728 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
3729 export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
3730 if(!isWasmInitialized) {
3731 throw new Error("initializeWasm() must be awaited first!");
3733 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
3734 return nativeResponseValue;
3736 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
3737 export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
3738 if(!isWasmInitialized) {
3739 throw new Error("initializeWasm() must be awaited first!");
3741 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
3742 return nativeResponseValue;
3744 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
3745 export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
3746 if(!isWasmInitialized) {
3747 throw new Error("initializeWasm() must be awaited first!");
3749 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
3750 return nativeResponseValue;
3752 // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
3753 export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
3754 if(!isWasmInitialized) {
3755 throw new Error("initializeWasm() must be awaited first!");
3757 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
3758 // debug statements here
3760 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
3761 export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
3762 if(!isWasmInitialized) {
3763 throw new Error("initializeWasm() must be awaited first!");
3765 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
3766 return nativeResponseValue;
3768 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
3769 export function CResult_InitDecodeErrorZ_ok(o: number): number {
3770 if(!isWasmInitialized) {
3771 throw new Error("initializeWasm() must be awaited first!");
3773 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
3774 return nativeResponseValue;
3776 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
3777 export function CResult_InitDecodeErrorZ_err(e: number): number {
3778 if(!isWasmInitialized) {
3779 throw new Error("initializeWasm() must be awaited first!");
3781 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
3782 return nativeResponseValue;
3784 // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
3785 export function CResult_InitDecodeErrorZ_free(_res: number): void {
3786 if(!isWasmInitialized) {
3787 throw new Error("initializeWasm() must be awaited first!");
3789 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
3790 // debug statements here
3792 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
3793 export function CResult_InitDecodeErrorZ_clone(orig: number): number {
3794 if(!isWasmInitialized) {
3795 throw new Error("initializeWasm() must be awaited first!");
3797 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
3798 return nativeResponseValue;
3800 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
3801 export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
3802 if(!isWasmInitialized) {
3803 throw new Error("initializeWasm() must be awaited first!");
3805 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
3806 return nativeResponseValue;
3808 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
3809 export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
3810 if(!isWasmInitialized) {
3811 throw new Error("initializeWasm() must be awaited first!");
3813 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
3814 return nativeResponseValue;
3816 // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
3817 export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
3818 if(!isWasmInitialized) {
3819 throw new Error("initializeWasm() must be awaited first!");
3821 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
3822 // debug statements here
3824 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
3825 export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
3826 if(!isWasmInitialized) {
3827 throw new Error("initializeWasm() must be awaited first!");
3829 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
3830 return nativeResponseValue;
3832 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
3833 export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
3834 if(!isWasmInitialized) {
3835 throw new Error("initializeWasm() must be awaited first!");
3837 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
3838 return nativeResponseValue;
3840 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
3841 export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
3842 if(!isWasmInitialized) {
3843 throw new Error("initializeWasm() must be awaited first!");
3845 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
3846 return nativeResponseValue;
3848 // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
3849 export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
3850 if(!isWasmInitialized) {
3851 throw new Error("initializeWasm() must be awaited first!");
3853 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
3854 // debug statements here
3856 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
3857 export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
3858 if(!isWasmInitialized) {
3859 throw new Error("initializeWasm() must be awaited first!");
3861 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
3862 return nativeResponseValue;
3864 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
3865 export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
3866 if(!isWasmInitialized) {
3867 throw new Error("initializeWasm() must be awaited first!");
3869 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
3870 return nativeResponseValue;
3872 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
3873 export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
3874 if(!isWasmInitialized) {
3875 throw new Error("initializeWasm() must be awaited first!");
3877 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
3878 return nativeResponseValue;
3880 // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
3881 export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
3882 if(!isWasmInitialized) {
3883 throw new Error("initializeWasm() must be awaited first!");
3885 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
3886 // debug statements here
3888 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
3889 export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
3890 if(!isWasmInitialized) {
3891 throw new Error("initializeWasm() must be awaited first!");
3893 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
3894 return nativeResponseValue;
3896 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
3897 export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
3898 if(!isWasmInitialized) {
3899 throw new Error("initializeWasm() must be awaited first!");
3901 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
3902 return nativeResponseValue;
3904 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3905 export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
3906 if(!isWasmInitialized) {
3907 throw new Error("initializeWasm() must be awaited first!");
3909 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
3910 return nativeResponseValue;
3912 // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
3913 export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
3914 if(!isWasmInitialized) {
3915 throw new Error("initializeWasm() must be awaited first!");
3917 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
3918 // debug statements here
3920 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
3921 export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
3922 if(!isWasmInitialized) {
3923 throw new Error("initializeWasm() must be awaited first!");
3925 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
3926 return nativeResponseValue;
3928 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
3929 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
3930 if(!isWasmInitialized) {
3931 throw new Error("initializeWasm() must be awaited first!");
3933 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
3934 return nativeResponseValue;
3936 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3937 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
3938 if(!isWasmInitialized) {
3939 throw new Error("initializeWasm() must be awaited first!");
3941 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
3942 return nativeResponseValue;
3944 // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
3945 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
3946 if(!isWasmInitialized) {
3947 throw new Error("initializeWasm() must be awaited first!");
3949 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
3950 // debug statements here
3952 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
3953 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
3954 if(!isWasmInitialized) {
3955 throw new Error("initializeWasm() must be awaited first!");
3957 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
3958 return nativeResponseValue;
3960 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
3961 export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
3962 if(!isWasmInitialized) {
3963 throw new Error("initializeWasm() must be awaited first!");
3965 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
3966 return nativeResponseValue;
3968 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
3969 export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
3970 if(!isWasmInitialized) {
3971 throw new Error("initializeWasm() must be awaited first!");
3973 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
3974 return nativeResponseValue;
3976 // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
3977 export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
3978 if(!isWasmInitialized) {
3979 throw new Error("initializeWasm() must be awaited first!");
3981 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
3982 // debug statements here
3984 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
3985 export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
3986 if(!isWasmInitialized) {
3987 throw new Error("initializeWasm() must be awaited first!");
3989 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
3990 return nativeResponseValue;
3992 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
3993 export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
3994 if(!isWasmInitialized) {
3995 throw new Error("initializeWasm() must be awaited first!");
3997 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
3998 return nativeResponseValue;
4000 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
4001 export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
4002 if(!isWasmInitialized) {
4003 throw new Error("initializeWasm() must be awaited first!");
4005 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
4006 return nativeResponseValue;
4008 // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
4009 export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
4010 if(!isWasmInitialized) {
4011 throw new Error("initializeWasm() must be awaited first!");
4013 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
4014 // debug statements here
4016 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
4017 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
4018 if(!isWasmInitialized) {
4019 throw new Error("initializeWasm() must be awaited first!");
4021 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
4022 return nativeResponseValue;
4024 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
4025 export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
4026 if(!isWasmInitialized) {
4027 throw new Error("initializeWasm() must be awaited first!");
4029 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
4030 return nativeResponseValue;
4032 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
4033 export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
4034 if(!isWasmInitialized) {
4035 throw new Error("initializeWasm() must be awaited first!");
4037 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
4038 return nativeResponseValue;
4040 // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
4041 export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
4042 if(!isWasmInitialized) {
4043 throw new Error("initializeWasm() must be awaited first!");
4045 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
4046 // debug statements here
4048 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
4049 export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
4050 if(!isWasmInitialized) {
4051 throw new Error("initializeWasm() must be awaited first!");
4053 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
4054 return nativeResponseValue;
4056 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
4057 export function CResult_PingDecodeErrorZ_ok(o: number): number {
4058 if(!isWasmInitialized) {
4059 throw new Error("initializeWasm() must be awaited first!");
4061 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
4062 return nativeResponseValue;
4064 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
4065 export function CResult_PingDecodeErrorZ_err(e: number): number {
4066 if(!isWasmInitialized) {
4067 throw new Error("initializeWasm() must be awaited first!");
4069 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
4070 return nativeResponseValue;
4072 // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
4073 export function CResult_PingDecodeErrorZ_free(_res: number): void {
4074 if(!isWasmInitialized) {
4075 throw new Error("initializeWasm() must be awaited first!");
4077 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
4078 // debug statements here
4080 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
4081 export function CResult_PingDecodeErrorZ_clone(orig: number): number {
4082 if(!isWasmInitialized) {
4083 throw new Error("initializeWasm() must be awaited first!");
4085 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
4086 return nativeResponseValue;
4088 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
4089 export function CResult_PongDecodeErrorZ_ok(o: number): number {
4090 if(!isWasmInitialized) {
4091 throw new Error("initializeWasm() must be awaited first!");
4093 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
4094 return nativeResponseValue;
4096 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
4097 export function CResult_PongDecodeErrorZ_err(e: number): number {
4098 if(!isWasmInitialized) {
4099 throw new Error("initializeWasm() must be awaited first!");
4101 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
4102 return nativeResponseValue;
4104 // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
4105 export function CResult_PongDecodeErrorZ_free(_res: number): void {
4106 if(!isWasmInitialized) {
4107 throw new Error("initializeWasm() must be awaited first!");
4109 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
4110 // debug statements here
4112 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
4113 export function CResult_PongDecodeErrorZ_clone(orig: number): number {
4114 if(!isWasmInitialized) {
4115 throw new Error("initializeWasm() must be awaited first!");
4117 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
4118 return nativeResponseValue;
4120 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
4121 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
4122 if(!isWasmInitialized) {
4123 throw new Error("initializeWasm() must be awaited first!");
4125 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
4126 return nativeResponseValue;
4128 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4129 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
4130 if(!isWasmInitialized) {
4131 throw new Error("initializeWasm() must be awaited first!");
4133 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
4134 return nativeResponseValue;
4136 // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
4137 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
4138 if(!isWasmInitialized) {
4139 throw new Error("initializeWasm() must be awaited first!");
4141 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
4142 // debug statements here
4144 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4145 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
4146 if(!isWasmInitialized) {
4147 throw new Error("initializeWasm() must be awaited first!");
4149 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
4150 return nativeResponseValue;
4152 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
4153 export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
4154 if(!isWasmInitialized) {
4155 throw new Error("initializeWasm() must be awaited first!");
4157 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
4158 return nativeResponseValue;
4160 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4161 export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
4162 if(!isWasmInitialized) {
4163 throw new Error("initializeWasm() must be awaited first!");
4165 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
4166 return nativeResponseValue;
4168 // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
4169 export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
4170 if(!isWasmInitialized) {
4171 throw new Error("initializeWasm() must be awaited first!");
4173 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
4174 // debug statements here
4176 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4177 export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
4178 if(!isWasmInitialized) {
4179 throw new Error("initializeWasm() must be awaited first!");
4181 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
4182 return nativeResponseValue;
4184 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
4185 export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
4186 if(!isWasmInitialized) {
4187 throw new Error("initializeWasm() must be awaited first!");
4189 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
4190 return nativeResponseValue;
4192 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4193 export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
4194 if(!isWasmInitialized) {
4195 throw new Error("initializeWasm() must be awaited first!");
4197 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
4198 return nativeResponseValue;
4200 // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
4201 export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
4202 if(!isWasmInitialized) {
4203 throw new Error("initializeWasm() must be awaited first!");
4205 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
4206 // debug statements here
4208 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4209 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
4210 if(!isWasmInitialized) {
4211 throw new Error("initializeWasm() must be awaited first!");
4213 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
4214 return nativeResponseValue;
4216 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
4217 export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
4218 if(!isWasmInitialized) {
4219 throw new Error("initializeWasm() must be awaited first!");
4221 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
4222 return nativeResponseValue;
4224 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4225 export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
4226 if(!isWasmInitialized) {
4227 throw new Error("initializeWasm() must be awaited first!");
4229 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
4230 return nativeResponseValue;
4232 // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
4233 export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
4234 if(!isWasmInitialized) {
4235 throw new Error("initializeWasm() must be awaited first!");
4237 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
4238 // debug statements here
4240 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4241 export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
4242 if(!isWasmInitialized) {
4243 throw new Error("initializeWasm() must be awaited first!");
4245 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
4246 return nativeResponseValue;
4248 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
4249 export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
4250 if(!isWasmInitialized) {
4251 throw new Error("initializeWasm() must be awaited first!");
4253 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
4254 return nativeResponseValue;
4256 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
4257 export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
4258 if(!isWasmInitialized) {
4259 throw new Error("initializeWasm() must be awaited first!");
4261 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
4262 return nativeResponseValue;
4264 // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
4265 export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
4266 if(!isWasmInitialized) {
4267 throw new Error("initializeWasm() must be awaited first!");
4269 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
4270 // debug statements here
4272 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
4273 export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
4274 if(!isWasmInitialized) {
4275 throw new Error("initializeWasm() must be awaited first!");
4277 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
4278 return nativeResponseValue;
4280 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
4281 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
4282 if(!isWasmInitialized) {
4283 throw new Error("initializeWasm() must be awaited first!");
4285 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
4286 return nativeResponseValue;
4288 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4289 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
4290 if(!isWasmInitialized) {
4291 throw new Error("initializeWasm() must be awaited first!");
4293 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
4294 return nativeResponseValue;
4296 // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
4297 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
4298 if(!isWasmInitialized) {
4299 throw new Error("initializeWasm() must be awaited first!");
4301 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
4302 // debug statements here
4304 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4305 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4306 if(!isWasmInitialized) {
4307 throw new Error("initializeWasm() must be awaited first!");
4309 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
4310 return nativeResponseValue;
4312 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
4313 export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
4314 if(!isWasmInitialized) {
4315 throw new Error("initializeWasm() must be awaited first!");
4317 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
4318 return nativeResponseValue;
4320 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4321 export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
4322 if(!isWasmInitialized) {
4323 throw new Error("initializeWasm() must be awaited first!");
4325 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
4326 return nativeResponseValue;
4328 // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
4329 export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
4330 if(!isWasmInitialized) {
4331 throw new Error("initializeWasm() must be awaited first!");
4333 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
4334 // debug statements here
4336 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4337 export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4338 if(!isWasmInitialized) {
4339 throw new Error("initializeWasm() must be awaited first!");
4341 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
4342 return nativeResponseValue;
4344 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
4345 export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
4346 if(!isWasmInitialized) {
4347 throw new Error("initializeWasm() must be awaited first!");
4349 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
4350 return nativeResponseValue;
4352 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
4353 export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
4354 if(!isWasmInitialized) {
4355 throw new Error("initializeWasm() must be awaited first!");
4357 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
4358 return nativeResponseValue;
4360 // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
4361 export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
4362 if(!isWasmInitialized) {
4363 throw new Error("initializeWasm() must be awaited first!");
4365 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
4366 // debug statements here
4368 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
4369 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
4370 if(!isWasmInitialized) {
4371 throw new Error("initializeWasm() must be awaited first!");
4373 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
4374 return nativeResponseValue;
4376 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
4377 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
4378 if(!isWasmInitialized) {
4379 throw new Error("initializeWasm() must be awaited first!");
4381 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
4382 return nativeResponseValue;
4384 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
4385 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
4386 if(!isWasmInitialized) {
4387 throw new Error("initializeWasm() must be awaited first!");
4389 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
4390 return nativeResponseValue;
4392 // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
4393 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
4394 if(!isWasmInitialized) {
4395 throw new Error("initializeWasm() must be awaited first!");
4397 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
4398 // debug statements here
4400 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
4401 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
4402 if(!isWasmInitialized) {
4403 throw new Error("initializeWasm() must be awaited first!");
4405 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
4406 return nativeResponseValue;
4408 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
4409 export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
4410 if(!isWasmInitialized) {
4411 throw new Error("initializeWasm() must be awaited first!");
4413 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
4414 return nativeResponseValue;
4416 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4417 export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
4418 if(!isWasmInitialized) {
4419 throw new Error("initializeWasm() must be awaited first!");
4421 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
4422 return nativeResponseValue;
4424 // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
4425 export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
4426 if(!isWasmInitialized) {
4427 throw new Error("initializeWasm() must be awaited first!");
4429 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
4430 // debug statements here
4432 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4433 export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
4434 if(!isWasmInitialized) {
4435 throw new Error("initializeWasm() must be awaited first!");
4437 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
4438 return nativeResponseValue;
4440 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
4441 export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
4442 if(!isWasmInitialized) {
4443 throw new Error("initializeWasm() must be awaited first!");
4445 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
4446 return nativeResponseValue;
4448 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4449 export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
4450 if(!isWasmInitialized) {
4451 throw new Error("initializeWasm() must be awaited first!");
4453 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
4454 return nativeResponseValue;
4456 // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
4457 export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
4458 if(!isWasmInitialized) {
4459 throw new Error("initializeWasm() must be awaited first!");
4461 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
4462 // debug statements here
4464 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4465 export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
4466 if(!isWasmInitialized) {
4467 throw new Error("initializeWasm() must be awaited first!");
4469 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
4470 return nativeResponseValue;
4472 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
4473 export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
4474 if(!isWasmInitialized) {
4475 throw new Error("initializeWasm() must be awaited first!");
4477 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
4478 return nativeResponseValue;
4480 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
4481 export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
4482 if(!isWasmInitialized) {
4483 throw new Error("initializeWasm() must be awaited first!");
4485 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
4486 return nativeResponseValue;
4488 // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
4489 export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
4490 if(!isWasmInitialized) {
4491 throw new Error("initializeWasm() must be awaited first!");
4493 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
4494 // debug statements here
4496 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
4497 export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
4498 if(!isWasmInitialized) {
4499 throw new Error("initializeWasm() must be awaited first!");
4501 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
4502 return nativeResponseValue;
4504 // void Event_free(struct LDKEvent this_ptr);
4505 export function Event_free(this_ptr: number): void {
4506 if(!isWasmInitialized) {
4507 throw new Error("initializeWasm() must be awaited first!");
4509 const nativeResponseValue = wasm.Event_free(this_ptr);
4510 // debug statements here
4512 // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
4513 export function Event_clone(orig: number): number {
4514 if(!isWasmInitialized) {
4515 throw new Error("initializeWasm() must be awaited first!");
4517 const nativeResponseValue = wasm.Event_clone(orig);
4518 return nativeResponseValue;
4520 // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
4521 export function Event_write(obj: number): Uint8Array {
4522 if(!isWasmInitialized) {
4523 throw new Error("initializeWasm() must be awaited first!");
4525 const nativeResponseValue = wasm.Event_write(obj);
4526 return decodeArray(nativeResponseValue);
4528 // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
4529 export function MessageSendEvent_free(this_ptr: number): void {
4530 if(!isWasmInitialized) {
4531 throw new Error("initializeWasm() must be awaited first!");
4533 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
4534 // debug statements here
4536 // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
4537 export function MessageSendEvent_clone(orig: number): number {
4538 if(!isWasmInitialized) {
4539 throw new Error("initializeWasm() must be awaited first!");
4541 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
4542 return nativeResponseValue;
4544 // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
4545 export function MessageSendEventsProvider_free(this_ptr: number): void {
4546 if(!isWasmInitialized) {
4547 throw new Error("initializeWasm() must be awaited first!");
4549 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
4550 // debug statements here
4552 // void EventsProvider_free(struct LDKEventsProvider this_ptr);
4553 export function EventsProvider_free(this_ptr: number): void {
4554 if(!isWasmInitialized) {
4555 throw new Error("initializeWasm() must be awaited first!");
4557 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
4558 // debug statements here
4560 // void APIError_free(struct LDKAPIError this_ptr);
4561 export function APIError_free(this_ptr: number): void {
4562 if(!isWasmInitialized) {
4563 throw new Error("initializeWasm() must be awaited first!");
4565 const nativeResponseValue = wasm.APIError_free(this_ptr);
4566 // debug statements here
4568 // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
4569 export function APIError_clone(orig: number): number {
4570 if(!isWasmInitialized) {
4571 throw new Error("initializeWasm() must be awaited first!");
4573 const nativeResponseValue = wasm.APIError_clone(orig);
4574 return nativeResponseValue;
4576 // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
4577 export function Level_clone(orig: number): LDKLevel {
4578 if(!isWasmInitialized) {
4579 throw new Error("initializeWasm() must be awaited first!");
4581 const nativeResponseValue = wasm.Level_clone(orig);
4582 return nativeResponseValue;
4584 // MUST_USE_RES enum LDKLevel Level_max(void);
4585 export function Level_max(): LDKLevel {
4586 if(!isWasmInitialized) {
4587 throw new Error("initializeWasm() must be awaited first!");
4589 const nativeResponseValue = wasm.Level_max();
4590 return nativeResponseValue;
4592 // void Logger_free(struct LDKLogger this_ptr);
4593 export function Logger_free(this_ptr: number): void {
4594 if(!isWasmInitialized) {
4595 throw new Error("initializeWasm() must be awaited first!");
4597 const nativeResponseValue = wasm.Logger_free(this_ptr);
4598 // debug statements here
4600 // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
4601 export function ChannelHandshakeConfig_free(this_obj: number): void {
4602 if(!isWasmInitialized) {
4603 throw new Error("initializeWasm() must be awaited first!");
4605 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
4606 // debug statements here
4608 // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4609 export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
4610 if(!isWasmInitialized) {
4611 throw new Error("initializeWasm() must be awaited first!");
4613 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
4614 return nativeResponseValue;
4616 // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
4617 export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
4618 if(!isWasmInitialized) {
4619 throw new Error("initializeWasm() must be awaited first!");
4621 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
4622 // debug statements here
4624 // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4625 export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
4626 if(!isWasmInitialized) {
4627 throw new Error("initializeWasm() must be awaited first!");
4629 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
4630 return nativeResponseValue;
4632 // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
4633 export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
4634 if(!isWasmInitialized) {
4635 throw new Error("initializeWasm() must be awaited first!");
4637 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
4638 // debug statements here
4640 // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4641 export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
4642 if(!isWasmInitialized) {
4643 throw new Error("initializeWasm() must be awaited first!");
4645 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
4646 return nativeResponseValue;
4648 // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
4649 export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
4650 if(!isWasmInitialized) {
4651 throw new Error("initializeWasm() must be awaited first!");
4653 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
4654 // debug statements here
4656 // 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);
4657 export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
4658 if(!isWasmInitialized) {
4659 throw new Error("initializeWasm() must be awaited first!");
4661 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
4662 return nativeResponseValue;
4664 // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
4665 export function ChannelHandshakeConfig_clone(orig: number): number {
4666 if(!isWasmInitialized) {
4667 throw new Error("initializeWasm() must be awaited first!");
4669 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
4670 return nativeResponseValue;
4672 // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
4673 export function ChannelHandshakeConfig_default(): number {
4674 if(!isWasmInitialized) {
4675 throw new Error("initializeWasm() must be awaited first!");
4677 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
4678 return nativeResponseValue;
4680 // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
4681 export function ChannelHandshakeLimits_free(this_obj: number): void {
4682 if(!isWasmInitialized) {
4683 throw new Error("initializeWasm() must be awaited first!");
4685 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
4686 // debug statements here
4688 // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4689 export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
4690 if(!isWasmInitialized) {
4691 throw new Error("initializeWasm() must be awaited first!");
4693 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
4694 return nativeResponseValue;
4696 // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4697 export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
4698 if(!isWasmInitialized) {
4699 throw new Error("initializeWasm() must be awaited first!");
4701 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
4702 // debug statements here
4704 // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4705 export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
4706 if(!isWasmInitialized) {
4707 throw new Error("initializeWasm() must be awaited first!");
4709 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
4710 return nativeResponseValue;
4712 // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4713 export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
4714 if(!isWasmInitialized) {
4715 throw new Error("initializeWasm() must be awaited first!");
4717 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
4718 // debug statements here
4720 // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4721 export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
4722 if(!isWasmInitialized) {
4723 throw new Error("initializeWasm() must be awaited first!");
4725 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
4726 return nativeResponseValue;
4728 // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4729 export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
4730 if(!isWasmInitialized) {
4731 throw new Error("initializeWasm() must be awaited first!");
4733 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
4734 // debug statements here
4736 // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4737 export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
4738 if(!isWasmInitialized) {
4739 throw new Error("initializeWasm() must be awaited first!");
4741 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
4742 return nativeResponseValue;
4744 // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4745 export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
4746 if(!isWasmInitialized) {
4747 throw new Error("initializeWasm() must be awaited first!");
4749 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
4750 // debug statements here
4752 // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4753 export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
4754 if(!isWasmInitialized) {
4755 throw new Error("initializeWasm() must be awaited first!");
4757 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
4758 return nativeResponseValue;
4760 // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4761 export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
4762 if(!isWasmInitialized) {
4763 throw new Error("initializeWasm() must be awaited first!");
4765 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
4766 // debug statements here
4768 // uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4769 export function ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr: number): number {
4770 if(!isWasmInitialized) {
4771 throw new Error("initializeWasm() must be awaited first!");
4773 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr);
4774 return nativeResponseValue;
4776 // void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4777 export function ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr: number, val: number): void {
4778 if(!isWasmInitialized) {
4779 throw new Error("initializeWasm() must be awaited first!");
4781 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr, val);
4782 // debug statements here
4784 // uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4785 export function ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr: number): number {
4786 if(!isWasmInitialized) {
4787 throw new Error("initializeWasm() must be awaited first!");
4789 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr);
4790 return nativeResponseValue;
4792 // void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4793 export function ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr: number, val: number): void {
4794 if(!isWasmInitialized) {
4795 throw new Error("initializeWasm() must be awaited first!");
4797 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr, val);
4798 // debug statements here
4800 // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4801 export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
4802 if(!isWasmInitialized) {
4803 throw new Error("initializeWasm() must be awaited first!");
4805 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
4806 return nativeResponseValue;
4808 // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
4809 export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
4810 if(!isWasmInitialized) {
4811 throw new Error("initializeWasm() must be awaited first!");
4813 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
4814 // debug statements here
4816 // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4817 export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
4818 if(!isWasmInitialized) {
4819 throw new Error("initializeWasm() must be awaited first!");
4821 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
4822 return nativeResponseValue;
4824 // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
4825 export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
4826 if(!isWasmInitialized) {
4827 throw new Error("initializeWasm() must be awaited first!");
4829 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
4830 // debug statements here
4832 // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4833 export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
4834 if(!isWasmInitialized) {
4835 throw new Error("initializeWasm() must be awaited first!");
4837 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
4838 return nativeResponseValue;
4840 // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4841 export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
4842 if(!isWasmInitialized) {
4843 throw new Error("initializeWasm() must be awaited first!");
4845 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
4846 // debug statements here
4848 // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint64_t min_dust_limit_satoshis_arg, uint64_t max_dust_limit_satoshis_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
4849 export function ChannelHandshakeLimits_new(min_funding_satoshis_arg: number, max_htlc_minimum_msat_arg: number, min_max_htlc_value_in_flight_msat_arg: number, max_channel_reserve_satoshis_arg: number, min_max_accepted_htlcs_arg: number, min_dust_limit_satoshis_arg: number, max_dust_limit_satoshis_arg: number, max_minimum_depth_arg: number, force_announced_channel_preference_arg: boolean, their_to_self_delay_arg: number): number {
4850 if(!isWasmInitialized) {
4851 throw new Error("initializeWasm() must be awaited first!");
4853 const nativeResponseValue = wasm.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
4854 return nativeResponseValue;
4856 // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
4857 export function ChannelHandshakeLimits_clone(orig: number): number {
4858 if(!isWasmInitialized) {
4859 throw new Error("initializeWasm() must be awaited first!");
4861 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
4862 return nativeResponseValue;
4864 // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
4865 export function ChannelHandshakeLimits_default(): number {
4866 if(!isWasmInitialized) {
4867 throw new Error("initializeWasm() must be awaited first!");
4869 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
4870 return nativeResponseValue;
4872 // void ChannelConfig_free(struct LDKChannelConfig this_obj);
4873 export function ChannelConfig_free(this_obj: number): void {
4874 if(!isWasmInitialized) {
4875 throw new Error("initializeWasm() must be awaited first!");
4877 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
4878 // debug statements here
4880 // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4881 export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
4882 if(!isWasmInitialized) {
4883 throw new Error("initializeWasm() must be awaited first!");
4885 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
4886 return nativeResponseValue;
4888 // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
4889 export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
4890 if(!isWasmInitialized) {
4891 throw new Error("initializeWasm() must be awaited first!");
4893 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
4894 // debug statements here
4896 // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4897 export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
4898 if(!isWasmInitialized) {
4899 throw new Error("initializeWasm() must be awaited first!");
4901 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
4902 return nativeResponseValue;
4904 // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
4905 export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
4906 if(!isWasmInitialized) {
4907 throw new Error("initializeWasm() must be awaited first!");
4909 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
4910 // debug statements here
4912 // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4913 export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
4914 if(!isWasmInitialized) {
4915 throw new Error("initializeWasm() must be awaited first!");
4917 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
4918 return nativeResponseValue;
4920 // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
4921 export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
4922 if(!isWasmInitialized) {
4923 throw new Error("initializeWasm() must be awaited first!");
4925 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
4926 // debug statements here
4928 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
4929 export function ChannelConfig_new(fee_proportional_millionths_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
4930 if(!isWasmInitialized) {
4931 throw new Error("initializeWasm() must be awaited first!");
4933 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
4934 return nativeResponseValue;
4936 // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
4937 export function ChannelConfig_clone(orig: number): number {
4938 if(!isWasmInitialized) {
4939 throw new Error("initializeWasm() must be awaited first!");
4941 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
4942 return nativeResponseValue;
4944 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
4945 export function ChannelConfig_default(): number {
4946 if(!isWasmInitialized) {
4947 throw new Error("initializeWasm() must be awaited first!");
4949 const nativeResponseValue = wasm.ChannelConfig_default();
4950 return nativeResponseValue;
4952 // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
4953 export function ChannelConfig_write(obj: number): Uint8Array {
4954 if(!isWasmInitialized) {
4955 throw new Error("initializeWasm() must be awaited first!");
4957 const nativeResponseValue = wasm.ChannelConfig_write(obj);
4958 return decodeArray(nativeResponseValue);
4960 // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
4961 export function ChannelConfig_read(ser: Uint8Array): number {
4962 if(!isWasmInitialized) {
4963 throw new Error("initializeWasm() must be awaited first!");
4965 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
4966 return nativeResponseValue;
4968 // void UserConfig_free(struct LDKUserConfig this_obj);
4969 export function UserConfig_free(this_obj: number): void {
4970 if(!isWasmInitialized) {
4971 throw new Error("initializeWasm() must be awaited first!");
4973 const nativeResponseValue = wasm.UserConfig_free(this_obj);
4974 // debug statements here
4976 // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4977 export function UserConfig_get_own_channel_config(this_ptr: number): number {
4978 if(!isWasmInitialized) {
4979 throw new Error("initializeWasm() must be awaited first!");
4981 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
4982 return nativeResponseValue;
4984 // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
4985 export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
4986 if(!isWasmInitialized) {
4987 throw new Error("initializeWasm() must be awaited first!");
4989 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
4990 // debug statements here
4992 // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4993 export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
4994 if(!isWasmInitialized) {
4995 throw new Error("initializeWasm() must be awaited first!");
4997 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
4998 return nativeResponseValue;
5000 // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
5001 export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
5002 if(!isWasmInitialized) {
5003 throw new Error("initializeWasm() must be awaited first!");
5005 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
5006 // debug statements here
5008 // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5009 export function UserConfig_get_channel_options(this_ptr: number): number {
5010 if(!isWasmInitialized) {
5011 throw new Error("initializeWasm() must be awaited first!");
5013 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
5014 return nativeResponseValue;
5016 // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
5017 export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
5018 if(!isWasmInitialized) {
5019 throw new Error("initializeWasm() must be awaited first!");
5021 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
5022 // debug statements here
5024 // 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);
5025 export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
5026 if(!isWasmInitialized) {
5027 throw new Error("initializeWasm() must be awaited first!");
5029 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
5030 return nativeResponseValue;
5032 // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
5033 export function UserConfig_clone(orig: number): number {
5034 if(!isWasmInitialized) {
5035 throw new Error("initializeWasm() must be awaited first!");
5037 const nativeResponseValue = wasm.UserConfig_clone(orig);
5038 return nativeResponseValue;
5040 // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
5041 export function UserConfig_default(): number {
5042 if(!isWasmInitialized) {
5043 throw new Error("initializeWasm() must be awaited first!");
5045 const nativeResponseValue = wasm.UserConfig_default();
5046 return nativeResponseValue;
5048 // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
5049 export function AccessError_clone(orig: number): LDKAccessError {
5050 if(!isWasmInitialized) {
5051 throw new Error("initializeWasm() must be awaited first!");
5053 const nativeResponseValue = wasm.AccessError_clone(orig);
5054 return nativeResponseValue;
5056 // void Access_free(struct LDKAccess this_ptr);
5057 export function Access_free(this_ptr: number): void {
5058 if(!isWasmInitialized) {
5059 throw new Error("initializeWasm() must be awaited first!");
5061 const nativeResponseValue = wasm.Access_free(this_ptr);
5062 // debug statements here
5064 // void Listen_free(struct LDKListen this_ptr);
5065 export function Listen_free(this_ptr: number): void {
5066 if(!isWasmInitialized) {
5067 throw new Error("initializeWasm() must be awaited first!");
5069 const nativeResponseValue = wasm.Listen_free(this_ptr);
5070 // debug statements here
5072 // void Watch_free(struct LDKWatch this_ptr);
5073 export function Watch_free(this_ptr: number): void {
5074 if(!isWasmInitialized) {
5075 throw new Error("initializeWasm() must be awaited first!");
5077 const nativeResponseValue = wasm.Watch_free(this_ptr);
5078 // debug statements here
5080 // void Filter_free(struct LDKFilter this_ptr);
5081 export function Filter_free(this_ptr: number): void {
5082 if(!isWasmInitialized) {
5083 throw new Error("initializeWasm() must be awaited first!");
5085 const nativeResponseValue = wasm.Filter_free(this_ptr);
5086 // debug statements here
5088 // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
5089 export function BroadcasterInterface_free(this_ptr: number): void {
5090 if(!isWasmInitialized) {
5091 throw new Error("initializeWasm() must be awaited first!");
5093 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
5094 // debug statements here
5096 // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
5097 export function ConfirmationTarget_clone(orig: number): LDKConfirmationTarget {
5098 if(!isWasmInitialized) {
5099 throw new Error("initializeWasm() must be awaited first!");
5101 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
5102 return nativeResponseValue;
5104 // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
5105 export function FeeEstimator_free(this_ptr: number): void {
5106 if(!isWasmInitialized) {
5107 throw new Error("initializeWasm() must be awaited first!");
5109 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
5110 // debug statements here
5112 // void ChainMonitor_free(struct LDKChainMonitor this_obj);
5113 export function ChainMonitor_free(this_obj: number): void {
5114 if(!isWasmInitialized) {
5115 throw new Error("initializeWasm() must be awaited first!");
5117 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
5118 // debug statements here
5120 // void ChainMonitor_block_connected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
5121 export function ChainMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
5122 if(!isWasmInitialized) {
5123 throw new Error("initializeWasm() must be awaited first!");
5125 const nativeResponseValue = wasm.ChainMonitor_block_connected(this_arg, encodeArray(header), txdata, height);
5126 // debug statements here
5128 // void ChainMonitor_block_disconnected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t disconnected_height);
5129 export function ChainMonitor_block_disconnected(this_arg: number, header: Uint8Array, disconnected_height: number): void {
5130 if(!isWasmInitialized) {
5131 throw new Error("initializeWasm() must be awaited first!");
5133 const nativeResponseValue = wasm.ChainMonitor_block_disconnected(this_arg, encodeArray(header), disconnected_height);
5134 // debug statements here
5136 // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
5137 export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
5138 if(!isWasmInitialized) {
5139 throw new Error("initializeWasm() must be awaited first!");
5141 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
5142 return nativeResponseValue;
5144 // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5145 export function ChainMonitor_as_Watch(this_arg: number): number {
5146 if(!isWasmInitialized) {
5147 throw new Error("initializeWasm() must be awaited first!");
5149 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
5150 return nativeResponseValue;
5152 // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5153 export function ChainMonitor_as_EventsProvider(this_arg: number): number {
5154 if(!isWasmInitialized) {
5155 throw new Error("initializeWasm() must be awaited first!");
5157 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
5158 return nativeResponseValue;
5160 // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
5161 export function ChannelMonitorUpdate_free(this_obj: number): void {
5162 if(!isWasmInitialized) {
5163 throw new Error("initializeWasm() must be awaited first!");
5165 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
5166 // debug statements here
5168 // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
5169 export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
5170 if(!isWasmInitialized) {
5171 throw new Error("initializeWasm() must be awaited first!");
5173 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
5174 return nativeResponseValue;
5176 // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
5177 export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
5178 if(!isWasmInitialized) {
5179 throw new Error("initializeWasm() must be awaited first!");
5181 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
5182 // debug statements here
5184 // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
5185 export function ChannelMonitorUpdate_clone(orig: number): number {
5186 if(!isWasmInitialized) {
5187 throw new Error("initializeWasm() must be awaited first!");
5189 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
5190 return nativeResponseValue;
5192 // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
5193 export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
5194 if(!isWasmInitialized) {
5195 throw new Error("initializeWasm() must be awaited first!");
5197 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
5198 return decodeArray(nativeResponseValue);
5200 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
5201 export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
5202 if(!isWasmInitialized) {
5203 throw new Error("initializeWasm() must be awaited first!");
5205 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
5206 return nativeResponseValue;
5208 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
5209 export function ChannelMonitorUpdateErr_clone(orig: number): LDKChannelMonitorUpdateErr {
5210 if(!isWasmInitialized) {
5211 throw new Error("initializeWasm() must be awaited first!");
5213 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
5214 return nativeResponseValue;
5216 // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
5217 export function MonitorUpdateError_free(this_obj: number): void {
5218 if(!isWasmInitialized) {
5219 throw new Error("initializeWasm() must be awaited first!");
5221 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
5222 // debug statements here
5224 // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
5225 export function MonitorUpdateError_clone(orig: number): number {
5226 if(!isWasmInitialized) {
5227 throw new Error("initializeWasm() must be awaited first!");
5229 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
5230 return nativeResponseValue;
5232 // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
5233 export function MonitorEvent_free(this_ptr: number): void {
5234 if(!isWasmInitialized) {
5235 throw new Error("initializeWasm() must be awaited first!");
5237 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
5238 // debug statements here
5240 // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
5241 export function MonitorEvent_clone(orig: number): number {
5242 if(!isWasmInitialized) {
5243 throw new Error("initializeWasm() must be awaited first!");
5245 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
5246 return nativeResponseValue;
5248 // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
5249 export function HTLCUpdate_free(this_obj: number): void {
5250 if(!isWasmInitialized) {
5251 throw new Error("initializeWasm() must be awaited first!");
5253 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
5254 // debug statements here
5256 // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
5257 export function HTLCUpdate_clone(orig: number): number {
5258 if(!isWasmInitialized) {
5259 throw new Error("initializeWasm() must be awaited first!");
5261 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
5262 return nativeResponseValue;
5264 // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
5265 export function HTLCUpdate_write(obj: number): Uint8Array {
5266 if(!isWasmInitialized) {
5267 throw new Error("initializeWasm() must be awaited first!");
5269 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
5270 return decodeArray(nativeResponseValue);
5272 // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
5273 export function HTLCUpdate_read(ser: Uint8Array): number {
5274 if(!isWasmInitialized) {
5275 throw new Error("initializeWasm() must be awaited first!");
5277 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
5278 return nativeResponseValue;
5280 // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
5281 export function ChannelMonitor_free(this_obj: number): void {
5282 if(!isWasmInitialized) {
5283 throw new Error("initializeWasm() must be awaited first!");
5285 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
5286 // debug statements here
5288 // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
5289 export function ChannelMonitor_clone(orig: number): number {
5290 if(!isWasmInitialized) {
5291 throw new Error("initializeWasm() must be awaited first!");
5293 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
5294 return nativeResponseValue;
5296 // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
5297 export function ChannelMonitor_write(obj: number): Uint8Array {
5298 if(!isWasmInitialized) {
5299 throw new Error("initializeWasm() must be awaited first!");
5301 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
5302 return decodeArray(nativeResponseValue);
5304 // 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);
5305 export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
5306 if(!isWasmInitialized) {
5307 throw new Error("initializeWasm() must be awaited first!");
5309 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
5310 return nativeResponseValue;
5312 // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5313 export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
5314 if(!isWasmInitialized) {
5315 throw new Error("initializeWasm() must be awaited first!");
5317 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
5318 return nativeResponseValue;
5320 // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5321 export function ChannelMonitor_get_funding_txo(this_arg: number): number {
5322 if(!isWasmInitialized) {
5323 throw new Error("initializeWasm() must be awaited first!");
5325 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
5326 return nativeResponseValue;
5328 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5329 export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
5330 if(!isWasmInitialized) {
5331 throw new Error("initializeWasm() must be awaited first!");
5333 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
5334 return nativeResponseValue;
5336 // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
5337 export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
5338 if(!isWasmInitialized) {
5339 throw new Error("initializeWasm() must be awaited first!");
5341 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
5342 // debug statements here
5344 // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5345 export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
5346 if(!isWasmInitialized) {
5347 throw new Error("initializeWasm() must be awaited first!");
5349 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
5350 return nativeResponseValue;
5352 // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5353 export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
5354 if(!isWasmInitialized) {
5355 throw new Error("initializeWasm() must be awaited first!");
5357 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
5358 return nativeResponseValue;
5360 // 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);
5361 export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
5362 if(!isWasmInitialized) {
5363 throw new Error("initializeWasm() must be awaited first!");
5365 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
5366 return nativeResponseValue;
5368 // 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);
5369 export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5370 if(!isWasmInitialized) {
5371 throw new Error("initializeWasm() must be awaited first!");
5373 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
5374 return nativeResponseValue;
5376 // 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);
5377 export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
5378 if(!isWasmInitialized) {
5379 throw new Error("initializeWasm() must be awaited first!");
5381 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
5382 // debug statements here
5384 // void Persist_free(struct LDKPersist this_ptr);
5385 export function Persist_free(this_ptr: number): void {
5386 if(!isWasmInitialized) {
5387 throw new Error("initializeWasm() must be awaited first!");
5389 const nativeResponseValue = wasm.Persist_free(this_ptr);
5390 // debug statements here
5392 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
5393 export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
5394 if(!isWasmInitialized) {
5395 throw new Error("initializeWasm() must be awaited first!");
5397 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
5398 return nativeResponseValue;
5400 // void OutPoint_free(struct LDKOutPoint this_obj);
5401 export function OutPoint_free(this_obj: number): void {
5402 if(!isWasmInitialized) {
5403 throw new Error("initializeWasm() must be awaited first!");
5405 const nativeResponseValue = wasm.OutPoint_free(this_obj);
5406 // debug statements here
5408 // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
5409 export function OutPoint_get_txid(this_ptr: number): Uint8Array {
5410 if(!isWasmInitialized) {
5411 throw new Error("initializeWasm() must be awaited first!");
5413 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
5414 return decodeArray(nativeResponseValue);
5416 // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5417 export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
5418 if(!isWasmInitialized) {
5419 throw new Error("initializeWasm() must be awaited first!");
5421 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
5422 // debug statements here
5424 // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
5425 export function OutPoint_get_index(this_ptr: number): number {
5426 if(!isWasmInitialized) {
5427 throw new Error("initializeWasm() must be awaited first!");
5429 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
5430 return nativeResponseValue;
5432 // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
5433 export function OutPoint_set_index(this_ptr: number, val: number): void {
5434 if(!isWasmInitialized) {
5435 throw new Error("initializeWasm() must be awaited first!");
5437 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
5438 // debug statements here
5440 // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
5441 export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
5442 if(!isWasmInitialized) {
5443 throw new Error("initializeWasm() must be awaited first!");
5445 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
5446 return nativeResponseValue;
5448 // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
5449 export function OutPoint_clone(orig: number): number {
5450 if(!isWasmInitialized) {
5451 throw new Error("initializeWasm() must be awaited first!");
5453 const nativeResponseValue = wasm.OutPoint_clone(orig);
5454 return nativeResponseValue;
5456 // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
5457 export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
5458 if(!isWasmInitialized) {
5459 throw new Error("initializeWasm() must be awaited first!");
5461 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
5462 return decodeArray(nativeResponseValue);
5464 // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
5465 export function OutPoint_write(obj: number): Uint8Array {
5466 if(!isWasmInitialized) {
5467 throw new Error("initializeWasm() must be awaited first!");
5469 const nativeResponseValue = wasm.OutPoint_write(obj);
5470 return decodeArray(nativeResponseValue);
5472 // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
5473 export function OutPoint_read(ser: Uint8Array): number {
5474 if(!isWasmInitialized) {
5475 throw new Error("initializeWasm() must be awaited first!");
5477 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
5478 return nativeResponseValue;
5480 // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
5481 export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
5482 if(!isWasmInitialized) {
5483 throw new Error("initializeWasm() must be awaited first!");
5485 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
5486 // debug statements here
5488 // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5489 export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5490 if(!isWasmInitialized) {
5491 throw new Error("initializeWasm() must be awaited first!");
5493 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
5494 return nativeResponseValue;
5496 // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5497 export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5498 if(!isWasmInitialized) {
5499 throw new Error("initializeWasm() must be awaited first!");
5501 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5502 // debug statements here
5504 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5505 export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
5506 if(!isWasmInitialized) {
5507 throw new Error("initializeWasm() must be awaited first!");
5509 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
5510 return decodeArray(nativeResponseValue);
5512 // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5513 export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5514 if(!isWasmInitialized) {
5515 throw new Error("initializeWasm() must be awaited first!");
5517 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
5518 // debug statements here
5520 // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5521 export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
5522 if(!isWasmInitialized) {
5523 throw new Error("initializeWasm() must be awaited first!");
5525 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
5526 return nativeResponseValue;
5528 // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
5529 export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
5530 if(!isWasmInitialized) {
5531 throw new Error("initializeWasm() must be awaited first!");
5533 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
5534 // debug statements here
5536 // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5537 export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5538 if(!isWasmInitialized) {
5539 throw new Error("initializeWasm() must be awaited first!");
5541 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
5542 // debug statements here
5544 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5545 export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
5546 if(!isWasmInitialized) {
5547 throw new Error("initializeWasm() must be awaited first!");
5549 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
5550 return decodeArray(nativeResponseValue);
5552 // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5553 export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
5554 if(!isWasmInitialized) {
5555 throw new Error("initializeWasm() must be awaited first!");
5557 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
5558 // debug statements here
5560 // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5561 export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5562 if(!isWasmInitialized) {
5563 throw new Error("initializeWasm() must be awaited first!");
5565 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5566 return decodeArray(nativeResponseValue);
5568 // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5569 export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5570 if(!isWasmInitialized) {
5571 throw new Error("initializeWasm() must be awaited first!");
5573 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5574 // debug statements here
5576 // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5577 export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5578 if(!isWasmInitialized) {
5579 throw new Error("initializeWasm() must be awaited first!");
5581 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5582 return nativeResponseValue;
5584 // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5585 export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5586 if(!isWasmInitialized) {
5587 throw new Error("initializeWasm() must be awaited first!");
5589 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5590 // debug statements here
5592 // 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);
5593 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 {
5594 if(!isWasmInitialized) {
5595 throw new Error("initializeWasm() must be awaited first!");
5597 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);
5598 return nativeResponseValue;
5600 // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
5601 export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
5602 if(!isWasmInitialized) {
5603 throw new Error("initializeWasm() must be awaited first!");
5605 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
5606 return nativeResponseValue;
5608 // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
5609 export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
5610 if(!isWasmInitialized) {
5611 throw new Error("initializeWasm() must be awaited first!");
5613 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
5614 // debug statements here
5616 // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5617 export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5618 if(!isWasmInitialized) {
5619 throw new Error("initializeWasm() must be awaited first!");
5621 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
5622 return nativeResponseValue;
5624 // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5625 export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5626 if(!isWasmInitialized) {
5627 throw new Error("initializeWasm() must be awaited first!");
5629 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5630 // debug statements here
5632 // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5633 export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5634 if(!isWasmInitialized) {
5635 throw new Error("initializeWasm() must be awaited first!");
5637 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
5638 // debug statements here
5640 // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5641 export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5642 if(!isWasmInitialized) {
5643 throw new Error("initializeWasm() must be awaited first!");
5645 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5646 return decodeArray(nativeResponseValue);
5648 // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5649 export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5650 if(!isWasmInitialized) {
5651 throw new Error("initializeWasm() must be awaited first!");
5653 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5654 // debug statements here
5656 // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5657 export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5658 if(!isWasmInitialized) {
5659 throw new Error("initializeWasm() must be awaited first!");
5661 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5662 return nativeResponseValue;
5664 // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5665 export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5666 if(!isWasmInitialized) {
5667 throw new Error("initializeWasm() must be awaited first!");
5669 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5670 // debug statements here
5672 // 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);
5673 export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
5674 if(!isWasmInitialized) {
5675 throw new Error("initializeWasm() must be awaited first!");
5677 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
5678 return nativeResponseValue;
5680 // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
5681 export function StaticPaymentOutputDescriptor_clone(orig: number): number {
5682 if(!isWasmInitialized) {
5683 throw new Error("initializeWasm() must be awaited first!");
5685 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
5686 return nativeResponseValue;
5688 // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
5689 export function SpendableOutputDescriptor_free(this_ptr: number): void {
5690 if(!isWasmInitialized) {
5691 throw new Error("initializeWasm() must be awaited first!");
5693 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
5694 // debug statements here
5696 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
5697 export function SpendableOutputDescriptor_clone(orig: number): number {
5698 if(!isWasmInitialized) {
5699 throw new Error("initializeWasm() must be awaited first!");
5701 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
5702 return nativeResponseValue;
5704 // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
5705 export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
5706 if(!isWasmInitialized) {
5707 throw new Error("initializeWasm() must be awaited first!");
5709 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
5710 return decodeArray(nativeResponseValue);
5712 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
5713 export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
5714 if(!isWasmInitialized) {
5715 throw new Error("initializeWasm() must be awaited first!");
5717 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
5718 return nativeResponseValue;
5720 // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
5721 export function Sign_clone(orig: number): number {
5722 if(!isWasmInitialized) {
5723 throw new Error("initializeWasm() must be awaited first!");
5725 const nativeResponseValue = wasm.Sign_clone(orig);
5726 return nativeResponseValue;
5728 // void Sign_free(struct LDKSign this_ptr);
5729 export function Sign_free(this_ptr: number): void {
5730 if(!isWasmInitialized) {
5731 throw new Error("initializeWasm() must be awaited first!");
5733 const nativeResponseValue = wasm.Sign_free(this_ptr);
5734 // debug statements here
5736 // void KeysInterface_free(struct LDKKeysInterface this_ptr);
5737 export function KeysInterface_free(this_ptr: number): void {
5738 if(!isWasmInitialized) {
5739 throw new Error("initializeWasm() must be awaited first!");
5741 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
5742 // debug statements here
5744 // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
5745 export function InMemorySigner_free(this_obj: number): void {
5746 if(!isWasmInitialized) {
5747 throw new Error("initializeWasm() must be awaited first!");
5749 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
5750 // debug statements here
5752 // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5753 export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
5754 if(!isWasmInitialized) {
5755 throw new Error("initializeWasm() must be awaited first!");
5757 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
5758 return decodeArray(nativeResponseValue);
5760 // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5761 export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
5762 if(!isWasmInitialized) {
5763 throw new Error("initializeWasm() must be awaited first!");
5765 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
5766 // debug statements here
5768 // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5769 export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
5770 if(!isWasmInitialized) {
5771 throw new Error("initializeWasm() must be awaited first!");
5773 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
5774 return decodeArray(nativeResponseValue);
5776 // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5777 export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
5778 if(!isWasmInitialized) {
5779 throw new Error("initializeWasm() must be awaited first!");
5781 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
5782 // debug statements here
5784 // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5785 export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
5786 if(!isWasmInitialized) {
5787 throw new Error("initializeWasm() must be awaited first!");
5789 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
5790 return decodeArray(nativeResponseValue);
5792 // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5793 export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
5794 if(!isWasmInitialized) {
5795 throw new Error("initializeWasm() must be awaited first!");
5797 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
5798 // debug statements here
5800 // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5801 export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
5802 if(!isWasmInitialized) {
5803 throw new Error("initializeWasm() must be awaited first!");
5805 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
5806 return decodeArray(nativeResponseValue);
5808 // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5809 export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
5810 if(!isWasmInitialized) {
5811 throw new Error("initializeWasm() must be awaited first!");
5813 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
5814 // debug statements here
5816 // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5817 export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
5818 if(!isWasmInitialized) {
5819 throw new Error("initializeWasm() must be awaited first!");
5821 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
5822 return decodeArray(nativeResponseValue);
5824 // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5825 export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
5826 if(!isWasmInitialized) {
5827 throw new Error("initializeWasm() must be awaited first!");
5829 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
5830 // debug statements here
5832 // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5833 export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
5834 if(!isWasmInitialized) {
5835 throw new Error("initializeWasm() must be awaited first!");
5837 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
5838 return decodeArray(nativeResponseValue);
5840 // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5841 export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
5842 if(!isWasmInitialized) {
5843 throw new Error("initializeWasm() must be awaited first!");
5845 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
5846 // debug statements here
5848 // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
5849 export function InMemorySigner_clone(orig: number): number {
5850 if(!isWasmInitialized) {
5851 throw new Error("initializeWasm() must be awaited first!");
5853 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
5854 return nativeResponseValue;
5856 // 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);
5857 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 {
5858 if(!isWasmInitialized) {
5859 throw new Error("initializeWasm() must be awaited first!");
5861 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));
5862 return nativeResponseValue;
5864 // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5865 export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
5866 if(!isWasmInitialized) {
5867 throw new Error("initializeWasm() must be awaited first!");
5869 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
5870 return nativeResponseValue;
5872 // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5873 export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
5874 if(!isWasmInitialized) {
5875 throw new Error("initializeWasm() must be awaited first!");
5877 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
5878 return nativeResponseValue;
5880 // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5881 export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
5882 if(!isWasmInitialized) {
5883 throw new Error("initializeWasm() must be awaited first!");
5885 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
5886 return nativeResponseValue;
5888 // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5889 export function InMemorySigner_is_outbound(this_arg: number): boolean {
5890 if(!isWasmInitialized) {
5891 throw new Error("initializeWasm() must be awaited first!");
5893 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
5894 return nativeResponseValue;
5896 // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5897 export function InMemorySigner_funding_outpoint(this_arg: number): number {
5898 if(!isWasmInitialized) {
5899 throw new Error("initializeWasm() must be awaited first!");
5901 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
5902 return nativeResponseValue;
5904 // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5905 export function InMemorySigner_get_channel_parameters(this_arg: number): number {
5906 if(!isWasmInitialized) {
5907 throw new Error("initializeWasm() must be awaited first!");
5909 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
5910 return nativeResponseValue;
5912 // 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);
5913 export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
5914 if(!isWasmInitialized) {
5915 throw new Error("initializeWasm() must be awaited first!");
5917 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
5918 return nativeResponseValue;
5920 // 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);
5921 export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
5922 if(!isWasmInitialized) {
5923 throw new Error("initializeWasm() must be awaited first!");
5925 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
5926 return nativeResponseValue;
5928 // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5929 export function InMemorySigner_as_Sign(this_arg: number): number {
5930 if(!isWasmInitialized) {
5931 throw new Error("initializeWasm() must be awaited first!");
5933 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
5934 return nativeResponseValue;
5936 // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
5937 export function InMemorySigner_write(obj: number): Uint8Array {
5938 if(!isWasmInitialized) {
5939 throw new Error("initializeWasm() must be awaited first!");
5941 const nativeResponseValue = wasm.InMemorySigner_write(obj);
5942 return decodeArray(nativeResponseValue);
5944 // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
5945 export function InMemorySigner_read(ser: Uint8Array): number {
5946 if(!isWasmInitialized) {
5947 throw new Error("initializeWasm() must be awaited first!");
5949 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
5950 return nativeResponseValue;
5952 // void KeysManager_free(struct LDKKeysManager this_obj);
5953 export function KeysManager_free(this_obj: number): void {
5954 if(!isWasmInitialized) {
5955 throw new Error("initializeWasm() must be awaited first!");
5957 const nativeResponseValue = wasm.KeysManager_free(this_obj);
5958 // debug statements here
5960 // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
5961 export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
5962 if(!isWasmInitialized) {
5963 throw new Error("initializeWasm() must be awaited first!");
5965 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
5966 return nativeResponseValue;
5968 // 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]);
5969 export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
5970 if(!isWasmInitialized) {
5971 throw new Error("initializeWasm() must be awaited first!");
5973 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
5974 return nativeResponseValue;
5976 // 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);
5977 export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
5978 if(!isWasmInitialized) {
5979 throw new Error("initializeWasm() must be awaited first!");
5981 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
5982 return nativeResponseValue;
5984 // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
5985 export function KeysManager_as_KeysInterface(this_arg: number): number {
5986 if(!isWasmInitialized) {
5987 throw new Error("initializeWasm() must be awaited first!");
5989 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
5990 return nativeResponseValue;
5992 // void ChannelManager_free(struct LDKChannelManager this_obj);
5993 export function ChannelManager_free(this_obj: number): void {
5994 if(!isWasmInitialized) {
5995 throw new Error("initializeWasm() must be awaited first!");
5997 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
5998 // debug statements here
6000 // void ChainParameters_free(struct LDKChainParameters this_obj);
6001 export function ChainParameters_free(this_obj: number): void {
6002 if(!isWasmInitialized) {
6003 throw new Error("initializeWasm() must be awaited first!");
6005 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
6006 // debug statements here
6008 // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6009 export function ChainParameters_get_network(this_ptr: number): LDKNetwork {
6010 if(!isWasmInitialized) {
6011 throw new Error("initializeWasm() must be awaited first!");
6013 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
6014 return nativeResponseValue;
6016 // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
6017 export function ChainParameters_set_network(this_ptr: number, val: LDKNetwork): void {
6018 if(!isWasmInitialized) {
6019 throw new Error("initializeWasm() must be awaited first!");
6021 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
6022 // debug statements here
6024 // const uint8_t (*ChainParameters_get_latest_hash(const struct LDKChainParameters *NONNULL_PTR this_ptr))[32];
6025 export function ChainParameters_get_latest_hash(this_ptr: number): Uint8Array {
6026 if(!isWasmInitialized) {
6027 throw new Error("initializeWasm() must be awaited first!");
6029 const nativeResponseValue = wasm.ChainParameters_get_latest_hash(this_ptr);
6030 return decodeArray(nativeResponseValue);
6032 // void ChainParameters_set_latest_hash(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6033 export function ChainParameters_set_latest_hash(this_ptr: number, val: Uint8Array): void {
6034 if(!isWasmInitialized) {
6035 throw new Error("initializeWasm() must be awaited first!");
6037 const nativeResponseValue = wasm.ChainParameters_set_latest_hash(this_ptr, encodeArray(val));
6038 // debug statements here
6040 // uintptr_t ChainParameters_get_latest_height(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6041 export function ChainParameters_get_latest_height(this_ptr: number): number {
6042 if(!isWasmInitialized) {
6043 throw new Error("initializeWasm() must be awaited first!");
6045 const nativeResponseValue = wasm.ChainParameters_get_latest_height(this_ptr);
6046 return nativeResponseValue;
6048 // void ChainParameters_set_latest_height(struct LDKChainParameters *NONNULL_PTR this_ptr, uintptr_t val);
6049 export function ChainParameters_set_latest_height(this_ptr: number, val: number): void {
6050 if(!isWasmInitialized) {
6051 throw new Error("initializeWasm() must be awaited first!");
6053 const nativeResponseValue = wasm.ChainParameters_set_latest_height(this_ptr, val);
6054 // debug statements here
6056 // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKThirtyTwoBytes latest_hash_arg, uintptr_t latest_height_arg);
6057 export function ChainParameters_new(network_arg: LDKNetwork, latest_hash_arg: Uint8Array, latest_height_arg: number): number {
6058 if(!isWasmInitialized) {
6059 throw new Error("initializeWasm() must be awaited first!");
6061 const nativeResponseValue = wasm.ChainParameters_new(network_arg, encodeArray(latest_hash_arg), latest_height_arg);
6062 return nativeResponseValue;
6064 // void ChannelDetails_free(struct LDKChannelDetails this_obj);
6065 export function ChannelDetails_free(this_obj: number): void {
6066 if(!isWasmInitialized) {
6067 throw new Error("initializeWasm() must be awaited first!");
6069 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
6070 // debug statements here
6072 // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
6073 export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
6074 if(!isWasmInitialized) {
6075 throw new Error("initializeWasm() must be awaited first!");
6077 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
6078 return decodeArray(nativeResponseValue);
6080 // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6081 export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
6082 if(!isWasmInitialized) {
6083 throw new Error("initializeWasm() must be awaited first!");
6085 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
6086 // debug statements here
6088 // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6089 export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
6090 if(!isWasmInitialized) {
6091 throw new Error("initializeWasm() must be awaited first!");
6093 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
6094 return decodeArray(nativeResponseValue);
6096 // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6097 export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
6098 if(!isWasmInitialized) {
6099 throw new Error("initializeWasm() must be awaited first!");
6101 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
6102 // debug statements here
6104 // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6105 export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
6106 if(!isWasmInitialized) {
6107 throw new Error("initializeWasm() must be awaited first!");
6109 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
6110 return nativeResponseValue;
6112 // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6113 export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
6114 if(!isWasmInitialized) {
6115 throw new Error("initializeWasm() must be awaited first!");
6117 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
6118 // debug statements here
6120 // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6121 export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
6122 if(!isWasmInitialized) {
6123 throw new Error("initializeWasm() must be awaited first!");
6125 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
6126 return nativeResponseValue;
6128 // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6129 export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
6130 if(!isWasmInitialized) {
6131 throw new Error("initializeWasm() must be awaited first!");
6133 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
6134 // debug statements here
6136 // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6137 export function ChannelDetails_get_user_id(this_ptr: number): number {
6138 if(!isWasmInitialized) {
6139 throw new Error("initializeWasm() must be awaited first!");
6141 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
6142 return nativeResponseValue;
6144 // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6145 export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
6146 if(!isWasmInitialized) {
6147 throw new Error("initializeWasm() must be awaited first!");
6149 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
6150 // debug statements here
6152 // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6153 export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
6154 if(!isWasmInitialized) {
6155 throw new Error("initializeWasm() must be awaited first!");
6157 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
6158 return nativeResponseValue;
6160 // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6161 export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
6162 if(!isWasmInitialized) {
6163 throw new Error("initializeWasm() must be awaited first!");
6165 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
6166 // debug statements here
6168 // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6169 export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
6170 if(!isWasmInitialized) {
6171 throw new Error("initializeWasm() must be awaited first!");
6173 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
6174 return nativeResponseValue;
6176 // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6177 export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
6178 if(!isWasmInitialized) {
6179 throw new Error("initializeWasm() must be awaited first!");
6181 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
6182 // debug statements here
6184 // bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6185 export function ChannelDetails_get_is_live(this_ptr: number): boolean {
6186 if(!isWasmInitialized) {
6187 throw new Error("initializeWasm() must be awaited first!");
6189 const nativeResponseValue = wasm.ChannelDetails_get_is_live(this_ptr);
6190 return nativeResponseValue;
6192 // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
6193 export function ChannelDetails_set_is_live(this_ptr: number, val: boolean): void {
6194 if(!isWasmInitialized) {
6195 throw new Error("initializeWasm() must be awaited first!");
6197 const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
6198 // debug statements here
6200 // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
6201 export function ChannelDetails_clone(orig: number): number {
6202 if(!isWasmInitialized) {
6203 throw new Error("initializeWasm() must be awaited first!");
6205 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
6206 return nativeResponseValue;
6208 // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
6209 export function PaymentSendFailure_free(this_ptr: number): void {
6210 if(!isWasmInitialized) {
6211 throw new Error("initializeWasm() must be awaited first!");
6213 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
6214 // debug statements here
6216 // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
6217 export function PaymentSendFailure_clone(orig: number): number {
6218 if(!isWasmInitialized) {
6219 throw new Error("initializeWasm() must be awaited first!");
6221 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
6222 return nativeResponseValue;
6224 // 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);
6225 export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
6226 if(!isWasmInitialized) {
6227 throw new Error("initializeWasm() must be awaited first!");
6229 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
6230 return nativeResponseValue;
6232 // 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);
6233 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 {
6234 if(!isWasmInitialized) {
6235 throw new Error("initializeWasm() must be awaited first!");
6237 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
6238 return nativeResponseValue;
6240 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6241 export function ChannelManager_list_channels(this_arg: number): number[] {
6242 if(!isWasmInitialized) {
6243 throw new Error("initializeWasm() must be awaited first!");
6245 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
6246 return nativeResponseValue;
6248 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6249 export function ChannelManager_list_usable_channels(this_arg: number): number[] {
6250 if(!isWasmInitialized) {
6251 throw new Error("initializeWasm() must be awaited first!");
6253 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
6254 return nativeResponseValue;
6256 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6257 export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
6258 if(!isWasmInitialized) {
6259 throw new Error("initializeWasm() must be awaited first!");
6261 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
6262 return nativeResponseValue;
6264 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6265 export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
6266 if(!isWasmInitialized) {
6267 throw new Error("initializeWasm() must be awaited first!");
6269 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
6270 return nativeResponseValue;
6272 // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6273 export function ChannelManager_force_close_all_channels(this_arg: number): void {
6274 if(!isWasmInitialized) {
6275 throw new Error("initializeWasm() must be awaited first!");
6277 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
6278 // debug statements here
6280 // 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);
6281 export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
6282 if(!isWasmInitialized) {
6283 throw new Error("initializeWasm() must be awaited first!");
6285 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
6286 return nativeResponseValue;
6288 // void ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKOutPoint funding_txo);
6289 export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_txo: number): void {
6290 if(!isWasmInitialized) {
6291 throw new Error("initializeWasm() must be awaited first!");
6293 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), funding_txo);
6294 // debug statements here
6296 // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
6297 export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
6298 if(!isWasmInitialized) {
6299 throw new Error("initializeWasm() must be awaited first!");
6301 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
6302 // debug statements here
6304 // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
6305 export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
6306 if(!isWasmInitialized) {
6307 throw new Error("initializeWasm() must be awaited first!");
6309 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
6310 // debug statements here
6312 // void ChannelManager_timer_chan_freshness_every_min(const struct LDKChannelManager *NONNULL_PTR this_arg);
6313 export function ChannelManager_timer_chan_freshness_every_min(this_arg: number): void {
6314 if(!isWasmInitialized) {
6315 throw new Error("initializeWasm() must be awaited first!");
6317 const nativeResponseValue = wasm.ChannelManager_timer_chan_freshness_every_min(this_arg);
6318 // debug statements here
6320 // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32], struct LDKThirtyTwoBytes payment_secret);
6321 export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): boolean {
6322 if(!isWasmInitialized) {
6323 throw new Error("initializeWasm() must be awaited first!");
6325 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash), encodeArray(payment_secret));
6326 return nativeResponseValue;
6328 // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t expected_amount);
6329 export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array, payment_secret: Uint8Array, expected_amount: number): boolean {
6330 if(!isWasmInitialized) {
6331 throw new Error("initializeWasm() must be awaited first!");
6333 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage), encodeArray(payment_secret), expected_amount);
6334 return nativeResponseValue;
6336 // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
6337 export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
6338 if(!isWasmInitialized) {
6339 throw new Error("initializeWasm() must be awaited first!");
6341 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
6342 return decodeArray(nativeResponseValue);
6344 // 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);
6345 export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
6346 if(!isWasmInitialized) {
6347 throw new Error("initializeWasm() must be awaited first!");
6349 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
6350 // debug statements here
6352 // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6353 export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
6354 if(!isWasmInitialized) {
6355 throw new Error("initializeWasm() must be awaited first!");
6357 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
6358 return nativeResponseValue;
6360 // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6361 export function ChannelManager_as_EventsProvider(this_arg: number): number {
6362 if(!isWasmInitialized) {
6363 throw new Error("initializeWasm() must be awaited first!");
6365 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
6366 return nativeResponseValue;
6368 // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
6369 export function ChannelManager_as_Listen(this_arg: number): number {
6370 if(!isWasmInitialized) {
6371 throw new Error("initializeWasm() must be awaited first!");
6373 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
6374 return nativeResponseValue;
6376 // void ChannelManager_block_connected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
6377 export function ChannelManager_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
6378 if(!isWasmInitialized) {
6379 throw new Error("initializeWasm() must be awaited first!");
6381 const nativeResponseValue = wasm.ChannelManager_block_connected(this_arg, encodeArray(header), txdata, height);
6382 // debug statements here
6384 // void ChannelManager_block_disconnected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80]);
6385 export function ChannelManager_block_disconnected(this_arg: number, header: Uint8Array): void {
6386 if(!isWasmInitialized) {
6387 throw new Error("initializeWasm() must be awaited first!");
6389 const nativeResponseValue = wasm.ChannelManager_block_disconnected(this_arg, encodeArray(header));
6390 // debug statements here
6392 // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
6393 export function ChannelManager_await_persistable_update(this_arg: number): void {
6394 if(!isWasmInitialized) {
6395 throw new Error("initializeWasm() must be awaited first!");
6397 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
6398 // debug statements here
6400 // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
6401 export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
6402 if(!isWasmInitialized) {
6403 throw new Error("initializeWasm() must be awaited first!");
6405 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
6406 return nativeResponseValue;
6408 // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
6409 export function ChannelManager_write(obj: number): Uint8Array {
6410 if(!isWasmInitialized) {
6411 throw new Error("initializeWasm() must be awaited first!");
6413 const nativeResponseValue = wasm.ChannelManager_write(obj);
6414 return decodeArray(nativeResponseValue);
6416 // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
6417 export function ChannelManagerReadArgs_free(this_obj: number): void {
6418 if(!isWasmInitialized) {
6419 throw new Error("initializeWasm() must be awaited first!");
6421 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
6422 // debug statements here
6424 // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6425 export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
6426 if(!isWasmInitialized) {
6427 throw new Error("initializeWasm() must be awaited first!");
6429 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
6430 return nativeResponseValue;
6432 // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
6433 export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
6434 if(!isWasmInitialized) {
6435 throw new Error("initializeWasm() must be awaited first!");
6437 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
6438 // debug statements here
6440 // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6441 export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
6442 if(!isWasmInitialized) {
6443 throw new Error("initializeWasm() must be awaited first!");
6445 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
6446 return nativeResponseValue;
6448 // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
6449 export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
6450 if(!isWasmInitialized) {
6451 throw new Error("initializeWasm() must be awaited first!");
6453 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
6454 // debug statements here
6456 // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6457 export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
6458 if(!isWasmInitialized) {
6459 throw new Error("initializeWasm() must be awaited first!");
6461 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
6462 return nativeResponseValue;
6464 // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
6465 export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
6466 if(!isWasmInitialized) {
6467 throw new Error("initializeWasm() must be awaited first!");
6469 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
6470 // debug statements here
6472 // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6473 export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
6474 if(!isWasmInitialized) {
6475 throw new Error("initializeWasm() must be awaited first!");
6477 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
6478 return nativeResponseValue;
6480 // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
6481 export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
6482 if(!isWasmInitialized) {
6483 throw new Error("initializeWasm() must be awaited first!");
6485 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
6486 // debug statements here
6488 // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6489 export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
6490 if(!isWasmInitialized) {
6491 throw new Error("initializeWasm() must be awaited first!");
6493 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
6494 return nativeResponseValue;
6496 // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
6497 export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
6498 if(!isWasmInitialized) {
6499 throw new Error("initializeWasm() must be awaited first!");
6501 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
6502 // debug statements here
6504 // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6505 export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
6506 if(!isWasmInitialized) {
6507 throw new Error("initializeWasm() must be awaited first!");
6509 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
6510 return nativeResponseValue;
6512 // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
6513 export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
6514 if(!isWasmInitialized) {
6515 throw new Error("initializeWasm() must be awaited first!");
6517 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
6518 // debug statements here
6520 // 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);
6521 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 {
6522 if(!isWasmInitialized) {
6523 throw new Error("initializeWasm() must be awaited first!");
6525 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
6526 return nativeResponseValue;
6528 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
6529 export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
6530 if(!isWasmInitialized) {
6531 throw new Error("initializeWasm() must be awaited first!");
6533 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
6534 return nativeResponseValue;
6536 // void DecodeError_free(struct LDKDecodeError this_obj);
6537 export function DecodeError_free(this_obj: number): void {
6538 if(!isWasmInitialized) {
6539 throw new Error("initializeWasm() must be awaited first!");
6541 const nativeResponseValue = wasm.DecodeError_free(this_obj);
6542 // debug statements here
6544 // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
6545 export function DecodeError_clone(orig: number): number {
6546 if(!isWasmInitialized) {
6547 throw new Error("initializeWasm() must be awaited first!");
6549 const nativeResponseValue = wasm.DecodeError_clone(orig);
6550 return nativeResponseValue;
6552 // void Init_free(struct LDKInit this_obj);
6553 export function Init_free(this_obj: number): void {
6554 if(!isWasmInitialized) {
6555 throw new Error("initializeWasm() must be awaited first!");
6557 const nativeResponseValue = wasm.Init_free(this_obj);
6558 // debug statements here
6560 // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
6561 export function Init_get_features(this_ptr: number): number {
6562 if(!isWasmInitialized) {
6563 throw new Error("initializeWasm() must be awaited first!");
6565 const nativeResponseValue = wasm.Init_get_features(this_ptr);
6566 return nativeResponseValue;
6568 // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6569 export function Init_set_features(this_ptr: number, val: number): void {
6570 if(!isWasmInitialized) {
6571 throw new Error("initializeWasm() must be awaited first!");
6573 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
6574 // debug statements here
6576 // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
6577 export function Init_new(features_arg: number): number {
6578 if(!isWasmInitialized) {
6579 throw new Error("initializeWasm() must be awaited first!");
6581 const nativeResponseValue = wasm.Init_new(features_arg);
6582 return nativeResponseValue;
6584 // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
6585 export function Init_clone(orig: number): number {
6586 if(!isWasmInitialized) {
6587 throw new Error("initializeWasm() must be awaited first!");
6589 const nativeResponseValue = wasm.Init_clone(orig);
6590 return nativeResponseValue;
6592 // void ErrorMessage_free(struct LDKErrorMessage this_obj);
6593 export function ErrorMessage_free(this_obj: number): void {
6594 if(!isWasmInitialized) {
6595 throw new Error("initializeWasm() must be awaited first!");
6597 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
6598 // debug statements here
6600 // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
6601 export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
6602 if(!isWasmInitialized) {
6603 throw new Error("initializeWasm() must be awaited first!");
6605 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
6606 return decodeArray(nativeResponseValue);
6608 // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6609 export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
6610 if(!isWasmInitialized) {
6611 throw new Error("initializeWasm() must be awaited first!");
6613 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
6614 // debug statements here
6616 // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
6617 export function ErrorMessage_get_data(this_ptr: number): String {
6618 if(!isWasmInitialized) {
6619 throw new Error("initializeWasm() must be awaited first!");
6621 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
6622 return nativeResponseValue;
6624 // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
6625 export function ErrorMessage_set_data(this_ptr: number, val: Uint8Array): void {
6626 if(!isWasmInitialized) {
6627 throw new Error("initializeWasm() must be awaited first!");
6629 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, encodeArray(val));
6630 // debug statements here
6632 // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
6633 export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: Uint8Array): number {
6634 if(!isWasmInitialized) {
6635 throw new Error("initializeWasm() must be awaited first!");
6637 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
6638 return nativeResponseValue;
6640 // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
6641 export function ErrorMessage_clone(orig: number): number {
6642 if(!isWasmInitialized) {
6643 throw new Error("initializeWasm() must be awaited first!");
6645 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
6646 return nativeResponseValue;
6648 // void Ping_free(struct LDKPing this_obj);
6649 export function Ping_free(this_obj: number): void {
6650 if(!isWasmInitialized) {
6651 throw new Error("initializeWasm() must be awaited first!");
6653 const nativeResponseValue = wasm.Ping_free(this_obj);
6654 // debug statements here
6656 // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
6657 export function Ping_get_ponglen(this_ptr: number): number {
6658 if(!isWasmInitialized) {
6659 throw new Error("initializeWasm() must be awaited first!");
6661 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
6662 return nativeResponseValue;
6664 // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6665 export function Ping_set_ponglen(this_ptr: number, val: number): void {
6666 if(!isWasmInitialized) {
6667 throw new Error("initializeWasm() must be awaited first!");
6669 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
6670 // debug statements here
6672 // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
6673 export function Ping_get_byteslen(this_ptr: number): number {
6674 if(!isWasmInitialized) {
6675 throw new Error("initializeWasm() must be awaited first!");
6677 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
6678 return nativeResponseValue;
6680 // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6681 export function Ping_set_byteslen(this_ptr: number, val: number): void {
6682 if(!isWasmInitialized) {
6683 throw new Error("initializeWasm() must be awaited first!");
6685 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
6686 // debug statements here
6688 // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
6689 export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
6690 if(!isWasmInitialized) {
6691 throw new Error("initializeWasm() must be awaited first!");
6693 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
6694 return nativeResponseValue;
6696 // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
6697 export function Ping_clone(orig: number): number {
6698 if(!isWasmInitialized) {
6699 throw new Error("initializeWasm() must be awaited first!");
6701 const nativeResponseValue = wasm.Ping_clone(orig);
6702 return nativeResponseValue;
6704 // void Pong_free(struct LDKPong this_obj);
6705 export function Pong_free(this_obj: number): void {
6706 if(!isWasmInitialized) {
6707 throw new Error("initializeWasm() must be awaited first!");
6709 const nativeResponseValue = wasm.Pong_free(this_obj);
6710 // debug statements here
6712 // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
6713 export function Pong_get_byteslen(this_ptr: number): number {
6714 if(!isWasmInitialized) {
6715 throw new Error("initializeWasm() must be awaited first!");
6717 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
6718 return nativeResponseValue;
6720 // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
6721 export function Pong_set_byteslen(this_ptr: number, val: number): void {
6722 if(!isWasmInitialized) {
6723 throw new Error("initializeWasm() must be awaited first!");
6725 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
6726 // debug statements here
6728 // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
6729 export function Pong_new(byteslen_arg: number): number {
6730 if(!isWasmInitialized) {
6731 throw new Error("initializeWasm() must be awaited first!");
6733 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
6734 return nativeResponseValue;
6736 // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
6737 export function Pong_clone(orig: number): number {
6738 if(!isWasmInitialized) {
6739 throw new Error("initializeWasm() must be awaited first!");
6741 const nativeResponseValue = wasm.Pong_clone(orig);
6742 return nativeResponseValue;
6744 // void OpenChannel_free(struct LDKOpenChannel this_obj);
6745 export function OpenChannel_free(this_obj: number): void {
6746 if(!isWasmInitialized) {
6747 throw new Error("initializeWasm() must be awaited first!");
6749 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
6750 // debug statements here
6752 // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
6753 export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
6754 if(!isWasmInitialized) {
6755 throw new Error("initializeWasm() must be awaited first!");
6757 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
6758 return decodeArray(nativeResponseValue);
6760 // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6761 export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6762 if(!isWasmInitialized) {
6763 throw new Error("initializeWasm() must be awaited first!");
6765 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
6766 // debug statements here
6768 // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
6769 export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
6770 if(!isWasmInitialized) {
6771 throw new Error("initializeWasm() must be awaited first!");
6773 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
6774 return decodeArray(nativeResponseValue);
6776 // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6777 export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
6778 if(!isWasmInitialized) {
6779 throw new Error("initializeWasm() must be awaited first!");
6781 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
6782 // debug statements here
6784 // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6785 export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
6786 if(!isWasmInitialized) {
6787 throw new Error("initializeWasm() must be awaited first!");
6789 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
6790 return nativeResponseValue;
6792 // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6793 export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
6794 if(!isWasmInitialized) {
6795 throw new Error("initializeWasm() must be awaited first!");
6797 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
6798 // debug statements here
6800 // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6801 export function OpenChannel_get_push_msat(this_ptr: number): number {
6802 if(!isWasmInitialized) {
6803 throw new Error("initializeWasm() must be awaited first!");
6805 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
6806 return nativeResponseValue;
6808 // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6809 export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
6810 if(!isWasmInitialized) {
6811 throw new Error("initializeWasm() must be awaited first!");
6813 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
6814 // debug statements here
6816 // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6817 export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
6818 if(!isWasmInitialized) {
6819 throw new Error("initializeWasm() must be awaited first!");
6821 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
6822 return nativeResponseValue;
6824 // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6825 export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
6826 if(!isWasmInitialized) {
6827 throw new Error("initializeWasm() must be awaited first!");
6829 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
6830 // debug statements here
6832 // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6833 export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
6834 if(!isWasmInitialized) {
6835 throw new Error("initializeWasm() must be awaited first!");
6837 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
6838 return nativeResponseValue;
6840 // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6841 export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
6842 if(!isWasmInitialized) {
6843 throw new Error("initializeWasm() must be awaited first!");
6845 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
6846 // debug statements here
6848 // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6849 export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
6850 if(!isWasmInitialized) {
6851 throw new Error("initializeWasm() must be awaited first!");
6853 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
6854 return nativeResponseValue;
6856 // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6857 export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
6858 if(!isWasmInitialized) {
6859 throw new Error("initializeWasm() must be awaited first!");
6861 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
6862 // debug statements here
6864 // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6865 export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
6866 if(!isWasmInitialized) {
6867 throw new Error("initializeWasm() must be awaited first!");
6869 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
6870 return nativeResponseValue;
6872 // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6873 export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
6874 if(!isWasmInitialized) {
6875 throw new Error("initializeWasm() must be awaited first!");
6877 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
6878 // debug statements here
6880 // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6881 export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
6882 if(!isWasmInitialized) {
6883 throw new Error("initializeWasm() must be awaited first!");
6885 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
6886 return nativeResponseValue;
6888 // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
6889 export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
6890 if(!isWasmInitialized) {
6891 throw new Error("initializeWasm() must be awaited first!");
6893 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
6894 // debug statements here
6896 // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6897 export function OpenChannel_get_to_self_delay(this_ptr: number): number {
6898 if(!isWasmInitialized) {
6899 throw new Error("initializeWasm() must be awaited first!");
6901 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
6902 return nativeResponseValue;
6904 // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
6905 export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
6906 if(!isWasmInitialized) {
6907 throw new Error("initializeWasm() must be awaited first!");
6909 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
6910 // debug statements here
6912 // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6913 export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
6914 if(!isWasmInitialized) {
6915 throw new Error("initializeWasm() must be awaited first!");
6917 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
6918 return nativeResponseValue;
6920 // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
6921 export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
6922 if(!isWasmInitialized) {
6923 throw new Error("initializeWasm() must be awaited first!");
6925 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
6926 // debug statements here
6928 // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6929 export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
6930 if(!isWasmInitialized) {
6931 throw new Error("initializeWasm() must be awaited first!");
6933 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
6934 return decodeArray(nativeResponseValue);
6936 // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6937 export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
6938 if(!isWasmInitialized) {
6939 throw new Error("initializeWasm() must be awaited first!");
6941 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
6942 // debug statements here
6944 // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6945 export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
6946 if(!isWasmInitialized) {
6947 throw new Error("initializeWasm() must be awaited first!");
6949 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
6950 return decodeArray(nativeResponseValue);
6952 // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6953 export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
6954 if(!isWasmInitialized) {
6955 throw new Error("initializeWasm() must be awaited first!");
6957 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
6958 // debug statements here
6960 // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6961 export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
6962 if(!isWasmInitialized) {
6963 throw new Error("initializeWasm() must be awaited first!");
6965 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
6966 return decodeArray(nativeResponseValue);
6968 // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6969 export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
6970 if(!isWasmInitialized) {
6971 throw new Error("initializeWasm() must be awaited first!");
6973 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
6974 // debug statements here
6976 // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6977 export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
6978 if(!isWasmInitialized) {
6979 throw new Error("initializeWasm() must be awaited first!");
6981 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
6982 return decodeArray(nativeResponseValue);
6984 // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6985 export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
6986 if(!isWasmInitialized) {
6987 throw new Error("initializeWasm() must be awaited first!");
6989 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
6990 // debug statements here
6992 // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6993 export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
6994 if(!isWasmInitialized) {
6995 throw new Error("initializeWasm() must be awaited first!");
6997 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
6998 return decodeArray(nativeResponseValue);
7000 // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7001 export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7002 if(!isWasmInitialized) {
7003 throw new Error("initializeWasm() must be awaited first!");
7005 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7006 // debug statements here
7008 // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7009 export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7010 if(!isWasmInitialized) {
7011 throw new Error("initializeWasm() must be awaited first!");
7013 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
7014 return decodeArray(nativeResponseValue);
7016 // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7017 export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7018 if(!isWasmInitialized) {
7019 throw new Error("initializeWasm() must be awaited first!");
7021 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7022 // debug statements here
7024 // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7025 export function OpenChannel_get_channel_flags(this_ptr: number): number {
7026 if(!isWasmInitialized) {
7027 throw new Error("initializeWasm() must be awaited first!");
7029 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
7030 return nativeResponseValue;
7032 // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
7033 export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
7034 if(!isWasmInitialized) {
7035 throw new Error("initializeWasm() must be awaited first!");
7037 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
7038 // debug statements here
7040 // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
7041 export function OpenChannel_clone(orig: number): number {
7042 if(!isWasmInitialized) {
7043 throw new Error("initializeWasm() must be awaited first!");
7045 const nativeResponseValue = wasm.OpenChannel_clone(orig);
7046 return nativeResponseValue;
7048 // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
7049 export function AcceptChannel_free(this_obj: number): void {
7050 if(!isWasmInitialized) {
7051 throw new Error("initializeWasm() must be awaited first!");
7053 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
7054 // debug statements here
7056 // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
7057 export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
7058 if(!isWasmInitialized) {
7059 throw new Error("initializeWasm() must be awaited first!");
7061 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
7062 return decodeArray(nativeResponseValue);
7064 // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7065 export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7066 if(!isWasmInitialized) {
7067 throw new Error("initializeWasm() must be awaited first!");
7069 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
7070 // debug statements here
7072 // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7073 export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
7074 if(!isWasmInitialized) {
7075 throw new Error("initializeWasm() must be awaited first!");
7077 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
7078 return nativeResponseValue;
7080 // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7081 export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
7082 if(!isWasmInitialized) {
7083 throw new Error("initializeWasm() must be awaited first!");
7085 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
7086 // debug statements here
7088 // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7089 export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
7090 if(!isWasmInitialized) {
7091 throw new Error("initializeWasm() must be awaited first!");
7093 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
7094 return nativeResponseValue;
7096 // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7097 export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7098 if(!isWasmInitialized) {
7099 throw new Error("initializeWasm() must be awaited first!");
7101 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
7102 // debug statements here
7104 // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7105 export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
7106 if(!isWasmInitialized) {
7107 throw new Error("initializeWasm() must be awaited first!");
7109 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
7110 return nativeResponseValue;
7112 // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7113 export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
7114 if(!isWasmInitialized) {
7115 throw new Error("initializeWasm() must be awaited first!");
7117 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
7118 // debug statements here
7120 // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7121 export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
7122 if(!isWasmInitialized) {
7123 throw new Error("initializeWasm() must be awaited first!");
7125 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
7126 return nativeResponseValue;
7128 // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7129 export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
7130 if(!isWasmInitialized) {
7131 throw new Error("initializeWasm() must be awaited first!");
7133 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
7134 // debug statements here
7136 // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7137 export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
7138 if(!isWasmInitialized) {
7139 throw new Error("initializeWasm() must be awaited first!");
7141 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
7142 return nativeResponseValue;
7144 // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
7145 export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
7146 if(!isWasmInitialized) {
7147 throw new Error("initializeWasm() must be awaited first!");
7149 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
7150 // debug statements here
7152 // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7153 export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
7154 if(!isWasmInitialized) {
7155 throw new Error("initializeWasm() must be awaited first!");
7157 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
7158 return nativeResponseValue;
7160 // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7161 export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
7162 if(!isWasmInitialized) {
7163 throw new Error("initializeWasm() must be awaited first!");
7165 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
7166 // debug statements here
7168 // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7169 export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
7170 if(!isWasmInitialized) {
7171 throw new Error("initializeWasm() must be awaited first!");
7173 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
7174 return nativeResponseValue;
7176 // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7177 export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
7178 if(!isWasmInitialized) {
7179 throw new Error("initializeWasm() must be awaited first!");
7181 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
7182 // debug statements here
7184 // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7185 export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
7186 if(!isWasmInitialized) {
7187 throw new Error("initializeWasm() must be awaited first!");
7189 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
7190 return decodeArray(nativeResponseValue);
7192 // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7193 export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
7194 if(!isWasmInitialized) {
7195 throw new Error("initializeWasm() must be awaited first!");
7197 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
7198 // debug statements here
7200 // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7201 export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
7202 if(!isWasmInitialized) {
7203 throw new Error("initializeWasm() must be awaited first!");
7205 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
7206 return decodeArray(nativeResponseValue);
7208 // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7209 export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
7210 if(!isWasmInitialized) {
7211 throw new Error("initializeWasm() must be awaited first!");
7213 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
7214 // debug statements here
7216 // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7217 export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
7218 if(!isWasmInitialized) {
7219 throw new Error("initializeWasm() must be awaited first!");
7221 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
7222 return decodeArray(nativeResponseValue);
7224 // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7225 export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
7226 if(!isWasmInitialized) {
7227 throw new Error("initializeWasm() must be awaited first!");
7229 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
7230 // debug statements here
7232 // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7233 export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
7234 if(!isWasmInitialized) {
7235 throw new Error("initializeWasm() must be awaited first!");
7237 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
7238 return decodeArray(nativeResponseValue);
7240 // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7241 export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
7242 if(!isWasmInitialized) {
7243 throw new Error("initializeWasm() must be awaited first!");
7245 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
7246 // debug statements here
7248 // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7249 export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
7250 if(!isWasmInitialized) {
7251 throw new Error("initializeWasm() must be awaited first!");
7253 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
7254 return decodeArray(nativeResponseValue);
7256 // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7257 export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7258 if(!isWasmInitialized) {
7259 throw new Error("initializeWasm() must be awaited first!");
7261 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7262 // debug statements here
7264 // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7265 export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7266 if(!isWasmInitialized) {
7267 throw new Error("initializeWasm() must be awaited first!");
7269 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
7270 return decodeArray(nativeResponseValue);
7272 // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7273 export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7274 if(!isWasmInitialized) {
7275 throw new Error("initializeWasm() must be awaited first!");
7277 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7278 // debug statements here
7280 // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
7281 export function AcceptChannel_clone(orig: number): number {
7282 if(!isWasmInitialized) {
7283 throw new Error("initializeWasm() must be awaited first!");
7285 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
7286 return nativeResponseValue;
7288 // void FundingCreated_free(struct LDKFundingCreated this_obj);
7289 export function FundingCreated_free(this_obj: number): void {
7290 if(!isWasmInitialized) {
7291 throw new Error("initializeWasm() must be awaited first!");
7293 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
7294 // debug statements here
7296 // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7297 export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
7298 if(!isWasmInitialized) {
7299 throw new Error("initializeWasm() must be awaited first!");
7301 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
7302 return decodeArray(nativeResponseValue);
7304 // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7305 export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7306 if(!isWasmInitialized) {
7307 throw new Error("initializeWasm() must be awaited first!");
7309 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
7310 // debug statements here
7312 // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7313 export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
7314 if(!isWasmInitialized) {
7315 throw new Error("initializeWasm() must be awaited first!");
7317 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
7318 return decodeArray(nativeResponseValue);
7320 // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7321 export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
7322 if(!isWasmInitialized) {
7323 throw new Error("initializeWasm() must be awaited first!");
7325 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
7326 // debug statements here
7328 // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7329 export function FundingCreated_get_funding_output_index(this_ptr: number): number {
7330 if(!isWasmInitialized) {
7331 throw new Error("initializeWasm() must be awaited first!");
7333 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
7334 return nativeResponseValue;
7336 // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
7337 export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
7338 if(!isWasmInitialized) {
7339 throw new Error("initializeWasm() must be awaited first!");
7341 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
7342 // debug statements here
7344 // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7345 export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
7346 if(!isWasmInitialized) {
7347 throw new Error("initializeWasm() must be awaited first!");
7349 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
7350 return decodeArray(nativeResponseValue);
7352 // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
7353 export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
7354 if(!isWasmInitialized) {
7355 throw new Error("initializeWasm() must be awaited first!");
7357 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
7358 // debug statements here
7360 // 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);
7361 export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
7362 if(!isWasmInitialized) {
7363 throw new Error("initializeWasm() must be awaited first!");
7365 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
7366 return nativeResponseValue;
7368 // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
7369 export function FundingCreated_clone(orig: number): number {
7370 if(!isWasmInitialized) {
7371 throw new Error("initializeWasm() must be awaited first!");
7373 const nativeResponseValue = wasm.FundingCreated_clone(orig);
7374 return nativeResponseValue;
7376 // void FundingSigned_free(struct LDKFundingSigned this_obj);
7377 export function FundingSigned_free(this_obj: number): void {
7378 if(!isWasmInitialized) {
7379 throw new Error("initializeWasm() must be awaited first!");
7381 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
7382 // debug statements here
7384 // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
7385 export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
7386 if(!isWasmInitialized) {
7387 throw new Error("initializeWasm() must be awaited first!");
7389 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
7390 return decodeArray(nativeResponseValue);
7392 // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7393 export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7394 if(!isWasmInitialized) {
7395 throw new Error("initializeWasm() must be awaited first!");
7397 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
7398 // debug statements here
7400 // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
7401 export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
7402 if(!isWasmInitialized) {
7403 throw new Error("initializeWasm() must be awaited first!");
7405 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
7406 return decodeArray(nativeResponseValue);
7408 // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7409 export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7410 if(!isWasmInitialized) {
7411 throw new Error("initializeWasm() must be awaited first!");
7413 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
7414 // debug statements here
7416 // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
7417 export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
7418 if(!isWasmInitialized) {
7419 throw new Error("initializeWasm() must be awaited first!");
7421 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
7422 return nativeResponseValue;
7424 // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
7425 export function FundingSigned_clone(orig: number): number {
7426 if(!isWasmInitialized) {
7427 throw new Error("initializeWasm() must be awaited first!");
7429 const nativeResponseValue = wasm.FundingSigned_clone(orig);
7430 return nativeResponseValue;
7432 // void FundingLocked_free(struct LDKFundingLocked this_obj);
7433 export function FundingLocked_free(this_obj: number): void {
7434 if(!isWasmInitialized) {
7435 throw new Error("initializeWasm() must be awaited first!");
7437 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
7438 // debug statements here
7440 // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
7441 export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
7442 if(!isWasmInitialized) {
7443 throw new Error("initializeWasm() must be awaited first!");
7445 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
7446 return decodeArray(nativeResponseValue);
7448 // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7449 export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
7450 if(!isWasmInitialized) {
7451 throw new Error("initializeWasm() must be awaited first!");
7453 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
7454 // debug statements here
7456 // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
7457 export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
7458 if(!isWasmInitialized) {
7459 throw new Error("initializeWasm() must be awaited first!");
7461 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
7462 return decodeArray(nativeResponseValue);
7464 // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7465 export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7466 if(!isWasmInitialized) {
7467 throw new Error("initializeWasm() must be awaited first!");
7469 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
7470 // debug statements here
7472 // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
7473 export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
7474 if(!isWasmInitialized) {
7475 throw new Error("initializeWasm() must be awaited first!");
7477 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
7478 return nativeResponseValue;
7480 // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
7481 export function FundingLocked_clone(orig: number): number {
7482 if(!isWasmInitialized) {
7483 throw new Error("initializeWasm() must be awaited first!");
7485 const nativeResponseValue = wasm.FundingLocked_clone(orig);
7486 return nativeResponseValue;
7488 // void Shutdown_free(struct LDKShutdown this_obj);
7489 export function Shutdown_free(this_obj: number): void {
7490 if(!isWasmInitialized) {
7491 throw new Error("initializeWasm() must be awaited first!");
7493 const nativeResponseValue = wasm.Shutdown_free(this_obj);
7494 // debug statements here
7496 // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
7497 export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
7498 if(!isWasmInitialized) {
7499 throw new Error("initializeWasm() must be awaited first!");
7501 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
7502 return decodeArray(nativeResponseValue);
7504 // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7505 export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
7506 if(!isWasmInitialized) {
7507 throw new Error("initializeWasm() must be awaited first!");
7509 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
7510 // debug statements here
7512 // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
7513 export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
7514 if(!isWasmInitialized) {
7515 throw new Error("initializeWasm() must be awaited first!");
7517 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
7518 return decodeArray(nativeResponseValue);
7520 // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7521 export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
7522 if(!isWasmInitialized) {
7523 throw new Error("initializeWasm() must be awaited first!");
7525 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
7526 // debug statements here
7528 // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
7529 export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
7530 if(!isWasmInitialized) {
7531 throw new Error("initializeWasm() must be awaited first!");
7533 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
7534 return nativeResponseValue;
7536 // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
7537 export function Shutdown_clone(orig: number): number {
7538 if(!isWasmInitialized) {
7539 throw new Error("initializeWasm() must be awaited first!");
7541 const nativeResponseValue = wasm.Shutdown_clone(orig);
7542 return nativeResponseValue;
7544 // void ClosingSigned_free(struct LDKClosingSigned this_obj);
7545 export function ClosingSigned_free(this_obj: number): void {
7546 if(!isWasmInitialized) {
7547 throw new Error("initializeWasm() must be awaited first!");
7549 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
7550 // debug statements here
7552 // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
7553 export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
7554 if(!isWasmInitialized) {
7555 throw new Error("initializeWasm() must be awaited first!");
7557 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
7558 return decodeArray(nativeResponseValue);
7560 // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7561 export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7562 if(!isWasmInitialized) {
7563 throw new Error("initializeWasm() must be awaited first!");
7565 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
7566 // debug statements here
7568 // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
7569 export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
7570 if(!isWasmInitialized) {
7571 throw new Error("initializeWasm() must be awaited first!");
7573 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
7574 return nativeResponseValue;
7576 // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
7577 export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
7578 if(!isWasmInitialized) {
7579 throw new Error("initializeWasm() must be awaited first!");
7581 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
7582 // debug statements here
7584 // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
7585 export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
7586 if(!isWasmInitialized) {
7587 throw new Error("initializeWasm() must be awaited first!");
7589 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
7590 return decodeArray(nativeResponseValue);
7592 // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7593 export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7594 if(!isWasmInitialized) {
7595 throw new Error("initializeWasm() must be awaited first!");
7597 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
7598 // debug statements here
7600 // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
7601 export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
7602 if(!isWasmInitialized) {
7603 throw new Error("initializeWasm() must be awaited first!");
7605 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
7606 return nativeResponseValue;
7608 // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
7609 export function ClosingSigned_clone(orig: number): number {
7610 if(!isWasmInitialized) {
7611 throw new Error("initializeWasm() must be awaited first!");
7613 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
7614 return nativeResponseValue;
7616 // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
7617 export function UpdateAddHTLC_free(this_obj: number): void {
7618 if(!isWasmInitialized) {
7619 throw new Error("initializeWasm() must be awaited first!");
7621 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
7622 // debug statements here
7624 // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7625 export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
7626 if(!isWasmInitialized) {
7627 throw new Error("initializeWasm() must be awaited first!");
7629 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
7630 return decodeArray(nativeResponseValue);
7632 // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7633 export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7634 if(!isWasmInitialized) {
7635 throw new Error("initializeWasm() must be awaited first!");
7637 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
7638 // debug statements here
7640 // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7641 export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
7642 if(!isWasmInitialized) {
7643 throw new Error("initializeWasm() must be awaited first!");
7645 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
7646 return nativeResponseValue;
7648 // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7649 export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
7650 if(!isWasmInitialized) {
7651 throw new Error("initializeWasm() must be awaited first!");
7653 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
7654 // debug statements here
7656 // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7657 export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
7658 if(!isWasmInitialized) {
7659 throw new Error("initializeWasm() must be awaited first!");
7661 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
7662 return nativeResponseValue;
7664 // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7665 export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
7666 if(!isWasmInitialized) {
7667 throw new Error("initializeWasm() must be awaited first!");
7669 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
7670 // debug statements here
7672 // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7673 export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
7674 if(!isWasmInitialized) {
7675 throw new Error("initializeWasm() must be awaited first!");
7677 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
7678 return decodeArray(nativeResponseValue);
7680 // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7681 export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
7682 if(!isWasmInitialized) {
7683 throw new Error("initializeWasm() must be awaited first!");
7685 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
7686 // debug statements here
7688 // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7689 export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
7690 if(!isWasmInitialized) {
7691 throw new Error("initializeWasm() must be awaited first!");
7693 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
7694 return nativeResponseValue;
7696 // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
7697 export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
7698 if(!isWasmInitialized) {
7699 throw new Error("initializeWasm() must be awaited first!");
7701 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
7702 // debug statements here
7704 // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
7705 export function UpdateAddHTLC_clone(orig: number): number {
7706 if(!isWasmInitialized) {
7707 throw new Error("initializeWasm() must be awaited first!");
7709 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
7710 return nativeResponseValue;
7712 // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
7713 export function UpdateFulfillHTLC_free(this_obj: number): void {
7714 if(!isWasmInitialized) {
7715 throw new Error("initializeWasm() must be awaited first!");
7717 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
7718 // debug statements here
7720 // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7721 export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
7722 if(!isWasmInitialized) {
7723 throw new Error("initializeWasm() must be awaited first!");
7725 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
7726 return decodeArray(nativeResponseValue);
7728 // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7729 export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7730 if(!isWasmInitialized) {
7731 throw new Error("initializeWasm() must be awaited first!");
7733 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
7734 // debug statements here
7736 // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
7737 export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
7738 if(!isWasmInitialized) {
7739 throw new Error("initializeWasm() must be awaited first!");
7741 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
7742 return nativeResponseValue;
7744 // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
7745 export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
7746 if(!isWasmInitialized) {
7747 throw new Error("initializeWasm() must be awaited first!");
7749 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
7750 // debug statements here
7752 // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7753 export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
7754 if(!isWasmInitialized) {
7755 throw new Error("initializeWasm() must be awaited first!");
7757 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
7758 return decodeArray(nativeResponseValue);
7760 // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7761 export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
7762 if(!isWasmInitialized) {
7763 throw new Error("initializeWasm() must be awaited first!");
7765 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
7766 // debug statements here
7768 // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
7769 export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
7770 if(!isWasmInitialized) {
7771 throw new Error("initializeWasm() must be awaited first!");
7773 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
7774 return nativeResponseValue;
7776 // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
7777 export function UpdateFulfillHTLC_clone(orig: number): number {
7778 if(!isWasmInitialized) {
7779 throw new Error("initializeWasm() must be awaited first!");
7781 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
7782 return nativeResponseValue;
7784 // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
7785 export function UpdateFailHTLC_free(this_obj: number): void {
7786 if(!isWasmInitialized) {
7787 throw new Error("initializeWasm() must be awaited first!");
7789 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
7790 // debug statements here
7792 // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
7793 export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
7794 if(!isWasmInitialized) {
7795 throw new Error("initializeWasm() must be awaited first!");
7797 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
7798 return decodeArray(nativeResponseValue);
7800 // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7801 export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7802 if(!isWasmInitialized) {
7803 throw new Error("initializeWasm() must be awaited first!");
7805 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
7806 // debug statements here
7808 // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
7809 export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
7810 if(!isWasmInitialized) {
7811 throw new Error("initializeWasm() must be awaited first!");
7813 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
7814 return nativeResponseValue;
7816 // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
7817 export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
7818 if(!isWasmInitialized) {
7819 throw new Error("initializeWasm() must be awaited first!");
7821 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
7822 // debug statements here
7824 // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
7825 export function UpdateFailHTLC_clone(orig: number): number {
7826 if(!isWasmInitialized) {
7827 throw new Error("initializeWasm() must be awaited first!");
7829 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
7830 return nativeResponseValue;
7832 // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
7833 export function UpdateFailMalformedHTLC_free(this_obj: number): void {
7834 if(!isWasmInitialized) {
7835 throw new Error("initializeWasm() must be awaited first!");
7837 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
7838 // debug statements here
7840 // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
7841 export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
7842 if(!isWasmInitialized) {
7843 throw new Error("initializeWasm() must be awaited first!");
7845 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
7846 return decodeArray(nativeResponseValue);
7848 // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7849 export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7850 if(!isWasmInitialized) {
7851 throw new Error("initializeWasm() must be awaited first!");
7853 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
7854 // debug statements here
7856 // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
7857 export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
7858 if(!isWasmInitialized) {
7859 throw new Error("initializeWasm() must be awaited first!");
7861 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
7862 return nativeResponseValue;
7864 // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
7865 export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
7866 if(!isWasmInitialized) {
7867 throw new Error("initializeWasm() must be awaited first!");
7869 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
7870 // debug statements here
7872 // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
7873 export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
7874 if(!isWasmInitialized) {
7875 throw new Error("initializeWasm() must be awaited first!");
7877 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
7878 return nativeResponseValue;
7880 // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
7881 export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
7882 if(!isWasmInitialized) {
7883 throw new Error("initializeWasm() must be awaited first!");
7885 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
7886 // debug statements here
7888 // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
7889 export function UpdateFailMalformedHTLC_clone(orig: number): number {
7890 if(!isWasmInitialized) {
7891 throw new Error("initializeWasm() must be awaited first!");
7893 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
7894 return nativeResponseValue;
7896 // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
7897 export function CommitmentSigned_free(this_obj: number): void {
7898 if(!isWasmInitialized) {
7899 throw new Error("initializeWasm() must be awaited first!");
7901 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
7902 // debug statements here
7904 // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
7905 export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
7906 if(!isWasmInitialized) {
7907 throw new Error("initializeWasm() must be awaited first!");
7909 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
7910 return decodeArray(nativeResponseValue);
7912 // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7913 export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7914 if(!isWasmInitialized) {
7915 throw new Error("initializeWasm() must be awaited first!");
7917 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
7918 // debug statements here
7920 // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
7921 export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
7922 if(!isWasmInitialized) {
7923 throw new Error("initializeWasm() must be awaited first!");
7925 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
7926 return decodeArray(nativeResponseValue);
7928 // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7929 export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7930 if(!isWasmInitialized) {
7931 throw new Error("initializeWasm() must be awaited first!");
7933 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
7934 // debug statements here
7936 // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
7937 export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
7938 if(!isWasmInitialized) {
7939 throw new Error("initializeWasm() must be awaited first!");
7941 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
7942 // debug statements here
7944 // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
7945 export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
7946 if(!isWasmInitialized) {
7947 throw new Error("initializeWasm() must be awaited first!");
7949 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
7950 return nativeResponseValue;
7952 // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
7953 export function CommitmentSigned_clone(orig: number): number {
7954 if(!isWasmInitialized) {
7955 throw new Error("initializeWasm() must be awaited first!");
7957 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
7958 return nativeResponseValue;
7960 // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
7961 export function RevokeAndACK_free(this_obj: number): void {
7962 if(!isWasmInitialized) {
7963 throw new Error("initializeWasm() must be awaited first!");
7965 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
7966 // debug statements here
7968 // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
7969 export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
7970 if(!isWasmInitialized) {
7971 throw new Error("initializeWasm() must be awaited first!");
7973 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
7974 return decodeArray(nativeResponseValue);
7976 // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7977 export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
7978 if(!isWasmInitialized) {
7979 throw new Error("initializeWasm() must be awaited first!");
7981 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
7982 // debug statements here
7984 // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
7985 export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
7986 if(!isWasmInitialized) {
7987 throw new Error("initializeWasm() must be awaited first!");
7989 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
7990 return decodeArray(nativeResponseValue);
7992 // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7993 export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
7994 if(!isWasmInitialized) {
7995 throw new Error("initializeWasm() must be awaited first!");
7997 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
7998 // debug statements here
8000 // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
8001 export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
8002 if(!isWasmInitialized) {
8003 throw new Error("initializeWasm() must be awaited first!");
8005 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
8006 return decodeArray(nativeResponseValue);
8008 // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8009 export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8010 if(!isWasmInitialized) {
8011 throw new Error("initializeWasm() must be awaited first!");
8013 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
8014 // debug statements here
8016 // 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);
8017 export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
8018 if(!isWasmInitialized) {
8019 throw new Error("initializeWasm() must be awaited first!");
8021 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
8022 return nativeResponseValue;
8024 // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
8025 export function RevokeAndACK_clone(orig: number): number {
8026 if(!isWasmInitialized) {
8027 throw new Error("initializeWasm() must be awaited first!");
8029 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
8030 return nativeResponseValue;
8032 // void UpdateFee_free(struct LDKUpdateFee this_obj);
8033 export function UpdateFee_free(this_obj: number): void {
8034 if(!isWasmInitialized) {
8035 throw new Error("initializeWasm() must be awaited first!");
8037 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
8038 // debug statements here
8040 // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
8041 export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
8042 if(!isWasmInitialized) {
8043 throw new Error("initializeWasm() must be awaited first!");
8045 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
8046 return decodeArray(nativeResponseValue);
8048 // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8049 export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
8050 if(!isWasmInitialized) {
8051 throw new Error("initializeWasm() must be awaited first!");
8053 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
8054 // debug statements here
8056 // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
8057 export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
8058 if(!isWasmInitialized) {
8059 throw new Error("initializeWasm() must be awaited first!");
8061 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
8062 return nativeResponseValue;
8064 // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
8065 export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
8066 if(!isWasmInitialized) {
8067 throw new Error("initializeWasm() must be awaited first!");
8069 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
8070 // debug statements here
8072 // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
8073 export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
8074 if(!isWasmInitialized) {
8075 throw new Error("initializeWasm() must be awaited first!");
8077 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
8078 return nativeResponseValue;
8080 // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
8081 export function UpdateFee_clone(orig: number): number {
8082 if(!isWasmInitialized) {
8083 throw new Error("initializeWasm() must be awaited first!");
8085 const nativeResponseValue = wasm.UpdateFee_clone(orig);
8086 return nativeResponseValue;
8088 // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
8089 export function DataLossProtect_free(this_obj: number): void {
8090 if(!isWasmInitialized) {
8091 throw new Error("initializeWasm() must be awaited first!");
8093 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
8094 // debug statements here
8096 // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
8097 export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
8098 if(!isWasmInitialized) {
8099 throw new Error("initializeWasm() must be awaited first!");
8101 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
8102 return decodeArray(nativeResponseValue);
8104 // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8105 export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
8106 if(!isWasmInitialized) {
8107 throw new Error("initializeWasm() must be awaited first!");
8109 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
8110 // debug statements here
8112 // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
8113 export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
8114 if(!isWasmInitialized) {
8115 throw new Error("initializeWasm() must be awaited first!");
8117 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
8118 return decodeArray(nativeResponseValue);
8120 // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8121 export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8122 if(!isWasmInitialized) {
8123 throw new Error("initializeWasm() must be awaited first!");
8125 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
8126 // debug statements here
8128 // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
8129 export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
8130 if(!isWasmInitialized) {
8131 throw new Error("initializeWasm() must be awaited first!");
8133 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
8134 return nativeResponseValue;
8136 // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
8137 export function DataLossProtect_clone(orig: number): number {
8138 if(!isWasmInitialized) {
8139 throw new Error("initializeWasm() must be awaited first!");
8141 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
8142 return nativeResponseValue;
8144 // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
8145 export function ChannelReestablish_free(this_obj: number): void {
8146 if(!isWasmInitialized) {
8147 throw new Error("initializeWasm() must be awaited first!");
8149 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
8150 // debug statements here
8152 // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
8153 export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
8154 if(!isWasmInitialized) {
8155 throw new Error("initializeWasm() must be awaited first!");
8157 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
8158 return decodeArray(nativeResponseValue);
8160 // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8161 export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
8162 if(!isWasmInitialized) {
8163 throw new Error("initializeWasm() must be awaited first!");
8165 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
8166 // debug statements here
8168 // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8169 export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
8170 if(!isWasmInitialized) {
8171 throw new Error("initializeWasm() must be awaited first!");
8173 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
8174 return nativeResponseValue;
8176 // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8177 export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
8178 if(!isWasmInitialized) {
8179 throw new Error("initializeWasm() must be awaited first!");
8181 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
8182 // debug statements here
8184 // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8185 export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
8186 if(!isWasmInitialized) {
8187 throw new Error("initializeWasm() must be awaited first!");
8189 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
8190 return nativeResponseValue;
8192 // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8193 export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
8194 if(!isWasmInitialized) {
8195 throw new Error("initializeWasm() must be awaited first!");
8197 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
8198 // debug statements here
8200 // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
8201 export function ChannelReestablish_clone(orig: number): number {
8202 if(!isWasmInitialized) {
8203 throw new Error("initializeWasm() must be awaited first!");
8205 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
8206 return nativeResponseValue;
8208 // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
8209 export function AnnouncementSignatures_free(this_obj: number): void {
8210 if(!isWasmInitialized) {
8211 throw new Error("initializeWasm() must be awaited first!");
8213 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
8214 // debug statements here
8216 // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
8217 export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
8218 if(!isWasmInitialized) {
8219 throw new Error("initializeWasm() must be awaited first!");
8221 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
8222 return decodeArray(nativeResponseValue);
8224 // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8225 export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
8226 if(!isWasmInitialized) {
8227 throw new Error("initializeWasm() must be awaited first!");
8229 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
8230 // debug statements here
8232 // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8233 export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
8234 if(!isWasmInitialized) {
8235 throw new Error("initializeWasm() must be awaited first!");
8237 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
8238 return nativeResponseValue;
8240 // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
8241 export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
8242 if(!isWasmInitialized) {
8243 throw new Error("initializeWasm() must be awaited first!");
8245 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
8246 // debug statements here
8248 // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8249 export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
8250 if(!isWasmInitialized) {
8251 throw new Error("initializeWasm() must be awaited first!");
8253 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
8254 return decodeArray(nativeResponseValue);
8256 // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8257 export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
8258 if(!isWasmInitialized) {
8259 throw new Error("initializeWasm() must be awaited first!");
8261 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
8262 // debug statements here
8264 // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8265 export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
8266 if(!isWasmInitialized) {
8267 throw new Error("initializeWasm() must be awaited first!");
8269 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
8270 return decodeArray(nativeResponseValue);
8272 // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8273 export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
8274 if(!isWasmInitialized) {
8275 throw new Error("initializeWasm() must be awaited first!");
8277 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
8278 // debug statements here
8280 // 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);
8281 export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
8282 if(!isWasmInitialized) {
8283 throw new Error("initializeWasm() must be awaited first!");
8285 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
8286 return nativeResponseValue;
8288 // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
8289 export function AnnouncementSignatures_clone(orig: number): number {
8290 if(!isWasmInitialized) {
8291 throw new Error("initializeWasm() must be awaited first!");
8293 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
8294 return nativeResponseValue;
8296 // void NetAddress_free(struct LDKNetAddress this_ptr);
8297 export function NetAddress_free(this_ptr: number): void {
8298 if(!isWasmInitialized) {
8299 throw new Error("initializeWasm() must be awaited first!");
8301 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
8302 // debug statements here
8304 // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
8305 export function NetAddress_clone(orig: number): number {
8306 if(!isWasmInitialized) {
8307 throw new Error("initializeWasm() must be awaited first!");
8309 const nativeResponseValue = wasm.NetAddress_clone(orig);
8310 return nativeResponseValue;
8312 // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
8313 export function NetAddress_write(obj: number): Uint8Array {
8314 if(!isWasmInitialized) {
8315 throw new Error("initializeWasm() must be awaited first!");
8317 const nativeResponseValue = wasm.NetAddress_write(obj);
8318 return decodeArray(nativeResponseValue);
8320 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
8321 export function Result_read(ser: Uint8Array): number {
8322 if(!isWasmInitialized) {
8323 throw new Error("initializeWasm() must be awaited first!");
8325 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
8326 return nativeResponseValue;
8328 // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
8329 export function UnsignedNodeAnnouncement_free(this_obj: number): void {
8330 if(!isWasmInitialized) {
8331 throw new Error("initializeWasm() must be awaited first!");
8333 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
8334 // debug statements here
8336 // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8337 export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
8338 if(!isWasmInitialized) {
8339 throw new Error("initializeWasm() must be awaited first!");
8341 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
8342 return nativeResponseValue;
8344 // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
8345 export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
8346 if(!isWasmInitialized) {
8347 throw new Error("initializeWasm() must be awaited first!");
8349 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
8350 // debug statements here
8352 // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8353 export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
8354 if(!isWasmInitialized) {
8355 throw new Error("initializeWasm() must be awaited first!");
8357 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
8358 return nativeResponseValue;
8360 // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
8361 export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
8362 if(!isWasmInitialized) {
8363 throw new Error("initializeWasm() must be awaited first!");
8365 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
8366 // debug statements here
8368 // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8369 export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
8370 if(!isWasmInitialized) {
8371 throw new Error("initializeWasm() must be awaited first!");
8373 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
8374 return decodeArray(nativeResponseValue);
8376 // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8377 export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
8378 if(!isWasmInitialized) {
8379 throw new Error("initializeWasm() must be awaited first!");
8381 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
8382 // debug statements here
8384 // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
8385 export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
8386 if(!isWasmInitialized) {
8387 throw new Error("initializeWasm() must be awaited first!");
8389 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
8390 return decodeArray(nativeResponseValue);
8392 // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
8393 export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
8394 if(!isWasmInitialized) {
8395 throw new Error("initializeWasm() must be awaited first!");
8397 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
8398 // debug statements here
8400 // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
8401 export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
8402 if(!isWasmInitialized) {
8403 throw new Error("initializeWasm() must be awaited first!");
8405 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
8406 return decodeArray(nativeResponseValue);
8408 // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8409 export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
8410 if(!isWasmInitialized) {
8411 throw new Error("initializeWasm() must be awaited first!");
8413 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
8414 // debug statements here
8416 // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
8417 export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
8418 if(!isWasmInitialized) {
8419 throw new Error("initializeWasm() must be awaited first!");
8421 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
8422 // debug statements here
8424 // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
8425 export function UnsignedNodeAnnouncement_clone(orig: number): number {
8426 if(!isWasmInitialized) {
8427 throw new Error("initializeWasm() must be awaited first!");
8429 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
8430 return nativeResponseValue;
8432 // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
8433 export function NodeAnnouncement_free(this_obj: number): void {
8434 if(!isWasmInitialized) {
8435 throw new Error("initializeWasm() must be awaited first!");
8437 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
8438 // debug statements here
8440 // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8441 export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
8442 if(!isWasmInitialized) {
8443 throw new Error("initializeWasm() must be awaited first!");
8445 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
8446 return decodeArray(nativeResponseValue);
8448 // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8449 export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
8450 if(!isWasmInitialized) {
8451 throw new Error("initializeWasm() must be awaited first!");
8453 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
8454 // debug statements here
8456 // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8457 export function NodeAnnouncement_get_contents(this_ptr: number): number {
8458 if(!isWasmInitialized) {
8459 throw new Error("initializeWasm() must be awaited first!");
8461 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
8462 return nativeResponseValue;
8464 // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
8465 export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
8466 if(!isWasmInitialized) {
8467 throw new Error("initializeWasm() must be awaited first!");
8469 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
8470 // debug statements here
8472 // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
8473 export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
8474 if(!isWasmInitialized) {
8475 throw new Error("initializeWasm() must be awaited first!");
8477 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
8478 return nativeResponseValue;
8480 // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
8481 export function NodeAnnouncement_clone(orig: number): number {
8482 if(!isWasmInitialized) {
8483 throw new Error("initializeWasm() must be awaited first!");
8485 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
8486 return nativeResponseValue;
8488 // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
8489 export function UnsignedChannelAnnouncement_free(this_obj: number): void {
8490 if(!isWasmInitialized) {
8491 throw new Error("initializeWasm() must be awaited first!");
8493 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
8494 // debug statements here
8496 // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8497 export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
8498 if(!isWasmInitialized) {
8499 throw new Error("initializeWasm() must be awaited first!");
8501 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
8502 return nativeResponseValue;
8504 // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
8505 export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
8506 if(!isWasmInitialized) {
8507 throw new Error("initializeWasm() must be awaited first!");
8509 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
8510 // debug statements here
8512 // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
8513 export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
8514 if(!isWasmInitialized) {
8515 throw new Error("initializeWasm() must be awaited first!");
8517 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
8518 return decodeArray(nativeResponseValue);
8520 // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8521 export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8522 if(!isWasmInitialized) {
8523 throw new Error("initializeWasm() must be awaited first!");
8525 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
8526 // debug statements here
8528 // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8529 export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
8530 if(!isWasmInitialized) {
8531 throw new Error("initializeWasm() must be awaited first!");
8533 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
8534 return nativeResponseValue;
8536 // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
8537 export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
8538 if(!isWasmInitialized) {
8539 throw new Error("initializeWasm() must be awaited first!");
8541 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
8542 // debug statements here
8544 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8545 export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
8546 if(!isWasmInitialized) {
8547 throw new Error("initializeWasm() must be awaited first!");
8549 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
8550 return decodeArray(nativeResponseValue);
8552 // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8553 export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
8554 if(!isWasmInitialized) {
8555 throw new Error("initializeWasm() must be awaited first!");
8557 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
8558 // debug statements here
8560 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8561 export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
8562 if(!isWasmInitialized) {
8563 throw new Error("initializeWasm() must be awaited first!");
8565 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
8566 return decodeArray(nativeResponseValue);
8568 // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8569 export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
8570 if(!isWasmInitialized) {
8571 throw new Error("initializeWasm() must be awaited first!");
8573 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
8574 // debug statements here
8576 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8577 export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
8578 if(!isWasmInitialized) {
8579 throw new Error("initializeWasm() must be awaited first!");
8581 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
8582 return decodeArray(nativeResponseValue);
8584 // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8585 export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
8586 if(!isWasmInitialized) {
8587 throw new Error("initializeWasm() must be awaited first!");
8589 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
8590 // debug statements here
8592 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8593 export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
8594 if(!isWasmInitialized) {
8595 throw new Error("initializeWasm() must be awaited first!");
8597 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
8598 return decodeArray(nativeResponseValue);
8600 // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8601 export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
8602 if(!isWasmInitialized) {
8603 throw new Error("initializeWasm() must be awaited first!");
8605 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
8606 // debug statements here
8608 // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
8609 export function UnsignedChannelAnnouncement_clone(orig: number): number {
8610 if(!isWasmInitialized) {
8611 throw new Error("initializeWasm() must be awaited first!");
8613 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
8614 return nativeResponseValue;
8616 // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
8617 export function ChannelAnnouncement_free(this_obj: number): void {
8618 if(!isWasmInitialized) {
8619 throw new Error("initializeWasm() must be awaited first!");
8621 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
8622 // debug statements here
8624 // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8625 export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
8626 if(!isWasmInitialized) {
8627 throw new Error("initializeWasm() must be awaited first!");
8629 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
8630 return decodeArray(nativeResponseValue);
8632 // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8633 export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
8634 if(!isWasmInitialized) {
8635 throw new Error("initializeWasm() must be awaited first!");
8637 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
8638 // debug statements here
8640 // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8641 export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
8642 if(!isWasmInitialized) {
8643 throw new Error("initializeWasm() must be awaited first!");
8645 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
8646 return decodeArray(nativeResponseValue);
8648 // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8649 export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
8650 if(!isWasmInitialized) {
8651 throw new Error("initializeWasm() must be awaited first!");
8653 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
8654 // debug statements here
8656 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8657 export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
8658 if(!isWasmInitialized) {
8659 throw new Error("initializeWasm() must be awaited first!");
8661 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
8662 return decodeArray(nativeResponseValue);
8664 // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8665 export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
8666 if(!isWasmInitialized) {
8667 throw new Error("initializeWasm() must be awaited first!");
8669 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
8670 // debug statements here
8672 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8673 export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
8674 if(!isWasmInitialized) {
8675 throw new Error("initializeWasm() must be awaited first!");
8677 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
8678 return decodeArray(nativeResponseValue);
8680 // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8681 export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
8682 if(!isWasmInitialized) {
8683 throw new Error("initializeWasm() must be awaited first!");
8685 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
8686 // debug statements here
8688 // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8689 export function ChannelAnnouncement_get_contents(this_ptr: number): number {
8690 if(!isWasmInitialized) {
8691 throw new Error("initializeWasm() must be awaited first!");
8693 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
8694 return nativeResponseValue;
8696 // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
8697 export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
8698 if(!isWasmInitialized) {
8699 throw new Error("initializeWasm() must be awaited first!");
8701 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
8702 // debug statements here
8704 // 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);
8705 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 {
8706 if(!isWasmInitialized) {
8707 throw new Error("initializeWasm() must be awaited first!");
8709 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);
8710 return nativeResponseValue;
8712 // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
8713 export function ChannelAnnouncement_clone(orig: number): number {
8714 if(!isWasmInitialized) {
8715 throw new Error("initializeWasm() must be awaited first!");
8717 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
8718 return nativeResponseValue;
8720 // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
8721 export function UnsignedChannelUpdate_free(this_obj: number): void {
8722 if(!isWasmInitialized) {
8723 throw new Error("initializeWasm() must be awaited first!");
8725 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
8726 // debug statements here
8728 // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
8729 export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
8730 if(!isWasmInitialized) {
8731 throw new Error("initializeWasm() must be awaited first!");
8733 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
8734 return decodeArray(nativeResponseValue);
8736 // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8737 export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8738 if(!isWasmInitialized) {
8739 throw new Error("initializeWasm() must be awaited first!");
8741 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
8742 // debug statements here
8744 // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8745 export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
8746 if(!isWasmInitialized) {
8747 throw new Error("initializeWasm() must be awaited first!");
8749 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
8750 return nativeResponseValue;
8752 // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
8753 export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
8754 if(!isWasmInitialized) {
8755 throw new Error("initializeWasm() must be awaited first!");
8757 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
8758 // debug statements here
8760 // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8761 export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
8762 if(!isWasmInitialized) {
8763 throw new Error("initializeWasm() must be awaited first!");
8765 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
8766 return nativeResponseValue;
8768 // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8769 export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
8770 if(!isWasmInitialized) {
8771 throw new Error("initializeWasm() must be awaited first!");
8773 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
8774 // debug statements here
8776 // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8777 export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
8778 if(!isWasmInitialized) {
8779 throw new Error("initializeWasm() must be awaited first!");
8781 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
8782 return nativeResponseValue;
8784 // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
8785 export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
8786 if(!isWasmInitialized) {
8787 throw new Error("initializeWasm() must be awaited first!");
8789 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
8790 // debug statements here
8792 // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8793 export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
8794 if(!isWasmInitialized) {
8795 throw new Error("initializeWasm() must be awaited first!");
8797 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
8798 return nativeResponseValue;
8800 // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
8801 export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
8802 if(!isWasmInitialized) {
8803 throw new Error("initializeWasm() must be awaited first!");
8805 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
8806 // debug statements here
8808 // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8809 export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
8810 if(!isWasmInitialized) {
8811 throw new Error("initializeWasm() must be awaited first!");
8813 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
8814 return nativeResponseValue;
8816 // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
8817 export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
8818 if(!isWasmInitialized) {
8819 throw new Error("initializeWasm() must be awaited first!");
8821 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
8822 // debug statements here
8824 // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8825 export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
8826 if(!isWasmInitialized) {
8827 throw new Error("initializeWasm() must be awaited first!");
8829 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
8830 return nativeResponseValue;
8832 // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8833 export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
8834 if(!isWasmInitialized) {
8835 throw new Error("initializeWasm() must be awaited first!");
8837 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
8838 // debug statements here
8840 // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8841 export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
8842 if(!isWasmInitialized) {
8843 throw new Error("initializeWasm() must be awaited first!");
8845 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
8846 return nativeResponseValue;
8848 // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8849 export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
8850 if(!isWasmInitialized) {
8851 throw new Error("initializeWasm() must be awaited first!");
8853 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
8854 // debug statements here
8856 // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
8857 export function UnsignedChannelUpdate_clone(orig: number): number {
8858 if(!isWasmInitialized) {
8859 throw new Error("initializeWasm() must be awaited first!");
8861 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
8862 return nativeResponseValue;
8864 // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
8865 export function ChannelUpdate_free(this_obj: number): void {
8866 if(!isWasmInitialized) {
8867 throw new Error("initializeWasm() must be awaited first!");
8869 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
8870 // debug statements here
8872 // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
8873 export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
8874 if(!isWasmInitialized) {
8875 throw new Error("initializeWasm() must be awaited first!");
8877 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
8878 return decodeArray(nativeResponseValue);
8880 // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
8881 export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
8882 if(!isWasmInitialized) {
8883 throw new Error("initializeWasm() must be awaited first!");
8885 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
8886 // debug statements here
8888 // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
8889 export function ChannelUpdate_get_contents(this_ptr: number): number {
8890 if(!isWasmInitialized) {
8891 throw new Error("initializeWasm() must be awaited first!");
8893 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
8894 return nativeResponseValue;
8896 // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
8897 export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
8898 if(!isWasmInitialized) {
8899 throw new Error("initializeWasm() must be awaited first!");
8901 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
8902 // debug statements here
8904 // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
8905 export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
8906 if(!isWasmInitialized) {
8907 throw new Error("initializeWasm() must be awaited first!");
8909 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
8910 return nativeResponseValue;
8912 // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
8913 export function ChannelUpdate_clone(orig: number): number {
8914 if(!isWasmInitialized) {
8915 throw new Error("initializeWasm() must be awaited first!");
8917 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
8918 return nativeResponseValue;
8920 // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
8921 export function QueryChannelRange_free(this_obj: number): void {
8922 if(!isWasmInitialized) {
8923 throw new Error("initializeWasm() must be awaited first!");
8925 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
8926 // debug statements here
8928 // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
8929 export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
8930 if(!isWasmInitialized) {
8931 throw new Error("initializeWasm() must be awaited first!");
8933 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
8934 return decodeArray(nativeResponseValue);
8936 // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8937 export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8938 if(!isWasmInitialized) {
8939 throw new Error("initializeWasm() must be awaited first!");
8941 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
8942 // debug statements here
8944 // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
8945 export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
8946 if(!isWasmInitialized) {
8947 throw new Error("initializeWasm() must be awaited first!");
8949 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
8950 return nativeResponseValue;
8952 // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8953 export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
8954 if(!isWasmInitialized) {
8955 throw new Error("initializeWasm() must be awaited first!");
8957 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
8958 // debug statements here
8960 // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
8961 export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
8962 if(!isWasmInitialized) {
8963 throw new Error("initializeWasm() must be awaited first!");
8965 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
8966 return nativeResponseValue;
8968 // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8969 export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
8970 if(!isWasmInitialized) {
8971 throw new Error("initializeWasm() must be awaited first!");
8973 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
8974 // debug statements here
8976 // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
8977 export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
8978 if(!isWasmInitialized) {
8979 throw new Error("initializeWasm() must be awaited first!");
8981 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
8982 return nativeResponseValue;
8984 // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
8985 export function QueryChannelRange_clone(orig: number): number {
8986 if(!isWasmInitialized) {
8987 throw new Error("initializeWasm() must be awaited first!");
8989 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
8990 return nativeResponseValue;
8992 // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
8993 export function ReplyChannelRange_free(this_obj: number): void {
8994 if(!isWasmInitialized) {
8995 throw new Error("initializeWasm() must be awaited first!");
8997 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
8998 // debug statements here
9000 // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
9001 export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
9002 if(!isWasmInitialized) {
9003 throw new Error("initializeWasm() must be awaited first!");
9005 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
9006 return decodeArray(nativeResponseValue);
9008 // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9009 export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9010 if(!isWasmInitialized) {
9011 throw new Error("initializeWasm() must be awaited first!");
9013 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
9014 // debug statements here
9016 // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9017 export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
9018 if(!isWasmInitialized) {
9019 throw new Error("initializeWasm() must be awaited first!");
9021 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
9022 return nativeResponseValue;
9024 // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9025 export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
9026 if(!isWasmInitialized) {
9027 throw new Error("initializeWasm() must be awaited first!");
9029 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
9030 // debug statements here
9032 // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9033 export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
9034 if(!isWasmInitialized) {
9035 throw new Error("initializeWasm() must be awaited first!");
9037 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
9038 return nativeResponseValue;
9040 // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9041 export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
9042 if(!isWasmInitialized) {
9043 throw new Error("initializeWasm() must be awaited first!");
9045 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
9046 // debug statements here
9048 // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9049 export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
9050 if(!isWasmInitialized) {
9051 throw new Error("initializeWasm() must be awaited first!");
9053 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
9054 return nativeResponseValue;
9056 // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
9057 export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
9058 if(!isWasmInitialized) {
9059 throw new Error("initializeWasm() must be awaited first!");
9061 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
9062 // debug statements here
9064 // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9065 export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
9066 if(!isWasmInitialized) {
9067 throw new Error("initializeWasm() must be awaited first!");
9069 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
9070 // debug statements here
9072 // 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);
9073 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 {
9074 if(!isWasmInitialized) {
9075 throw new Error("initializeWasm() must be awaited first!");
9077 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
9078 return nativeResponseValue;
9080 // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
9081 export function ReplyChannelRange_clone(orig: number): number {
9082 if(!isWasmInitialized) {
9083 throw new Error("initializeWasm() must be awaited first!");
9085 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
9086 return nativeResponseValue;
9088 // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
9089 export function QueryShortChannelIds_free(this_obj: number): void {
9090 if(!isWasmInitialized) {
9091 throw new Error("initializeWasm() must be awaited first!");
9093 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
9094 // debug statements here
9096 // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
9097 export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
9098 if(!isWasmInitialized) {
9099 throw new Error("initializeWasm() must be awaited first!");
9101 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
9102 return decodeArray(nativeResponseValue);
9104 // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9105 export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9106 if(!isWasmInitialized) {
9107 throw new Error("initializeWasm() must be awaited first!");
9109 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
9110 // debug statements here
9112 // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9113 export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
9114 if(!isWasmInitialized) {
9115 throw new Error("initializeWasm() must be awaited first!");
9117 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
9118 // debug statements here
9120 // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
9121 export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
9122 if(!isWasmInitialized) {
9123 throw new Error("initializeWasm() must be awaited first!");
9125 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
9126 return nativeResponseValue;
9128 // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
9129 export function QueryShortChannelIds_clone(orig: number): number {
9130 if(!isWasmInitialized) {
9131 throw new Error("initializeWasm() must be awaited first!");
9133 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
9134 return nativeResponseValue;
9136 // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
9137 export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
9138 if(!isWasmInitialized) {
9139 throw new Error("initializeWasm() must be awaited first!");
9141 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
9142 // debug statements here
9144 // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
9145 export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
9146 if(!isWasmInitialized) {
9147 throw new Error("initializeWasm() must be awaited first!");
9149 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
9150 return decodeArray(nativeResponseValue);
9152 // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9153 export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9154 if(!isWasmInitialized) {
9155 throw new Error("initializeWasm() must be awaited first!");
9157 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
9158 // debug statements here
9160 // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
9161 export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
9162 if(!isWasmInitialized) {
9163 throw new Error("initializeWasm() must be awaited first!");
9165 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
9166 return nativeResponseValue;
9168 // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
9169 export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
9170 if(!isWasmInitialized) {
9171 throw new Error("initializeWasm() must be awaited first!");
9173 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
9174 // debug statements here
9176 // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
9177 export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
9178 if(!isWasmInitialized) {
9179 throw new Error("initializeWasm() must be awaited first!");
9181 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
9182 return nativeResponseValue;
9184 // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
9185 export function ReplyShortChannelIdsEnd_clone(orig: number): number {
9186 if(!isWasmInitialized) {
9187 throw new Error("initializeWasm() must be awaited first!");
9189 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
9190 return nativeResponseValue;
9192 // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
9193 export function GossipTimestampFilter_free(this_obj: number): void {
9194 if(!isWasmInitialized) {
9195 throw new Error("initializeWasm() must be awaited first!");
9197 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
9198 // debug statements here
9200 // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
9201 export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
9202 if(!isWasmInitialized) {
9203 throw new Error("initializeWasm() must be awaited first!");
9205 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
9206 return decodeArray(nativeResponseValue);
9208 // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9209 export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9210 if(!isWasmInitialized) {
9211 throw new Error("initializeWasm() must be awaited first!");
9213 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
9214 // debug statements here
9216 // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9217 export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
9218 if(!isWasmInitialized) {
9219 throw new Error("initializeWasm() must be awaited first!");
9221 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
9222 return nativeResponseValue;
9224 // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9225 export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
9226 if(!isWasmInitialized) {
9227 throw new Error("initializeWasm() must be awaited first!");
9229 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
9230 // debug statements here
9232 // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9233 export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
9234 if(!isWasmInitialized) {
9235 throw new Error("initializeWasm() must be awaited first!");
9237 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
9238 return nativeResponseValue;
9240 // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9241 export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
9242 if(!isWasmInitialized) {
9243 throw new Error("initializeWasm() must be awaited first!");
9245 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
9246 // debug statements here
9248 // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
9249 export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
9250 if(!isWasmInitialized) {
9251 throw new Error("initializeWasm() must be awaited first!");
9253 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
9254 return nativeResponseValue;
9256 // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
9257 export function GossipTimestampFilter_clone(orig: number): number {
9258 if(!isWasmInitialized) {
9259 throw new Error("initializeWasm() must be awaited first!");
9261 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
9262 return nativeResponseValue;
9264 // void ErrorAction_free(struct LDKErrorAction this_ptr);
9265 export function ErrorAction_free(this_ptr: number): void {
9266 if(!isWasmInitialized) {
9267 throw new Error("initializeWasm() must be awaited first!");
9269 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
9270 // debug statements here
9272 // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
9273 export function ErrorAction_clone(orig: number): number {
9274 if(!isWasmInitialized) {
9275 throw new Error("initializeWasm() must be awaited first!");
9277 const nativeResponseValue = wasm.ErrorAction_clone(orig);
9278 return nativeResponseValue;
9280 // void LightningError_free(struct LDKLightningError this_obj);
9281 export function LightningError_free(this_obj: number): void {
9282 if(!isWasmInitialized) {
9283 throw new Error("initializeWasm() must be awaited first!");
9285 const nativeResponseValue = wasm.LightningError_free(this_obj);
9286 // debug statements here
9288 // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
9289 export function LightningError_get_err(this_ptr: number): String {
9290 if(!isWasmInitialized) {
9291 throw new Error("initializeWasm() must be awaited first!");
9293 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
9294 return nativeResponseValue;
9296 // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9297 export function LightningError_set_err(this_ptr: number, val: Uint8Array): void {
9298 if(!isWasmInitialized) {
9299 throw new Error("initializeWasm() must be awaited first!");
9301 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, encodeArray(val));
9302 // debug statements here
9304 // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
9305 export function LightningError_get_action(this_ptr: number): number {
9306 if(!isWasmInitialized) {
9307 throw new Error("initializeWasm() must be awaited first!");
9309 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
9310 return nativeResponseValue;
9312 // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
9313 export function LightningError_set_action(this_ptr: number, val: number): void {
9314 if(!isWasmInitialized) {
9315 throw new Error("initializeWasm() must be awaited first!");
9317 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
9318 // debug statements here
9320 // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
9321 export function LightningError_new(err_arg: Uint8Array, action_arg: number): number {
9322 if(!isWasmInitialized) {
9323 throw new Error("initializeWasm() must be awaited first!");
9325 const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
9326 return nativeResponseValue;
9328 // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
9329 export function LightningError_clone(orig: number): number {
9330 if(!isWasmInitialized) {
9331 throw new Error("initializeWasm() must be awaited first!");
9333 const nativeResponseValue = wasm.LightningError_clone(orig);
9334 return nativeResponseValue;
9336 // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
9337 export function CommitmentUpdate_free(this_obj: number): void {
9338 if(!isWasmInitialized) {
9339 throw new Error("initializeWasm() must be awaited first!");
9341 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
9342 // debug statements here
9344 // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
9345 export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
9346 if(!isWasmInitialized) {
9347 throw new Error("initializeWasm() must be awaited first!");
9349 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
9350 // debug statements here
9352 // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
9353 export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
9354 if(!isWasmInitialized) {
9355 throw new Error("initializeWasm() must be awaited first!");
9357 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
9358 // debug statements here
9360 // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
9361 export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
9362 if(!isWasmInitialized) {
9363 throw new Error("initializeWasm() must be awaited first!");
9365 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
9366 // debug statements here
9368 // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
9369 export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
9370 if(!isWasmInitialized) {
9371 throw new Error("initializeWasm() must be awaited first!");
9373 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
9374 // debug statements here
9376 // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9377 export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
9378 if(!isWasmInitialized) {
9379 throw new Error("initializeWasm() must be awaited first!");
9381 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
9382 return nativeResponseValue;
9384 // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
9385 export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
9386 if(!isWasmInitialized) {
9387 throw new Error("initializeWasm() must be awaited first!");
9389 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
9390 // debug statements here
9392 // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9393 export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
9394 if(!isWasmInitialized) {
9395 throw new Error("initializeWasm() must be awaited first!");
9397 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
9398 return nativeResponseValue;
9400 // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
9401 export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
9402 if(!isWasmInitialized) {
9403 throw new Error("initializeWasm() must be awaited first!");
9405 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
9406 // debug statements here
9408 // 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);
9409 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 {
9410 if(!isWasmInitialized) {
9411 throw new Error("initializeWasm() must be awaited first!");
9413 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);
9414 return nativeResponseValue;
9416 // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
9417 export function CommitmentUpdate_clone(orig: number): number {
9418 if(!isWasmInitialized) {
9419 throw new Error("initializeWasm() must be awaited first!");
9421 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
9422 return nativeResponseValue;
9424 // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
9425 export function HTLCFailChannelUpdate_free(this_ptr: number): void {
9426 if(!isWasmInitialized) {
9427 throw new Error("initializeWasm() must be awaited first!");
9429 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
9430 // debug statements here
9432 // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
9433 export function HTLCFailChannelUpdate_clone(orig: number): number {
9434 if(!isWasmInitialized) {
9435 throw new Error("initializeWasm() must be awaited first!");
9437 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
9438 return nativeResponseValue;
9440 // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
9441 export function ChannelMessageHandler_free(this_ptr: number): void {
9442 if(!isWasmInitialized) {
9443 throw new Error("initializeWasm() must be awaited first!");
9445 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
9446 // debug statements here
9448 // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
9449 export function RoutingMessageHandler_free(this_ptr: number): void {
9450 if(!isWasmInitialized) {
9451 throw new Error("initializeWasm() must be awaited first!");
9453 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
9454 // debug statements here
9456 // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
9457 export function AcceptChannel_write(obj: number): Uint8Array {
9458 if(!isWasmInitialized) {
9459 throw new Error("initializeWasm() must be awaited first!");
9461 const nativeResponseValue = wasm.AcceptChannel_write(obj);
9462 return decodeArray(nativeResponseValue);
9464 // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
9465 export function AcceptChannel_read(ser: Uint8Array): number {
9466 if(!isWasmInitialized) {
9467 throw new Error("initializeWasm() must be awaited first!");
9469 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
9470 return nativeResponseValue;
9472 // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
9473 export function AnnouncementSignatures_write(obj: number): Uint8Array {
9474 if(!isWasmInitialized) {
9475 throw new Error("initializeWasm() must be awaited first!");
9477 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
9478 return decodeArray(nativeResponseValue);
9480 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
9481 export function AnnouncementSignatures_read(ser: Uint8Array): number {
9482 if(!isWasmInitialized) {
9483 throw new Error("initializeWasm() must be awaited first!");
9485 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
9486 return nativeResponseValue;
9488 // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
9489 export function ChannelReestablish_write(obj: number): Uint8Array {
9490 if(!isWasmInitialized) {
9491 throw new Error("initializeWasm() must be awaited first!");
9493 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
9494 return decodeArray(nativeResponseValue);
9496 // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
9497 export function ChannelReestablish_read(ser: Uint8Array): number {
9498 if(!isWasmInitialized) {
9499 throw new Error("initializeWasm() must be awaited first!");
9501 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
9502 return nativeResponseValue;
9504 // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
9505 export function ClosingSigned_write(obj: number): Uint8Array {
9506 if(!isWasmInitialized) {
9507 throw new Error("initializeWasm() must be awaited first!");
9509 const nativeResponseValue = wasm.ClosingSigned_write(obj);
9510 return decodeArray(nativeResponseValue);
9512 // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
9513 export function ClosingSigned_read(ser: Uint8Array): number {
9514 if(!isWasmInitialized) {
9515 throw new Error("initializeWasm() must be awaited first!");
9517 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
9518 return nativeResponseValue;
9520 // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
9521 export function CommitmentSigned_write(obj: number): Uint8Array {
9522 if(!isWasmInitialized) {
9523 throw new Error("initializeWasm() must be awaited first!");
9525 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
9526 return decodeArray(nativeResponseValue);
9528 // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
9529 export function CommitmentSigned_read(ser: Uint8Array): number {
9530 if(!isWasmInitialized) {
9531 throw new Error("initializeWasm() must be awaited first!");
9533 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
9534 return nativeResponseValue;
9536 // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
9537 export function FundingCreated_write(obj: number): Uint8Array {
9538 if(!isWasmInitialized) {
9539 throw new Error("initializeWasm() must be awaited first!");
9541 const nativeResponseValue = wasm.FundingCreated_write(obj);
9542 return decodeArray(nativeResponseValue);
9544 // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
9545 export function FundingCreated_read(ser: Uint8Array): number {
9546 if(!isWasmInitialized) {
9547 throw new Error("initializeWasm() must be awaited first!");
9549 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
9550 return nativeResponseValue;
9552 // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
9553 export function FundingSigned_write(obj: number): Uint8Array {
9554 if(!isWasmInitialized) {
9555 throw new Error("initializeWasm() must be awaited first!");
9557 const nativeResponseValue = wasm.FundingSigned_write(obj);
9558 return decodeArray(nativeResponseValue);
9560 // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
9561 export function FundingSigned_read(ser: Uint8Array): number {
9562 if(!isWasmInitialized) {
9563 throw new Error("initializeWasm() must be awaited first!");
9565 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
9566 return nativeResponseValue;
9568 // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
9569 export function FundingLocked_write(obj: number): Uint8Array {
9570 if(!isWasmInitialized) {
9571 throw new Error("initializeWasm() must be awaited first!");
9573 const nativeResponseValue = wasm.FundingLocked_write(obj);
9574 return decodeArray(nativeResponseValue);
9576 // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
9577 export function FundingLocked_read(ser: Uint8Array): number {
9578 if(!isWasmInitialized) {
9579 throw new Error("initializeWasm() must be awaited first!");
9581 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
9582 return nativeResponseValue;
9584 // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
9585 export function Init_write(obj: number): Uint8Array {
9586 if(!isWasmInitialized) {
9587 throw new Error("initializeWasm() must be awaited first!");
9589 const nativeResponseValue = wasm.Init_write(obj);
9590 return decodeArray(nativeResponseValue);
9592 // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
9593 export function Init_read(ser: Uint8Array): number {
9594 if(!isWasmInitialized) {
9595 throw new Error("initializeWasm() must be awaited first!");
9597 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
9598 return nativeResponseValue;
9600 // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
9601 export function OpenChannel_write(obj: number): Uint8Array {
9602 if(!isWasmInitialized) {
9603 throw new Error("initializeWasm() must be awaited first!");
9605 const nativeResponseValue = wasm.OpenChannel_write(obj);
9606 return decodeArray(nativeResponseValue);
9608 // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
9609 export function OpenChannel_read(ser: Uint8Array): number {
9610 if(!isWasmInitialized) {
9611 throw new Error("initializeWasm() must be awaited first!");
9613 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
9614 return nativeResponseValue;
9616 // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
9617 export function RevokeAndACK_write(obj: number): Uint8Array {
9618 if(!isWasmInitialized) {
9619 throw new Error("initializeWasm() must be awaited first!");
9621 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
9622 return decodeArray(nativeResponseValue);
9624 // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
9625 export function RevokeAndACK_read(ser: Uint8Array): number {
9626 if(!isWasmInitialized) {
9627 throw new Error("initializeWasm() must be awaited first!");
9629 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
9630 return nativeResponseValue;
9632 // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
9633 export function Shutdown_write(obj: number): Uint8Array {
9634 if(!isWasmInitialized) {
9635 throw new Error("initializeWasm() must be awaited first!");
9637 const nativeResponseValue = wasm.Shutdown_write(obj);
9638 return decodeArray(nativeResponseValue);
9640 // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
9641 export function Shutdown_read(ser: Uint8Array): number {
9642 if(!isWasmInitialized) {
9643 throw new Error("initializeWasm() must be awaited first!");
9645 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
9646 return nativeResponseValue;
9648 // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
9649 export function UpdateFailHTLC_write(obj: number): Uint8Array {
9650 if(!isWasmInitialized) {
9651 throw new Error("initializeWasm() must be awaited first!");
9653 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
9654 return decodeArray(nativeResponseValue);
9656 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
9657 export function UpdateFailHTLC_read(ser: Uint8Array): number {
9658 if(!isWasmInitialized) {
9659 throw new Error("initializeWasm() must be awaited first!");
9661 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
9662 return nativeResponseValue;
9664 // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
9665 export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
9666 if(!isWasmInitialized) {
9667 throw new Error("initializeWasm() must be awaited first!");
9669 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
9670 return decodeArray(nativeResponseValue);
9672 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
9673 export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
9674 if(!isWasmInitialized) {
9675 throw new Error("initializeWasm() must be awaited first!");
9677 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
9678 return nativeResponseValue;
9680 // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
9681 export function UpdateFee_write(obj: number): Uint8Array {
9682 if(!isWasmInitialized) {
9683 throw new Error("initializeWasm() must be awaited first!");
9685 const nativeResponseValue = wasm.UpdateFee_write(obj);
9686 return decodeArray(nativeResponseValue);
9688 // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
9689 export function UpdateFee_read(ser: Uint8Array): number {
9690 if(!isWasmInitialized) {
9691 throw new Error("initializeWasm() must be awaited first!");
9693 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
9694 return nativeResponseValue;
9696 // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
9697 export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
9698 if(!isWasmInitialized) {
9699 throw new Error("initializeWasm() must be awaited first!");
9701 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
9702 return decodeArray(nativeResponseValue);
9704 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
9705 export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
9706 if(!isWasmInitialized) {
9707 throw new Error("initializeWasm() must be awaited first!");
9709 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
9710 return nativeResponseValue;
9712 // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
9713 export function UpdateAddHTLC_write(obj: number): Uint8Array {
9714 if(!isWasmInitialized) {
9715 throw new Error("initializeWasm() must be awaited first!");
9717 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
9718 return decodeArray(nativeResponseValue);
9720 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
9721 export function UpdateAddHTLC_read(ser: Uint8Array): number {
9722 if(!isWasmInitialized) {
9723 throw new Error("initializeWasm() must be awaited first!");
9725 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
9726 return nativeResponseValue;
9728 // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
9729 export function Ping_write(obj: number): Uint8Array {
9730 if(!isWasmInitialized) {
9731 throw new Error("initializeWasm() must be awaited first!");
9733 const nativeResponseValue = wasm.Ping_write(obj);
9734 return decodeArray(nativeResponseValue);
9736 // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
9737 export function Ping_read(ser: Uint8Array): number {
9738 if(!isWasmInitialized) {
9739 throw new Error("initializeWasm() must be awaited first!");
9741 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
9742 return nativeResponseValue;
9744 // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
9745 export function Pong_write(obj: number): Uint8Array {
9746 if(!isWasmInitialized) {
9747 throw new Error("initializeWasm() must be awaited first!");
9749 const nativeResponseValue = wasm.Pong_write(obj);
9750 return decodeArray(nativeResponseValue);
9752 // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
9753 export function Pong_read(ser: Uint8Array): number {
9754 if(!isWasmInitialized) {
9755 throw new Error("initializeWasm() must be awaited first!");
9757 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
9758 return nativeResponseValue;
9760 // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
9761 export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
9762 if(!isWasmInitialized) {
9763 throw new Error("initializeWasm() must be awaited first!");
9765 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
9766 return decodeArray(nativeResponseValue);
9768 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
9769 export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
9770 if(!isWasmInitialized) {
9771 throw new Error("initializeWasm() must be awaited first!");
9773 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
9774 return nativeResponseValue;
9776 // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
9777 export function ChannelAnnouncement_write(obj: number): Uint8Array {
9778 if(!isWasmInitialized) {
9779 throw new Error("initializeWasm() must be awaited first!");
9781 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
9782 return decodeArray(nativeResponseValue);
9784 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
9785 export function ChannelAnnouncement_read(ser: Uint8Array): number {
9786 if(!isWasmInitialized) {
9787 throw new Error("initializeWasm() must be awaited first!");
9789 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
9790 return nativeResponseValue;
9792 // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
9793 export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
9794 if(!isWasmInitialized) {
9795 throw new Error("initializeWasm() must be awaited first!");
9797 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
9798 return decodeArray(nativeResponseValue);
9800 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
9801 export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
9802 if(!isWasmInitialized) {
9803 throw new Error("initializeWasm() must be awaited first!");
9805 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
9806 return nativeResponseValue;
9808 // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
9809 export function ChannelUpdate_write(obj: number): Uint8Array {
9810 if(!isWasmInitialized) {
9811 throw new Error("initializeWasm() must be awaited first!");
9813 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
9814 return decodeArray(nativeResponseValue);
9816 // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
9817 export function ChannelUpdate_read(ser: Uint8Array): number {
9818 if(!isWasmInitialized) {
9819 throw new Error("initializeWasm() must be awaited first!");
9821 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
9822 return nativeResponseValue;
9824 // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
9825 export function ErrorMessage_write(obj: number): Uint8Array {
9826 if(!isWasmInitialized) {
9827 throw new Error("initializeWasm() must be awaited first!");
9829 const nativeResponseValue = wasm.ErrorMessage_write(obj);
9830 return decodeArray(nativeResponseValue);
9832 // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
9833 export function ErrorMessage_read(ser: Uint8Array): number {
9834 if(!isWasmInitialized) {
9835 throw new Error("initializeWasm() must be awaited first!");
9837 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
9838 return nativeResponseValue;
9840 // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
9841 export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
9842 if(!isWasmInitialized) {
9843 throw new Error("initializeWasm() must be awaited first!");
9845 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
9846 return decodeArray(nativeResponseValue);
9848 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
9849 export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
9850 if(!isWasmInitialized) {
9851 throw new Error("initializeWasm() must be awaited first!");
9853 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
9854 return nativeResponseValue;
9856 // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
9857 export function NodeAnnouncement_write(obj: number): Uint8Array {
9858 if(!isWasmInitialized) {
9859 throw new Error("initializeWasm() must be awaited first!");
9861 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
9862 return decodeArray(nativeResponseValue);
9864 // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
9865 export function NodeAnnouncement_read(ser: Uint8Array): number {
9866 if(!isWasmInitialized) {
9867 throw new Error("initializeWasm() must be awaited first!");
9869 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
9870 return nativeResponseValue;
9872 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
9873 export function QueryShortChannelIds_read(ser: Uint8Array): number {
9874 if(!isWasmInitialized) {
9875 throw new Error("initializeWasm() must be awaited first!");
9877 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
9878 return nativeResponseValue;
9880 // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
9881 export function QueryShortChannelIds_write(obj: number): Uint8Array {
9882 if(!isWasmInitialized) {
9883 throw new Error("initializeWasm() must be awaited first!");
9885 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
9886 return decodeArray(nativeResponseValue);
9888 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
9889 export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
9890 if(!isWasmInitialized) {
9891 throw new Error("initializeWasm() must be awaited first!");
9893 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
9894 return nativeResponseValue;
9896 // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
9897 export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
9898 if(!isWasmInitialized) {
9899 throw new Error("initializeWasm() must be awaited first!");
9901 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
9902 return decodeArray(nativeResponseValue);
9904 // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
9905 export function QueryChannelRange_read(ser: Uint8Array): number {
9906 if(!isWasmInitialized) {
9907 throw new Error("initializeWasm() must be awaited first!");
9909 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
9910 return nativeResponseValue;
9912 // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
9913 export function QueryChannelRange_write(obj: number): Uint8Array {
9914 if(!isWasmInitialized) {
9915 throw new Error("initializeWasm() must be awaited first!");
9917 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
9918 return decodeArray(nativeResponseValue);
9920 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
9921 export function ReplyChannelRange_read(ser: Uint8Array): number {
9922 if(!isWasmInitialized) {
9923 throw new Error("initializeWasm() must be awaited first!");
9925 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
9926 return nativeResponseValue;
9928 // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
9929 export function ReplyChannelRange_write(obj: number): Uint8Array {
9930 if(!isWasmInitialized) {
9931 throw new Error("initializeWasm() must be awaited first!");
9933 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
9934 return decodeArray(nativeResponseValue);
9936 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
9937 export function GossipTimestampFilter_read(ser: Uint8Array): number {
9938 if(!isWasmInitialized) {
9939 throw new Error("initializeWasm() must be awaited first!");
9941 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
9942 return nativeResponseValue;
9944 // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
9945 export function GossipTimestampFilter_write(obj: number): Uint8Array {
9946 if(!isWasmInitialized) {
9947 throw new Error("initializeWasm() must be awaited first!");
9949 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
9950 return decodeArray(nativeResponseValue);
9952 // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
9953 export function IgnoringMessageHandler_free(this_obj: number): void {
9954 if(!isWasmInitialized) {
9955 throw new Error("initializeWasm() must be awaited first!");
9957 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
9958 // debug statements here
9960 // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
9961 export function IgnoringMessageHandler_new(): number {
9962 if(!isWasmInitialized) {
9963 throw new Error("initializeWasm() must be awaited first!");
9965 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
9966 return nativeResponseValue;
9968 // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
9969 export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
9970 if(!isWasmInitialized) {
9971 throw new Error("initializeWasm() must be awaited first!");
9973 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
9974 return nativeResponseValue;
9976 // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
9977 export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
9978 if(!isWasmInitialized) {
9979 throw new Error("initializeWasm() must be awaited first!");
9981 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
9982 return nativeResponseValue;
9984 // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
9985 export function ErroringMessageHandler_free(this_obj: number): void {
9986 if(!isWasmInitialized) {
9987 throw new Error("initializeWasm() must be awaited first!");
9989 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
9990 // debug statements here
9992 // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
9993 export function ErroringMessageHandler_new(): number {
9994 if(!isWasmInitialized) {
9995 throw new Error("initializeWasm() must be awaited first!");
9997 const nativeResponseValue = wasm.ErroringMessageHandler_new();
9998 return nativeResponseValue;
10000 // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
10001 export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
10002 if(!isWasmInitialized) {
10003 throw new Error("initializeWasm() must be awaited first!");
10005 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
10006 return nativeResponseValue;
10008 // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
10009 export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
10010 if(!isWasmInitialized) {
10011 throw new Error("initializeWasm() must be awaited first!");
10013 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
10014 return nativeResponseValue;
10016 // void MessageHandler_free(struct LDKMessageHandler this_obj);
10017 export function MessageHandler_free(this_obj: number): void {
10018 if(!isWasmInitialized) {
10019 throw new Error("initializeWasm() must be awaited first!");
10021 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
10022 // debug statements here
10024 // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10025 export function MessageHandler_get_chan_handler(this_ptr: number): number {
10026 if(!isWasmInitialized) {
10027 throw new Error("initializeWasm() must be awaited first!");
10029 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
10030 return nativeResponseValue;
10032 // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
10033 export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
10034 if(!isWasmInitialized) {
10035 throw new Error("initializeWasm() must be awaited first!");
10037 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
10038 // debug statements here
10040 // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10041 export function MessageHandler_get_route_handler(this_ptr: number): number {
10042 if(!isWasmInitialized) {
10043 throw new Error("initializeWasm() must be awaited first!");
10045 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
10046 return nativeResponseValue;
10048 // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
10049 export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
10050 if(!isWasmInitialized) {
10051 throw new Error("initializeWasm() must be awaited first!");
10053 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
10054 // debug statements here
10056 // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
10057 export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
10058 if(!isWasmInitialized) {
10059 throw new Error("initializeWasm() must be awaited first!");
10061 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
10062 return nativeResponseValue;
10064 // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
10065 export function SocketDescriptor_clone(orig: number): number {
10066 if(!isWasmInitialized) {
10067 throw new Error("initializeWasm() must be awaited first!");
10069 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
10070 return nativeResponseValue;
10072 // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
10073 export function SocketDescriptor_free(this_ptr: number): void {
10074 if(!isWasmInitialized) {
10075 throw new Error("initializeWasm() must be awaited first!");
10077 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
10078 // debug statements here
10080 // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
10081 export function PeerHandleError_free(this_obj: number): void {
10082 if(!isWasmInitialized) {
10083 throw new Error("initializeWasm() must be awaited first!");
10085 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
10086 // debug statements here
10088 // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
10089 export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
10090 if(!isWasmInitialized) {
10091 throw new Error("initializeWasm() must be awaited first!");
10093 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
10094 return nativeResponseValue;
10096 // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
10097 export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
10098 if(!isWasmInitialized) {
10099 throw new Error("initializeWasm() must be awaited first!");
10101 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
10102 // debug statements here
10104 // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
10105 export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
10106 if(!isWasmInitialized) {
10107 throw new Error("initializeWasm() must be awaited first!");
10109 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
10110 return nativeResponseValue;
10112 // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
10113 export function PeerHandleError_clone(orig: number): number {
10114 if(!isWasmInitialized) {
10115 throw new Error("initializeWasm() must be awaited first!");
10117 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
10118 return nativeResponseValue;
10120 // void PeerManager_free(struct LDKPeerManager this_obj);
10121 export function PeerManager_free(this_obj: number): void {
10122 if(!isWasmInitialized) {
10123 throw new Error("initializeWasm() must be awaited first!");
10125 const nativeResponseValue = wasm.PeerManager_free(this_obj);
10126 // debug statements here
10128 // 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);
10129 export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
10130 if(!isWasmInitialized) {
10131 throw new Error("initializeWasm() must be awaited first!");
10133 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
10134 return nativeResponseValue;
10136 // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
10137 export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
10138 if(!isWasmInitialized) {
10139 throw new Error("initializeWasm() must be awaited first!");
10141 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
10142 return nativeResponseValue;
10144 // 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);
10145 export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
10146 if(!isWasmInitialized) {
10147 throw new Error("initializeWasm() must be awaited first!");
10149 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
10150 return nativeResponseValue;
10152 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
10153 export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
10154 if(!isWasmInitialized) {
10155 throw new Error("initializeWasm() must be awaited first!");
10157 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
10158 return nativeResponseValue;
10160 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10161 export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
10162 if(!isWasmInitialized) {
10163 throw new Error("initializeWasm() must be awaited first!");
10165 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
10166 return nativeResponseValue;
10168 // 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);
10169 export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
10170 if(!isWasmInitialized) {
10171 throw new Error("initializeWasm() must be awaited first!");
10173 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
10174 return nativeResponseValue;
10176 // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
10177 export function PeerManager_process_events(this_arg: number): void {
10178 if(!isWasmInitialized) {
10179 throw new Error("initializeWasm() must be awaited first!");
10181 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
10182 // debug statements here
10184 // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10185 export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
10186 if(!isWasmInitialized) {
10187 throw new Error("initializeWasm() must be awaited first!");
10189 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
10190 // debug statements here
10192 // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
10193 export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
10194 if(!isWasmInitialized) {
10195 throw new Error("initializeWasm() must be awaited first!");
10197 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
10198 // debug statements here
10200 // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
10201 export function PeerManager_timer_tick_occurred(this_arg: number): void {
10202 if(!isWasmInitialized) {
10203 throw new Error("initializeWasm() must be awaited first!");
10205 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
10206 // debug statements here
10208 // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
10209 export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
10210 if(!isWasmInitialized) {
10211 throw new Error("initializeWasm() must be awaited first!");
10213 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
10214 return decodeArray(nativeResponseValue);
10216 // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
10217 export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
10218 if(!isWasmInitialized) {
10219 throw new Error("initializeWasm() must be awaited first!");
10221 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
10222 return nativeResponseValue;
10224 // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
10225 export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
10226 if(!isWasmInitialized) {
10227 throw new Error("initializeWasm() must be awaited first!");
10229 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
10230 return nativeResponseValue;
10232 // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
10233 export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
10234 if(!isWasmInitialized) {
10235 throw new Error("initializeWasm() must be awaited first!");
10237 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
10238 return nativeResponseValue;
10240 // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
10241 export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
10242 if(!isWasmInitialized) {
10243 throw new Error("initializeWasm() must be awaited first!");
10245 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
10246 return nativeResponseValue;
10248 // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
10249 export function TxCreationKeys_free(this_obj: number): void {
10250 if(!isWasmInitialized) {
10251 throw new Error("initializeWasm() must be awaited first!");
10253 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
10254 // debug statements here
10256 // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10257 export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
10258 if(!isWasmInitialized) {
10259 throw new Error("initializeWasm() must be awaited first!");
10261 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
10262 return decodeArray(nativeResponseValue);
10264 // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10265 export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10266 if(!isWasmInitialized) {
10267 throw new Error("initializeWasm() must be awaited first!");
10269 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
10270 // debug statements here
10272 // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10273 export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
10274 if(!isWasmInitialized) {
10275 throw new Error("initializeWasm() must be awaited first!");
10277 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
10278 return decodeArray(nativeResponseValue);
10280 // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10281 export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
10282 if(!isWasmInitialized) {
10283 throw new Error("initializeWasm() must be awaited first!");
10285 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
10286 // debug statements here
10288 // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10289 export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
10290 if(!isWasmInitialized) {
10291 throw new Error("initializeWasm() must be awaited first!");
10293 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
10294 return decodeArray(nativeResponseValue);
10296 // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10297 export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
10298 if(!isWasmInitialized) {
10299 throw new Error("initializeWasm() must be awaited first!");
10301 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
10302 // debug statements here
10304 // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10305 export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
10306 if(!isWasmInitialized) {
10307 throw new Error("initializeWasm() must be awaited first!");
10309 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
10310 return decodeArray(nativeResponseValue);
10312 // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10313 export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
10314 if(!isWasmInitialized) {
10315 throw new Error("initializeWasm() must be awaited first!");
10317 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
10318 // debug statements here
10320 // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10321 export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
10322 if(!isWasmInitialized) {
10323 throw new Error("initializeWasm() must be awaited first!");
10325 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
10326 return decodeArray(nativeResponseValue);
10328 // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10329 export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
10330 if(!isWasmInitialized) {
10331 throw new Error("initializeWasm() must be awaited first!");
10333 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
10334 // debug statements here
10336 // 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);
10337 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 {
10338 if(!isWasmInitialized) {
10339 throw new Error("initializeWasm() must be awaited first!");
10341 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));
10342 return nativeResponseValue;
10344 // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
10345 export function TxCreationKeys_clone(orig: number): number {
10346 if(!isWasmInitialized) {
10347 throw new Error("initializeWasm() must be awaited first!");
10349 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
10350 return nativeResponseValue;
10352 // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
10353 export function TxCreationKeys_write(obj: number): Uint8Array {
10354 if(!isWasmInitialized) {
10355 throw new Error("initializeWasm() must be awaited first!");
10357 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
10358 return decodeArray(nativeResponseValue);
10360 // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
10361 export function TxCreationKeys_read(ser: Uint8Array): number {
10362 if(!isWasmInitialized) {
10363 throw new Error("initializeWasm() must be awaited first!");
10365 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
10366 return nativeResponseValue;
10368 // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
10369 export function ChannelPublicKeys_free(this_obj: number): void {
10370 if(!isWasmInitialized) {
10371 throw new Error("initializeWasm() must be awaited first!");
10373 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
10374 // debug statements here
10376 // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10377 export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
10378 if(!isWasmInitialized) {
10379 throw new Error("initializeWasm() must be awaited first!");
10381 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
10382 return decodeArray(nativeResponseValue);
10384 // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10385 export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10386 if(!isWasmInitialized) {
10387 throw new Error("initializeWasm() must be awaited first!");
10389 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
10390 // debug statements here
10392 // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10393 export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
10394 if(!isWasmInitialized) {
10395 throw new Error("initializeWasm() must be awaited first!");
10397 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
10398 return decodeArray(nativeResponseValue);
10400 // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10401 export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10402 if(!isWasmInitialized) {
10403 throw new Error("initializeWasm() must be awaited first!");
10405 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
10406 // debug statements here
10408 // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10409 export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
10410 if(!isWasmInitialized) {
10411 throw new Error("initializeWasm() must be awaited first!");
10413 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
10414 return decodeArray(nativeResponseValue);
10416 // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10417 export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
10418 if(!isWasmInitialized) {
10419 throw new Error("initializeWasm() must be awaited first!");
10421 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
10422 // debug statements here
10424 // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10425 export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10426 if(!isWasmInitialized) {
10427 throw new Error("initializeWasm() must be awaited first!");
10429 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
10430 return decodeArray(nativeResponseValue);
10432 // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10433 export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10434 if(!isWasmInitialized) {
10435 throw new Error("initializeWasm() must be awaited first!");
10437 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10438 // debug statements here
10440 // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10441 export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
10442 if(!isWasmInitialized) {
10443 throw new Error("initializeWasm() must be awaited first!");
10445 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
10446 return decodeArray(nativeResponseValue);
10448 // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10449 export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10450 if(!isWasmInitialized) {
10451 throw new Error("initializeWasm() must be awaited first!");
10453 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
10454 // debug statements here
10456 // 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);
10457 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 {
10458 if(!isWasmInitialized) {
10459 throw new Error("initializeWasm() must be awaited first!");
10461 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));
10462 return nativeResponseValue;
10464 // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
10465 export function ChannelPublicKeys_clone(orig: number): number {
10466 if(!isWasmInitialized) {
10467 throw new Error("initializeWasm() must be awaited first!");
10469 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
10470 return nativeResponseValue;
10472 // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
10473 export function ChannelPublicKeys_write(obj: number): Uint8Array {
10474 if(!isWasmInitialized) {
10475 throw new Error("initializeWasm() must be awaited first!");
10477 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
10478 return decodeArray(nativeResponseValue);
10480 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
10481 export function ChannelPublicKeys_read(ser: Uint8Array): number {
10482 if(!isWasmInitialized) {
10483 throw new Error("initializeWasm() must be awaited first!");
10485 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
10486 return nativeResponseValue;
10488 // 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);
10489 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 {
10490 if(!isWasmInitialized) {
10491 throw new Error("initializeWasm() must be awaited first!");
10493 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));
10494 return nativeResponseValue;
10496 // 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);
10497 export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
10498 if(!isWasmInitialized) {
10499 throw new Error("initializeWasm() must be awaited first!");
10501 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
10502 return nativeResponseValue;
10504 // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
10505 export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
10506 if(!isWasmInitialized) {
10507 throw new Error("initializeWasm() must be awaited first!");
10509 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
10510 return decodeArray(nativeResponseValue);
10512 // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
10513 export function HTLCOutputInCommitment_free(this_obj: number): void {
10514 if(!isWasmInitialized) {
10515 throw new Error("initializeWasm() must be awaited first!");
10517 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
10518 // debug statements here
10520 // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10521 export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
10522 if(!isWasmInitialized) {
10523 throw new Error("initializeWasm() must be awaited first!");
10525 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
10526 return nativeResponseValue;
10528 // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
10529 export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
10530 if(!isWasmInitialized) {
10531 throw new Error("initializeWasm() must be awaited first!");
10533 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
10534 // debug statements here
10536 // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10537 export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
10538 if(!isWasmInitialized) {
10539 throw new Error("initializeWasm() must be awaited first!");
10541 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
10542 return nativeResponseValue;
10544 // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
10545 export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
10546 if(!isWasmInitialized) {
10547 throw new Error("initializeWasm() must be awaited first!");
10549 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
10550 // debug statements here
10552 // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10553 export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
10554 if(!isWasmInitialized) {
10555 throw new Error("initializeWasm() must be awaited first!");
10557 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
10558 return nativeResponseValue;
10560 // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
10561 export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
10562 if(!isWasmInitialized) {
10563 throw new Error("initializeWasm() must be awaited first!");
10565 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
10566 // debug statements here
10568 // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
10569 export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
10570 if(!isWasmInitialized) {
10571 throw new Error("initializeWasm() must be awaited first!");
10573 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
10574 return decodeArray(nativeResponseValue);
10576 // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10577 export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
10578 if(!isWasmInitialized) {
10579 throw new Error("initializeWasm() must be awaited first!");
10581 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
10582 // debug statements here
10584 // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
10585 export function HTLCOutputInCommitment_clone(orig: number): number {
10586 if(!isWasmInitialized) {
10587 throw new Error("initializeWasm() must be awaited first!");
10589 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
10590 return nativeResponseValue;
10592 // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
10593 export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
10594 if(!isWasmInitialized) {
10595 throw new Error("initializeWasm() must be awaited first!");
10597 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
10598 return decodeArray(nativeResponseValue);
10600 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
10601 export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
10602 if(!isWasmInitialized) {
10603 throw new Error("initializeWasm() must be awaited first!");
10605 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
10606 return nativeResponseValue;
10608 // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
10609 export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
10610 if(!isWasmInitialized) {
10611 throw new Error("initializeWasm() must be awaited first!");
10613 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
10614 return decodeArray(nativeResponseValue);
10616 // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
10617 export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
10618 if(!isWasmInitialized) {
10619 throw new Error("initializeWasm() must be awaited first!");
10621 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
10622 return decodeArray(nativeResponseValue);
10624 // struct LDKTransaction build_htlc_transaction(const uint8_t (*prev_hash)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, struct LDKPublicKey broadcaster_delayed_payment_key, struct LDKPublicKey revocation_key);
10625 export function build_htlc_transaction(prev_hash: Uint8Array, feerate_per_kw: number, contest_delay: number, htlc: number, broadcaster_delayed_payment_key: Uint8Array, revocation_key: Uint8Array): Uint8Array {
10626 if(!isWasmInitialized) {
10627 throw new Error("initializeWasm() must be awaited first!");
10629 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(prev_hash), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
10630 return decodeArray(nativeResponseValue);
10632 // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
10633 export function ChannelTransactionParameters_free(this_obj: number): void {
10634 if(!isWasmInitialized) {
10635 throw new Error("initializeWasm() must be awaited first!");
10637 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
10638 // debug statements here
10640 // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10641 export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
10642 if(!isWasmInitialized) {
10643 throw new Error("initializeWasm() must be awaited first!");
10645 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
10646 return nativeResponseValue;
10648 // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
10649 export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
10650 if(!isWasmInitialized) {
10651 throw new Error("initializeWasm() must be awaited first!");
10653 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
10654 // debug statements here
10656 // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10657 export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
10658 if(!isWasmInitialized) {
10659 throw new Error("initializeWasm() must be awaited first!");
10661 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
10662 return nativeResponseValue;
10664 // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10665 export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
10666 if(!isWasmInitialized) {
10667 throw new Error("initializeWasm() must be awaited first!");
10669 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
10670 // debug statements here
10672 // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10673 export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
10674 if(!isWasmInitialized) {
10675 throw new Error("initializeWasm() must be awaited first!");
10677 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
10678 return nativeResponseValue;
10680 // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
10681 export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
10682 if(!isWasmInitialized) {
10683 throw new Error("initializeWasm() must be awaited first!");
10685 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
10686 // debug statements here
10688 // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10689 export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
10690 if(!isWasmInitialized) {
10691 throw new Error("initializeWasm() must be awaited first!");
10693 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
10694 return nativeResponseValue;
10696 // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
10697 export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
10698 if(!isWasmInitialized) {
10699 throw new Error("initializeWasm() must be awaited first!");
10701 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
10702 // debug statements here
10704 // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10705 export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
10706 if(!isWasmInitialized) {
10707 throw new Error("initializeWasm() must be awaited first!");
10709 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
10710 return nativeResponseValue;
10712 // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
10713 export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
10714 if(!isWasmInitialized) {
10715 throw new Error("initializeWasm() must be awaited first!");
10717 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
10718 // debug statements here
10720 // 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);
10721 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 {
10722 if(!isWasmInitialized) {
10723 throw new Error("initializeWasm() must be awaited first!");
10725 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
10726 return nativeResponseValue;
10728 // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
10729 export function ChannelTransactionParameters_clone(orig: number): number {
10730 if(!isWasmInitialized) {
10731 throw new Error("initializeWasm() must be awaited first!");
10733 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
10734 return nativeResponseValue;
10736 // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
10737 export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
10738 if(!isWasmInitialized) {
10739 throw new Error("initializeWasm() must be awaited first!");
10741 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
10742 // debug statements here
10744 // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
10745 export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
10746 if(!isWasmInitialized) {
10747 throw new Error("initializeWasm() must be awaited first!");
10749 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
10750 return nativeResponseValue;
10752 // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
10753 export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
10754 if(!isWasmInitialized) {
10755 throw new Error("initializeWasm() must be awaited first!");
10757 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
10758 // debug statements here
10760 // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
10761 export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
10762 if(!isWasmInitialized) {
10763 throw new Error("initializeWasm() must be awaited first!");
10765 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
10766 return nativeResponseValue;
10768 // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10769 export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
10770 if(!isWasmInitialized) {
10771 throw new Error("initializeWasm() must be awaited first!");
10773 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
10774 // debug statements here
10776 // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
10777 export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
10778 if(!isWasmInitialized) {
10779 throw new Error("initializeWasm() must be awaited first!");
10781 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
10782 return nativeResponseValue;
10784 // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
10785 export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
10786 if(!isWasmInitialized) {
10787 throw new Error("initializeWasm() must be awaited first!");
10789 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
10790 return nativeResponseValue;
10792 // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10793 export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
10794 if(!isWasmInitialized) {
10795 throw new Error("initializeWasm() must be awaited first!");
10797 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
10798 return nativeResponseValue;
10800 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10801 export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
10802 if(!isWasmInitialized) {
10803 throw new Error("initializeWasm() must be awaited first!");
10805 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
10806 return nativeResponseValue;
10808 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10809 export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
10810 if(!isWasmInitialized) {
10811 throw new Error("initializeWasm() must be awaited first!");
10813 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
10814 return nativeResponseValue;
10816 // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
10817 export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
10818 if(!isWasmInitialized) {
10819 throw new Error("initializeWasm() must be awaited first!");
10821 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
10822 return decodeArray(nativeResponseValue);
10824 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
10825 export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
10826 if(!isWasmInitialized) {
10827 throw new Error("initializeWasm() must be awaited first!");
10829 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
10830 return nativeResponseValue;
10832 // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
10833 export function ChannelTransactionParameters_write(obj: number): Uint8Array {
10834 if(!isWasmInitialized) {
10835 throw new Error("initializeWasm() must be awaited first!");
10837 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
10838 return decodeArray(nativeResponseValue);
10840 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
10841 export function ChannelTransactionParameters_read(ser: Uint8Array): number {
10842 if(!isWasmInitialized) {
10843 throw new Error("initializeWasm() must be awaited first!");
10845 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
10846 return nativeResponseValue;
10848 // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
10849 export function DirectedChannelTransactionParameters_free(this_obj: number): void {
10850 if(!isWasmInitialized) {
10851 throw new Error("initializeWasm() must be awaited first!");
10853 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
10854 // debug statements here
10856 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10857 export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
10858 if(!isWasmInitialized) {
10859 throw new Error("initializeWasm() must be awaited first!");
10861 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
10862 return nativeResponseValue;
10864 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10865 export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
10866 if(!isWasmInitialized) {
10867 throw new Error("initializeWasm() must be awaited first!");
10869 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
10870 return nativeResponseValue;
10872 // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10873 export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
10874 if(!isWasmInitialized) {
10875 throw new Error("initializeWasm() must be awaited first!");
10877 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
10878 return nativeResponseValue;
10880 // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10881 export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
10882 if(!isWasmInitialized) {
10883 throw new Error("initializeWasm() must be awaited first!");
10885 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
10886 return nativeResponseValue;
10888 // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10889 export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
10890 if(!isWasmInitialized) {
10891 throw new Error("initializeWasm() must be awaited first!");
10893 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
10894 return nativeResponseValue;
10896 // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
10897 export function HolderCommitmentTransaction_free(this_obj: number): void {
10898 if(!isWasmInitialized) {
10899 throw new Error("initializeWasm() must be awaited first!");
10901 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
10902 // debug statements here
10904 // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
10905 export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
10906 if(!isWasmInitialized) {
10907 throw new Error("initializeWasm() must be awaited first!");
10909 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
10910 return decodeArray(nativeResponseValue);
10912 // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
10913 export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
10914 if(!isWasmInitialized) {
10915 throw new Error("initializeWasm() must be awaited first!");
10917 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
10918 // debug statements here
10920 // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
10921 export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
10922 if(!isWasmInitialized) {
10923 throw new Error("initializeWasm() must be awaited first!");
10925 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
10926 // debug statements here
10928 // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
10929 export function HolderCommitmentTransaction_clone(orig: number): number {
10930 if(!isWasmInitialized) {
10931 throw new Error("initializeWasm() must be awaited first!");
10933 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
10934 return nativeResponseValue;
10936 // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
10937 export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
10938 if(!isWasmInitialized) {
10939 throw new Error("initializeWasm() must be awaited first!");
10941 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
10942 return decodeArray(nativeResponseValue);
10944 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
10945 export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
10946 if(!isWasmInitialized) {
10947 throw new Error("initializeWasm() must be awaited first!");
10949 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
10950 return nativeResponseValue;
10952 // 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);
10953 export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
10954 if(!isWasmInitialized) {
10955 throw new Error("initializeWasm() must be awaited first!");
10957 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
10958 return nativeResponseValue;
10960 // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
10961 export function BuiltCommitmentTransaction_free(this_obj: number): void {
10962 if(!isWasmInitialized) {
10963 throw new Error("initializeWasm() must be awaited first!");
10965 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
10966 // debug statements here
10968 // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
10969 export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
10970 if(!isWasmInitialized) {
10971 throw new Error("initializeWasm() must be awaited first!");
10973 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
10974 return decodeArray(nativeResponseValue);
10976 // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
10977 export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
10978 if(!isWasmInitialized) {
10979 throw new Error("initializeWasm() must be awaited first!");
10981 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
10982 // debug statements here
10984 // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
10985 export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
10986 if(!isWasmInitialized) {
10987 throw new Error("initializeWasm() must be awaited first!");
10989 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
10990 return decodeArray(nativeResponseValue);
10992 // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10993 export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
10994 if(!isWasmInitialized) {
10995 throw new Error("initializeWasm() must be awaited first!");
10997 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
10998 // debug statements here
11000 // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
11001 export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
11002 if(!isWasmInitialized) {
11003 throw new Error("initializeWasm() must be awaited first!");
11005 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
11006 return nativeResponseValue;
11008 // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
11009 export function BuiltCommitmentTransaction_clone(orig: number): number {
11010 if(!isWasmInitialized) {
11011 throw new Error("initializeWasm() must be awaited first!");
11013 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
11014 return nativeResponseValue;
11016 // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
11017 export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
11018 if(!isWasmInitialized) {
11019 throw new Error("initializeWasm() must be awaited first!");
11021 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
11022 return decodeArray(nativeResponseValue);
11024 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
11025 export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
11026 if(!isWasmInitialized) {
11027 throw new Error("initializeWasm() must be awaited first!");
11029 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
11030 return nativeResponseValue;
11032 // 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);
11033 export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11034 if(!isWasmInitialized) {
11035 throw new Error("initializeWasm() must be awaited first!");
11037 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
11038 return decodeArray(nativeResponseValue);
11040 // 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);
11041 export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11042 if(!isWasmInitialized) {
11043 throw new Error("initializeWasm() must be awaited first!");
11045 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
11046 return decodeArray(nativeResponseValue);
11048 // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
11049 export function CommitmentTransaction_free(this_obj: number): void {
11050 if(!isWasmInitialized) {
11051 throw new Error("initializeWasm() must be awaited first!");
11053 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
11054 // debug statements here
11056 // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
11057 export function CommitmentTransaction_clone(orig: number): number {
11058 if(!isWasmInitialized) {
11059 throw new Error("initializeWasm() must be awaited first!");
11061 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
11062 return nativeResponseValue;
11064 // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
11065 export function CommitmentTransaction_write(obj: number): Uint8Array {
11066 if(!isWasmInitialized) {
11067 throw new Error("initializeWasm() must be awaited first!");
11069 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
11070 return decodeArray(nativeResponseValue);
11072 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
11073 export function CommitmentTransaction_read(ser: Uint8Array): number {
11074 if(!isWasmInitialized) {
11075 throw new Error("initializeWasm() must be awaited first!");
11077 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
11078 return nativeResponseValue;
11080 // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11081 export function CommitmentTransaction_commitment_number(this_arg: number): number {
11082 if(!isWasmInitialized) {
11083 throw new Error("initializeWasm() must be awaited first!");
11085 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
11086 return nativeResponseValue;
11088 // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11089 export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
11090 if(!isWasmInitialized) {
11091 throw new Error("initializeWasm() must be awaited first!");
11093 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
11094 return nativeResponseValue;
11096 // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11097 export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
11098 if(!isWasmInitialized) {
11099 throw new Error("initializeWasm() must be awaited first!");
11101 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
11102 return nativeResponseValue;
11104 // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11105 export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
11106 if(!isWasmInitialized) {
11107 throw new Error("initializeWasm() must be awaited first!");
11109 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
11110 return nativeResponseValue;
11112 // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11113 export function CommitmentTransaction_trust(this_arg: number): number {
11114 if(!isWasmInitialized) {
11115 throw new Error("initializeWasm() must be awaited first!");
11117 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
11118 return nativeResponseValue;
11120 // 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);
11121 export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
11122 if(!isWasmInitialized) {
11123 throw new Error("initializeWasm() must be awaited first!");
11125 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
11126 return nativeResponseValue;
11128 // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
11129 export function TrustedCommitmentTransaction_free(this_obj: number): void {
11130 if(!isWasmInitialized) {
11131 throw new Error("initializeWasm() must be awaited first!");
11133 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
11134 // debug statements here
11136 // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11137 export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
11138 if(!isWasmInitialized) {
11139 throw new Error("initializeWasm() must be awaited first!");
11141 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
11142 return decodeArray(nativeResponseValue);
11144 // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11145 export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
11146 if(!isWasmInitialized) {
11147 throw new Error("initializeWasm() must be awaited first!");
11149 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
11150 return nativeResponseValue;
11152 // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11153 export function TrustedCommitmentTransaction_keys(this_arg: number): number {
11154 if(!isWasmInitialized) {
11155 throw new Error("initializeWasm() must be awaited first!");
11157 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
11158 return nativeResponseValue;
11160 // 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);
11161 export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
11162 if(!isWasmInitialized) {
11163 throw new Error("initializeWasm() must be awaited first!");
11165 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
11166 return nativeResponseValue;
11168 // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
11169 export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
11170 if(!isWasmInitialized) {
11171 throw new Error("initializeWasm() must be awaited first!");
11173 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
11174 return nativeResponseValue;
11176 // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
11177 export function InitFeatures_clone(orig: number): number {
11178 if(!isWasmInitialized) {
11179 throw new Error("initializeWasm() must be awaited first!");
11181 const nativeResponseValue = wasm.InitFeatures_clone(orig);
11182 return nativeResponseValue;
11184 // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
11185 export function NodeFeatures_clone(orig: number): number {
11186 if(!isWasmInitialized) {
11187 throw new Error("initializeWasm() must be awaited first!");
11189 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
11190 return nativeResponseValue;
11192 // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
11193 export function ChannelFeatures_clone(orig: number): number {
11194 if(!isWasmInitialized) {
11195 throw new Error("initializeWasm() must be awaited first!");
11197 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
11198 return nativeResponseValue;
11200 // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
11201 export function InvoiceFeatures_clone(orig: number): number {
11202 if(!isWasmInitialized) {
11203 throw new Error("initializeWasm() must be awaited first!");
11205 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
11206 return nativeResponseValue;
11208 // void InitFeatures_free(struct LDKInitFeatures this_obj);
11209 export function InitFeatures_free(this_obj: number): void {
11210 if(!isWasmInitialized) {
11211 throw new Error("initializeWasm() must be awaited first!");
11213 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
11214 // debug statements here
11216 // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
11217 export function NodeFeatures_free(this_obj: number): void {
11218 if(!isWasmInitialized) {
11219 throw new Error("initializeWasm() must be awaited first!");
11221 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
11222 // debug statements here
11224 // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
11225 export function ChannelFeatures_free(this_obj: number): void {
11226 if(!isWasmInitialized) {
11227 throw new Error("initializeWasm() must be awaited first!");
11229 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
11230 // debug statements here
11232 // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
11233 export function InvoiceFeatures_free(this_obj: number): void {
11234 if(!isWasmInitialized) {
11235 throw new Error("initializeWasm() must be awaited first!");
11237 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
11238 // debug statements here
11240 // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
11241 export function InitFeatures_empty(): number {
11242 if(!isWasmInitialized) {
11243 throw new Error("initializeWasm() must be awaited first!");
11245 const nativeResponseValue = wasm.InitFeatures_empty();
11246 return nativeResponseValue;
11248 // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
11249 export function InitFeatures_known(): number {
11250 if(!isWasmInitialized) {
11251 throw new Error("initializeWasm() must be awaited first!");
11253 const nativeResponseValue = wasm.InitFeatures_known();
11254 return nativeResponseValue;
11256 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
11257 export function NodeFeatures_empty(): number {
11258 if(!isWasmInitialized) {
11259 throw new Error("initializeWasm() must be awaited first!");
11261 const nativeResponseValue = wasm.NodeFeatures_empty();
11262 return nativeResponseValue;
11264 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
11265 export function NodeFeatures_known(): number {
11266 if(!isWasmInitialized) {
11267 throw new Error("initializeWasm() must be awaited first!");
11269 const nativeResponseValue = wasm.NodeFeatures_known();
11270 return nativeResponseValue;
11272 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
11273 export function ChannelFeatures_empty(): number {
11274 if(!isWasmInitialized) {
11275 throw new Error("initializeWasm() must be awaited first!");
11277 const nativeResponseValue = wasm.ChannelFeatures_empty();
11278 return nativeResponseValue;
11280 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
11281 export function ChannelFeatures_known(): number {
11282 if(!isWasmInitialized) {
11283 throw new Error("initializeWasm() must be awaited first!");
11285 const nativeResponseValue = wasm.ChannelFeatures_known();
11286 return nativeResponseValue;
11288 // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
11289 export function InvoiceFeatures_empty(): number {
11290 if(!isWasmInitialized) {
11291 throw new Error("initializeWasm() must be awaited first!");
11293 const nativeResponseValue = wasm.InvoiceFeatures_empty();
11294 return nativeResponseValue;
11296 // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
11297 export function InvoiceFeatures_known(): number {
11298 if(!isWasmInitialized) {
11299 throw new Error("initializeWasm() must be awaited first!");
11301 const nativeResponseValue = wasm.InvoiceFeatures_known();
11302 return nativeResponseValue;
11304 // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
11305 export function InitFeatures_write(obj: number): Uint8Array {
11306 if(!isWasmInitialized) {
11307 throw new Error("initializeWasm() must be awaited first!");
11309 const nativeResponseValue = wasm.InitFeatures_write(obj);
11310 return decodeArray(nativeResponseValue);
11312 // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
11313 export function NodeFeatures_write(obj: number): Uint8Array {
11314 if(!isWasmInitialized) {
11315 throw new Error("initializeWasm() must be awaited first!");
11317 const nativeResponseValue = wasm.NodeFeatures_write(obj);
11318 return decodeArray(nativeResponseValue);
11320 // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
11321 export function ChannelFeatures_write(obj: number): Uint8Array {
11322 if(!isWasmInitialized) {
11323 throw new Error("initializeWasm() must be awaited first!");
11325 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
11326 return decodeArray(nativeResponseValue);
11328 // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
11329 export function InvoiceFeatures_write(obj: number): Uint8Array {
11330 if(!isWasmInitialized) {
11331 throw new Error("initializeWasm() must be awaited first!");
11333 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
11334 return decodeArray(nativeResponseValue);
11336 // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
11337 export function InitFeatures_read(ser: Uint8Array): number {
11338 if(!isWasmInitialized) {
11339 throw new Error("initializeWasm() must be awaited first!");
11341 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
11342 return nativeResponseValue;
11344 // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
11345 export function NodeFeatures_read(ser: Uint8Array): number {
11346 if(!isWasmInitialized) {
11347 throw new Error("initializeWasm() must be awaited first!");
11349 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
11350 return nativeResponseValue;
11352 // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
11353 export function ChannelFeatures_read(ser: Uint8Array): number {
11354 if(!isWasmInitialized) {
11355 throw new Error("initializeWasm() must be awaited first!");
11357 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
11358 return nativeResponseValue;
11360 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
11361 export function InvoiceFeatures_read(ser: Uint8Array): number {
11362 if(!isWasmInitialized) {
11363 throw new Error("initializeWasm() must be awaited first!");
11365 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
11366 return nativeResponseValue;
11368 // void RouteHop_free(struct LDKRouteHop this_obj);
11369 export function RouteHop_free(this_obj: number): void {
11370 if(!isWasmInitialized) {
11371 throw new Error("initializeWasm() must be awaited first!");
11373 const nativeResponseValue = wasm.RouteHop_free(this_obj);
11374 // debug statements here
11376 // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11377 export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
11378 if(!isWasmInitialized) {
11379 throw new Error("initializeWasm() must be awaited first!");
11381 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
11382 return decodeArray(nativeResponseValue);
11384 // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11385 export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
11386 if(!isWasmInitialized) {
11387 throw new Error("initializeWasm() must be awaited first!");
11389 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
11390 // debug statements here
11392 // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11393 export function RouteHop_get_node_features(this_ptr: number): number {
11394 if(!isWasmInitialized) {
11395 throw new Error("initializeWasm() must be awaited first!");
11397 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
11398 return nativeResponseValue;
11400 // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11401 export function RouteHop_set_node_features(this_ptr: number, val: number): void {
11402 if(!isWasmInitialized) {
11403 throw new Error("initializeWasm() must be awaited first!");
11405 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
11406 // debug statements here
11408 // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11409 export function RouteHop_get_short_channel_id(this_ptr: number): number {
11410 if(!isWasmInitialized) {
11411 throw new Error("initializeWasm() must be awaited first!");
11413 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
11414 return nativeResponseValue;
11416 // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11417 export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
11418 if(!isWasmInitialized) {
11419 throw new Error("initializeWasm() must be awaited first!");
11421 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
11422 // debug statements here
11424 // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11425 export function RouteHop_get_channel_features(this_ptr: number): number {
11426 if(!isWasmInitialized) {
11427 throw new Error("initializeWasm() must be awaited first!");
11429 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
11430 return nativeResponseValue;
11432 // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11433 export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
11434 if(!isWasmInitialized) {
11435 throw new Error("initializeWasm() must be awaited first!");
11437 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
11438 // debug statements here
11440 // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11441 export function RouteHop_get_fee_msat(this_ptr: number): number {
11442 if(!isWasmInitialized) {
11443 throw new Error("initializeWasm() must be awaited first!");
11445 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
11446 return nativeResponseValue;
11448 // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11449 export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
11450 if(!isWasmInitialized) {
11451 throw new Error("initializeWasm() must be awaited first!");
11453 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
11454 // debug statements here
11456 // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11457 export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
11458 if(!isWasmInitialized) {
11459 throw new Error("initializeWasm() must be awaited first!");
11461 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
11462 return nativeResponseValue;
11464 // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
11465 export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11466 if(!isWasmInitialized) {
11467 throw new Error("initializeWasm() must be awaited first!");
11469 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
11470 // debug statements here
11472 // 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);
11473 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 {
11474 if(!isWasmInitialized) {
11475 throw new Error("initializeWasm() must be awaited first!");
11477 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);
11478 return nativeResponseValue;
11480 // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
11481 export function RouteHop_clone(orig: number): number {
11482 if(!isWasmInitialized) {
11483 throw new Error("initializeWasm() must be awaited first!");
11485 const nativeResponseValue = wasm.RouteHop_clone(orig);
11486 return nativeResponseValue;
11488 // void Route_free(struct LDKRoute this_obj);
11489 export function Route_free(this_obj: number): void {
11490 if(!isWasmInitialized) {
11491 throw new Error("initializeWasm() must be awaited first!");
11493 const nativeResponseValue = wasm.Route_free(this_obj);
11494 // debug statements here
11496 // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
11497 export function Route_set_paths(this_ptr: number, val: number[][]): void {
11498 if(!isWasmInitialized) {
11499 throw new Error("initializeWasm() must be awaited first!");
11501 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
11502 // debug statements here
11504 // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
11505 export function Route_new(paths_arg: number[][]): number {
11506 if(!isWasmInitialized) {
11507 throw new Error("initializeWasm() must be awaited first!");
11509 const nativeResponseValue = wasm.Route_new(paths_arg);
11510 return nativeResponseValue;
11512 // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
11513 export function Route_clone(orig: number): number {
11514 if(!isWasmInitialized) {
11515 throw new Error("initializeWasm() must be awaited first!");
11517 const nativeResponseValue = wasm.Route_clone(orig);
11518 return nativeResponseValue;
11520 // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
11521 export function Route_write(obj: number): Uint8Array {
11522 if(!isWasmInitialized) {
11523 throw new Error("initializeWasm() must be awaited first!");
11525 const nativeResponseValue = wasm.Route_write(obj);
11526 return decodeArray(nativeResponseValue);
11528 // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
11529 export function Route_read(ser: Uint8Array): number {
11530 if(!isWasmInitialized) {
11531 throw new Error("initializeWasm() must be awaited first!");
11533 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
11534 return nativeResponseValue;
11536 // void RouteHint_free(struct LDKRouteHint this_obj);
11537 export function RouteHint_free(this_obj: number): void {
11538 if(!isWasmInitialized) {
11539 throw new Error("initializeWasm() must be awaited first!");
11541 const nativeResponseValue = wasm.RouteHint_free(this_obj);
11542 // debug statements here
11544 // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11545 export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
11546 if(!isWasmInitialized) {
11547 throw new Error("initializeWasm() must be awaited first!");
11549 const nativeResponseValue = wasm.RouteHint_get_src_node_id(this_ptr);
11550 return decodeArray(nativeResponseValue);
11552 // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11553 export function RouteHint_set_src_node_id(this_ptr: number, val: Uint8Array): void {
11554 if(!isWasmInitialized) {
11555 throw new Error("initializeWasm() must be awaited first!");
11557 const nativeResponseValue = wasm.RouteHint_set_src_node_id(this_ptr, encodeArray(val));
11558 // debug statements here
11560 // uint64_t RouteHint_get_short_channel_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11561 export function RouteHint_get_short_channel_id(this_ptr: number): number {
11562 if(!isWasmInitialized) {
11563 throw new Error("initializeWasm() must be awaited first!");
11565 const nativeResponseValue = wasm.RouteHint_get_short_channel_id(this_ptr);
11566 return nativeResponseValue;
11568 // void RouteHint_set_short_channel_id(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
11569 export function RouteHint_set_short_channel_id(this_ptr: number, val: number): void {
11570 if(!isWasmInitialized) {
11571 throw new Error("initializeWasm() must be awaited first!");
11573 const nativeResponseValue = wasm.RouteHint_set_short_channel_id(this_ptr, val);
11574 // debug statements here
11576 // struct LDKRoutingFees RouteHint_get_fees(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11577 export function RouteHint_get_fees(this_ptr: number): number {
11578 if(!isWasmInitialized) {
11579 throw new Error("initializeWasm() must be awaited first!");
11581 const nativeResponseValue = wasm.RouteHint_get_fees(this_ptr);
11582 return nativeResponseValue;
11584 // void RouteHint_set_fees(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11585 export function RouteHint_set_fees(this_ptr: number, val: number): void {
11586 if(!isWasmInitialized) {
11587 throw new Error("initializeWasm() must be awaited first!");
11589 const nativeResponseValue = wasm.RouteHint_set_fees(this_ptr, val);
11590 // debug statements here
11592 // uint16_t RouteHint_get_cltv_expiry_delta(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11593 export function RouteHint_get_cltv_expiry_delta(this_ptr: number): number {
11594 if(!isWasmInitialized) {
11595 throw new Error("initializeWasm() must be awaited first!");
11597 const nativeResponseValue = wasm.RouteHint_get_cltv_expiry_delta(this_ptr);
11598 return nativeResponseValue;
11600 // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
11601 export function RouteHint_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11602 if(!isWasmInitialized) {
11603 throw new Error("initializeWasm() must be awaited first!");
11605 const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
11606 // debug statements here
11608 // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
11609 export function RouteHint_clone(orig: number): number {
11610 if(!isWasmInitialized) {
11611 throw new Error("initializeWasm() must be awaited first!");
11613 const nativeResponseValue = wasm.RouteHint_clone(orig);
11614 return nativeResponseValue;
11616 // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
11617 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 {
11618 if(!isWasmInitialized) {
11619 throw new Error("initializeWasm() must be awaited first!");
11621 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
11622 return nativeResponseValue;
11624 // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
11625 export function NetworkGraph_free(this_obj: number): void {
11626 if(!isWasmInitialized) {
11627 throw new Error("initializeWasm() must be awaited first!");
11629 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
11630 // debug statements here
11632 // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
11633 export function NetworkGraph_clone(orig: number): number {
11634 if(!isWasmInitialized) {
11635 throw new Error("initializeWasm() must be awaited first!");
11637 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
11638 return nativeResponseValue;
11640 // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
11641 export function LockedNetworkGraph_free(this_obj: number): void {
11642 if(!isWasmInitialized) {
11643 throw new Error("initializeWasm() must be awaited first!");
11645 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_obj);
11646 // debug statements here
11648 // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
11649 export function NetGraphMsgHandler_free(this_obj: number): void {
11650 if(!isWasmInitialized) {
11651 throw new Error("initializeWasm() must be awaited first!");
11653 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
11654 // debug statements here
11656 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
11657 export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
11658 if(!isWasmInitialized) {
11659 throw new Error("initializeWasm() must be awaited first!");
11661 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
11662 return nativeResponseValue;
11664 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
11665 export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
11666 if(!isWasmInitialized) {
11667 throw new Error("initializeWasm() must be awaited first!");
11669 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
11670 return nativeResponseValue;
11672 // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
11673 export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
11674 if(!isWasmInitialized) {
11675 throw new Error("initializeWasm() must be awaited first!");
11677 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
11678 // debug statements here
11680 // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11681 export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
11682 if(!isWasmInitialized) {
11683 throw new Error("initializeWasm() must be awaited first!");
11685 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
11686 return nativeResponseValue;
11688 // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
11689 export function LockedNetworkGraph_graph(this_arg: number): number {
11690 if(!isWasmInitialized) {
11691 throw new Error("initializeWasm() must be awaited first!");
11693 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
11694 return nativeResponseValue;
11696 // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11697 export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
11698 if(!isWasmInitialized) {
11699 throw new Error("initializeWasm() must be awaited first!");
11701 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
11702 return nativeResponseValue;
11704 // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11705 export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
11706 if(!isWasmInitialized) {
11707 throw new Error("initializeWasm() must be awaited first!");
11709 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
11710 return nativeResponseValue;
11712 // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
11713 export function DirectionalChannelInfo_free(this_obj: number): void {
11714 if(!isWasmInitialized) {
11715 throw new Error("initializeWasm() must be awaited first!");
11717 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
11718 // debug statements here
11720 // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11721 export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
11722 if(!isWasmInitialized) {
11723 throw new Error("initializeWasm() must be awaited first!");
11725 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
11726 return nativeResponseValue;
11728 // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
11729 export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
11730 if(!isWasmInitialized) {
11731 throw new Error("initializeWasm() must be awaited first!");
11733 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
11734 // debug statements here
11736 // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11737 export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
11738 if(!isWasmInitialized) {
11739 throw new Error("initializeWasm() must be awaited first!");
11741 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
11742 return nativeResponseValue;
11744 // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
11745 export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
11746 if(!isWasmInitialized) {
11747 throw new Error("initializeWasm() must be awaited first!");
11749 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
11750 // debug statements here
11752 // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11753 export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
11754 if(!isWasmInitialized) {
11755 throw new Error("initializeWasm() must be awaited first!");
11757 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
11758 return nativeResponseValue;
11760 // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
11761 export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11762 if(!isWasmInitialized) {
11763 throw new Error("initializeWasm() must be awaited first!");
11765 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
11766 // debug statements here
11768 // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11769 export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
11770 if(!isWasmInitialized) {
11771 throw new Error("initializeWasm() must be awaited first!");
11773 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
11774 return nativeResponseValue;
11776 // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
11777 export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
11778 if(!isWasmInitialized) {
11779 throw new Error("initializeWasm() must be awaited first!");
11781 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
11782 // debug statements here
11784 // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11785 export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
11786 if(!isWasmInitialized) {
11787 throw new Error("initializeWasm() must be awaited first!");
11789 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
11790 return nativeResponseValue;
11792 // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11793 export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
11794 if(!isWasmInitialized) {
11795 throw new Error("initializeWasm() must be awaited first!");
11797 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
11798 // debug statements here
11800 // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11801 export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
11802 if(!isWasmInitialized) {
11803 throw new Error("initializeWasm() must be awaited first!");
11805 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
11806 return nativeResponseValue;
11808 // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
11809 export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
11810 if(!isWasmInitialized) {
11811 throw new Error("initializeWasm() must be awaited first!");
11813 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
11814 // debug statements here
11816 // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
11817 export function DirectionalChannelInfo_clone(orig: number): number {
11818 if(!isWasmInitialized) {
11819 throw new Error("initializeWasm() must be awaited first!");
11821 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
11822 return nativeResponseValue;
11824 // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
11825 export function DirectionalChannelInfo_write(obj: number): Uint8Array {
11826 if(!isWasmInitialized) {
11827 throw new Error("initializeWasm() must be awaited first!");
11829 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
11830 return decodeArray(nativeResponseValue);
11832 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
11833 export function DirectionalChannelInfo_read(ser: Uint8Array): number {
11834 if(!isWasmInitialized) {
11835 throw new Error("initializeWasm() must be awaited first!");
11837 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
11838 return nativeResponseValue;
11840 // void ChannelInfo_free(struct LDKChannelInfo this_obj);
11841 export function ChannelInfo_free(this_obj: number): void {
11842 if(!isWasmInitialized) {
11843 throw new Error("initializeWasm() must be awaited first!");
11845 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
11846 // debug statements here
11848 // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11849 export function ChannelInfo_get_features(this_ptr: number): number {
11850 if(!isWasmInitialized) {
11851 throw new Error("initializeWasm() must be awaited first!");
11853 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
11854 return nativeResponseValue;
11856 // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11857 export function ChannelInfo_set_features(this_ptr: number, val: number): void {
11858 if(!isWasmInitialized) {
11859 throw new Error("initializeWasm() must be awaited first!");
11861 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
11862 // debug statements here
11864 // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11865 export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
11866 if(!isWasmInitialized) {
11867 throw new Error("initializeWasm() must be awaited first!");
11869 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
11870 return decodeArray(nativeResponseValue);
11872 // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11873 export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
11874 if(!isWasmInitialized) {
11875 throw new Error("initializeWasm() must be awaited first!");
11877 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
11878 // debug statements here
11880 // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11881 export function ChannelInfo_get_one_to_two(this_ptr: number): number {
11882 if(!isWasmInitialized) {
11883 throw new Error("initializeWasm() must be awaited first!");
11885 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
11886 return nativeResponseValue;
11888 // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
11889 export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
11890 if(!isWasmInitialized) {
11891 throw new Error("initializeWasm() must be awaited first!");
11893 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
11894 // debug statements here
11896 // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11897 export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
11898 if(!isWasmInitialized) {
11899 throw new Error("initializeWasm() must be awaited first!");
11901 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
11902 return decodeArray(nativeResponseValue);
11904 // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11905 export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
11906 if(!isWasmInitialized) {
11907 throw new Error("initializeWasm() must be awaited first!");
11909 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
11910 // debug statements here
11912 // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11913 export function ChannelInfo_get_two_to_one(this_ptr: number): number {
11914 if(!isWasmInitialized) {
11915 throw new Error("initializeWasm() must be awaited first!");
11917 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
11918 return nativeResponseValue;
11920 // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
11921 export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
11922 if(!isWasmInitialized) {
11923 throw new Error("initializeWasm() must be awaited first!");
11925 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
11926 // debug statements here
11928 // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11929 export function ChannelInfo_get_announcement_message(this_ptr: number): number {
11930 if(!isWasmInitialized) {
11931 throw new Error("initializeWasm() must be awaited first!");
11933 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
11934 return nativeResponseValue;
11936 // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
11937 export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
11938 if(!isWasmInitialized) {
11939 throw new Error("initializeWasm() must be awaited first!");
11941 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
11942 // debug statements here
11944 // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
11945 export function ChannelInfo_clone(orig: number): number {
11946 if(!isWasmInitialized) {
11947 throw new Error("initializeWasm() must be awaited first!");
11949 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
11950 return nativeResponseValue;
11952 // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
11953 export function ChannelInfo_write(obj: number): Uint8Array {
11954 if(!isWasmInitialized) {
11955 throw new Error("initializeWasm() must be awaited first!");
11957 const nativeResponseValue = wasm.ChannelInfo_write(obj);
11958 return decodeArray(nativeResponseValue);
11960 // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
11961 export function ChannelInfo_read(ser: Uint8Array): number {
11962 if(!isWasmInitialized) {
11963 throw new Error("initializeWasm() must be awaited first!");
11965 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
11966 return nativeResponseValue;
11968 // void RoutingFees_free(struct LDKRoutingFees this_obj);
11969 export function RoutingFees_free(this_obj: number): void {
11970 if(!isWasmInitialized) {
11971 throw new Error("initializeWasm() must be awaited first!");
11973 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
11974 // debug statements here
11976 // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
11977 export function RoutingFees_get_base_msat(this_ptr: number): number {
11978 if(!isWasmInitialized) {
11979 throw new Error("initializeWasm() must be awaited first!");
11981 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
11982 return nativeResponseValue;
11984 // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
11985 export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
11986 if(!isWasmInitialized) {
11987 throw new Error("initializeWasm() must be awaited first!");
11989 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
11990 // debug statements here
11992 // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
11993 export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
11994 if(!isWasmInitialized) {
11995 throw new Error("initializeWasm() must be awaited first!");
11997 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
11998 return nativeResponseValue;
12000 // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
12001 export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
12002 if(!isWasmInitialized) {
12003 throw new Error("initializeWasm() must be awaited first!");
12005 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
12006 // debug statements here
12008 // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
12009 export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
12010 if(!isWasmInitialized) {
12011 throw new Error("initializeWasm() must be awaited first!");
12013 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
12014 return nativeResponseValue;
12016 // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
12017 export function RoutingFees_clone(orig: number): number {
12018 if(!isWasmInitialized) {
12019 throw new Error("initializeWasm() must be awaited first!");
12021 const nativeResponseValue = wasm.RoutingFees_clone(orig);
12022 return nativeResponseValue;
12024 // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
12025 export function RoutingFees_read(ser: Uint8Array): number {
12026 if(!isWasmInitialized) {
12027 throw new Error("initializeWasm() must be awaited first!");
12029 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
12030 return nativeResponseValue;
12032 // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
12033 export function RoutingFees_write(obj: number): Uint8Array {
12034 if(!isWasmInitialized) {
12035 throw new Error("initializeWasm() must be awaited first!");
12037 const nativeResponseValue = wasm.RoutingFees_write(obj);
12038 return decodeArray(nativeResponseValue);
12040 // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
12041 export function NodeAnnouncementInfo_free(this_obj: number): void {
12042 if(!isWasmInitialized) {
12043 throw new Error("initializeWasm() must be awaited first!");
12045 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
12046 // debug statements here
12048 // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12049 export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
12050 if(!isWasmInitialized) {
12051 throw new Error("initializeWasm() must be awaited first!");
12053 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
12054 return nativeResponseValue;
12056 // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
12057 export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
12058 if(!isWasmInitialized) {
12059 throw new Error("initializeWasm() must be awaited first!");
12061 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
12062 // debug statements here
12064 // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12065 export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
12066 if(!isWasmInitialized) {
12067 throw new Error("initializeWasm() must be awaited first!");
12069 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
12070 return nativeResponseValue;
12072 // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
12073 export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
12074 if(!isWasmInitialized) {
12075 throw new Error("initializeWasm() must be awaited first!");
12077 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
12078 // debug statements here
12080 // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
12081 export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
12082 if(!isWasmInitialized) {
12083 throw new Error("initializeWasm() must be awaited first!");
12085 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
12086 return decodeArray(nativeResponseValue);
12088 // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
12089 export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
12090 if(!isWasmInitialized) {
12091 throw new Error("initializeWasm() must be awaited first!");
12093 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
12094 // debug statements here
12096 // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
12097 export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
12098 if(!isWasmInitialized) {
12099 throw new Error("initializeWasm() must be awaited first!");
12101 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
12102 return decodeArray(nativeResponseValue);
12104 // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12105 export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
12106 if(!isWasmInitialized) {
12107 throw new Error("initializeWasm() must be awaited first!");
12109 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
12110 // debug statements here
12112 // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
12113 export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
12114 if(!isWasmInitialized) {
12115 throw new Error("initializeWasm() must be awaited first!");
12117 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
12118 // debug statements here
12120 // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12121 export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
12122 if(!isWasmInitialized) {
12123 throw new Error("initializeWasm() must be awaited first!");
12125 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
12126 return nativeResponseValue;
12128 // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
12129 export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
12130 if(!isWasmInitialized) {
12131 throw new Error("initializeWasm() must be awaited first!");
12133 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
12134 // debug statements here
12136 // 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);
12137 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 {
12138 if(!isWasmInitialized) {
12139 throw new Error("initializeWasm() must be awaited first!");
12141 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
12142 return nativeResponseValue;
12144 // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
12145 export function NodeAnnouncementInfo_clone(orig: number): number {
12146 if(!isWasmInitialized) {
12147 throw new Error("initializeWasm() must be awaited first!");
12149 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
12150 return nativeResponseValue;
12152 // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
12153 export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
12154 if(!isWasmInitialized) {
12155 throw new Error("initializeWasm() must be awaited first!");
12157 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
12158 return decodeArray(nativeResponseValue);
12160 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
12161 export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
12162 if(!isWasmInitialized) {
12163 throw new Error("initializeWasm() must be awaited first!");
12165 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
12166 return nativeResponseValue;
12168 // void NodeInfo_free(struct LDKNodeInfo this_obj);
12169 export function NodeInfo_free(this_obj: number): void {
12170 if(!isWasmInitialized) {
12171 throw new Error("initializeWasm() must be awaited first!");
12173 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
12174 // debug statements here
12176 // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12177 export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
12178 if(!isWasmInitialized) {
12179 throw new Error("initializeWasm() must be awaited first!");
12181 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
12182 // debug statements here
12184 // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12185 export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
12186 if(!isWasmInitialized) {
12187 throw new Error("initializeWasm() must be awaited first!");
12189 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
12190 return nativeResponseValue;
12192 // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12193 export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
12194 if(!isWasmInitialized) {
12195 throw new Error("initializeWasm() must be awaited first!");
12197 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
12198 // debug statements here
12200 // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12201 export function NodeInfo_get_announcement_info(this_ptr: number): number {
12202 if(!isWasmInitialized) {
12203 throw new Error("initializeWasm() must be awaited first!");
12205 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
12206 return nativeResponseValue;
12208 // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
12209 export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
12210 if(!isWasmInitialized) {
12211 throw new Error("initializeWasm() must be awaited first!");
12213 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
12214 // debug statements here
12216 // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
12217 export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
12218 if(!isWasmInitialized) {
12219 throw new Error("initializeWasm() must be awaited first!");
12221 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
12222 return nativeResponseValue;
12224 // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
12225 export function NodeInfo_clone(orig: number): number {
12226 if(!isWasmInitialized) {
12227 throw new Error("initializeWasm() must be awaited first!");
12229 const nativeResponseValue = wasm.NodeInfo_clone(orig);
12230 return nativeResponseValue;
12232 // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
12233 export function NodeInfo_write(obj: number): Uint8Array {
12234 if(!isWasmInitialized) {
12235 throw new Error("initializeWasm() must be awaited first!");
12237 const nativeResponseValue = wasm.NodeInfo_write(obj);
12238 return decodeArray(nativeResponseValue);
12240 // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
12241 export function NodeInfo_read(ser: Uint8Array): number {
12242 if(!isWasmInitialized) {
12243 throw new Error("initializeWasm() must be awaited first!");
12245 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
12246 return nativeResponseValue;
12248 // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
12249 export function NetworkGraph_write(obj: number): Uint8Array {
12250 if(!isWasmInitialized) {
12251 throw new Error("initializeWasm() must be awaited first!");
12253 const nativeResponseValue = wasm.NetworkGraph_write(obj);
12254 return decodeArray(nativeResponseValue);
12256 // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
12257 export function NetworkGraph_read(ser: Uint8Array): number {
12258 if(!isWasmInitialized) {
12259 throw new Error("initializeWasm() must be awaited first!");
12261 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
12262 return nativeResponseValue;
12264 // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
12265 export function NetworkGraph_new(genesis_hash: Uint8Array): number {
12266 if(!isWasmInitialized) {
12267 throw new Error("initializeWasm() must be awaited first!");
12269 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
12270 return nativeResponseValue;
12272 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
12273 export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
12274 if(!isWasmInitialized) {
12275 throw new Error("initializeWasm() must be awaited first!");
12277 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
12278 return nativeResponseValue;
12280 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
12281 export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
12282 if(!isWasmInitialized) {
12283 throw new Error("initializeWasm() must be awaited first!");
12285 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
12286 return nativeResponseValue;
12288 // 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);
12289 export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
12290 if(!isWasmInitialized) {
12291 throw new Error("initializeWasm() must be awaited first!");
12293 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
12294 return nativeResponseValue;
12296 // 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);
12297 export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
12298 if(!isWasmInitialized) {
12299 throw new Error("initializeWasm() must be awaited first!");
12301 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
12302 return nativeResponseValue;
12304 // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
12305 export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
12306 if(!isWasmInitialized) {
12307 throw new Error("initializeWasm() must be awaited first!");
12309 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
12310 // debug statements here
12312 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
12313 export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
12314 if(!isWasmInitialized) {
12315 throw new Error("initializeWasm() must be awaited first!");
12317 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
12318 return nativeResponseValue;
12320 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
12321 export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
12322 if(!isWasmInitialized) {
12323 throw new Error("initializeWasm() must be awaited first!");
12325 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
12326 return nativeResponseValue;
12329 export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
12330 if(isWasmInitialized && !allowDoubleInitialization) {
12333 const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
12334 wasm = wasmInstance.exports;
12335 isWasmInitialized = true;