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_ChannelConfigDecodeErrorZ_result_ok(long arg);
356 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
357 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
358 public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
359 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
360 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
361 public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
362 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
363 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
364 public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
365 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
366 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
367 public static class LDKNetAddress {
368 private LDKNetAddress() {}
369 export class IPv4 extends LDKNetAddress {
370 public Uint8Array addr;
372 IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
374 export class IPv6 extends LDKNetAddress {
375 public Uint8Array addr;
377 IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
379 export class OnionV2 extends LDKNetAddress {
380 public Uint8Array addr;
382 OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
384 export class OnionV3 extends LDKNetAddress {
385 public Uint8Array ed25519_pubkey;
386 public number checksum;
387 public number version;
389 OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
391 static native void init();
393 static { LDKNetAddress.init(); }
394 public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
395 public static native long LDKCVec_NetAddressZ_new(number[] elems);
396 public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
397 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
398 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
399 public static native long LDKCVec_u64Z_new(number[] elems);
400 public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
401 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
402 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
403 public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
404 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
405 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
406 public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
407 public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
408 public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
409 public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
410 public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
411 public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
412 public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
413 public static class LDKMonitorEvent {
414 private LDKMonitorEvent() {}
415 export class HTLCEvent extends LDKMonitorEvent {
418 export class CommitmentTxBroadcasted extends LDKMonitorEvent {
419 CommitmentTxBroadcasted() { }
421 static native void init();
423 static { LDKMonitorEvent.init(); }
424 public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
425 public static native long LDKCVec_MonitorEventZ_new(number[] elems);
426 public static class LDKSpendableOutputDescriptor {
427 private LDKSpendableOutputDescriptor() {}
428 export class StaticOutput extends LDKSpendableOutputDescriptor {
429 public number outpoint;
430 public number output;
431 StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
433 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
434 DelayedPaymentOutput() { }
436 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
437 StaticPaymentOutput() { }
439 static native void init();
441 static { LDKSpendableOutputDescriptor.init(); }
442 public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
443 public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
444 public static class LDKEvent {
445 private LDKEvent() {}
446 export class FundingGenerationReady extends LDKEvent {
447 public Uint8Array temporary_channel_id;
448 public number channel_value_satoshis;
449 public Uint8Array output_script;
450 public number user_channel_id;
451 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; }
453 export class FundingBroadcastSafe extends LDKEvent {
454 public number funding_txo;
455 public number user_channel_id;
456 FundingBroadcastSafe(number funding_txo, number user_channel_id) { this.funding_txo = funding_txo; this.user_channel_id = user_channel_id; }
458 export class PaymentReceived extends LDKEvent {
459 public Uint8Array payment_hash;
460 public Uint8Array payment_secret;
462 PaymentReceived(Uint8Array payment_hash, Uint8Array payment_secret, number amt) { this.payment_hash = payment_hash; this.payment_secret = payment_secret; this.amt = amt; }
464 export class PaymentSent extends LDKEvent {
465 public Uint8Array payment_preimage;
466 PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
468 export class PaymentFailed extends LDKEvent {
469 public Uint8Array payment_hash;
470 public boolean rejected_by_dest;
471 PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
473 export class PendingHTLCsForwardable extends LDKEvent {
474 public number time_forwardable;
475 PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
477 export class SpendableOutputs extends LDKEvent {
478 public number[] outputs;
479 SpendableOutputs(number[] outputs) { this.outputs = outputs; }
481 static native void init();
483 static { LDKEvent.init(); }
484 public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
485 public static native long LDKCVec_EventZ_new(number[] elems);
486 public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
487 public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
488 public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
489 public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
490 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
491 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
492 public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
493 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
494 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
495 public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
496 public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
497 public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
498 public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
499 public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
500 public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
501 public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
502 public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
503 public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
504 public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
505 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
506 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
507 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
508 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
509 public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
510 public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
511 public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
512 public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
513 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
514 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
515 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
516 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
517 public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
518 public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
519 public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
520 public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
521 public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
522 public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
523 public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
524 public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
525 public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
529 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
531 export interface LDKSign {
532 get_per_commitment_point (idx: number): Uint8Array;
533 release_commitment_secret (idx: number): Uint8Array;
534 channel_keys_id (): Uint8Array;
535 sign_counterparty_commitment (commitment_tx: number): number;
536 sign_holder_commitment_and_htlcs (commitment_tx: number): number;
537 sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
538 sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
539 sign_closing_transaction (closing_tx: Uint8Array): number;
540 sign_channel_announcement (msg: number): number;
541 ready_channel (channel_parameters: number): void;
542 write (): Uint8Array;
545 export function LDKSign_new(impl: LDKSign, pubkeys: number): number {
546 throw new Error('unimplemented'); // TODO: bind to WASM
549 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
552 // LDKPublicKey Sign_get_per_commitment_point LDKSign *NONNULL_PTR this_arg, uint64_t idx
553 export function Sign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
554 if(!isWasmInitialized) {
555 throw new Error("initializeWasm() must be awaited first!");
557 const nativeResponseValue = wasm.Sign_get_per_commitment_point(this_arg, idx);
558 return decodeArray(nativeResponseValue);
560 // LDKThirtyTwoBytes Sign_release_commitment_secret LDKSign *NONNULL_PTR this_arg, uint64_t idx
561 export function Sign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
562 if(!isWasmInitialized) {
563 throw new Error("initializeWasm() must be awaited first!");
565 const nativeResponseValue = wasm.Sign_release_commitment_secret(this_arg, idx);
566 return decodeArray(nativeResponseValue);
568 // LDKThirtyTwoBytes Sign_channel_keys_id LDKSign *NONNULL_PTR this_arg
569 export function Sign_channel_keys_id(this_arg: number): Uint8Array {
570 if(!isWasmInitialized) {
571 throw new Error("initializeWasm() must be awaited first!");
573 const nativeResponseValue = wasm.Sign_channel_keys_id(this_arg);
574 return decodeArray(nativeResponseValue);
576 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_counterparty_commitment LDKSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
577 export function Sign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
578 if(!isWasmInitialized) {
579 throw new Error("initializeWasm() must be awaited first!");
581 const nativeResponseValue = wasm.Sign_sign_counterparty_commitment(this_arg, commitment_tx);
582 return nativeResponseValue;
584 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_holder_commitment_and_htlcs LDKSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
585 export function Sign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
586 if(!isWasmInitialized) {
587 throw new Error("initializeWasm() must be awaited first!");
589 const nativeResponseValue = wasm.Sign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
590 return nativeResponseValue;
592 // 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
593 export function Sign_sign_justice_transaction(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
594 if(!isWasmInitialized) {
595 throw new Error("initializeWasm() must be awaited first!");
597 const nativeResponseValue = wasm.Sign_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
598 return nativeResponseValue;
600 // 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
601 export function Sign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
602 if(!isWasmInitialized) {
603 throw new Error("initializeWasm() must be awaited first!");
605 const nativeResponseValue = wasm.Sign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
606 return nativeResponseValue;
608 // LDKCResult_SignatureNoneZ Sign_sign_closing_transaction LDKSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
609 export function Sign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
610 if(!isWasmInitialized) {
611 throw new Error("initializeWasm() must be awaited first!");
613 const nativeResponseValue = wasm.Sign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
614 return nativeResponseValue;
616 // LDKCResult_SignatureNoneZ Sign_sign_channel_announcement LDKSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
617 export function Sign_sign_channel_announcement(this_arg: number, msg: number): number {
618 if(!isWasmInitialized) {
619 throw new Error("initializeWasm() must be awaited first!");
621 const nativeResponseValue = wasm.Sign_sign_channel_announcement(this_arg, msg);
622 return nativeResponseValue;
624 // void Sign_ready_channel LDKSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
625 export function Sign_ready_channel(this_arg: number, channel_parameters: number): void {
626 if(!isWasmInitialized) {
627 throw new Error("initializeWasm() must be awaited first!");
629 const nativeResponseValue = wasm.Sign_ready_channel(this_arg, channel_parameters);
630 // debug statements here
632 // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
633 export function Sign_write(this_arg: number): Uint8Array {
634 if(!isWasmInitialized) {
635 throw new Error("initializeWasm() must be awaited first!");
637 const nativeResponseValue = wasm.Sign_write(this_arg);
638 return decodeArray(nativeResponseValue);
640 // LDKChannelPublicKeys Sign_get_pubkeys LDKSign *NONNULL_PTR this_arg
641 export function Sign_get_pubkeys(this_arg: number): number {
642 if(!isWasmInitialized) {
643 throw new Error("initializeWasm() must be awaited first!");
645 const nativeResponseValue = wasm.Sign_get_pubkeys(this_arg);
646 return nativeResponseValue;
648 public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
649 public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
650 public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
651 public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
652 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
653 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
654 public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
655 public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
656 public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
657 public static class LDKAPIError {
658 private LDKAPIError() {}
659 export class APIMisuseError extends LDKAPIError {
660 public Uint8Array err;
661 APIMisuseError(Uint8Array err) { this.err = err; }
663 export class FeeRateTooHigh extends LDKAPIError {
664 public Uint8Array err;
665 public number feerate;
666 FeeRateTooHigh(Uint8Array err, number feerate) { this.err = err; this.feerate = feerate; }
668 export class RouteError extends LDKAPIError {
670 RouteError(String err) { this.err = err; }
672 export class ChannelUnavailable extends LDKAPIError {
673 public Uint8Array err;
674 ChannelUnavailable(Uint8Array err) { this.err = err; }
676 export class MonitorUpdateFailed extends LDKAPIError {
677 MonitorUpdateFailed() { }
679 static native void init();
681 static { LDKAPIError.init(); }
682 public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
683 public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
684 public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
685 public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
686 public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
687 public static native long LDKCVec_APIErrorZ_new(number[] elems);
688 public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
689 public static class LDKPaymentSendFailure {
690 private LDKPaymentSendFailure() {}
691 export class ParameterError extends LDKPaymentSendFailure {
694 export class PathParameterError extends LDKPaymentSendFailure {
695 PathParameterError() { }
697 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
698 AllFailedRetrySafe() { }
700 export class PartialFailure extends LDKPaymentSendFailure {
703 static native void init();
705 static { LDKPaymentSendFailure.init(); }
706 public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
707 public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
708 public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
709 public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
710 public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
714 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
716 export interface LDKWatch {
717 watch_channel (funding_txo: number, monitor: number): number;
718 update_channel (funding_txo: number, update: number): number;
719 release_pending_monitor_events (): number[];
722 export function LDKWatch_new(impl: LDKWatch): number {
723 throw new Error('unimplemented'); // TODO: bind to WASM
726 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
729 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
730 export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
731 if(!isWasmInitialized) {
732 throw new Error("initializeWasm() must be awaited first!");
734 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
735 return nativeResponseValue;
737 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
738 export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
739 if(!isWasmInitialized) {
740 throw new Error("initializeWasm() must be awaited first!");
742 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
743 return nativeResponseValue;
745 // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
746 export function Watch_release_pending_monitor_events(this_arg: number): number[] {
747 if(!isWasmInitialized) {
748 throw new Error("initializeWasm() must be awaited first!");
750 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
751 return nativeResponseValue;
756 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
758 export interface LDKBroadcasterInterface {
759 broadcast_transaction (tx: Uint8Array): void;
762 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
763 throw new Error('unimplemented'); // TODO: bind to WASM
766 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
769 // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
770 export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
771 if(!isWasmInitialized) {
772 throw new Error("initializeWasm() must be awaited first!");
774 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
775 // debug statements here
777 public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
778 public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
779 public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
783 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
785 export interface LDKKeysInterface {
786 get_node_secret (): Uint8Array;
787 get_destination_script (): Uint8Array;
788 get_shutdown_pubkey (): Uint8Array;
789 get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
790 get_secure_random_bytes (): Uint8Array;
791 read_chan_signer (reader: Uint8Array): number;
794 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
795 throw new Error('unimplemented'); // TODO: bind to WASM
798 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
801 // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
802 export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
803 if(!isWasmInitialized) {
804 throw new Error("initializeWasm() must be awaited first!");
806 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
807 return decodeArray(nativeResponseValue);
809 // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
810 export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
811 if(!isWasmInitialized) {
812 throw new Error("initializeWasm() must be awaited first!");
814 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
815 return decodeArray(nativeResponseValue);
817 // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
818 export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
819 if(!isWasmInitialized) {
820 throw new Error("initializeWasm() must be awaited first!");
822 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
823 return decodeArray(nativeResponseValue);
825 // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
826 export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
827 if(!isWasmInitialized) {
828 throw new Error("initializeWasm() must be awaited first!");
830 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
831 return nativeResponseValue;
833 // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
834 export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
835 if(!isWasmInitialized) {
836 throw new Error("initializeWasm() must be awaited first!");
838 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
839 return decodeArray(nativeResponseValue);
841 // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
842 export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
843 if(!isWasmInitialized) {
844 throw new Error("initializeWasm() must be awaited first!");
846 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
847 return nativeResponseValue;
852 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
854 export interface LDKFeeEstimator {
855 get_est_sat_per_1000_weight (confirmation_target: LDKConfirmationTarget): number;
858 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
859 throw new Error('unimplemented'); // TODO: bind to WASM
862 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
865 // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
866 export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: LDKConfirmationTarget): number {
867 if(!isWasmInitialized) {
868 throw new Error("initializeWasm() must be awaited first!");
870 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
871 return nativeResponseValue;
876 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
878 export interface LDKLogger {
879 log (record: String): void;
882 export function LDKLogger_new(impl: LDKLogger): number {
883 throw new Error('unimplemented'); // TODO: bind to WASM
886 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
889 public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
890 public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
891 public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
892 public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
893 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
894 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
895 public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
896 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
897 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
898 public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
899 public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
900 public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
901 public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
902 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
903 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
904 public static native long LDKCVec_TxOutZ_new(number[] elems);
905 public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
906 public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
907 public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
908 public static native long LDKCVec_RouteHopZ_new(number[] elems);
909 public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
910 public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
911 public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
912 public static native long LDKCVec_RouteHintZ_new(number[] elems);
913 public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
914 public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
915 public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
916 public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
917 public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
918 public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
919 public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
920 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
921 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
922 public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
923 public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
924 public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
925 public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
926 public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
927 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
928 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
929 public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
930 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
931 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
932 public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
933 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
934 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
935 public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
936 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
937 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
938 public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
939 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
940 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
941 public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
942 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
943 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
944 public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
945 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
946 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
947 public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
948 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
949 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
950 public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
951 public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
952 public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
953 public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
954 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
955 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
956 public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
957 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
958 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
959 public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
960 public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
961 public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
962 public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
963 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
964 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
965 public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
966 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
967 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
968 public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
969 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
970 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
971 public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
972 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
973 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
974 public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
975 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
976 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
977 public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
978 public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
979 public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
980 public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
981 public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
982 public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
983 public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
984 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
985 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
986 public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
987 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
988 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
989 public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
990 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
991 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
992 public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
993 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
994 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
995 public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
996 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
997 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
998 public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
999 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1000 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1001 public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1002 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1003 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1004 public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1005 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1006 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1007 public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1008 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1009 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1010 public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1011 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1012 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1013 public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1014 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1015 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1016 public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1017 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1018 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1022 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1024 export interface LDKMessageSendEventsProvider {
1025 get_and_clear_pending_msg_events (): number[];
1028 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1029 throw new Error('unimplemented'); // TODO: bind to WASM
1032 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1035 // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1036 export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1037 if(!isWasmInitialized) {
1038 throw new Error("initializeWasm() must be awaited first!");
1040 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1041 return nativeResponseValue;
1046 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1048 export interface LDKEventsProvider {
1049 get_and_clear_pending_events (): number[];
1052 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1053 throw new Error('unimplemented'); // TODO: bind to WASM
1056 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1059 // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider *NONNULL_PTR this_arg
1060 export function EventsProvider_get_and_clear_pending_events(this_arg: number): number[] {
1061 if(!isWasmInitialized) {
1062 throw new Error("initializeWasm() must be awaited first!");
1064 const nativeResponseValue = wasm.EventsProvider_get_and_clear_pending_events(this_arg);
1065 return nativeResponseValue;
1070 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1072 export interface LDKAccess {
1073 get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1076 export function LDKAccess_new(impl: LDKAccess): number {
1077 throw new Error('unimplemented'); // TODO: bind to WASM
1080 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1083 // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1084 export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1085 if(!isWasmInitialized) {
1086 throw new Error("initializeWasm() must be awaited first!");
1088 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1089 return nativeResponseValue;
1094 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1096 export interface LDKListen {
1097 block_connected (block: Uint8Array, height: number): void;
1098 block_disconnected (header: Uint8Array, height: number): void;
1101 export function LDKListen_new(impl: LDKListen): number {
1102 throw new Error('unimplemented'); // TODO: bind to WASM
1105 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1108 // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1109 export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1110 if(!isWasmInitialized) {
1111 throw new Error("initializeWasm() must be awaited first!");
1113 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1114 // debug statements here
1116 // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1117 export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1118 if(!isWasmInitialized) {
1119 throw new Error("initializeWasm() must be awaited first!");
1121 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1122 // debug statements here
1127 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1129 export interface LDKFilter {
1130 register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1131 register_output (outpoint: number, script_pubkey: Uint8Array): void;
1134 export function LDKFilter_new(impl: LDKFilter): number {
1135 throw new Error('unimplemented'); // TODO: bind to WASM
1138 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1141 // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1142 export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1143 if(!isWasmInitialized) {
1144 throw new Error("initializeWasm() must be awaited first!");
1146 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1147 // debug statements here
1149 // void Filter_register_output LDKFilter *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
1150 export function Filter_register_output(this_arg: number, outpoint: number, script_pubkey: Uint8Array): void {
1151 if(!isWasmInitialized) {
1152 throw new Error("initializeWasm() must be awaited first!");
1154 const nativeResponseValue = wasm.Filter_register_output(this_arg, outpoint, encodeArray(script_pubkey));
1155 // debug statements here
1160 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1162 export interface LDKPersist {
1163 persist_new_channel (id: number, data: number): number;
1164 update_persisted_channel (id: number, update: number, data: number): number;
1167 export function LDKPersist_new(impl: LDKPersist): number {
1168 throw new Error('unimplemented'); // TODO: bind to WASM
1171 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1174 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1175 export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1176 if(!isWasmInitialized) {
1177 throw new Error("initializeWasm() must be awaited first!");
1179 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1180 return nativeResponseValue;
1182 // 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
1183 export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1184 if(!isWasmInitialized) {
1185 throw new Error("initializeWasm() must be awaited first!");
1187 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1188 return nativeResponseValue;
1193 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1195 export interface LDKChannelMessageHandler {
1196 handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1197 handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1198 handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1199 handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1200 handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1201 handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1202 handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1203 handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1204 handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1205 handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1206 handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1207 handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1208 handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1209 handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1210 handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1211 peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1212 peer_connected (their_node_id: Uint8Array, msg: number): void;
1213 handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1214 handle_error (their_node_id: Uint8Array, msg: number): void;
1217 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1218 throw new Error('unimplemented'); // TODO: bind to WASM
1221 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1224 // 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
1225 export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1226 if(!isWasmInitialized) {
1227 throw new Error("initializeWasm() must be awaited first!");
1229 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1230 // debug statements here
1232 // 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
1233 export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1234 if(!isWasmInitialized) {
1235 throw new Error("initializeWasm() must be awaited first!");
1237 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1238 // debug statements here
1240 // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1241 export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1242 if(!isWasmInitialized) {
1243 throw new Error("initializeWasm() must be awaited first!");
1245 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1246 // debug statements here
1248 // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1249 export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1250 if(!isWasmInitialized) {
1251 throw new Error("initializeWasm() must be awaited first!");
1253 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1254 // debug statements here
1256 // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1257 export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1258 if(!isWasmInitialized) {
1259 throw new Error("initializeWasm() must be awaited first!");
1261 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1262 // debug statements here
1264 // 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
1265 export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1266 if(!isWasmInitialized) {
1267 throw new Error("initializeWasm() must be awaited first!");
1269 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1270 // debug statements here
1272 // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1273 export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1274 if(!isWasmInitialized) {
1275 throw new Error("initializeWasm() must be awaited first!");
1277 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1278 // debug statements here
1280 // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1281 export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1282 if(!isWasmInitialized) {
1283 throw new Error("initializeWasm() must be awaited first!");
1285 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1286 // debug statements here
1288 // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1289 export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1290 if(!isWasmInitialized) {
1291 throw new Error("initializeWasm() must be awaited first!");
1293 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1294 // debug statements here
1296 // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1297 export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1298 if(!isWasmInitialized) {
1299 throw new Error("initializeWasm() must be awaited first!");
1301 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1302 // debug statements here
1304 // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1305 export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1306 if(!isWasmInitialized) {
1307 throw new Error("initializeWasm() must be awaited first!");
1309 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1310 // debug statements here
1312 // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1313 export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1314 if(!isWasmInitialized) {
1315 throw new Error("initializeWasm() must be awaited first!");
1317 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1318 // debug statements here
1320 // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1321 export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1322 if(!isWasmInitialized) {
1323 throw new Error("initializeWasm() must be awaited first!");
1325 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1326 // debug statements here
1328 // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1329 export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1330 if(!isWasmInitialized) {
1331 throw new Error("initializeWasm() must be awaited first!");
1333 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1334 // debug statements here
1336 // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1337 export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1338 if(!isWasmInitialized) {
1339 throw new Error("initializeWasm() must be awaited first!");
1341 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1342 // debug statements here
1344 // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1345 export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1346 if(!isWasmInitialized) {
1347 throw new Error("initializeWasm() must be awaited first!");
1349 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1350 // debug statements here
1352 // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1353 export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1354 if(!isWasmInitialized) {
1355 throw new Error("initializeWasm() must be awaited first!");
1357 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1358 // debug statements here
1360 // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1361 export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1362 if(!isWasmInitialized) {
1363 throw new Error("initializeWasm() must be awaited first!");
1365 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1366 // debug statements here
1368 // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1369 export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1370 if(!isWasmInitialized) {
1371 throw new Error("initializeWasm() must be awaited first!");
1373 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1374 // debug statements here
1379 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1381 export interface LDKRoutingMessageHandler {
1382 handle_node_announcement (msg: number): number;
1383 handle_channel_announcement (msg: number): number;
1384 handle_channel_update (msg: number): number;
1385 handle_htlc_fail_channel_update (update: number): void;
1386 get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1387 get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1388 sync_routing_table (their_node_id: Uint8Array, init: number): void;
1389 handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1390 handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1391 handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1392 handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1395 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1396 throw new Error('unimplemented'); // TODO: bind to WASM
1399 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1402 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1403 export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1404 if(!isWasmInitialized) {
1405 throw new Error("initializeWasm() must be awaited first!");
1407 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1408 return nativeResponseValue;
1410 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1411 export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1412 if(!isWasmInitialized) {
1413 throw new Error("initializeWasm() must be awaited first!");
1415 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1416 return nativeResponseValue;
1418 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1419 export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1420 if(!isWasmInitialized) {
1421 throw new Error("initializeWasm() must be awaited first!");
1423 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1424 return nativeResponseValue;
1426 // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1427 export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1428 if(!isWasmInitialized) {
1429 throw new Error("initializeWasm() must be awaited first!");
1431 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1432 // debug statements here
1434 // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1435 export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1436 if(!isWasmInitialized) {
1437 throw new Error("initializeWasm() must be awaited first!");
1439 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1440 return nativeResponseValue;
1442 // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1443 export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1444 if(!isWasmInitialized) {
1445 throw new Error("initializeWasm() must be awaited first!");
1447 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1448 return nativeResponseValue;
1450 // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1451 export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1452 if(!isWasmInitialized) {
1453 throw new Error("initializeWasm() must be awaited first!");
1455 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1456 // debug statements here
1458 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1459 export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1460 if(!isWasmInitialized) {
1461 throw new Error("initializeWasm() must be awaited first!");
1463 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1464 return nativeResponseValue;
1466 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1467 export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1468 if(!isWasmInitialized) {
1469 throw new Error("initializeWasm() must be awaited first!");
1471 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1472 return nativeResponseValue;
1474 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1475 export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1476 if(!isWasmInitialized) {
1477 throw new Error("initializeWasm() must be awaited first!");
1479 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1480 return nativeResponseValue;
1482 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1483 export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1484 if(!isWasmInitialized) {
1485 throw new Error("initializeWasm() must be awaited first!");
1487 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1488 return nativeResponseValue;
1493 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1495 export interface LDKSocketDescriptor {
1496 send_data (data: Uint8Array, resume_read: boolean): number;
1497 disconnect_socket (): void;
1498 eq (other_arg: number): boolean;
1502 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1503 throw new Error('unimplemented'); // TODO: bind to WASM
1506 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1509 // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1510 export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1511 if(!isWasmInitialized) {
1512 throw new Error("initializeWasm() must be awaited first!");
1514 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1515 return nativeResponseValue;
1517 // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1518 export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1519 if(!isWasmInitialized) {
1520 throw new Error("initializeWasm() must be awaited first!");
1522 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1523 // debug statements here
1525 // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1526 export function SocketDescriptor_hash(this_arg: number): number {
1527 if(!isWasmInitialized) {
1528 throw new Error("initializeWasm() must be awaited first!");
1530 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1531 return nativeResponseValue;
1533 // void Transaction_free(struct LDKTransaction _res);
1534 export function Transaction_free(_res: Uint8Array): void {
1535 if(!isWasmInitialized) {
1536 throw new Error("initializeWasm() must be awaited first!");
1538 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1539 // debug statements here
1541 // void TxOut_free(struct LDKTxOut _res);
1542 export function TxOut_free(_res: number): void {
1543 if(!isWasmInitialized) {
1544 throw new Error("initializeWasm() must be awaited first!");
1546 const nativeResponseValue = wasm.TxOut_free(_res);
1547 // debug statements here
1549 // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1550 export function TxOut_clone(orig: number): number {
1551 if(!isWasmInitialized) {
1552 throw new Error("initializeWasm() must be awaited first!");
1554 const nativeResponseValue = wasm.TxOut_clone(orig);
1555 return nativeResponseValue;
1557 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1558 export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1559 if(!isWasmInitialized) {
1560 throw new Error("initializeWasm() must be awaited first!");
1562 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1563 return nativeResponseValue;
1565 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1566 export function CResult_SecretKeyErrorZ_err(e: LDKSecp256k1Error): number {
1567 if(!isWasmInitialized) {
1568 throw new Error("initializeWasm() must be awaited first!");
1570 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1571 return nativeResponseValue;
1573 // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1574 export function CResult_SecretKeyErrorZ_free(_res: number): void {
1575 if(!isWasmInitialized) {
1576 throw new Error("initializeWasm() must be awaited first!");
1578 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1579 // debug statements here
1581 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1582 export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1583 if(!isWasmInitialized) {
1584 throw new Error("initializeWasm() must be awaited first!");
1586 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1587 return nativeResponseValue;
1589 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1590 export function CResult_PublicKeyErrorZ_err(e: LDKSecp256k1Error): number {
1591 if(!isWasmInitialized) {
1592 throw new Error("initializeWasm() must be awaited first!");
1594 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1595 return nativeResponseValue;
1597 // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1598 export function CResult_PublicKeyErrorZ_free(_res: number): void {
1599 if(!isWasmInitialized) {
1600 throw new Error("initializeWasm() must be awaited first!");
1602 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1603 // debug statements here
1605 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1606 export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1607 if(!isWasmInitialized) {
1608 throw new Error("initializeWasm() must be awaited first!");
1610 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1611 return nativeResponseValue;
1613 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1614 export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1615 if(!isWasmInitialized) {
1616 throw new Error("initializeWasm() must be awaited first!");
1618 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1619 return nativeResponseValue;
1621 // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1622 export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1623 if(!isWasmInitialized) {
1624 throw new Error("initializeWasm() must be awaited first!");
1626 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1627 // debug statements here
1629 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1630 export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
1631 if(!isWasmInitialized) {
1632 throw new Error("initializeWasm() must be awaited first!");
1634 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
1635 return nativeResponseValue;
1637 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1638 export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
1639 if(!isWasmInitialized) {
1640 throw new Error("initializeWasm() must be awaited first!");
1642 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
1643 return nativeResponseValue;
1645 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1646 export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
1647 if(!isWasmInitialized) {
1648 throw new Error("initializeWasm() must be awaited first!");
1650 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
1651 return nativeResponseValue;
1653 // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1654 export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
1655 if(!isWasmInitialized) {
1656 throw new Error("initializeWasm() must be awaited first!");
1658 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
1659 // debug statements here
1661 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1662 export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
1663 if(!isWasmInitialized) {
1664 throw new Error("initializeWasm() must be awaited first!");
1666 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
1667 return nativeResponseValue;
1669 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1670 export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
1671 if(!isWasmInitialized) {
1672 throw new Error("initializeWasm() must be awaited first!");
1674 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
1675 return nativeResponseValue;
1677 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
1678 export function CResult_TxCreationKeysErrorZ_err(e: LDKSecp256k1Error): number {
1679 if(!isWasmInitialized) {
1680 throw new Error("initializeWasm() must be awaited first!");
1682 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
1683 return nativeResponseValue;
1685 // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
1686 export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
1687 if(!isWasmInitialized) {
1688 throw new Error("initializeWasm() must be awaited first!");
1690 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
1691 // debug statements here
1693 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
1694 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
1695 if(!isWasmInitialized) {
1696 throw new Error("initializeWasm() must be awaited first!");
1698 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
1699 return nativeResponseValue;
1701 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
1702 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
1703 if(!isWasmInitialized) {
1704 throw new Error("initializeWasm() must be awaited first!");
1706 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
1707 return nativeResponseValue;
1709 // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
1710 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
1711 if(!isWasmInitialized) {
1712 throw new Error("initializeWasm() must be awaited first!");
1714 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
1715 // debug statements here
1717 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
1718 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
1719 if(!isWasmInitialized) {
1720 throw new Error("initializeWasm() must be awaited first!");
1722 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
1723 return nativeResponseValue;
1725 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
1726 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1727 if(!isWasmInitialized) {
1728 throw new Error("initializeWasm() must be awaited first!");
1730 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
1731 return nativeResponseValue;
1733 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1734 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1735 if(!isWasmInitialized) {
1736 throw new Error("initializeWasm() must be awaited first!");
1738 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
1739 return nativeResponseValue;
1741 // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
1742 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1743 if(!isWasmInitialized) {
1744 throw new Error("initializeWasm() must be awaited first!");
1746 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
1747 // debug statements here
1749 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1750 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1751 if(!isWasmInitialized) {
1752 throw new Error("initializeWasm() must be awaited first!");
1754 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
1755 return nativeResponseValue;
1757 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
1758 export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1759 if(!isWasmInitialized) {
1760 throw new Error("initializeWasm() must be awaited first!");
1762 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
1763 return nativeResponseValue;
1765 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1766 export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1767 if(!isWasmInitialized) {
1768 throw new Error("initializeWasm() must be awaited first!");
1770 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
1771 return nativeResponseValue;
1773 // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
1774 export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1775 if(!isWasmInitialized) {
1776 throw new Error("initializeWasm() must be awaited first!");
1778 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
1779 // debug statements here
1781 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1782 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1783 if(!isWasmInitialized) {
1784 throw new Error("initializeWasm() must be awaited first!");
1786 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
1787 return nativeResponseValue;
1789 // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1790 export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
1791 if(!isWasmInitialized) {
1792 throw new Error("initializeWasm() must be awaited first!");
1794 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
1795 // debug statements here
1797 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
1798 export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1799 if(!isWasmInitialized) {
1800 throw new Error("initializeWasm() must be awaited first!");
1802 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
1803 return nativeResponseValue;
1805 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1806 export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
1807 if(!isWasmInitialized) {
1808 throw new Error("initializeWasm() must be awaited first!");
1810 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
1811 return nativeResponseValue;
1813 // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
1814 export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1815 if(!isWasmInitialized) {
1816 throw new Error("initializeWasm() must be awaited first!");
1818 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
1819 // debug statements here
1821 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1822 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1823 if(!isWasmInitialized) {
1824 throw new Error("initializeWasm() must be awaited first!");
1826 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
1827 return nativeResponseValue;
1829 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
1830 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1831 if(!isWasmInitialized) {
1832 throw new Error("initializeWasm() must be awaited first!");
1834 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
1835 return nativeResponseValue;
1837 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1838 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
1839 if(!isWasmInitialized) {
1840 throw new Error("initializeWasm() must be awaited first!");
1842 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
1843 return nativeResponseValue;
1845 // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
1846 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1847 if(!isWasmInitialized) {
1848 throw new Error("initializeWasm() must be awaited first!");
1850 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
1851 // debug statements here
1853 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1854 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1855 if(!isWasmInitialized) {
1856 throw new Error("initializeWasm() must be awaited first!");
1858 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
1859 return nativeResponseValue;
1861 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
1862 export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
1863 if(!isWasmInitialized) {
1864 throw new Error("initializeWasm() must be awaited first!");
1866 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
1867 return nativeResponseValue;
1869 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1870 export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
1871 if(!isWasmInitialized) {
1872 throw new Error("initializeWasm() must be awaited first!");
1874 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
1875 return nativeResponseValue;
1877 // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
1878 export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
1879 if(!isWasmInitialized) {
1880 throw new Error("initializeWasm() must be awaited first!");
1882 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
1883 // debug statements here
1885 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1886 export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1887 if(!isWasmInitialized) {
1888 throw new Error("initializeWasm() must be awaited first!");
1890 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
1891 return nativeResponseValue;
1893 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
1894 export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
1895 if(!isWasmInitialized) {
1896 throw new Error("initializeWasm() must be awaited first!");
1898 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
1899 return nativeResponseValue;
1901 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
1902 export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
1903 if(!isWasmInitialized) {
1904 throw new Error("initializeWasm() must be awaited first!");
1906 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
1907 return nativeResponseValue;
1909 // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
1910 export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
1911 if(!isWasmInitialized) {
1912 throw new Error("initializeWasm() must be awaited first!");
1914 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
1915 // debug statements here
1917 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
1918 export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
1919 if(!isWasmInitialized) {
1920 throw new Error("initializeWasm() must be awaited first!");
1922 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
1923 return nativeResponseValue;
1925 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
1926 export function CResult_CVec_SignatureZNoneZ_err(): number {
1927 if(!isWasmInitialized) {
1928 throw new Error("initializeWasm() must be awaited first!");
1930 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
1931 return nativeResponseValue;
1933 // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
1934 export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
1935 if(!isWasmInitialized) {
1936 throw new Error("initializeWasm() must be awaited first!");
1938 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
1939 // debug statements here
1941 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
1942 export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
1943 if(!isWasmInitialized) {
1944 throw new Error("initializeWasm() must be awaited first!");
1946 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
1947 return nativeResponseValue;
1949 // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
1950 export function CVec_MessageSendEventZ_free(_res: number[]): void {
1951 if(!isWasmInitialized) {
1952 throw new Error("initializeWasm() must be awaited first!");
1954 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
1955 // debug statements here
1957 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
1958 export function CResult_boolLightningErrorZ_ok(o: boolean): number {
1959 if(!isWasmInitialized) {
1960 throw new Error("initializeWasm() must be awaited first!");
1962 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
1963 return nativeResponseValue;
1965 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
1966 export function CResult_boolLightningErrorZ_err(e: number): number {
1967 if(!isWasmInitialized) {
1968 throw new Error("initializeWasm() must be awaited first!");
1970 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
1971 return nativeResponseValue;
1973 // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
1974 export function CResult_boolLightningErrorZ_free(_res: number): void {
1975 if(!isWasmInitialized) {
1976 throw new Error("initializeWasm() must be awaited first!");
1978 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
1979 // debug statements here
1981 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
1982 export function CResult_boolLightningErrorZ_clone(orig: number): number {
1983 if(!isWasmInitialized) {
1984 throw new Error("initializeWasm() must be awaited first!");
1986 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
1987 return nativeResponseValue;
1989 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
1990 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
1991 if(!isWasmInitialized) {
1992 throw new Error("initializeWasm() must be awaited first!");
1994 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
1995 return nativeResponseValue;
1997 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
1998 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
1999 if(!isWasmInitialized) {
2000 throw new Error("initializeWasm() must be awaited first!");
2002 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
2003 return nativeResponseValue;
2005 // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
2006 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
2007 if(!isWasmInitialized) {
2008 throw new Error("initializeWasm() must be awaited first!");
2010 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
2011 // debug statements here
2013 // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2014 export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
2015 if(!isWasmInitialized) {
2016 throw new Error("initializeWasm() must be awaited first!");
2018 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
2019 // debug statements here
2021 // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2022 export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
2023 if(!isWasmInitialized) {
2024 throw new Error("initializeWasm() must be awaited first!");
2026 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
2027 // debug statements here
2029 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2030 export function CResult_NoneLightningErrorZ_ok(): number {
2031 if(!isWasmInitialized) {
2032 throw new Error("initializeWasm() must be awaited first!");
2034 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
2035 return nativeResponseValue;
2037 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2038 export function CResult_NoneLightningErrorZ_err(e: number): number {
2039 if(!isWasmInitialized) {
2040 throw new Error("initializeWasm() must be awaited first!");
2042 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
2043 return nativeResponseValue;
2045 // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2046 export function CResult_NoneLightningErrorZ_free(_res: number): void {
2047 if(!isWasmInitialized) {
2048 throw new Error("initializeWasm() must be awaited first!");
2050 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
2051 // debug statements here
2053 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
2054 export function CResult_NoneLightningErrorZ_clone(orig: number): number {
2055 if(!isWasmInitialized) {
2056 throw new Error("initializeWasm() must be awaited first!");
2058 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
2059 return nativeResponseValue;
2061 // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
2062 export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
2063 if(!isWasmInitialized) {
2064 throw new Error("initializeWasm() must be awaited first!");
2066 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
2067 // debug statements here
2069 // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2070 export function CVec_u8Z_free(_res: Uint8Array): void {
2071 if(!isWasmInitialized) {
2072 throw new Error("initializeWasm() must be awaited first!");
2074 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
2075 // debug statements here
2077 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
2078 export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
2079 if(!isWasmInitialized) {
2080 throw new Error("initializeWasm() must be awaited first!");
2082 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
2083 return nativeResponseValue;
2085 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2086 export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
2087 if(!isWasmInitialized) {
2088 throw new Error("initializeWasm() must be awaited first!");
2090 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
2091 return nativeResponseValue;
2093 // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
2094 export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
2095 if(!isWasmInitialized) {
2096 throw new Error("initializeWasm() must be awaited first!");
2098 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
2099 // debug statements here
2101 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
2102 export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
2103 if(!isWasmInitialized) {
2104 throw new Error("initializeWasm() must be awaited first!");
2106 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
2107 return nativeResponseValue;
2109 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
2110 export function CResult_NonePeerHandleErrorZ_ok(): number {
2111 if(!isWasmInitialized) {
2112 throw new Error("initializeWasm() must be awaited first!");
2114 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
2115 return nativeResponseValue;
2117 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
2118 export function CResult_NonePeerHandleErrorZ_err(e: number): number {
2119 if(!isWasmInitialized) {
2120 throw new Error("initializeWasm() must be awaited first!");
2122 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
2123 return nativeResponseValue;
2125 // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
2126 export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
2127 if(!isWasmInitialized) {
2128 throw new Error("initializeWasm() must be awaited first!");
2130 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
2131 // debug statements here
2133 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
2134 export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
2135 if(!isWasmInitialized) {
2136 throw new Error("initializeWasm() must be awaited first!");
2138 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
2139 return nativeResponseValue;
2141 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
2142 export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
2143 if(!isWasmInitialized) {
2144 throw new Error("initializeWasm() must be awaited first!");
2146 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
2147 return nativeResponseValue;
2149 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2150 export function CResult_boolPeerHandleErrorZ_err(e: number): number {
2151 if(!isWasmInitialized) {
2152 throw new Error("initializeWasm() must be awaited first!");
2154 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
2155 return nativeResponseValue;
2157 // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
2158 export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
2159 if(!isWasmInitialized) {
2160 throw new Error("initializeWasm() must be awaited first!");
2162 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
2163 // debug statements here
2165 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
2166 export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
2167 if(!isWasmInitialized) {
2168 throw new Error("initializeWasm() must be awaited first!");
2170 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
2171 return nativeResponseValue;
2173 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
2174 export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
2175 if(!isWasmInitialized) {
2176 throw new Error("initializeWasm() must be awaited first!");
2178 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
2179 return nativeResponseValue;
2181 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2182 export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
2183 if(!isWasmInitialized) {
2184 throw new Error("initializeWasm() must be awaited first!");
2186 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
2187 return nativeResponseValue;
2189 // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2190 export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
2191 if(!isWasmInitialized) {
2192 throw new Error("initializeWasm() must be awaited first!");
2194 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
2195 // debug statements here
2197 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2198 export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
2199 if(!isWasmInitialized) {
2200 throw new Error("initializeWasm() must be awaited first!");
2202 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
2203 return nativeResponseValue;
2205 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2206 export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
2207 if(!isWasmInitialized) {
2208 throw new Error("initializeWasm() must be awaited first!");
2210 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
2211 return nativeResponseValue;
2213 // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2214 export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
2215 if(!isWasmInitialized) {
2216 throw new Error("initializeWasm() must be awaited first!");
2218 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
2219 // debug statements here
2221 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2222 export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
2223 if(!isWasmInitialized) {
2224 throw new Error("initializeWasm() must be awaited first!");
2226 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
2227 return nativeResponseValue;
2229 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2230 export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
2231 if(!isWasmInitialized) {
2232 throw new Error("initializeWasm() must be awaited first!");
2234 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
2235 return nativeResponseValue;
2237 // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2238 export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
2239 if(!isWasmInitialized) {
2240 throw new Error("initializeWasm() must be awaited first!");
2242 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
2243 // debug statements here
2245 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
2246 export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
2247 if(!isWasmInitialized) {
2248 throw new Error("initializeWasm() must be awaited first!");
2250 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
2251 return nativeResponseValue;
2253 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
2254 export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
2255 if(!isWasmInitialized) {
2256 throw new Error("initializeWasm() must be awaited first!");
2258 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
2259 return nativeResponseValue;
2261 // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
2262 export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
2263 if(!isWasmInitialized) {
2264 throw new Error("initializeWasm() must be awaited first!");
2266 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
2267 // debug statements here
2269 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
2270 export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
2271 if(!isWasmInitialized) {
2272 throw new Error("initializeWasm() must be awaited first!");
2274 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
2275 return nativeResponseValue;
2277 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
2278 export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
2279 if(!isWasmInitialized) {
2280 throw new Error("initializeWasm() must be awaited first!");
2282 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
2283 return nativeResponseValue;
2285 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2286 export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
2287 if(!isWasmInitialized) {
2288 throw new Error("initializeWasm() must be awaited first!");
2290 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
2291 return nativeResponseValue;
2293 // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
2294 export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
2295 if(!isWasmInitialized) {
2296 throw new Error("initializeWasm() must be awaited first!");
2298 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
2299 // debug statements here
2301 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2302 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
2303 if(!isWasmInitialized) {
2304 throw new Error("initializeWasm() must be awaited first!");
2306 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
2307 return nativeResponseValue;
2309 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
2310 export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
2311 if(!isWasmInitialized) {
2312 throw new Error("initializeWasm() must be awaited first!");
2314 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
2315 return nativeResponseValue;
2317 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2318 export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
2319 if(!isWasmInitialized) {
2320 throw new Error("initializeWasm() must be awaited first!");
2322 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
2323 return nativeResponseValue;
2325 // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
2326 export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
2327 if(!isWasmInitialized) {
2328 throw new Error("initializeWasm() must be awaited first!");
2330 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
2331 // debug statements here
2333 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2334 export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
2335 if(!isWasmInitialized) {
2336 throw new Error("initializeWasm() must be awaited first!");
2338 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
2339 return nativeResponseValue;
2341 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2342 export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
2343 if(!isWasmInitialized) {
2344 throw new Error("initializeWasm() must be awaited first!");
2346 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
2347 return nativeResponseValue;
2349 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2350 export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
2351 if(!isWasmInitialized) {
2352 throw new Error("initializeWasm() must be awaited first!");
2354 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
2355 return nativeResponseValue;
2357 // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2358 export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
2359 if(!isWasmInitialized) {
2360 throw new Error("initializeWasm() must be awaited first!");
2362 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
2363 // debug statements here
2365 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
2366 export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
2367 if(!isWasmInitialized) {
2368 throw new Error("initializeWasm() must be awaited first!");
2370 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
2371 return nativeResponseValue;
2373 // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
2374 export function CVec_NetAddressZ_free(_res: number[]): void {
2375 if(!isWasmInitialized) {
2376 throw new Error("initializeWasm() must be awaited first!");
2378 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
2379 // debug statements here
2381 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2382 export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
2383 if(!isWasmInitialized) {
2384 throw new Error("initializeWasm() must be awaited first!");
2386 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
2387 return nativeResponseValue;
2389 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2390 export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
2391 if(!isWasmInitialized) {
2392 throw new Error("initializeWasm() must be awaited first!");
2394 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
2395 return nativeResponseValue;
2397 // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
2398 export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
2399 if(!isWasmInitialized) {
2400 throw new Error("initializeWasm() must be awaited first!");
2402 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
2403 // debug statements here
2405 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
2406 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
2407 if(!isWasmInitialized) {
2408 throw new Error("initializeWasm() must be awaited first!");
2410 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
2411 return nativeResponseValue;
2413 // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
2414 export function CVec_u64Z_free(_res: number[]): void {
2415 if(!isWasmInitialized) {
2416 throw new Error("initializeWasm() must be awaited first!");
2418 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
2419 // debug statements here
2421 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
2422 export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
2423 if(!isWasmInitialized) {
2424 throw new Error("initializeWasm() must be awaited first!");
2426 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
2427 return nativeResponseValue;
2429 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
2430 export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
2431 if(!isWasmInitialized) {
2432 throw new Error("initializeWasm() must be awaited first!");
2434 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
2435 return nativeResponseValue;
2437 // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
2438 export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
2439 if(!isWasmInitialized) {
2440 throw new Error("initializeWasm() must be awaited first!");
2442 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
2443 // debug statements here
2445 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
2446 export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
2447 if(!isWasmInitialized) {
2448 throw new Error("initializeWasm() must be awaited first!");
2450 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
2451 return nativeResponseValue;
2453 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
2454 export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
2455 if(!isWasmInitialized) {
2456 throw new Error("initializeWasm() must be awaited first!");
2458 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
2459 return nativeResponseValue;
2461 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
2462 export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
2463 if(!isWasmInitialized) {
2464 throw new Error("initializeWasm() must be awaited first!");
2466 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
2467 return nativeResponseValue;
2469 // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
2470 export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
2471 if(!isWasmInitialized) {
2472 throw new Error("initializeWasm() must be awaited first!");
2474 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
2475 // debug statements here
2477 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
2478 export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
2479 if(!isWasmInitialized) {
2480 throw new Error("initializeWasm() must be awaited first!");
2482 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
2483 return nativeResponseValue;
2485 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2486 export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2487 if(!isWasmInitialized) {
2488 throw new Error("initializeWasm() must be awaited first!");
2490 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2491 return nativeResponseValue;
2493 // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2494 export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2495 if(!isWasmInitialized) {
2496 throw new Error("initializeWasm() must be awaited first!");
2498 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2499 // debug statements here
2501 // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2502 export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2503 if(!isWasmInitialized) {
2504 throw new Error("initializeWasm() must be awaited first!");
2506 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2507 // debug statements here
2509 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2510 export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2511 if(!isWasmInitialized) {
2512 throw new Error("initializeWasm() must be awaited first!");
2514 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2515 return nativeResponseValue;
2517 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2518 export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
2519 if(!isWasmInitialized) {
2520 throw new Error("initializeWasm() must be awaited first!");
2522 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2523 return nativeResponseValue;
2525 // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2526 export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2527 if(!isWasmInitialized) {
2528 throw new Error("initializeWasm() must be awaited first!");
2530 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2531 // debug statements here
2533 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2534 export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2535 if(!isWasmInitialized) {
2536 throw new Error("initializeWasm() must be awaited first!");
2538 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2539 return nativeResponseValue;
2541 // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2542 export function CVec_MonitorEventZ_free(_res: number[]): void {
2543 if(!isWasmInitialized) {
2544 throw new Error("initializeWasm() must be awaited first!");
2546 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2547 // debug statements here
2549 // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
2550 export function CVec_EventZ_free(_res: number[]): void {
2551 if(!isWasmInitialized) {
2552 throw new Error("initializeWasm() must be awaited first!");
2554 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
2555 // debug statements here
2557 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
2558 export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
2559 if(!isWasmInitialized) {
2560 throw new Error("initializeWasm() must be awaited first!");
2562 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
2563 return nativeResponseValue;
2565 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
2566 export function CResult_OutPointDecodeErrorZ_err(e: number): number {
2567 if(!isWasmInitialized) {
2568 throw new Error("initializeWasm() must be awaited first!");
2570 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
2571 return nativeResponseValue;
2573 // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
2574 export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
2575 if(!isWasmInitialized) {
2576 throw new Error("initializeWasm() must be awaited first!");
2578 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
2579 // debug statements here
2581 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
2582 export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
2583 if(!isWasmInitialized) {
2584 throw new Error("initializeWasm() must be awaited first!");
2586 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
2587 return nativeResponseValue;
2589 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
2590 export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
2591 if(!isWasmInitialized) {
2592 throw new Error("initializeWasm() must be awaited first!");
2594 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
2595 return nativeResponseValue;
2597 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2598 export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
2599 if(!isWasmInitialized) {
2600 throw new Error("initializeWasm() must be awaited first!");
2602 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
2603 return nativeResponseValue;
2605 // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
2606 export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
2607 if(!isWasmInitialized) {
2608 throw new Error("initializeWasm() must be awaited first!");
2610 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
2611 // debug statements here
2613 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
2614 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
2615 if(!isWasmInitialized) {
2616 throw new Error("initializeWasm() must be awaited first!");
2618 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
2619 return nativeResponseValue;
2621 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
2622 export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
2623 if(!isWasmInitialized) {
2624 throw new Error("initializeWasm() must be awaited first!");
2626 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
2627 return nativeResponseValue;
2629 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2630 export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
2631 if(!isWasmInitialized) {
2632 throw new Error("initializeWasm() must be awaited first!");
2634 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
2635 return nativeResponseValue;
2637 // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
2638 export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
2639 if(!isWasmInitialized) {
2640 throw new Error("initializeWasm() must be awaited first!");
2642 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
2643 // debug statements here
2645 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
2646 export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
2647 if(!isWasmInitialized) {
2648 throw new Error("initializeWasm() must be awaited first!");
2650 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
2651 return nativeResponseValue;
2653 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
2654 export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
2655 if(!isWasmInitialized) {
2656 throw new Error("initializeWasm() must be awaited first!");
2658 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
2659 return nativeResponseValue;
2661 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
2662 export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
2663 if(!isWasmInitialized) {
2664 throw new Error("initializeWasm() must be awaited first!");
2666 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
2667 return nativeResponseValue;
2669 // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
2670 export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
2671 if(!isWasmInitialized) {
2672 throw new Error("initializeWasm() must be awaited first!");
2674 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
2675 // debug statements here
2677 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
2678 export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
2679 if(!isWasmInitialized) {
2680 throw new Error("initializeWasm() must be awaited first!");
2682 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
2683 return nativeResponseValue;
2685 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
2686 export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
2687 if(!isWasmInitialized) {
2688 throw new Error("initializeWasm() must be awaited first!");
2690 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
2691 return nativeResponseValue;
2693 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
2694 export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
2695 if(!isWasmInitialized) {
2696 throw new Error("initializeWasm() must be awaited first!");
2698 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
2699 return nativeResponseValue;
2701 // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
2702 export function C2Tuple_OutPointScriptZ_free(_res: number): void {
2703 if(!isWasmInitialized) {
2704 throw new Error("initializeWasm() must be awaited first!");
2706 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
2707 // debug statements here
2709 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
2710 export function C2Tuple_u32ScriptZ_clone(orig: number): number {
2711 if(!isWasmInitialized) {
2712 throw new Error("initializeWasm() must be awaited first!");
2714 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
2715 return nativeResponseValue;
2717 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
2718 export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
2719 if(!isWasmInitialized) {
2720 throw new Error("initializeWasm() must be awaited first!");
2722 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
2723 return nativeResponseValue;
2725 // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
2726 export function C2Tuple_u32ScriptZ_free(_res: number): void {
2727 if(!isWasmInitialized) {
2728 throw new Error("initializeWasm() must be awaited first!");
2730 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
2731 // debug statements here
2733 // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
2734 export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
2735 if(!isWasmInitialized) {
2736 throw new Error("initializeWasm() must be awaited first!");
2738 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
2739 // debug statements here
2741 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
2742 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
2743 if(!isWasmInitialized) {
2744 throw new Error("initializeWasm() must be awaited first!");
2746 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
2747 return nativeResponseValue;
2749 // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
2750 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
2751 if(!isWasmInitialized) {
2752 throw new Error("initializeWasm() must be awaited first!");
2754 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
2755 // debug statements here
2757 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
2758 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
2759 if(!isWasmInitialized) {
2760 throw new Error("initializeWasm() must be awaited first!");
2762 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
2763 // debug statements here
2765 // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
2766 export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
2767 if(!isWasmInitialized) {
2768 throw new Error("initializeWasm() must be awaited first!");
2770 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
2771 // debug statements here
2773 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
2774 export function C2Tuple_u32TxOutZ_clone(orig: number): number {
2775 if(!isWasmInitialized) {
2776 throw new Error("initializeWasm() must be awaited first!");
2778 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
2779 return nativeResponseValue;
2781 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
2782 export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
2783 if(!isWasmInitialized) {
2784 throw new Error("initializeWasm() must be awaited first!");
2786 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
2787 return nativeResponseValue;
2789 // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
2790 export function C2Tuple_u32TxOutZ_free(_res: number): void {
2791 if(!isWasmInitialized) {
2792 throw new Error("initializeWasm() must be awaited first!");
2794 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
2795 // debug statements here
2797 // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
2798 export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
2799 if(!isWasmInitialized) {
2800 throw new Error("initializeWasm() must be awaited first!");
2802 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
2803 // debug statements here
2805 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
2806 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
2807 if(!isWasmInitialized) {
2808 throw new Error("initializeWasm() must be awaited first!");
2810 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
2811 return nativeResponseValue;
2813 // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
2814 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
2815 if(!isWasmInitialized) {
2816 throw new Error("initializeWasm() must be awaited first!");
2818 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
2819 // debug statements here
2821 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
2822 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
2823 if(!isWasmInitialized) {
2824 throw new Error("initializeWasm() must be awaited first!");
2826 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
2827 // debug statements here
2829 // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
2830 export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
2831 if(!isWasmInitialized) {
2832 throw new Error("initializeWasm() must be awaited first!");
2834 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
2835 return nativeResponseValue;
2837 // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
2838 export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
2839 if(!isWasmInitialized) {
2840 throw new Error("initializeWasm() must be awaited first!");
2842 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
2843 // debug statements here
2845 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
2846 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
2847 if(!isWasmInitialized) {
2848 throw new Error("initializeWasm() must be awaited first!");
2850 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
2851 return nativeResponseValue;
2853 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
2854 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
2855 if(!isWasmInitialized) {
2856 throw new Error("initializeWasm() must be awaited first!");
2858 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
2859 return nativeResponseValue;
2861 // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
2862 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
2863 if(!isWasmInitialized) {
2864 throw new Error("initializeWasm() must be awaited first!");
2866 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
2867 // debug statements here
2869 // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2870 export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2871 if(!isWasmInitialized) {
2872 throw new Error("initializeWasm() must be awaited first!");
2874 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2875 // debug statements here
2877 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2878 export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2879 if(!isWasmInitialized) {
2880 throw new Error("initializeWasm() must be awaited first!");
2882 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2883 return nativeResponseValue;
2885 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2886 export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
2887 if(!isWasmInitialized) {
2888 throw new Error("initializeWasm() must be awaited first!");
2890 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2891 return nativeResponseValue;
2893 // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2894 export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2895 if(!isWasmInitialized) {
2896 throw new Error("initializeWasm() must be awaited first!");
2898 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2899 // debug statements here
2901 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2902 export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2903 if(!isWasmInitialized) {
2904 throw new Error("initializeWasm() must be awaited first!");
2906 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2907 return nativeResponseValue;
2909 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
2910 export function CResult_NoneAPIErrorZ_ok(): number {
2911 if(!isWasmInitialized) {
2912 throw new Error("initializeWasm() must be awaited first!");
2914 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
2915 return nativeResponseValue;
2917 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
2918 export function CResult_NoneAPIErrorZ_err(e: number): number {
2919 if(!isWasmInitialized) {
2920 throw new Error("initializeWasm() must be awaited first!");
2922 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
2923 return nativeResponseValue;
2925 // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
2926 export function CResult_NoneAPIErrorZ_free(_res: number): void {
2927 if(!isWasmInitialized) {
2928 throw new Error("initializeWasm() must be awaited first!");
2930 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
2931 // debug statements here
2933 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
2934 export function CResult_NoneAPIErrorZ_clone(orig: number): number {
2935 if(!isWasmInitialized) {
2936 throw new Error("initializeWasm() must be awaited first!");
2938 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
2939 return nativeResponseValue;
2941 // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
2942 export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
2943 if(!isWasmInitialized) {
2944 throw new Error("initializeWasm() must be awaited first!");
2946 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
2947 // debug statements here
2949 // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
2950 export function CVec_APIErrorZ_free(_res: number[]): void {
2951 if(!isWasmInitialized) {
2952 throw new Error("initializeWasm() must be awaited first!");
2954 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
2955 // debug statements here
2957 // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2958 export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2959 if(!isWasmInitialized) {
2960 throw new Error("initializeWasm() must be awaited first!");
2962 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2963 // debug statements here
2965 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
2966 export function CResult_NonePaymentSendFailureZ_ok(): number {
2967 if(!isWasmInitialized) {
2968 throw new Error("initializeWasm() must be awaited first!");
2970 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
2971 return nativeResponseValue;
2973 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
2974 export function CResult_NonePaymentSendFailureZ_err(e: number): number {
2975 if(!isWasmInitialized) {
2976 throw new Error("initializeWasm() must be awaited first!");
2978 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
2979 return nativeResponseValue;
2981 // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
2982 export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
2983 if(!isWasmInitialized) {
2984 throw new Error("initializeWasm() must be awaited first!");
2986 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
2987 // debug statements here
2989 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
2990 export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
2991 if(!isWasmInitialized) {
2992 throw new Error("initializeWasm() must be awaited first!");
2994 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
2995 return nativeResponseValue;
2997 // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
2998 export function CVec_ChannelMonitorZ_free(_res: number[]): void {
2999 if(!isWasmInitialized) {
3000 throw new Error("initializeWasm() must be awaited first!");
3002 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
3003 // debug statements here
3005 // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
3006 export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
3007 if(!isWasmInitialized) {
3008 throw new Error("initializeWasm() must be awaited first!");
3010 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
3011 return nativeResponseValue;
3013 // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
3014 export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
3015 if(!isWasmInitialized) {
3016 throw new Error("initializeWasm() must be awaited first!");
3018 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
3019 // debug statements here
3021 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
3022 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
3023 if(!isWasmInitialized) {
3024 throw new Error("initializeWasm() must be awaited first!");
3026 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
3027 return nativeResponseValue;
3029 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
3030 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
3031 if(!isWasmInitialized) {
3032 throw new Error("initializeWasm() must be awaited first!");
3034 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
3035 return nativeResponseValue;
3037 // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
3038 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
3039 if(!isWasmInitialized) {
3040 throw new Error("initializeWasm() must be awaited first!");
3042 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
3043 // debug statements here
3045 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
3046 export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
3047 if(!isWasmInitialized) {
3048 throw new Error("initializeWasm() must be awaited first!");
3050 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
3051 return nativeResponseValue;
3053 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3054 export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
3055 if(!isWasmInitialized) {
3056 throw new Error("initializeWasm() must be awaited first!");
3058 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
3059 return nativeResponseValue;
3061 // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
3062 export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
3063 if(!isWasmInitialized) {
3064 throw new Error("initializeWasm() must be awaited first!");
3066 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
3067 // debug statements here
3069 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3070 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3071 if(!isWasmInitialized) {
3072 throw new Error("initializeWasm() must be awaited first!");
3074 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
3075 return nativeResponseValue;
3077 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
3078 export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
3079 if(!isWasmInitialized) {
3080 throw new Error("initializeWasm() must be awaited first!");
3082 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
3083 return nativeResponseValue;
3085 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
3086 export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
3087 if(!isWasmInitialized) {
3088 throw new Error("initializeWasm() must be awaited first!");
3090 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
3091 return nativeResponseValue;
3093 // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
3094 export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
3095 if(!isWasmInitialized) {
3096 throw new Error("initializeWasm() must be awaited first!");
3098 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
3099 // debug statements here
3101 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
3102 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
3103 if(!isWasmInitialized) {
3104 throw new Error("initializeWasm() must be awaited first!");
3106 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
3107 return nativeResponseValue;
3109 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
3110 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
3111 if(!isWasmInitialized) {
3112 throw new Error("initializeWasm() must be awaited first!");
3114 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
3115 return nativeResponseValue;
3117 // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
3118 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
3119 if(!isWasmInitialized) {
3120 throw new Error("initializeWasm() must be awaited first!");
3122 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
3123 // debug statements here
3125 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
3126 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
3127 if(!isWasmInitialized) {
3128 throw new Error("initializeWasm() must be awaited first!");
3130 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
3131 return nativeResponseValue;
3133 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3134 export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3135 if(!isWasmInitialized) {
3136 throw new Error("initializeWasm() must be awaited first!");
3138 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3139 return nativeResponseValue;
3141 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3142 export function CResult_SignatureNoneZ_err(): number {
3143 if(!isWasmInitialized) {
3144 throw new Error("initializeWasm() must be awaited first!");
3146 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3147 return nativeResponseValue;
3149 // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3150 export function CResult_SignatureNoneZ_free(_res: number): void {
3151 if(!isWasmInitialized) {
3152 throw new Error("initializeWasm() must be awaited first!");
3154 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3155 // debug statements here
3157 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3158 export function CResult_SignatureNoneZ_clone(orig: number): number {
3159 if(!isWasmInitialized) {
3160 throw new Error("initializeWasm() must be awaited first!");
3162 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3163 return nativeResponseValue;
3165 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
3166 export function CResult_SignDecodeErrorZ_ok(o: number): number {
3167 if(!isWasmInitialized) {
3168 throw new Error("initializeWasm() must be awaited first!");
3170 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
3171 return nativeResponseValue;
3173 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
3174 export function CResult_SignDecodeErrorZ_err(e: number): number {
3175 if(!isWasmInitialized) {
3176 throw new Error("initializeWasm() must be awaited first!");
3178 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
3179 return nativeResponseValue;
3181 // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
3182 export function CResult_SignDecodeErrorZ_free(_res: number): void {
3183 if(!isWasmInitialized) {
3184 throw new Error("initializeWasm() must be awaited first!");
3186 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
3187 // debug statements here
3189 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
3190 export function CResult_SignDecodeErrorZ_clone(orig: number): number {
3191 if(!isWasmInitialized) {
3192 throw new Error("initializeWasm() must be awaited first!");
3194 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
3195 return nativeResponseValue;
3197 // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3198 export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3199 if(!isWasmInitialized) {
3200 throw new Error("initializeWasm() must be awaited first!");
3202 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3203 // debug statements here
3205 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3206 export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3207 if(!isWasmInitialized) {
3208 throw new Error("initializeWasm() must be awaited first!");
3210 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3211 return nativeResponseValue;
3213 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3214 export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3215 if(!isWasmInitialized) {
3216 throw new Error("initializeWasm() must be awaited first!");
3218 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3219 return nativeResponseValue;
3221 // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3222 export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3223 if(!isWasmInitialized) {
3224 throw new Error("initializeWasm() must be awaited first!");
3226 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3227 // debug statements here
3229 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3230 export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3231 if(!isWasmInitialized) {
3232 throw new Error("initializeWasm() must be awaited first!");
3234 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3235 return nativeResponseValue;
3237 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3238 export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3239 if(!isWasmInitialized) {
3240 throw new Error("initializeWasm() must be awaited first!");
3242 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3243 return nativeResponseValue;
3245 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3246 export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3247 if(!isWasmInitialized) {
3248 throw new Error("initializeWasm() must be awaited first!");
3250 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3251 return nativeResponseValue;
3253 // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3254 export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3255 if(!isWasmInitialized) {
3256 throw new Error("initializeWasm() must be awaited first!");
3258 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3259 // debug statements here
3261 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3262 export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3263 if(!isWasmInitialized) {
3264 throw new Error("initializeWasm() must be awaited first!");
3266 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3267 return nativeResponseValue;
3269 // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3270 export function CVec_TxOutZ_free(_res: number[]): void {
3271 if(!isWasmInitialized) {
3272 throw new Error("initializeWasm() must be awaited first!");
3274 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3275 // debug statements here
3277 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3278 export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3279 if(!isWasmInitialized) {
3280 throw new Error("initializeWasm() must be awaited first!");
3282 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3283 return nativeResponseValue;
3285 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3286 export function CResult_TransactionNoneZ_err(): number {
3287 if(!isWasmInitialized) {
3288 throw new Error("initializeWasm() must be awaited first!");
3290 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3291 return nativeResponseValue;
3293 // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3294 export function CResult_TransactionNoneZ_free(_res: number): void {
3295 if(!isWasmInitialized) {
3296 throw new Error("initializeWasm() must be awaited first!");
3298 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3299 // debug statements here
3301 // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
3302 export function CVec_RouteHopZ_free(_res: number[]): void {
3303 if(!isWasmInitialized) {
3304 throw new Error("initializeWasm() must be awaited first!");
3306 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
3307 // debug statements here
3309 // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
3310 export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
3311 if(!isWasmInitialized) {
3312 throw new Error("initializeWasm() must be awaited first!");
3314 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
3315 // debug statements here
3317 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
3318 export function CResult_RouteDecodeErrorZ_ok(o: number): number {
3319 if(!isWasmInitialized) {
3320 throw new Error("initializeWasm() must be awaited first!");
3322 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
3323 return nativeResponseValue;
3325 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
3326 export function CResult_RouteDecodeErrorZ_err(e: number): number {
3327 if(!isWasmInitialized) {
3328 throw new Error("initializeWasm() must be awaited first!");
3330 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
3331 return nativeResponseValue;
3333 // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3334 export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3335 if(!isWasmInitialized) {
3336 throw new Error("initializeWasm() must be awaited first!");
3338 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3339 // debug statements here
3341 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3342 export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3343 if(!isWasmInitialized) {
3344 throw new Error("initializeWasm() must be awaited first!");
3346 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3347 return nativeResponseValue;
3349 // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3350 export function CVec_RouteHintZ_free(_res: number[]): void {
3351 if(!isWasmInitialized) {
3352 throw new Error("initializeWasm() must be awaited first!");
3354 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3355 // debug statements here
3357 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3358 export function CResult_RouteLightningErrorZ_ok(o: number): number {
3359 if(!isWasmInitialized) {
3360 throw new Error("initializeWasm() must be awaited first!");
3362 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3363 return nativeResponseValue;
3365 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3366 export function CResult_RouteLightningErrorZ_err(e: number): number {
3367 if(!isWasmInitialized) {
3368 throw new Error("initializeWasm() must be awaited first!");
3370 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3371 return nativeResponseValue;
3373 // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3374 export function CResult_RouteLightningErrorZ_free(_res: number): void {
3375 if(!isWasmInitialized) {
3376 throw new Error("initializeWasm() must be awaited first!");
3378 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3379 // debug statements here
3381 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3382 export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3383 if(!isWasmInitialized) {
3384 throw new Error("initializeWasm() must be awaited first!");
3386 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3387 return nativeResponseValue;
3389 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
3390 export function CResult_NetAddressu8Z_ok(o: number): number {
3391 if(!isWasmInitialized) {
3392 throw new Error("initializeWasm() must be awaited first!");
3394 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
3395 return nativeResponseValue;
3397 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
3398 export function CResult_NetAddressu8Z_err(e: number): number {
3399 if(!isWasmInitialized) {
3400 throw new Error("initializeWasm() must be awaited first!");
3402 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
3403 return nativeResponseValue;
3405 // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
3406 export function CResult_NetAddressu8Z_free(_res: number): void {
3407 if(!isWasmInitialized) {
3408 throw new Error("initializeWasm() must be awaited first!");
3410 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
3411 // debug statements here
3413 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
3414 export function CResult_NetAddressu8Z_clone(orig: number): number {
3415 if(!isWasmInitialized) {
3416 throw new Error("initializeWasm() must be awaited first!");
3418 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
3419 return nativeResponseValue;
3421 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
3422 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
3423 if(!isWasmInitialized) {
3424 throw new Error("initializeWasm() must be awaited first!");
3426 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
3427 return nativeResponseValue;
3429 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
3430 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
3431 if(!isWasmInitialized) {
3432 throw new Error("initializeWasm() must be awaited first!");
3434 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
3435 return nativeResponseValue;
3437 // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
3438 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
3439 if(!isWasmInitialized) {
3440 throw new Error("initializeWasm() must be awaited first!");
3442 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
3443 // debug statements here
3445 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
3446 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
3447 if(!isWasmInitialized) {
3448 throw new Error("initializeWasm() must be awaited first!");
3450 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
3451 return nativeResponseValue;
3453 // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
3454 export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
3455 if(!isWasmInitialized) {
3456 throw new Error("initializeWasm() must be awaited first!");
3458 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
3459 // debug statements here
3461 // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
3462 export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
3463 if(!isWasmInitialized) {
3464 throw new Error("initializeWasm() must be awaited first!");
3466 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
3467 // debug statements here
3469 // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
3470 export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
3471 if(!isWasmInitialized) {
3472 throw new Error("initializeWasm() must be awaited first!");
3474 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
3475 // debug statements here
3477 // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
3478 export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
3479 if(!isWasmInitialized) {
3480 throw new Error("initializeWasm() must be awaited first!");
3482 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
3483 // debug statements here
3485 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
3486 export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
3487 if(!isWasmInitialized) {
3488 throw new Error("initializeWasm() must be awaited first!");
3490 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
3491 return nativeResponseValue;
3493 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
3494 export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
3495 if(!isWasmInitialized) {
3496 throw new Error("initializeWasm() must be awaited first!");
3498 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
3499 return nativeResponseValue;
3501 // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
3502 export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
3503 if(!isWasmInitialized) {
3504 throw new Error("initializeWasm() must be awaited first!");
3506 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
3507 // debug statements here
3509 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
3510 export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
3511 if(!isWasmInitialized) {
3512 throw new Error("initializeWasm() must be awaited first!");
3514 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
3515 return nativeResponseValue;
3517 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
3518 export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
3519 if(!isWasmInitialized) {
3520 throw new Error("initializeWasm() must be awaited first!");
3522 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
3523 return nativeResponseValue;
3525 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
3526 export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
3527 if(!isWasmInitialized) {
3528 throw new Error("initializeWasm() must be awaited first!");
3530 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
3531 return nativeResponseValue;
3533 // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
3534 export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
3535 if(!isWasmInitialized) {
3536 throw new Error("initializeWasm() must be awaited first!");
3538 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
3539 // debug statements here
3541 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
3542 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
3543 if(!isWasmInitialized) {
3544 throw new Error("initializeWasm() must be awaited first!");
3546 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
3547 return nativeResponseValue;
3549 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
3550 export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
3551 if(!isWasmInitialized) {
3552 throw new Error("initializeWasm() must be awaited first!");
3554 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
3555 return nativeResponseValue;
3557 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
3558 export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
3559 if(!isWasmInitialized) {
3560 throw new Error("initializeWasm() must be awaited first!");
3562 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
3563 return nativeResponseValue;
3565 // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
3566 export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
3567 if(!isWasmInitialized) {
3568 throw new Error("initializeWasm() must be awaited first!");
3570 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
3571 // debug statements here
3573 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
3574 export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
3575 if(!isWasmInitialized) {
3576 throw new Error("initializeWasm() must be awaited first!");
3578 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
3579 return nativeResponseValue;
3581 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
3582 export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
3583 if(!isWasmInitialized) {
3584 throw new Error("initializeWasm() must be awaited first!");
3586 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
3587 return nativeResponseValue;
3589 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3590 export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
3591 if(!isWasmInitialized) {
3592 throw new Error("initializeWasm() must be awaited first!");
3594 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
3595 return nativeResponseValue;
3597 // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
3598 export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
3599 if(!isWasmInitialized) {
3600 throw new Error("initializeWasm() must be awaited first!");
3602 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
3603 // debug statements here
3605 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
3606 export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
3607 if(!isWasmInitialized) {
3608 throw new Error("initializeWasm() must be awaited first!");
3610 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
3611 return nativeResponseValue;
3613 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
3614 export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
3615 if(!isWasmInitialized) {
3616 throw new Error("initializeWasm() must be awaited first!");
3618 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
3619 return nativeResponseValue;
3621 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
3622 export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
3623 if(!isWasmInitialized) {
3624 throw new Error("initializeWasm() must be awaited first!");
3626 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
3627 return nativeResponseValue;
3629 // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
3630 export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
3631 if(!isWasmInitialized) {
3632 throw new Error("initializeWasm() must be awaited first!");
3634 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
3635 // debug statements here
3637 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
3638 export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
3639 if(!isWasmInitialized) {
3640 throw new Error("initializeWasm() must be awaited first!");
3642 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
3643 return nativeResponseValue;
3645 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
3646 export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
3647 if(!isWasmInitialized) {
3648 throw new Error("initializeWasm() must be awaited first!");
3650 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
3651 return nativeResponseValue;
3653 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
3654 export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
3655 if(!isWasmInitialized) {
3656 throw new Error("initializeWasm() must be awaited first!");
3658 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
3659 return nativeResponseValue;
3661 // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
3662 export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
3663 if(!isWasmInitialized) {
3664 throw new Error("initializeWasm() must be awaited first!");
3666 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
3667 // debug statements here
3669 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
3670 export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
3671 if(!isWasmInitialized) {
3672 throw new Error("initializeWasm() must be awaited first!");
3674 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
3675 return nativeResponseValue;
3677 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
3678 export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
3679 if(!isWasmInitialized) {
3680 throw new Error("initializeWasm() must be awaited first!");
3682 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
3683 return nativeResponseValue;
3685 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3686 export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
3687 if(!isWasmInitialized) {
3688 throw new Error("initializeWasm() must be awaited first!");
3690 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
3691 return nativeResponseValue;
3693 // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
3694 export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
3695 if(!isWasmInitialized) {
3696 throw new Error("initializeWasm() must be awaited first!");
3698 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
3699 // debug statements here
3701 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
3702 export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
3703 if(!isWasmInitialized) {
3704 throw new Error("initializeWasm() must be awaited first!");
3706 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
3707 return nativeResponseValue;
3709 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
3710 export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
3711 if(!isWasmInitialized) {
3712 throw new Error("initializeWasm() must be awaited first!");
3714 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
3715 return nativeResponseValue;
3717 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
3718 export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
3719 if(!isWasmInitialized) {
3720 throw new Error("initializeWasm() must be awaited first!");
3722 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
3723 return nativeResponseValue;
3725 // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
3726 export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
3727 if(!isWasmInitialized) {
3728 throw new Error("initializeWasm() must be awaited first!");
3730 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
3731 // debug statements here
3733 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
3734 export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
3735 if(!isWasmInitialized) {
3736 throw new Error("initializeWasm() must be awaited first!");
3738 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
3739 return nativeResponseValue;
3741 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
3742 export function CResult_InitDecodeErrorZ_ok(o: number): number {
3743 if(!isWasmInitialized) {
3744 throw new Error("initializeWasm() must be awaited first!");
3746 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
3747 return nativeResponseValue;
3749 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
3750 export function CResult_InitDecodeErrorZ_err(e: number): number {
3751 if(!isWasmInitialized) {
3752 throw new Error("initializeWasm() must be awaited first!");
3754 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
3755 return nativeResponseValue;
3757 // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
3758 export function CResult_InitDecodeErrorZ_free(_res: number): void {
3759 if(!isWasmInitialized) {
3760 throw new Error("initializeWasm() must be awaited first!");
3762 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
3763 // debug statements here
3765 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
3766 export function CResult_InitDecodeErrorZ_clone(orig: number): number {
3767 if(!isWasmInitialized) {
3768 throw new Error("initializeWasm() must be awaited first!");
3770 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
3771 return nativeResponseValue;
3773 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
3774 export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
3775 if(!isWasmInitialized) {
3776 throw new Error("initializeWasm() must be awaited first!");
3778 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
3779 return nativeResponseValue;
3781 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
3782 export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
3783 if(!isWasmInitialized) {
3784 throw new Error("initializeWasm() must be awaited first!");
3786 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
3787 return nativeResponseValue;
3789 // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
3790 export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
3791 if(!isWasmInitialized) {
3792 throw new Error("initializeWasm() must be awaited first!");
3794 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
3795 // debug statements here
3797 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
3798 export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
3799 if(!isWasmInitialized) {
3800 throw new Error("initializeWasm() must be awaited first!");
3802 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
3803 return nativeResponseValue;
3805 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
3806 export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
3807 if(!isWasmInitialized) {
3808 throw new Error("initializeWasm() must be awaited first!");
3810 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
3811 return nativeResponseValue;
3813 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
3814 export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
3815 if(!isWasmInitialized) {
3816 throw new Error("initializeWasm() must be awaited first!");
3818 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
3819 return nativeResponseValue;
3821 // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
3822 export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
3823 if(!isWasmInitialized) {
3824 throw new Error("initializeWasm() must be awaited first!");
3826 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
3827 // debug statements here
3829 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
3830 export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
3831 if(!isWasmInitialized) {
3832 throw new Error("initializeWasm() must be awaited first!");
3834 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
3835 return nativeResponseValue;
3837 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
3838 export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
3839 if(!isWasmInitialized) {
3840 throw new Error("initializeWasm() must be awaited first!");
3842 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
3843 return nativeResponseValue;
3845 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
3846 export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
3847 if(!isWasmInitialized) {
3848 throw new Error("initializeWasm() must be awaited first!");
3850 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
3851 return nativeResponseValue;
3853 // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
3854 export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
3855 if(!isWasmInitialized) {
3856 throw new Error("initializeWasm() must be awaited first!");
3858 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
3859 // debug statements here
3861 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
3862 export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
3863 if(!isWasmInitialized) {
3864 throw new Error("initializeWasm() must be awaited first!");
3866 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
3867 return nativeResponseValue;
3869 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
3870 export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
3871 if(!isWasmInitialized) {
3872 throw new Error("initializeWasm() must be awaited first!");
3874 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
3875 return nativeResponseValue;
3877 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3878 export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
3879 if(!isWasmInitialized) {
3880 throw new Error("initializeWasm() must be awaited first!");
3882 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
3883 return nativeResponseValue;
3885 // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
3886 export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
3887 if(!isWasmInitialized) {
3888 throw new Error("initializeWasm() must be awaited first!");
3890 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
3891 // debug statements here
3893 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
3894 export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
3895 if(!isWasmInitialized) {
3896 throw new Error("initializeWasm() must be awaited first!");
3898 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
3899 return nativeResponseValue;
3901 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
3902 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
3903 if(!isWasmInitialized) {
3904 throw new Error("initializeWasm() must be awaited first!");
3906 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
3907 return nativeResponseValue;
3909 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3910 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
3911 if(!isWasmInitialized) {
3912 throw new Error("initializeWasm() must be awaited first!");
3914 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
3915 return nativeResponseValue;
3917 // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
3918 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
3919 if(!isWasmInitialized) {
3920 throw new Error("initializeWasm() must be awaited first!");
3922 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
3923 // debug statements here
3925 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
3926 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
3927 if(!isWasmInitialized) {
3928 throw new Error("initializeWasm() must be awaited first!");
3930 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
3931 return nativeResponseValue;
3933 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
3934 export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
3935 if(!isWasmInitialized) {
3936 throw new Error("initializeWasm() must be awaited first!");
3938 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
3939 return nativeResponseValue;
3941 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
3942 export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
3943 if(!isWasmInitialized) {
3944 throw new Error("initializeWasm() must be awaited first!");
3946 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
3947 return nativeResponseValue;
3949 // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
3950 export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
3951 if(!isWasmInitialized) {
3952 throw new Error("initializeWasm() must be awaited first!");
3954 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
3955 // debug statements here
3957 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
3958 export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
3959 if(!isWasmInitialized) {
3960 throw new Error("initializeWasm() must be awaited first!");
3962 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
3963 return nativeResponseValue;
3965 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
3966 export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
3967 if(!isWasmInitialized) {
3968 throw new Error("initializeWasm() must be awaited first!");
3970 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
3971 return nativeResponseValue;
3973 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3974 export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
3975 if(!isWasmInitialized) {
3976 throw new Error("initializeWasm() must be awaited first!");
3978 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
3979 return nativeResponseValue;
3981 // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
3982 export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
3983 if(!isWasmInitialized) {
3984 throw new Error("initializeWasm() must be awaited first!");
3986 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
3987 // debug statements here
3989 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
3990 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
3991 if(!isWasmInitialized) {
3992 throw new Error("initializeWasm() must be awaited first!");
3994 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
3995 return nativeResponseValue;
3997 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
3998 export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
3999 if(!isWasmInitialized) {
4000 throw new Error("initializeWasm() must be awaited first!");
4002 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
4003 return nativeResponseValue;
4005 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
4006 export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
4007 if(!isWasmInitialized) {
4008 throw new Error("initializeWasm() must be awaited first!");
4010 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
4011 return nativeResponseValue;
4013 // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
4014 export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
4015 if(!isWasmInitialized) {
4016 throw new Error("initializeWasm() must be awaited first!");
4018 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
4019 // debug statements here
4021 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
4022 export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
4023 if(!isWasmInitialized) {
4024 throw new Error("initializeWasm() must be awaited first!");
4026 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
4027 return nativeResponseValue;
4029 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
4030 export function CResult_PingDecodeErrorZ_ok(o: number): number {
4031 if(!isWasmInitialized) {
4032 throw new Error("initializeWasm() must be awaited first!");
4034 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
4035 return nativeResponseValue;
4037 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
4038 export function CResult_PingDecodeErrorZ_err(e: number): number {
4039 if(!isWasmInitialized) {
4040 throw new Error("initializeWasm() must be awaited first!");
4042 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
4043 return nativeResponseValue;
4045 // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
4046 export function CResult_PingDecodeErrorZ_free(_res: number): void {
4047 if(!isWasmInitialized) {
4048 throw new Error("initializeWasm() must be awaited first!");
4050 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
4051 // debug statements here
4053 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
4054 export function CResult_PingDecodeErrorZ_clone(orig: number): number {
4055 if(!isWasmInitialized) {
4056 throw new Error("initializeWasm() must be awaited first!");
4058 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
4059 return nativeResponseValue;
4061 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
4062 export function CResult_PongDecodeErrorZ_ok(o: number): number {
4063 if(!isWasmInitialized) {
4064 throw new Error("initializeWasm() must be awaited first!");
4066 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
4067 return nativeResponseValue;
4069 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
4070 export function CResult_PongDecodeErrorZ_err(e: number): number {
4071 if(!isWasmInitialized) {
4072 throw new Error("initializeWasm() must be awaited first!");
4074 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
4075 return nativeResponseValue;
4077 // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
4078 export function CResult_PongDecodeErrorZ_free(_res: number): void {
4079 if(!isWasmInitialized) {
4080 throw new Error("initializeWasm() must be awaited first!");
4082 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
4083 // debug statements here
4085 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
4086 export function CResult_PongDecodeErrorZ_clone(orig: number): number {
4087 if(!isWasmInitialized) {
4088 throw new Error("initializeWasm() must be awaited first!");
4090 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
4091 return nativeResponseValue;
4093 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
4094 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
4095 if(!isWasmInitialized) {
4096 throw new Error("initializeWasm() must be awaited first!");
4098 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
4099 return nativeResponseValue;
4101 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4102 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
4103 if(!isWasmInitialized) {
4104 throw new Error("initializeWasm() must be awaited first!");
4106 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
4107 return nativeResponseValue;
4109 // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
4110 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
4111 if(!isWasmInitialized) {
4112 throw new Error("initializeWasm() must be awaited first!");
4114 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
4115 // debug statements here
4117 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4118 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
4119 if(!isWasmInitialized) {
4120 throw new Error("initializeWasm() must be awaited first!");
4122 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
4123 return nativeResponseValue;
4125 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
4126 export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
4127 if(!isWasmInitialized) {
4128 throw new Error("initializeWasm() must be awaited first!");
4130 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
4131 return nativeResponseValue;
4133 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4134 export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
4135 if(!isWasmInitialized) {
4136 throw new Error("initializeWasm() must be awaited first!");
4138 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
4139 return nativeResponseValue;
4141 // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
4142 export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
4143 if(!isWasmInitialized) {
4144 throw new Error("initializeWasm() must be awaited first!");
4146 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
4147 // debug statements here
4149 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4150 export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
4151 if(!isWasmInitialized) {
4152 throw new Error("initializeWasm() must be awaited first!");
4154 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
4155 return nativeResponseValue;
4157 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
4158 export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
4159 if(!isWasmInitialized) {
4160 throw new Error("initializeWasm() must be awaited first!");
4162 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
4163 return nativeResponseValue;
4165 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4166 export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
4167 if(!isWasmInitialized) {
4168 throw new Error("initializeWasm() must be awaited first!");
4170 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
4171 return nativeResponseValue;
4173 // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
4174 export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
4175 if(!isWasmInitialized) {
4176 throw new Error("initializeWasm() must be awaited first!");
4178 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
4179 // debug statements here
4181 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4182 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
4183 if(!isWasmInitialized) {
4184 throw new Error("initializeWasm() must be awaited first!");
4186 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
4187 return nativeResponseValue;
4189 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
4190 export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
4191 if(!isWasmInitialized) {
4192 throw new Error("initializeWasm() must be awaited first!");
4194 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
4195 return nativeResponseValue;
4197 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4198 export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
4199 if(!isWasmInitialized) {
4200 throw new Error("initializeWasm() must be awaited first!");
4202 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
4203 return nativeResponseValue;
4205 // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
4206 export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
4207 if(!isWasmInitialized) {
4208 throw new Error("initializeWasm() must be awaited first!");
4210 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
4211 // debug statements here
4213 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4214 export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
4215 if(!isWasmInitialized) {
4216 throw new Error("initializeWasm() must be awaited first!");
4218 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
4219 return nativeResponseValue;
4221 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
4222 export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
4223 if(!isWasmInitialized) {
4224 throw new Error("initializeWasm() must be awaited first!");
4226 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
4227 return nativeResponseValue;
4229 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
4230 export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
4231 if(!isWasmInitialized) {
4232 throw new Error("initializeWasm() must be awaited first!");
4234 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
4235 return nativeResponseValue;
4237 // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
4238 export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
4239 if(!isWasmInitialized) {
4240 throw new Error("initializeWasm() must be awaited first!");
4242 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
4243 // debug statements here
4245 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
4246 export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
4247 if(!isWasmInitialized) {
4248 throw new Error("initializeWasm() must be awaited first!");
4250 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
4251 return nativeResponseValue;
4253 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
4254 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
4255 if(!isWasmInitialized) {
4256 throw new Error("initializeWasm() must be awaited first!");
4258 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
4259 return nativeResponseValue;
4261 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4262 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
4263 if(!isWasmInitialized) {
4264 throw new Error("initializeWasm() must be awaited first!");
4266 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
4267 return nativeResponseValue;
4269 // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
4270 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
4271 if(!isWasmInitialized) {
4272 throw new Error("initializeWasm() must be awaited first!");
4274 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
4275 // debug statements here
4277 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4278 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4279 if(!isWasmInitialized) {
4280 throw new Error("initializeWasm() must be awaited first!");
4282 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
4283 return nativeResponseValue;
4285 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
4286 export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
4287 if(!isWasmInitialized) {
4288 throw new Error("initializeWasm() must be awaited first!");
4290 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
4291 return nativeResponseValue;
4293 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4294 export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
4295 if(!isWasmInitialized) {
4296 throw new Error("initializeWasm() must be awaited first!");
4298 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
4299 return nativeResponseValue;
4301 // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
4302 export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
4303 if(!isWasmInitialized) {
4304 throw new Error("initializeWasm() must be awaited first!");
4306 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
4307 // debug statements here
4309 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4310 export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4311 if(!isWasmInitialized) {
4312 throw new Error("initializeWasm() must be awaited first!");
4314 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
4315 return nativeResponseValue;
4317 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
4318 export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
4319 if(!isWasmInitialized) {
4320 throw new Error("initializeWasm() must be awaited first!");
4322 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
4323 return nativeResponseValue;
4325 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
4326 export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
4327 if(!isWasmInitialized) {
4328 throw new Error("initializeWasm() must be awaited first!");
4330 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
4331 return nativeResponseValue;
4333 // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
4334 export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
4335 if(!isWasmInitialized) {
4336 throw new Error("initializeWasm() must be awaited first!");
4338 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
4339 // debug statements here
4341 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
4342 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
4343 if(!isWasmInitialized) {
4344 throw new Error("initializeWasm() must be awaited first!");
4346 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
4347 return nativeResponseValue;
4349 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
4350 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
4351 if(!isWasmInitialized) {
4352 throw new Error("initializeWasm() must be awaited first!");
4354 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
4355 return nativeResponseValue;
4357 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
4358 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
4359 if(!isWasmInitialized) {
4360 throw new Error("initializeWasm() must be awaited first!");
4362 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
4363 return nativeResponseValue;
4365 // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
4366 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
4367 if(!isWasmInitialized) {
4368 throw new Error("initializeWasm() must be awaited first!");
4370 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
4371 // debug statements here
4373 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
4374 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
4375 if(!isWasmInitialized) {
4376 throw new Error("initializeWasm() must be awaited first!");
4378 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
4379 return nativeResponseValue;
4381 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
4382 export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
4383 if(!isWasmInitialized) {
4384 throw new Error("initializeWasm() must be awaited first!");
4386 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
4387 return nativeResponseValue;
4389 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4390 export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
4391 if(!isWasmInitialized) {
4392 throw new Error("initializeWasm() must be awaited first!");
4394 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
4395 return nativeResponseValue;
4397 // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
4398 export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
4399 if(!isWasmInitialized) {
4400 throw new Error("initializeWasm() must be awaited first!");
4402 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
4403 // debug statements here
4405 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4406 export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
4407 if(!isWasmInitialized) {
4408 throw new Error("initializeWasm() must be awaited first!");
4410 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
4411 return nativeResponseValue;
4413 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
4414 export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
4415 if(!isWasmInitialized) {
4416 throw new Error("initializeWasm() must be awaited first!");
4418 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
4419 return nativeResponseValue;
4421 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4422 export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
4423 if(!isWasmInitialized) {
4424 throw new Error("initializeWasm() must be awaited first!");
4426 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
4427 return nativeResponseValue;
4429 // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
4430 export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
4431 if(!isWasmInitialized) {
4432 throw new Error("initializeWasm() must be awaited first!");
4434 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
4435 // debug statements here
4437 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4438 export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
4439 if(!isWasmInitialized) {
4440 throw new Error("initializeWasm() must be awaited first!");
4442 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
4443 return nativeResponseValue;
4445 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
4446 export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
4447 if(!isWasmInitialized) {
4448 throw new Error("initializeWasm() must be awaited first!");
4450 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
4451 return nativeResponseValue;
4453 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
4454 export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
4455 if(!isWasmInitialized) {
4456 throw new Error("initializeWasm() must be awaited first!");
4458 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
4459 return nativeResponseValue;
4461 // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
4462 export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
4463 if(!isWasmInitialized) {
4464 throw new Error("initializeWasm() must be awaited first!");
4466 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
4467 // debug statements here
4469 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
4470 export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
4471 if(!isWasmInitialized) {
4472 throw new Error("initializeWasm() must be awaited first!");
4474 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
4475 return nativeResponseValue;
4477 // void Event_free(struct LDKEvent this_ptr);
4478 export function Event_free(this_ptr: number): void {
4479 if(!isWasmInitialized) {
4480 throw new Error("initializeWasm() must be awaited first!");
4482 const nativeResponseValue = wasm.Event_free(this_ptr);
4483 // debug statements here
4485 // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
4486 export function Event_clone(orig: number): number {
4487 if(!isWasmInitialized) {
4488 throw new Error("initializeWasm() must be awaited first!");
4490 const nativeResponseValue = wasm.Event_clone(orig);
4491 return nativeResponseValue;
4493 // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
4494 export function Event_write(obj: number): Uint8Array {
4495 if(!isWasmInitialized) {
4496 throw new Error("initializeWasm() must be awaited first!");
4498 const nativeResponseValue = wasm.Event_write(obj);
4499 return decodeArray(nativeResponseValue);
4501 // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
4502 export function MessageSendEvent_free(this_ptr: number): void {
4503 if(!isWasmInitialized) {
4504 throw new Error("initializeWasm() must be awaited first!");
4506 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
4507 // debug statements here
4509 // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
4510 export function MessageSendEvent_clone(orig: number): number {
4511 if(!isWasmInitialized) {
4512 throw new Error("initializeWasm() must be awaited first!");
4514 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
4515 return nativeResponseValue;
4517 // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
4518 export function MessageSendEventsProvider_free(this_ptr: number): void {
4519 if(!isWasmInitialized) {
4520 throw new Error("initializeWasm() must be awaited first!");
4522 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
4523 // debug statements here
4525 // void EventsProvider_free(struct LDKEventsProvider this_ptr);
4526 export function EventsProvider_free(this_ptr: number): void {
4527 if(!isWasmInitialized) {
4528 throw new Error("initializeWasm() must be awaited first!");
4530 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
4531 // debug statements here
4533 // void APIError_free(struct LDKAPIError this_ptr);
4534 export function APIError_free(this_ptr: number): void {
4535 if(!isWasmInitialized) {
4536 throw new Error("initializeWasm() must be awaited first!");
4538 const nativeResponseValue = wasm.APIError_free(this_ptr);
4539 // debug statements here
4541 // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
4542 export function APIError_clone(orig: number): number {
4543 if(!isWasmInitialized) {
4544 throw new Error("initializeWasm() must be awaited first!");
4546 const nativeResponseValue = wasm.APIError_clone(orig);
4547 return nativeResponseValue;
4549 // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
4550 export function Level_clone(orig: number): LDKLevel {
4551 if(!isWasmInitialized) {
4552 throw new Error("initializeWasm() must be awaited first!");
4554 const nativeResponseValue = wasm.Level_clone(orig);
4555 return nativeResponseValue;
4557 // MUST_USE_RES enum LDKLevel Level_max(void);
4558 export function Level_max(): LDKLevel {
4559 if(!isWasmInitialized) {
4560 throw new Error("initializeWasm() must be awaited first!");
4562 const nativeResponseValue = wasm.Level_max();
4563 return nativeResponseValue;
4565 // void Logger_free(struct LDKLogger this_ptr);
4566 export function Logger_free(this_ptr: number): void {
4567 if(!isWasmInitialized) {
4568 throw new Error("initializeWasm() must be awaited first!");
4570 const nativeResponseValue = wasm.Logger_free(this_ptr);
4571 // debug statements here
4573 // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
4574 export function ChannelHandshakeConfig_free(this_obj: number): void {
4575 if(!isWasmInitialized) {
4576 throw new Error("initializeWasm() must be awaited first!");
4578 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
4579 // debug statements here
4581 // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4582 export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
4583 if(!isWasmInitialized) {
4584 throw new Error("initializeWasm() must be awaited first!");
4586 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
4587 return nativeResponseValue;
4589 // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
4590 export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
4591 if(!isWasmInitialized) {
4592 throw new Error("initializeWasm() must be awaited first!");
4594 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
4595 // debug statements here
4597 // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4598 export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
4599 if(!isWasmInitialized) {
4600 throw new Error("initializeWasm() must be awaited first!");
4602 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
4603 return nativeResponseValue;
4605 // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
4606 export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
4607 if(!isWasmInitialized) {
4608 throw new Error("initializeWasm() must be awaited first!");
4610 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
4611 // debug statements here
4613 // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4614 export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
4615 if(!isWasmInitialized) {
4616 throw new Error("initializeWasm() must be awaited first!");
4618 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
4619 return nativeResponseValue;
4621 // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
4622 export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
4623 if(!isWasmInitialized) {
4624 throw new Error("initializeWasm() must be awaited first!");
4626 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
4627 // debug statements here
4629 // 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);
4630 export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
4631 if(!isWasmInitialized) {
4632 throw new Error("initializeWasm() must be awaited first!");
4634 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
4635 return nativeResponseValue;
4637 // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
4638 export function ChannelHandshakeConfig_clone(orig: number): number {
4639 if(!isWasmInitialized) {
4640 throw new Error("initializeWasm() must be awaited first!");
4642 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
4643 return nativeResponseValue;
4645 // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
4646 export function ChannelHandshakeConfig_default(): number {
4647 if(!isWasmInitialized) {
4648 throw new Error("initializeWasm() must be awaited first!");
4650 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
4651 return nativeResponseValue;
4653 // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
4654 export function ChannelHandshakeLimits_free(this_obj: number): void {
4655 if(!isWasmInitialized) {
4656 throw new Error("initializeWasm() must be awaited first!");
4658 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
4659 // debug statements here
4661 // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4662 export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
4663 if(!isWasmInitialized) {
4664 throw new Error("initializeWasm() must be awaited first!");
4666 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
4667 return nativeResponseValue;
4669 // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4670 export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
4671 if(!isWasmInitialized) {
4672 throw new Error("initializeWasm() must be awaited first!");
4674 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
4675 // debug statements here
4677 // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4678 export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
4679 if(!isWasmInitialized) {
4680 throw new Error("initializeWasm() must be awaited first!");
4682 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
4683 return nativeResponseValue;
4685 // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4686 export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
4687 if(!isWasmInitialized) {
4688 throw new Error("initializeWasm() must be awaited first!");
4690 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
4691 // debug statements here
4693 // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4694 export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
4695 if(!isWasmInitialized) {
4696 throw new Error("initializeWasm() must be awaited first!");
4698 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
4699 return nativeResponseValue;
4701 // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4702 export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
4703 if(!isWasmInitialized) {
4704 throw new Error("initializeWasm() must be awaited first!");
4706 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
4707 // debug statements here
4709 // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4710 export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
4711 if(!isWasmInitialized) {
4712 throw new Error("initializeWasm() must be awaited first!");
4714 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
4715 return nativeResponseValue;
4717 // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4718 export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
4719 if(!isWasmInitialized) {
4720 throw new Error("initializeWasm() must be awaited first!");
4722 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
4723 // debug statements here
4725 // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4726 export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
4727 if(!isWasmInitialized) {
4728 throw new Error("initializeWasm() must be awaited first!");
4730 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
4731 return nativeResponseValue;
4733 // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4734 export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
4735 if(!isWasmInitialized) {
4736 throw new Error("initializeWasm() must be awaited first!");
4738 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
4739 // debug statements here
4741 // uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4742 export function ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr: number): number {
4743 if(!isWasmInitialized) {
4744 throw new Error("initializeWasm() must be awaited first!");
4746 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr);
4747 return nativeResponseValue;
4749 // void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4750 export function ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr: number, val: number): void {
4751 if(!isWasmInitialized) {
4752 throw new Error("initializeWasm() must be awaited first!");
4754 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr, val);
4755 // debug statements here
4757 // uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4758 export function ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr: number): number {
4759 if(!isWasmInitialized) {
4760 throw new Error("initializeWasm() must be awaited first!");
4762 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr);
4763 return nativeResponseValue;
4765 // void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4766 export function ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr: number, val: number): void {
4767 if(!isWasmInitialized) {
4768 throw new Error("initializeWasm() must be awaited first!");
4770 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr, val);
4771 // debug statements here
4773 // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4774 export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
4775 if(!isWasmInitialized) {
4776 throw new Error("initializeWasm() must be awaited first!");
4778 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
4779 return nativeResponseValue;
4781 // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
4782 export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
4783 if(!isWasmInitialized) {
4784 throw new Error("initializeWasm() must be awaited first!");
4786 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
4787 // debug statements here
4789 // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4790 export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
4791 if(!isWasmInitialized) {
4792 throw new Error("initializeWasm() must be awaited first!");
4794 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
4795 return nativeResponseValue;
4797 // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
4798 export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
4799 if(!isWasmInitialized) {
4800 throw new Error("initializeWasm() must be awaited first!");
4802 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
4803 // debug statements here
4805 // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4806 export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
4807 if(!isWasmInitialized) {
4808 throw new Error("initializeWasm() must be awaited first!");
4810 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
4811 return nativeResponseValue;
4813 // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4814 export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
4815 if(!isWasmInitialized) {
4816 throw new Error("initializeWasm() must be awaited first!");
4818 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
4819 // debug statements here
4821 // 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);
4822 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 {
4823 if(!isWasmInitialized) {
4824 throw new Error("initializeWasm() must be awaited first!");
4826 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);
4827 return nativeResponseValue;
4829 // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
4830 export function ChannelHandshakeLimits_clone(orig: number): number {
4831 if(!isWasmInitialized) {
4832 throw new Error("initializeWasm() must be awaited first!");
4834 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
4835 return nativeResponseValue;
4837 // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
4838 export function ChannelHandshakeLimits_default(): number {
4839 if(!isWasmInitialized) {
4840 throw new Error("initializeWasm() must be awaited first!");
4842 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
4843 return nativeResponseValue;
4845 // void ChannelConfig_free(struct LDKChannelConfig this_obj);
4846 export function ChannelConfig_free(this_obj: number): void {
4847 if(!isWasmInitialized) {
4848 throw new Error("initializeWasm() must be awaited first!");
4850 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
4851 // debug statements here
4853 // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4854 export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
4855 if(!isWasmInitialized) {
4856 throw new Error("initializeWasm() must be awaited first!");
4858 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
4859 return nativeResponseValue;
4861 // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
4862 export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
4863 if(!isWasmInitialized) {
4864 throw new Error("initializeWasm() must be awaited first!");
4866 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
4867 // debug statements here
4869 // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4870 export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
4871 if(!isWasmInitialized) {
4872 throw new Error("initializeWasm() must be awaited first!");
4874 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
4875 return nativeResponseValue;
4877 // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
4878 export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
4879 if(!isWasmInitialized) {
4880 throw new Error("initializeWasm() must be awaited first!");
4882 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
4883 // debug statements here
4885 // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4886 export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
4887 if(!isWasmInitialized) {
4888 throw new Error("initializeWasm() must be awaited first!");
4890 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
4891 return nativeResponseValue;
4893 // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
4894 export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
4895 if(!isWasmInitialized) {
4896 throw new Error("initializeWasm() must be awaited first!");
4898 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
4899 // debug statements here
4901 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
4902 export function ChannelConfig_new(fee_proportional_millionths_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
4903 if(!isWasmInitialized) {
4904 throw new Error("initializeWasm() must be awaited first!");
4906 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
4907 return nativeResponseValue;
4909 // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
4910 export function ChannelConfig_clone(orig: number): number {
4911 if(!isWasmInitialized) {
4912 throw new Error("initializeWasm() must be awaited first!");
4914 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
4915 return nativeResponseValue;
4917 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
4918 export function ChannelConfig_default(): number {
4919 if(!isWasmInitialized) {
4920 throw new Error("initializeWasm() must be awaited first!");
4922 const nativeResponseValue = wasm.ChannelConfig_default();
4923 return nativeResponseValue;
4925 // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
4926 export function ChannelConfig_write(obj: number): Uint8Array {
4927 if(!isWasmInitialized) {
4928 throw new Error("initializeWasm() must be awaited first!");
4930 const nativeResponseValue = wasm.ChannelConfig_write(obj);
4931 return decodeArray(nativeResponseValue);
4933 // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
4934 export function ChannelConfig_read(ser: Uint8Array): number {
4935 if(!isWasmInitialized) {
4936 throw new Error("initializeWasm() must be awaited first!");
4938 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
4939 return nativeResponseValue;
4941 // void UserConfig_free(struct LDKUserConfig this_obj);
4942 export function UserConfig_free(this_obj: number): void {
4943 if(!isWasmInitialized) {
4944 throw new Error("initializeWasm() must be awaited first!");
4946 const nativeResponseValue = wasm.UserConfig_free(this_obj);
4947 // debug statements here
4949 // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4950 export function UserConfig_get_own_channel_config(this_ptr: number): number {
4951 if(!isWasmInitialized) {
4952 throw new Error("initializeWasm() must be awaited first!");
4954 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
4955 return nativeResponseValue;
4957 // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
4958 export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
4959 if(!isWasmInitialized) {
4960 throw new Error("initializeWasm() must be awaited first!");
4962 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
4963 // debug statements here
4965 // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4966 export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
4967 if(!isWasmInitialized) {
4968 throw new Error("initializeWasm() must be awaited first!");
4970 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
4971 return nativeResponseValue;
4973 // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
4974 export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
4975 if(!isWasmInitialized) {
4976 throw new Error("initializeWasm() must be awaited first!");
4978 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
4979 // debug statements here
4981 // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4982 export function UserConfig_get_channel_options(this_ptr: number): number {
4983 if(!isWasmInitialized) {
4984 throw new Error("initializeWasm() must be awaited first!");
4986 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
4987 return nativeResponseValue;
4989 // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
4990 export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
4991 if(!isWasmInitialized) {
4992 throw new Error("initializeWasm() must be awaited first!");
4994 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
4995 // debug statements here
4997 // 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);
4998 export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
4999 if(!isWasmInitialized) {
5000 throw new Error("initializeWasm() must be awaited first!");
5002 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
5003 return nativeResponseValue;
5005 // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
5006 export function UserConfig_clone(orig: number): number {
5007 if(!isWasmInitialized) {
5008 throw new Error("initializeWasm() must be awaited first!");
5010 const nativeResponseValue = wasm.UserConfig_clone(orig);
5011 return nativeResponseValue;
5013 // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
5014 export function UserConfig_default(): number {
5015 if(!isWasmInitialized) {
5016 throw new Error("initializeWasm() must be awaited first!");
5018 const nativeResponseValue = wasm.UserConfig_default();
5019 return nativeResponseValue;
5021 // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
5022 export function AccessError_clone(orig: number): LDKAccessError {
5023 if(!isWasmInitialized) {
5024 throw new Error("initializeWasm() must be awaited first!");
5026 const nativeResponseValue = wasm.AccessError_clone(orig);
5027 return nativeResponseValue;
5029 // void Access_free(struct LDKAccess this_ptr);
5030 export function Access_free(this_ptr: number): void {
5031 if(!isWasmInitialized) {
5032 throw new Error("initializeWasm() must be awaited first!");
5034 const nativeResponseValue = wasm.Access_free(this_ptr);
5035 // debug statements here
5037 // void Listen_free(struct LDKListen this_ptr);
5038 export function Listen_free(this_ptr: number): void {
5039 if(!isWasmInitialized) {
5040 throw new Error("initializeWasm() must be awaited first!");
5042 const nativeResponseValue = wasm.Listen_free(this_ptr);
5043 // debug statements here
5045 // void Watch_free(struct LDKWatch this_ptr);
5046 export function Watch_free(this_ptr: number): void {
5047 if(!isWasmInitialized) {
5048 throw new Error("initializeWasm() must be awaited first!");
5050 const nativeResponseValue = wasm.Watch_free(this_ptr);
5051 // debug statements here
5053 // void Filter_free(struct LDKFilter this_ptr);
5054 export function Filter_free(this_ptr: number): void {
5055 if(!isWasmInitialized) {
5056 throw new Error("initializeWasm() must be awaited first!");
5058 const nativeResponseValue = wasm.Filter_free(this_ptr);
5059 // debug statements here
5061 // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
5062 export function BroadcasterInterface_free(this_ptr: number): void {
5063 if(!isWasmInitialized) {
5064 throw new Error("initializeWasm() must be awaited first!");
5066 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
5067 // debug statements here
5069 // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
5070 export function ConfirmationTarget_clone(orig: number): LDKConfirmationTarget {
5071 if(!isWasmInitialized) {
5072 throw new Error("initializeWasm() must be awaited first!");
5074 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
5075 return nativeResponseValue;
5077 // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
5078 export function FeeEstimator_free(this_ptr: number): void {
5079 if(!isWasmInitialized) {
5080 throw new Error("initializeWasm() must be awaited first!");
5082 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
5083 // debug statements here
5085 // void ChainMonitor_free(struct LDKChainMonitor this_obj);
5086 export function ChainMonitor_free(this_obj: number): void {
5087 if(!isWasmInitialized) {
5088 throw new Error("initializeWasm() must be awaited first!");
5090 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
5091 // debug statements here
5093 // void ChainMonitor_block_connected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
5094 export function ChainMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
5095 if(!isWasmInitialized) {
5096 throw new Error("initializeWasm() must be awaited first!");
5098 const nativeResponseValue = wasm.ChainMonitor_block_connected(this_arg, encodeArray(header), txdata, height);
5099 // debug statements here
5101 // void ChainMonitor_block_disconnected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t disconnected_height);
5102 export function ChainMonitor_block_disconnected(this_arg: number, header: Uint8Array, disconnected_height: number): void {
5103 if(!isWasmInitialized) {
5104 throw new Error("initializeWasm() must be awaited first!");
5106 const nativeResponseValue = wasm.ChainMonitor_block_disconnected(this_arg, encodeArray(header), disconnected_height);
5107 // debug statements here
5109 // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
5110 export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
5111 if(!isWasmInitialized) {
5112 throw new Error("initializeWasm() must be awaited first!");
5114 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
5115 return nativeResponseValue;
5117 // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5118 export function ChainMonitor_as_Watch(this_arg: number): number {
5119 if(!isWasmInitialized) {
5120 throw new Error("initializeWasm() must be awaited first!");
5122 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
5123 return nativeResponseValue;
5125 // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5126 export function ChainMonitor_as_EventsProvider(this_arg: number): number {
5127 if(!isWasmInitialized) {
5128 throw new Error("initializeWasm() must be awaited first!");
5130 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
5131 return nativeResponseValue;
5133 // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
5134 export function ChannelMonitorUpdate_free(this_obj: number): void {
5135 if(!isWasmInitialized) {
5136 throw new Error("initializeWasm() must be awaited first!");
5138 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
5139 // debug statements here
5141 // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
5142 export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
5143 if(!isWasmInitialized) {
5144 throw new Error("initializeWasm() must be awaited first!");
5146 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
5147 return nativeResponseValue;
5149 // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
5150 export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
5151 if(!isWasmInitialized) {
5152 throw new Error("initializeWasm() must be awaited first!");
5154 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
5155 // debug statements here
5157 // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
5158 export function ChannelMonitorUpdate_clone(orig: number): number {
5159 if(!isWasmInitialized) {
5160 throw new Error("initializeWasm() must be awaited first!");
5162 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
5163 return nativeResponseValue;
5165 // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
5166 export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
5167 if(!isWasmInitialized) {
5168 throw new Error("initializeWasm() must be awaited first!");
5170 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
5171 return decodeArray(nativeResponseValue);
5173 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
5174 export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
5175 if(!isWasmInitialized) {
5176 throw new Error("initializeWasm() must be awaited first!");
5178 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
5179 return nativeResponseValue;
5181 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
5182 export function ChannelMonitorUpdateErr_clone(orig: number): LDKChannelMonitorUpdateErr {
5183 if(!isWasmInitialized) {
5184 throw new Error("initializeWasm() must be awaited first!");
5186 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
5187 return nativeResponseValue;
5189 // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
5190 export function MonitorUpdateError_free(this_obj: number): void {
5191 if(!isWasmInitialized) {
5192 throw new Error("initializeWasm() must be awaited first!");
5194 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
5195 // debug statements here
5197 // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
5198 export function MonitorUpdateError_clone(orig: number): number {
5199 if(!isWasmInitialized) {
5200 throw new Error("initializeWasm() must be awaited first!");
5202 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
5203 return nativeResponseValue;
5205 // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
5206 export function MonitorEvent_free(this_ptr: number): void {
5207 if(!isWasmInitialized) {
5208 throw new Error("initializeWasm() must be awaited first!");
5210 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
5211 // debug statements here
5213 // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
5214 export function MonitorEvent_clone(orig: number): number {
5215 if(!isWasmInitialized) {
5216 throw new Error("initializeWasm() must be awaited first!");
5218 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
5219 return nativeResponseValue;
5221 // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
5222 export function HTLCUpdate_free(this_obj: number): void {
5223 if(!isWasmInitialized) {
5224 throw new Error("initializeWasm() must be awaited first!");
5226 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
5227 // debug statements here
5229 // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
5230 export function HTLCUpdate_clone(orig: number): number {
5231 if(!isWasmInitialized) {
5232 throw new Error("initializeWasm() must be awaited first!");
5234 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
5235 return nativeResponseValue;
5237 // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
5238 export function HTLCUpdate_write(obj: number): Uint8Array {
5239 if(!isWasmInitialized) {
5240 throw new Error("initializeWasm() must be awaited first!");
5242 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
5243 return decodeArray(nativeResponseValue);
5245 // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
5246 export function HTLCUpdate_read(ser: Uint8Array): number {
5247 if(!isWasmInitialized) {
5248 throw new Error("initializeWasm() must be awaited first!");
5250 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
5251 return nativeResponseValue;
5253 // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
5254 export function ChannelMonitor_free(this_obj: number): void {
5255 if(!isWasmInitialized) {
5256 throw new Error("initializeWasm() must be awaited first!");
5258 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
5259 // debug statements here
5261 // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
5262 export function ChannelMonitor_clone(orig: number): number {
5263 if(!isWasmInitialized) {
5264 throw new Error("initializeWasm() must be awaited first!");
5266 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
5267 return nativeResponseValue;
5269 // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
5270 export function ChannelMonitor_write(obj: number): Uint8Array {
5271 if(!isWasmInitialized) {
5272 throw new Error("initializeWasm() must be awaited first!");
5274 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
5275 return decodeArray(nativeResponseValue);
5277 // 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);
5278 export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
5279 if(!isWasmInitialized) {
5280 throw new Error("initializeWasm() must be awaited first!");
5282 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
5283 return nativeResponseValue;
5285 // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5286 export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
5287 if(!isWasmInitialized) {
5288 throw new Error("initializeWasm() must be awaited first!");
5290 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
5291 return nativeResponseValue;
5293 // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5294 export function ChannelMonitor_get_funding_txo(this_arg: number): number {
5295 if(!isWasmInitialized) {
5296 throw new Error("initializeWasm() must be awaited first!");
5298 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
5299 return nativeResponseValue;
5301 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5302 export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
5303 if(!isWasmInitialized) {
5304 throw new Error("initializeWasm() must be awaited first!");
5306 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
5307 return nativeResponseValue;
5309 // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
5310 export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
5311 if(!isWasmInitialized) {
5312 throw new Error("initializeWasm() must be awaited first!");
5314 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
5315 // debug statements here
5317 // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5318 export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
5319 if(!isWasmInitialized) {
5320 throw new Error("initializeWasm() must be awaited first!");
5322 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
5323 return nativeResponseValue;
5325 // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5326 export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
5327 if(!isWasmInitialized) {
5328 throw new Error("initializeWasm() must be awaited first!");
5330 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
5331 return nativeResponseValue;
5333 // 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);
5334 export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
5335 if(!isWasmInitialized) {
5336 throw new Error("initializeWasm() must be awaited first!");
5338 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
5339 return nativeResponseValue;
5341 // 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);
5342 export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5343 if(!isWasmInitialized) {
5344 throw new Error("initializeWasm() must be awaited first!");
5346 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
5347 return nativeResponseValue;
5349 // 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);
5350 export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
5351 if(!isWasmInitialized) {
5352 throw new Error("initializeWasm() must be awaited first!");
5354 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
5355 // debug statements here
5357 // void Persist_free(struct LDKPersist this_ptr);
5358 export function Persist_free(this_ptr: number): void {
5359 if(!isWasmInitialized) {
5360 throw new Error("initializeWasm() must be awaited first!");
5362 const nativeResponseValue = wasm.Persist_free(this_ptr);
5363 // debug statements here
5365 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
5366 export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
5367 if(!isWasmInitialized) {
5368 throw new Error("initializeWasm() must be awaited first!");
5370 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
5371 return nativeResponseValue;
5373 // void OutPoint_free(struct LDKOutPoint this_obj);
5374 export function OutPoint_free(this_obj: number): void {
5375 if(!isWasmInitialized) {
5376 throw new Error("initializeWasm() must be awaited first!");
5378 const nativeResponseValue = wasm.OutPoint_free(this_obj);
5379 // debug statements here
5381 // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
5382 export function OutPoint_get_txid(this_ptr: number): Uint8Array {
5383 if(!isWasmInitialized) {
5384 throw new Error("initializeWasm() must be awaited first!");
5386 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
5387 return decodeArray(nativeResponseValue);
5389 // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5390 export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
5391 if(!isWasmInitialized) {
5392 throw new Error("initializeWasm() must be awaited first!");
5394 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
5395 // debug statements here
5397 // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
5398 export function OutPoint_get_index(this_ptr: number): number {
5399 if(!isWasmInitialized) {
5400 throw new Error("initializeWasm() must be awaited first!");
5402 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
5403 return nativeResponseValue;
5405 // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
5406 export function OutPoint_set_index(this_ptr: number, val: number): void {
5407 if(!isWasmInitialized) {
5408 throw new Error("initializeWasm() must be awaited first!");
5410 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
5411 // debug statements here
5413 // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
5414 export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
5415 if(!isWasmInitialized) {
5416 throw new Error("initializeWasm() must be awaited first!");
5418 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
5419 return nativeResponseValue;
5421 // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
5422 export function OutPoint_clone(orig: number): number {
5423 if(!isWasmInitialized) {
5424 throw new Error("initializeWasm() must be awaited first!");
5426 const nativeResponseValue = wasm.OutPoint_clone(orig);
5427 return nativeResponseValue;
5429 // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
5430 export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
5431 if(!isWasmInitialized) {
5432 throw new Error("initializeWasm() must be awaited first!");
5434 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
5435 return decodeArray(nativeResponseValue);
5437 // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
5438 export function OutPoint_write(obj: number): Uint8Array {
5439 if(!isWasmInitialized) {
5440 throw new Error("initializeWasm() must be awaited first!");
5442 const nativeResponseValue = wasm.OutPoint_write(obj);
5443 return decodeArray(nativeResponseValue);
5445 // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
5446 export function OutPoint_read(ser: Uint8Array): number {
5447 if(!isWasmInitialized) {
5448 throw new Error("initializeWasm() must be awaited first!");
5450 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
5451 return nativeResponseValue;
5453 // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
5454 export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
5455 if(!isWasmInitialized) {
5456 throw new Error("initializeWasm() must be awaited first!");
5458 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
5459 // debug statements here
5461 // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5462 export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5463 if(!isWasmInitialized) {
5464 throw new Error("initializeWasm() must be awaited first!");
5466 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
5467 return nativeResponseValue;
5469 // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5470 export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5471 if(!isWasmInitialized) {
5472 throw new Error("initializeWasm() must be awaited first!");
5474 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5475 // debug statements here
5477 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5478 export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
5479 if(!isWasmInitialized) {
5480 throw new Error("initializeWasm() must be awaited first!");
5482 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
5483 return decodeArray(nativeResponseValue);
5485 // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5486 export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5487 if(!isWasmInitialized) {
5488 throw new Error("initializeWasm() must be awaited first!");
5490 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
5491 // debug statements here
5493 // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5494 export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
5495 if(!isWasmInitialized) {
5496 throw new Error("initializeWasm() must be awaited first!");
5498 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
5499 return nativeResponseValue;
5501 // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
5502 export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
5503 if(!isWasmInitialized) {
5504 throw new Error("initializeWasm() must be awaited first!");
5506 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
5507 // debug statements here
5509 // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5510 export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5511 if(!isWasmInitialized) {
5512 throw new Error("initializeWasm() must be awaited first!");
5514 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
5515 // debug statements here
5517 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5518 export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
5519 if(!isWasmInitialized) {
5520 throw new Error("initializeWasm() must be awaited first!");
5522 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
5523 return decodeArray(nativeResponseValue);
5525 // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5526 export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
5527 if(!isWasmInitialized) {
5528 throw new Error("initializeWasm() must be awaited first!");
5530 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
5531 // debug statements here
5533 // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5534 export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5535 if(!isWasmInitialized) {
5536 throw new Error("initializeWasm() must be awaited first!");
5538 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5539 return decodeArray(nativeResponseValue);
5541 // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5542 export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5543 if(!isWasmInitialized) {
5544 throw new Error("initializeWasm() must be awaited first!");
5546 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5547 // debug statements here
5549 // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5550 export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5551 if(!isWasmInitialized) {
5552 throw new Error("initializeWasm() must be awaited first!");
5554 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5555 return nativeResponseValue;
5557 // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5558 export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5559 if(!isWasmInitialized) {
5560 throw new Error("initializeWasm() must be awaited first!");
5562 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5563 // debug statements here
5565 // 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);
5566 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 {
5567 if(!isWasmInitialized) {
5568 throw new Error("initializeWasm() must be awaited first!");
5570 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);
5571 return nativeResponseValue;
5573 // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
5574 export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
5575 if(!isWasmInitialized) {
5576 throw new Error("initializeWasm() must be awaited first!");
5578 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
5579 return nativeResponseValue;
5581 // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
5582 export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
5583 if(!isWasmInitialized) {
5584 throw new Error("initializeWasm() must be awaited first!");
5586 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
5587 // debug statements here
5589 // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5590 export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5591 if(!isWasmInitialized) {
5592 throw new Error("initializeWasm() must be awaited first!");
5594 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
5595 return nativeResponseValue;
5597 // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5598 export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5599 if(!isWasmInitialized) {
5600 throw new Error("initializeWasm() must be awaited first!");
5602 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5603 // debug statements here
5605 // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5606 export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5607 if(!isWasmInitialized) {
5608 throw new Error("initializeWasm() must be awaited first!");
5610 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
5611 // debug statements here
5613 // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5614 export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5615 if(!isWasmInitialized) {
5616 throw new Error("initializeWasm() must be awaited first!");
5618 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5619 return decodeArray(nativeResponseValue);
5621 // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5622 export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5623 if(!isWasmInitialized) {
5624 throw new Error("initializeWasm() must be awaited first!");
5626 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5627 // debug statements here
5629 // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5630 export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5631 if(!isWasmInitialized) {
5632 throw new Error("initializeWasm() must be awaited first!");
5634 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5635 return nativeResponseValue;
5637 // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5638 export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5639 if(!isWasmInitialized) {
5640 throw new Error("initializeWasm() must be awaited first!");
5642 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5643 // debug statements here
5645 // 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);
5646 export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
5647 if(!isWasmInitialized) {
5648 throw new Error("initializeWasm() must be awaited first!");
5650 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
5651 return nativeResponseValue;
5653 // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
5654 export function StaticPaymentOutputDescriptor_clone(orig: number): number {
5655 if(!isWasmInitialized) {
5656 throw new Error("initializeWasm() must be awaited first!");
5658 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
5659 return nativeResponseValue;
5661 // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
5662 export function SpendableOutputDescriptor_free(this_ptr: number): void {
5663 if(!isWasmInitialized) {
5664 throw new Error("initializeWasm() must be awaited first!");
5666 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
5667 // debug statements here
5669 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
5670 export function SpendableOutputDescriptor_clone(orig: number): number {
5671 if(!isWasmInitialized) {
5672 throw new Error("initializeWasm() must be awaited first!");
5674 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
5675 return nativeResponseValue;
5677 // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
5678 export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
5679 if(!isWasmInitialized) {
5680 throw new Error("initializeWasm() must be awaited first!");
5682 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
5683 return decodeArray(nativeResponseValue);
5685 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
5686 export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
5687 if(!isWasmInitialized) {
5688 throw new Error("initializeWasm() must be awaited first!");
5690 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
5691 return nativeResponseValue;
5693 // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
5694 export function Sign_clone(orig: number): number {
5695 if(!isWasmInitialized) {
5696 throw new Error("initializeWasm() must be awaited first!");
5698 const nativeResponseValue = wasm.Sign_clone(orig);
5699 return nativeResponseValue;
5701 // void Sign_free(struct LDKSign this_ptr);
5702 export function Sign_free(this_ptr: number): void {
5703 if(!isWasmInitialized) {
5704 throw new Error("initializeWasm() must be awaited first!");
5706 const nativeResponseValue = wasm.Sign_free(this_ptr);
5707 // debug statements here
5709 // void KeysInterface_free(struct LDKKeysInterface this_ptr);
5710 export function KeysInterface_free(this_ptr: number): void {
5711 if(!isWasmInitialized) {
5712 throw new Error("initializeWasm() must be awaited first!");
5714 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
5715 // debug statements here
5717 // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
5718 export function InMemorySigner_free(this_obj: number): void {
5719 if(!isWasmInitialized) {
5720 throw new Error("initializeWasm() must be awaited first!");
5722 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
5723 // debug statements here
5725 // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5726 export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
5727 if(!isWasmInitialized) {
5728 throw new Error("initializeWasm() must be awaited first!");
5730 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
5731 return decodeArray(nativeResponseValue);
5733 // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5734 export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
5735 if(!isWasmInitialized) {
5736 throw new Error("initializeWasm() must be awaited first!");
5738 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
5739 // debug statements here
5741 // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5742 export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
5743 if(!isWasmInitialized) {
5744 throw new Error("initializeWasm() must be awaited first!");
5746 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
5747 return decodeArray(nativeResponseValue);
5749 // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5750 export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
5751 if(!isWasmInitialized) {
5752 throw new Error("initializeWasm() must be awaited first!");
5754 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
5755 // debug statements here
5757 // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5758 export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
5759 if(!isWasmInitialized) {
5760 throw new Error("initializeWasm() must be awaited first!");
5762 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
5763 return decodeArray(nativeResponseValue);
5765 // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5766 export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
5767 if(!isWasmInitialized) {
5768 throw new Error("initializeWasm() must be awaited first!");
5770 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
5771 // debug statements here
5773 // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5774 export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
5775 if(!isWasmInitialized) {
5776 throw new Error("initializeWasm() must be awaited first!");
5778 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
5779 return decodeArray(nativeResponseValue);
5781 // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5782 export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
5783 if(!isWasmInitialized) {
5784 throw new Error("initializeWasm() must be awaited first!");
5786 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
5787 // debug statements here
5789 // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5790 export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
5791 if(!isWasmInitialized) {
5792 throw new Error("initializeWasm() must be awaited first!");
5794 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
5795 return decodeArray(nativeResponseValue);
5797 // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5798 export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
5799 if(!isWasmInitialized) {
5800 throw new Error("initializeWasm() must be awaited first!");
5802 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
5803 // debug statements here
5805 // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5806 export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
5807 if(!isWasmInitialized) {
5808 throw new Error("initializeWasm() must be awaited first!");
5810 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
5811 return decodeArray(nativeResponseValue);
5813 // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5814 export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
5815 if(!isWasmInitialized) {
5816 throw new Error("initializeWasm() must be awaited first!");
5818 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
5819 // debug statements here
5821 // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
5822 export function InMemorySigner_clone(orig: number): number {
5823 if(!isWasmInitialized) {
5824 throw new Error("initializeWasm() must be awaited first!");
5826 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
5827 return nativeResponseValue;
5829 // 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);
5830 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 {
5831 if(!isWasmInitialized) {
5832 throw new Error("initializeWasm() must be awaited first!");
5834 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));
5835 return nativeResponseValue;
5837 // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5838 export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
5839 if(!isWasmInitialized) {
5840 throw new Error("initializeWasm() must be awaited first!");
5842 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
5843 return nativeResponseValue;
5845 // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5846 export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
5847 if(!isWasmInitialized) {
5848 throw new Error("initializeWasm() must be awaited first!");
5850 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
5851 return nativeResponseValue;
5853 // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5854 export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
5855 if(!isWasmInitialized) {
5856 throw new Error("initializeWasm() must be awaited first!");
5858 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
5859 return nativeResponseValue;
5861 // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5862 export function InMemorySigner_is_outbound(this_arg: number): boolean {
5863 if(!isWasmInitialized) {
5864 throw new Error("initializeWasm() must be awaited first!");
5866 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
5867 return nativeResponseValue;
5869 // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5870 export function InMemorySigner_funding_outpoint(this_arg: number): number {
5871 if(!isWasmInitialized) {
5872 throw new Error("initializeWasm() must be awaited first!");
5874 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
5875 return nativeResponseValue;
5877 // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5878 export function InMemorySigner_get_channel_parameters(this_arg: number): number {
5879 if(!isWasmInitialized) {
5880 throw new Error("initializeWasm() must be awaited first!");
5882 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
5883 return nativeResponseValue;
5885 // 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);
5886 export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
5887 if(!isWasmInitialized) {
5888 throw new Error("initializeWasm() must be awaited first!");
5890 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
5891 return nativeResponseValue;
5893 // 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);
5894 export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
5895 if(!isWasmInitialized) {
5896 throw new Error("initializeWasm() must be awaited first!");
5898 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
5899 return nativeResponseValue;
5901 // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5902 export function InMemorySigner_as_Sign(this_arg: number): number {
5903 if(!isWasmInitialized) {
5904 throw new Error("initializeWasm() must be awaited first!");
5906 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
5907 return nativeResponseValue;
5909 // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
5910 export function InMemorySigner_write(obj: number): Uint8Array {
5911 if(!isWasmInitialized) {
5912 throw new Error("initializeWasm() must be awaited first!");
5914 const nativeResponseValue = wasm.InMemorySigner_write(obj);
5915 return decodeArray(nativeResponseValue);
5917 // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
5918 export function InMemorySigner_read(ser: Uint8Array): number {
5919 if(!isWasmInitialized) {
5920 throw new Error("initializeWasm() must be awaited first!");
5922 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
5923 return nativeResponseValue;
5925 // void KeysManager_free(struct LDKKeysManager this_obj);
5926 export function KeysManager_free(this_obj: number): void {
5927 if(!isWasmInitialized) {
5928 throw new Error("initializeWasm() must be awaited first!");
5930 const nativeResponseValue = wasm.KeysManager_free(this_obj);
5931 // debug statements here
5933 // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
5934 export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
5935 if(!isWasmInitialized) {
5936 throw new Error("initializeWasm() must be awaited first!");
5938 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
5939 return nativeResponseValue;
5941 // 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]);
5942 export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
5943 if(!isWasmInitialized) {
5944 throw new Error("initializeWasm() must be awaited first!");
5946 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
5947 return nativeResponseValue;
5949 // 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);
5950 export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
5951 if(!isWasmInitialized) {
5952 throw new Error("initializeWasm() must be awaited first!");
5954 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
5955 return nativeResponseValue;
5957 // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
5958 export function KeysManager_as_KeysInterface(this_arg: number): number {
5959 if(!isWasmInitialized) {
5960 throw new Error("initializeWasm() must be awaited first!");
5962 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
5963 return nativeResponseValue;
5965 // void ChannelManager_free(struct LDKChannelManager this_obj);
5966 export function ChannelManager_free(this_obj: number): void {
5967 if(!isWasmInitialized) {
5968 throw new Error("initializeWasm() must be awaited first!");
5970 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
5971 // debug statements here
5973 // void ChainParameters_free(struct LDKChainParameters this_obj);
5974 export function ChainParameters_free(this_obj: number): void {
5975 if(!isWasmInitialized) {
5976 throw new Error("initializeWasm() must be awaited first!");
5978 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
5979 // debug statements here
5981 // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
5982 export function ChainParameters_get_network(this_ptr: number): LDKNetwork {
5983 if(!isWasmInitialized) {
5984 throw new Error("initializeWasm() must be awaited first!");
5986 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
5987 return nativeResponseValue;
5989 // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
5990 export function ChainParameters_set_network(this_ptr: number, val: LDKNetwork): void {
5991 if(!isWasmInitialized) {
5992 throw new Error("initializeWasm() must be awaited first!");
5994 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
5995 // debug statements here
5997 // const uint8_t (*ChainParameters_get_latest_hash(const struct LDKChainParameters *NONNULL_PTR this_ptr))[32];
5998 export function ChainParameters_get_latest_hash(this_ptr: number): Uint8Array {
5999 if(!isWasmInitialized) {
6000 throw new Error("initializeWasm() must be awaited first!");
6002 const nativeResponseValue = wasm.ChainParameters_get_latest_hash(this_ptr);
6003 return decodeArray(nativeResponseValue);
6005 // void ChainParameters_set_latest_hash(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6006 export function ChainParameters_set_latest_hash(this_ptr: number, val: Uint8Array): void {
6007 if(!isWasmInitialized) {
6008 throw new Error("initializeWasm() must be awaited first!");
6010 const nativeResponseValue = wasm.ChainParameters_set_latest_hash(this_ptr, encodeArray(val));
6011 // debug statements here
6013 // uintptr_t ChainParameters_get_latest_height(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6014 export function ChainParameters_get_latest_height(this_ptr: number): number {
6015 if(!isWasmInitialized) {
6016 throw new Error("initializeWasm() must be awaited first!");
6018 const nativeResponseValue = wasm.ChainParameters_get_latest_height(this_ptr);
6019 return nativeResponseValue;
6021 // void ChainParameters_set_latest_height(struct LDKChainParameters *NONNULL_PTR this_ptr, uintptr_t val);
6022 export function ChainParameters_set_latest_height(this_ptr: number, val: number): void {
6023 if(!isWasmInitialized) {
6024 throw new Error("initializeWasm() must be awaited first!");
6026 const nativeResponseValue = wasm.ChainParameters_set_latest_height(this_ptr, val);
6027 // debug statements here
6029 // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKThirtyTwoBytes latest_hash_arg, uintptr_t latest_height_arg);
6030 export function ChainParameters_new(network_arg: LDKNetwork, latest_hash_arg: Uint8Array, latest_height_arg: number): number {
6031 if(!isWasmInitialized) {
6032 throw new Error("initializeWasm() must be awaited first!");
6034 const nativeResponseValue = wasm.ChainParameters_new(network_arg, encodeArray(latest_hash_arg), latest_height_arg);
6035 return nativeResponseValue;
6037 // void ChannelDetails_free(struct LDKChannelDetails this_obj);
6038 export function ChannelDetails_free(this_obj: number): void {
6039 if(!isWasmInitialized) {
6040 throw new Error("initializeWasm() must be awaited first!");
6042 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
6043 // debug statements here
6045 // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
6046 export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
6047 if(!isWasmInitialized) {
6048 throw new Error("initializeWasm() must be awaited first!");
6050 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
6051 return decodeArray(nativeResponseValue);
6053 // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6054 export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
6055 if(!isWasmInitialized) {
6056 throw new Error("initializeWasm() must be awaited first!");
6058 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
6059 // debug statements here
6061 // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6062 export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
6063 if(!isWasmInitialized) {
6064 throw new Error("initializeWasm() must be awaited first!");
6066 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
6067 return decodeArray(nativeResponseValue);
6069 // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6070 export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
6071 if(!isWasmInitialized) {
6072 throw new Error("initializeWasm() must be awaited first!");
6074 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
6075 // debug statements here
6077 // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6078 export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
6079 if(!isWasmInitialized) {
6080 throw new Error("initializeWasm() must be awaited first!");
6082 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
6083 return nativeResponseValue;
6085 // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6086 export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
6087 if(!isWasmInitialized) {
6088 throw new Error("initializeWasm() must be awaited first!");
6090 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
6091 // debug statements here
6093 // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6094 export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
6095 if(!isWasmInitialized) {
6096 throw new Error("initializeWasm() must be awaited first!");
6098 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
6099 return nativeResponseValue;
6101 // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6102 export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
6103 if(!isWasmInitialized) {
6104 throw new Error("initializeWasm() must be awaited first!");
6106 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
6107 // debug statements here
6109 // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6110 export function ChannelDetails_get_user_id(this_ptr: number): number {
6111 if(!isWasmInitialized) {
6112 throw new Error("initializeWasm() must be awaited first!");
6114 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
6115 return nativeResponseValue;
6117 // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6118 export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
6119 if(!isWasmInitialized) {
6120 throw new Error("initializeWasm() must be awaited first!");
6122 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
6123 // debug statements here
6125 // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6126 export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
6127 if(!isWasmInitialized) {
6128 throw new Error("initializeWasm() must be awaited first!");
6130 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
6131 return nativeResponseValue;
6133 // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6134 export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
6135 if(!isWasmInitialized) {
6136 throw new Error("initializeWasm() must be awaited first!");
6138 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
6139 // debug statements here
6141 // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6142 export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
6143 if(!isWasmInitialized) {
6144 throw new Error("initializeWasm() must be awaited first!");
6146 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
6147 return nativeResponseValue;
6149 // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6150 export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
6151 if(!isWasmInitialized) {
6152 throw new Error("initializeWasm() must be awaited first!");
6154 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
6155 // debug statements here
6157 // bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6158 export function ChannelDetails_get_is_live(this_ptr: number): boolean {
6159 if(!isWasmInitialized) {
6160 throw new Error("initializeWasm() must be awaited first!");
6162 const nativeResponseValue = wasm.ChannelDetails_get_is_live(this_ptr);
6163 return nativeResponseValue;
6165 // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
6166 export function ChannelDetails_set_is_live(this_ptr: number, val: boolean): void {
6167 if(!isWasmInitialized) {
6168 throw new Error("initializeWasm() must be awaited first!");
6170 const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
6171 // debug statements here
6173 // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
6174 export function ChannelDetails_clone(orig: number): number {
6175 if(!isWasmInitialized) {
6176 throw new Error("initializeWasm() must be awaited first!");
6178 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
6179 return nativeResponseValue;
6181 // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
6182 export function PaymentSendFailure_free(this_ptr: number): void {
6183 if(!isWasmInitialized) {
6184 throw new Error("initializeWasm() must be awaited first!");
6186 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
6187 // debug statements here
6189 // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
6190 export function PaymentSendFailure_clone(orig: number): number {
6191 if(!isWasmInitialized) {
6192 throw new Error("initializeWasm() must be awaited first!");
6194 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
6195 return nativeResponseValue;
6197 // 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);
6198 export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
6199 if(!isWasmInitialized) {
6200 throw new Error("initializeWasm() must be awaited first!");
6202 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
6203 return nativeResponseValue;
6205 // 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);
6206 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 {
6207 if(!isWasmInitialized) {
6208 throw new Error("initializeWasm() must be awaited first!");
6210 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
6211 return nativeResponseValue;
6213 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6214 export function ChannelManager_list_channels(this_arg: number): number[] {
6215 if(!isWasmInitialized) {
6216 throw new Error("initializeWasm() must be awaited first!");
6218 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
6219 return nativeResponseValue;
6221 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6222 export function ChannelManager_list_usable_channels(this_arg: number): number[] {
6223 if(!isWasmInitialized) {
6224 throw new Error("initializeWasm() must be awaited first!");
6226 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
6227 return nativeResponseValue;
6229 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6230 export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
6231 if(!isWasmInitialized) {
6232 throw new Error("initializeWasm() must be awaited first!");
6234 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
6235 return nativeResponseValue;
6237 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6238 export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
6239 if(!isWasmInitialized) {
6240 throw new Error("initializeWasm() must be awaited first!");
6242 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
6243 return nativeResponseValue;
6245 // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6246 export function ChannelManager_force_close_all_channels(this_arg: number): void {
6247 if(!isWasmInitialized) {
6248 throw new Error("initializeWasm() must be awaited first!");
6250 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
6251 // debug statements here
6253 // 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);
6254 export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
6255 if(!isWasmInitialized) {
6256 throw new Error("initializeWasm() must be awaited first!");
6258 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
6259 return nativeResponseValue;
6261 // void ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKOutPoint funding_txo);
6262 export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_txo: number): void {
6263 if(!isWasmInitialized) {
6264 throw new Error("initializeWasm() must be awaited first!");
6266 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), funding_txo);
6267 // debug statements here
6269 // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
6270 export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
6271 if(!isWasmInitialized) {
6272 throw new Error("initializeWasm() must be awaited first!");
6274 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
6275 // debug statements here
6277 // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
6278 export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
6279 if(!isWasmInitialized) {
6280 throw new Error("initializeWasm() must be awaited first!");
6282 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
6283 // debug statements here
6285 // void ChannelManager_timer_chan_freshness_every_min(const struct LDKChannelManager *NONNULL_PTR this_arg);
6286 export function ChannelManager_timer_chan_freshness_every_min(this_arg: number): void {
6287 if(!isWasmInitialized) {
6288 throw new Error("initializeWasm() must be awaited first!");
6290 const nativeResponseValue = wasm.ChannelManager_timer_chan_freshness_every_min(this_arg);
6291 // debug statements here
6293 // 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);
6294 export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): boolean {
6295 if(!isWasmInitialized) {
6296 throw new Error("initializeWasm() must be awaited first!");
6298 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash), encodeArray(payment_secret));
6299 return nativeResponseValue;
6301 // 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);
6302 export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array, payment_secret: Uint8Array, expected_amount: number): boolean {
6303 if(!isWasmInitialized) {
6304 throw new Error("initializeWasm() must be awaited first!");
6306 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage), encodeArray(payment_secret), expected_amount);
6307 return nativeResponseValue;
6309 // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
6310 export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
6311 if(!isWasmInitialized) {
6312 throw new Error("initializeWasm() must be awaited first!");
6314 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
6315 return decodeArray(nativeResponseValue);
6317 // 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);
6318 export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
6319 if(!isWasmInitialized) {
6320 throw new Error("initializeWasm() must be awaited first!");
6322 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
6323 // debug statements here
6325 // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6326 export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
6327 if(!isWasmInitialized) {
6328 throw new Error("initializeWasm() must be awaited first!");
6330 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
6331 return nativeResponseValue;
6333 // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6334 export function ChannelManager_as_EventsProvider(this_arg: number): number {
6335 if(!isWasmInitialized) {
6336 throw new Error("initializeWasm() must be awaited first!");
6338 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
6339 return nativeResponseValue;
6341 // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
6342 export function ChannelManager_as_Listen(this_arg: number): number {
6343 if(!isWasmInitialized) {
6344 throw new Error("initializeWasm() must be awaited first!");
6346 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
6347 return nativeResponseValue;
6349 // void ChannelManager_block_connected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
6350 export function ChannelManager_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
6351 if(!isWasmInitialized) {
6352 throw new Error("initializeWasm() must be awaited first!");
6354 const nativeResponseValue = wasm.ChannelManager_block_connected(this_arg, encodeArray(header), txdata, height);
6355 // debug statements here
6357 // void ChannelManager_block_disconnected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80]);
6358 export function ChannelManager_block_disconnected(this_arg: number, header: Uint8Array): void {
6359 if(!isWasmInitialized) {
6360 throw new Error("initializeWasm() must be awaited first!");
6362 const nativeResponseValue = wasm.ChannelManager_block_disconnected(this_arg, encodeArray(header));
6363 // debug statements here
6365 // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
6366 export function ChannelManager_await_persistable_update(this_arg: number): void {
6367 if(!isWasmInitialized) {
6368 throw new Error("initializeWasm() must be awaited first!");
6370 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
6371 // debug statements here
6373 // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
6374 export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
6375 if(!isWasmInitialized) {
6376 throw new Error("initializeWasm() must be awaited first!");
6378 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
6379 return nativeResponseValue;
6381 // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
6382 export function ChannelManager_write(obj: number): Uint8Array {
6383 if(!isWasmInitialized) {
6384 throw new Error("initializeWasm() must be awaited first!");
6386 const nativeResponseValue = wasm.ChannelManager_write(obj);
6387 return decodeArray(nativeResponseValue);
6389 // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
6390 export function ChannelManagerReadArgs_free(this_obj: number): void {
6391 if(!isWasmInitialized) {
6392 throw new Error("initializeWasm() must be awaited first!");
6394 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
6395 // debug statements here
6397 // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6398 export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
6399 if(!isWasmInitialized) {
6400 throw new Error("initializeWasm() must be awaited first!");
6402 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
6403 return nativeResponseValue;
6405 // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
6406 export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
6407 if(!isWasmInitialized) {
6408 throw new Error("initializeWasm() must be awaited first!");
6410 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
6411 // debug statements here
6413 // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6414 export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
6415 if(!isWasmInitialized) {
6416 throw new Error("initializeWasm() must be awaited first!");
6418 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
6419 return nativeResponseValue;
6421 // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
6422 export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
6423 if(!isWasmInitialized) {
6424 throw new Error("initializeWasm() must be awaited first!");
6426 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
6427 // debug statements here
6429 // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6430 export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
6431 if(!isWasmInitialized) {
6432 throw new Error("initializeWasm() must be awaited first!");
6434 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
6435 return nativeResponseValue;
6437 // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
6438 export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
6439 if(!isWasmInitialized) {
6440 throw new Error("initializeWasm() must be awaited first!");
6442 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
6443 // debug statements here
6445 // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6446 export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
6447 if(!isWasmInitialized) {
6448 throw new Error("initializeWasm() must be awaited first!");
6450 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
6451 return nativeResponseValue;
6453 // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
6454 export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
6455 if(!isWasmInitialized) {
6456 throw new Error("initializeWasm() must be awaited first!");
6458 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
6459 // debug statements here
6461 // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6462 export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
6463 if(!isWasmInitialized) {
6464 throw new Error("initializeWasm() must be awaited first!");
6466 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
6467 return nativeResponseValue;
6469 // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
6470 export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
6471 if(!isWasmInitialized) {
6472 throw new Error("initializeWasm() must be awaited first!");
6474 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
6475 // debug statements here
6477 // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6478 export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
6479 if(!isWasmInitialized) {
6480 throw new Error("initializeWasm() must be awaited first!");
6482 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
6483 return nativeResponseValue;
6485 // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
6486 export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
6487 if(!isWasmInitialized) {
6488 throw new Error("initializeWasm() must be awaited first!");
6490 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
6491 // debug statements here
6493 // 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);
6494 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 {
6495 if(!isWasmInitialized) {
6496 throw new Error("initializeWasm() must be awaited first!");
6498 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
6499 return nativeResponseValue;
6501 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
6502 export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
6503 if(!isWasmInitialized) {
6504 throw new Error("initializeWasm() must be awaited first!");
6506 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
6507 return nativeResponseValue;
6509 // void DecodeError_free(struct LDKDecodeError this_obj);
6510 export function DecodeError_free(this_obj: number): void {
6511 if(!isWasmInitialized) {
6512 throw new Error("initializeWasm() must be awaited first!");
6514 const nativeResponseValue = wasm.DecodeError_free(this_obj);
6515 // debug statements here
6517 // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
6518 export function DecodeError_clone(orig: number): number {
6519 if(!isWasmInitialized) {
6520 throw new Error("initializeWasm() must be awaited first!");
6522 const nativeResponseValue = wasm.DecodeError_clone(orig);
6523 return nativeResponseValue;
6525 // void Init_free(struct LDKInit this_obj);
6526 export function Init_free(this_obj: number): void {
6527 if(!isWasmInitialized) {
6528 throw new Error("initializeWasm() must be awaited first!");
6530 const nativeResponseValue = wasm.Init_free(this_obj);
6531 // debug statements here
6533 // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
6534 export function Init_get_features(this_ptr: number): number {
6535 if(!isWasmInitialized) {
6536 throw new Error("initializeWasm() must be awaited first!");
6538 const nativeResponseValue = wasm.Init_get_features(this_ptr);
6539 return nativeResponseValue;
6541 // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6542 export function Init_set_features(this_ptr: number, val: number): void {
6543 if(!isWasmInitialized) {
6544 throw new Error("initializeWasm() must be awaited first!");
6546 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
6547 // debug statements here
6549 // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
6550 export function Init_new(features_arg: number): number {
6551 if(!isWasmInitialized) {
6552 throw new Error("initializeWasm() must be awaited first!");
6554 const nativeResponseValue = wasm.Init_new(features_arg);
6555 return nativeResponseValue;
6557 // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
6558 export function Init_clone(orig: number): number {
6559 if(!isWasmInitialized) {
6560 throw new Error("initializeWasm() must be awaited first!");
6562 const nativeResponseValue = wasm.Init_clone(orig);
6563 return nativeResponseValue;
6565 // void ErrorMessage_free(struct LDKErrorMessage this_obj);
6566 export function ErrorMessage_free(this_obj: number): void {
6567 if(!isWasmInitialized) {
6568 throw new Error("initializeWasm() must be awaited first!");
6570 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
6571 // debug statements here
6573 // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
6574 export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
6575 if(!isWasmInitialized) {
6576 throw new Error("initializeWasm() must be awaited first!");
6578 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
6579 return decodeArray(nativeResponseValue);
6581 // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6582 export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
6583 if(!isWasmInitialized) {
6584 throw new Error("initializeWasm() must be awaited first!");
6586 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
6587 // debug statements here
6589 // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
6590 export function ErrorMessage_get_data(this_ptr: number): String {
6591 if(!isWasmInitialized) {
6592 throw new Error("initializeWasm() must be awaited first!");
6594 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
6595 return nativeResponseValue;
6597 // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
6598 export function ErrorMessage_set_data(this_ptr: number, val: Uint8Array): void {
6599 if(!isWasmInitialized) {
6600 throw new Error("initializeWasm() must be awaited first!");
6602 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, encodeArray(val));
6603 // debug statements here
6605 // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
6606 export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: Uint8Array): number {
6607 if(!isWasmInitialized) {
6608 throw new Error("initializeWasm() must be awaited first!");
6610 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
6611 return nativeResponseValue;
6613 // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
6614 export function ErrorMessage_clone(orig: number): number {
6615 if(!isWasmInitialized) {
6616 throw new Error("initializeWasm() must be awaited first!");
6618 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
6619 return nativeResponseValue;
6621 // void Ping_free(struct LDKPing this_obj);
6622 export function Ping_free(this_obj: number): void {
6623 if(!isWasmInitialized) {
6624 throw new Error("initializeWasm() must be awaited first!");
6626 const nativeResponseValue = wasm.Ping_free(this_obj);
6627 // debug statements here
6629 // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
6630 export function Ping_get_ponglen(this_ptr: number): number {
6631 if(!isWasmInitialized) {
6632 throw new Error("initializeWasm() must be awaited first!");
6634 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
6635 return nativeResponseValue;
6637 // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6638 export function Ping_set_ponglen(this_ptr: number, val: number): void {
6639 if(!isWasmInitialized) {
6640 throw new Error("initializeWasm() must be awaited first!");
6642 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
6643 // debug statements here
6645 // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
6646 export function Ping_get_byteslen(this_ptr: number): number {
6647 if(!isWasmInitialized) {
6648 throw new Error("initializeWasm() must be awaited first!");
6650 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
6651 return nativeResponseValue;
6653 // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6654 export function Ping_set_byteslen(this_ptr: number, val: number): void {
6655 if(!isWasmInitialized) {
6656 throw new Error("initializeWasm() must be awaited first!");
6658 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
6659 // debug statements here
6661 // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
6662 export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
6663 if(!isWasmInitialized) {
6664 throw new Error("initializeWasm() must be awaited first!");
6666 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
6667 return nativeResponseValue;
6669 // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
6670 export function Ping_clone(orig: number): number {
6671 if(!isWasmInitialized) {
6672 throw new Error("initializeWasm() must be awaited first!");
6674 const nativeResponseValue = wasm.Ping_clone(orig);
6675 return nativeResponseValue;
6677 // void Pong_free(struct LDKPong this_obj);
6678 export function Pong_free(this_obj: number): void {
6679 if(!isWasmInitialized) {
6680 throw new Error("initializeWasm() must be awaited first!");
6682 const nativeResponseValue = wasm.Pong_free(this_obj);
6683 // debug statements here
6685 // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
6686 export function Pong_get_byteslen(this_ptr: number): number {
6687 if(!isWasmInitialized) {
6688 throw new Error("initializeWasm() must be awaited first!");
6690 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
6691 return nativeResponseValue;
6693 // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
6694 export function Pong_set_byteslen(this_ptr: number, val: number): void {
6695 if(!isWasmInitialized) {
6696 throw new Error("initializeWasm() must be awaited first!");
6698 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
6699 // debug statements here
6701 // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
6702 export function Pong_new(byteslen_arg: number): number {
6703 if(!isWasmInitialized) {
6704 throw new Error("initializeWasm() must be awaited first!");
6706 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
6707 return nativeResponseValue;
6709 // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
6710 export function Pong_clone(orig: number): number {
6711 if(!isWasmInitialized) {
6712 throw new Error("initializeWasm() must be awaited first!");
6714 const nativeResponseValue = wasm.Pong_clone(orig);
6715 return nativeResponseValue;
6717 // void OpenChannel_free(struct LDKOpenChannel this_obj);
6718 export function OpenChannel_free(this_obj: number): void {
6719 if(!isWasmInitialized) {
6720 throw new Error("initializeWasm() must be awaited first!");
6722 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
6723 // debug statements here
6725 // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
6726 export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
6727 if(!isWasmInitialized) {
6728 throw new Error("initializeWasm() must be awaited first!");
6730 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
6731 return decodeArray(nativeResponseValue);
6733 // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6734 export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6735 if(!isWasmInitialized) {
6736 throw new Error("initializeWasm() must be awaited first!");
6738 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
6739 // debug statements here
6741 // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
6742 export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
6743 if(!isWasmInitialized) {
6744 throw new Error("initializeWasm() must be awaited first!");
6746 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
6747 return decodeArray(nativeResponseValue);
6749 // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6750 export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
6751 if(!isWasmInitialized) {
6752 throw new Error("initializeWasm() must be awaited first!");
6754 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
6755 // debug statements here
6757 // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6758 export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
6759 if(!isWasmInitialized) {
6760 throw new Error("initializeWasm() must be awaited first!");
6762 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
6763 return nativeResponseValue;
6765 // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6766 export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
6767 if(!isWasmInitialized) {
6768 throw new Error("initializeWasm() must be awaited first!");
6770 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
6771 // debug statements here
6773 // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6774 export function OpenChannel_get_push_msat(this_ptr: number): number {
6775 if(!isWasmInitialized) {
6776 throw new Error("initializeWasm() must be awaited first!");
6778 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
6779 return nativeResponseValue;
6781 // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6782 export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
6783 if(!isWasmInitialized) {
6784 throw new Error("initializeWasm() must be awaited first!");
6786 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
6787 // debug statements here
6789 // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6790 export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
6791 if(!isWasmInitialized) {
6792 throw new Error("initializeWasm() must be awaited first!");
6794 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
6795 return nativeResponseValue;
6797 // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6798 export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
6799 if(!isWasmInitialized) {
6800 throw new Error("initializeWasm() must be awaited first!");
6802 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
6803 // debug statements here
6805 // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6806 export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
6807 if(!isWasmInitialized) {
6808 throw new Error("initializeWasm() must be awaited first!");
6810 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
6811 return nativeResponseValue;
6813 // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6814 export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
6815 if(!isWasmInitialized) {
6816 throw new Error("initializeWasm() must be awaited first!");
6818 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
6819 // debug statements here
6821 // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6822 export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
6823 if(!isWasmInitialized) {
6824 throw new Error("initializeWasm() must be awaited first!");
6826 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
6827 return nativeResponseValue;
6829 // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6830 export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
6831 if(!isWasmInitialized) {
6832 throw new Error("initializeWasm() must be awaited first!");
6834 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
6835 // debug statements here
6837 // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6838 export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
6839 if(!isWasmInitialized) {
6840 throw new Error("initializeWasm() must be awaited first!");
6842 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
6843 return nativeResponseValue;
6845 // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6846 export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
6847 if(!isWasmInitialized) {
6848 throw new Error("initializeWasm() must be awaited first!");
6850 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
6851 // debug statements here
6853 // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6854 export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
6855 if(!isWasmInitialized) {
6856 throw new Error("initializeWasm() must be awaited first!");
6858 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
6859 return nativeResponseValue;
6861 // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
6862 export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
6863 if(!isWasmInitialized) {
6864 throw new Error("initializeWasm() must be awaited first!");
6866 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
6867 // debug statements here
6869 // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6870 export function OpenChannel_get_to_self_delay(this_ptr: number): number {
6871 if(!isWasmInitialized) {
6872 throw new Error("initializeWasm() must be awaited first!");
6874 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
6875 return nativeResponseValue;
6877 // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
6878 export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
6879 if(!isWasmInitialized) {
6880 throw new Error("initializeWasm() must be awaited first!");
6882 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
6883 // debug statements here
6885 // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6886 export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
6887 if(!isWasmInitialized) {
6888 throw new Error("initializeWasm() must be awaited first!");
6890 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
6891 return nativeResponseValue;
6893 // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
6894 export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
6895 if(!isWasmInitialized) {
6896 throw new Error("initializeWasm() must be awaited first!");
6898 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
6899 // debug statements here
6901 // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6902 export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
6903 if(!isWasmInitialized) {
6904 throw new Error("initializeWasm() must be awaited first!");
6906 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
6907 return decodeArray(nativeResponseValue);
6909 // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6910 export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
6911 if(!isWasmInitialized) {
6912 throw new Error("initializeWasm() must be awaited first!");
6914 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
6915 // debug statements here
6917 // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6918 export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
6919 if(!isWasmInitialized) {
6920 throw new Error("initializeWasm() must be awaited first!");
6922 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
6923 return decodeArray(nativeResponseValue);
6925 // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6926 export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
6927 if(!isWasmInitialized) {
6928 throw new Error("initializeWasm() must be awaited first!");
6930 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
6931 // debug statements here
6933 // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6934 export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
6935 if(!isWasmInitialized) {
6936 throw new Error("initializeWasm() must be awaited first!");
6938 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
6939 return decodeArray(nativeResponseValue);
6941 // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6942 export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
6943 if(!isWasmInitialized) {
6944 throw new Error("initializeWasm() must be awaited first!");
6946 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
6947 // debug statements here
6949 // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6950 export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
6951 if(!isWasmInitialized) {
6952 throw new Error("initializeWasm() must be awaited first!");
6954 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
6955 return decodeArray(nativeResponseValue);
6957 // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6958 export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
6959 if(!isWasmInitialized) {
6960 throw new Error("initializeWasm() must be awaited first!");
6962 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
6963 // debug statements here
6965 // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6966 export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
6967 if(!isWasmInitialized) {
6968 throw new Error("initializeWasm() must be awaited first!");
6970 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
6971 return decodeArray(nativeResponseValue);
6973 // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6974 export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
6975 if(!isWasmInitialized) {
6976 throw new Error("initializeWasm() must be awaited first!");
6978 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
6979 // debug statements here
6981 // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6982 export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
6983 if(!isWasmInitialized) {
6984 throw new Error("initializeWasm() must be awaited first!");
6986 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
6987 return decodeArray(nativeResponseValue);
6989 // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6990 export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
6991 if(!isWasmInitialized) {
6992 throw new Error("initializeWasm() must be awaited first!");
6994 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
6995 // debug statements here
6997 // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6998 export function OpenChannel_get_channel_flags(this_ptr: number): number {
6999 if(!isWasmInitialized) {
7000 throw new Error("initializeWasm() must be awaited first!");
7002 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
7003 return nativeResponseValue;
7005 // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
7006 export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
7007 if(!isWasmInitialized) {
7008 throw new Error("initializeWasm() must be awaited first!");
7010 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
7011 // debug statements here
7013 // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
7014 export function OpenChannel_clone(orig: number): number {
7015 if(!isWasmInitialized) {
7016 throw new Error("initializeWasm() must be awaited first!");
7018 const nativeResponseValue = wasm.OpenChannel_clone(orig);
7019 return nativeResponseValue;
7021 // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
7022 export function AcceptChannel_free(this_obj: number): void {
7023 if(!isWasmInitialized) {
7024 throw new Error("initializeWasm() must be awaited first!");
7026 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
7027 // debug statements here
7029 // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
7030 export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
7031 if(!isWasmInitialized) {
7032 throw new Error("initializeWasm() must be awaited first!");
7034 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
7035 return decodeArray(nativeResponseValue);
7037 // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7038 export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7039 if(!isWasmInitialized) {
7040 throw new Error("initializeWasm() must be awaited first!");
7042 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
7043 // debug statements here
7045 // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7046 export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
7047 if(!isWasmInitialized) {
7048 throw new Error("initializeWasm() must be awaited first!");
7050 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
7051 return nativeResponseValue;
7053 // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7054 export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
7055 if(!isWasmInitialized) {
7056 throw new Error("initializeWasm() must be awaited first!");
7058 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
7059 // debug statements here
7061 // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7062 export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
7063 if(!isWasmInitialized) {
7064 throw new Error("initializeWasm() must be awaited first!");
7066 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
7067 return nativeResponseValue;
7069 // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7070 export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7071 if(!isWasmInitialized) {
7072 throw new Error("initializeWasm() must be awaited first!");
7074 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
7075 // debug statements here
7077 // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7078 export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
7079 if(!isWasmInitialized) {
7080 throw new Error("initializeWasm() must be awaited first!");
7082 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
7083 return nativeResponseValue;
7085 // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7086 export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
7087 if(!isWasmInitialized) {
7088 throw new Error("initializeWasm() must be awaited first!");
7090 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
7091 // debug statements here
7093 // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7094 export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
7095 if(!isWasmInitialized) {
7096 throw new Error("initializeWasm() must be awaited first!");
7098 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
7099 return nativeResponseValue;
7101 // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7102 export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
7103 if(!isWasmInitialized) {
7104 throw new Error("initializeWasm() must be awaited first!");
7106 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
7107 // debug statements here
7109 // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7110 export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
7111 if(!isWasmInitialized) {
7112 throw new Error("initializeWasm() must be awaited first!");
7114 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
7115 return nativeResponseValue;
7117 // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
7118 export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
7119 if(!isWasmInitialized) {
7120 throw new Error("initializeWasm() must be awaited first!");
7122 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
7123 // debug statements here
7125 // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7126 export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
7127 if(!isWasmInitialized) {
7128 throw new Error("initializeWasm() must be awaited first!");
7130 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
7131 return nativeResponseValue;
7133 // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7134 export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
7135 if(!isWasmInitialized) {
7136 throw new Error("initializeWasm() must be awaited first!");
7138 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
7139 // debug statements here
7141 // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7142 export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
7143 if(!isWasmInitialized) {
7144 throw new Error("initializeWasm() must be awaited first!");
7146 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
7147 return nativeResponseValue;
7149 // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7150 export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
7151 if(!isWasmInitialized) {
7152 throw new Error("initializeWasm() must be awaited first!");
7154 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
7155 // debug statements here
7157 // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7158 export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
7159 if(!isWasmInitialized) {
7160 throw new Error("initializeWasm() must be awaited first!");
7162 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
7163 return decodeArray(nativeResponseValue);
7165 // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7166 export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
7167 if(!isWasmInitialized) {
7168 throw new Error("initializeWasm() must be awaited first!");
7170 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
7171 // debug statements here
7173 // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7174 export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
7175 if(!isWasmInitialized) {
7176 throw new Error("initializeWasm() must be awaited first!");
7178 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
7179 return decodeArray(nativeResponseValue);
7181 // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7182 export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
7183 if(!isWasmInitialized) {
7184 throw new Error("initializeWasm() must be awaited first!");
7186 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
7187 // debug statements here
7189 // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7190 export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
7191 if(!isWasmInitialized) {
7192 throw new Error("initializeWasm() must be awaited first!");
7194 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
7195 return decodeArray(nativeResponseValue);
7197 // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7198 export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
7199 if(!isWasmInitialized) {
7200 throw new Error("initializeWasm() must be awaited first!");
7202 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
7203 // debug statements here
7205 // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7206 export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
7207 if(!isWasmInitialized) {
7208 throw new Error("initializeWasm() must be awaited first!");
7210 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
7211 return decodeArray(nativeResponseValue);
7213 // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7214 export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
7215 if(!isWasmInitialized) {
7216 throw new Error("initializeWasm() must be awaited first!");
7218 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
7219 // debug statements here
7221 // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7222 export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
7223 if(!isWasmInitialized) {
7224 throw new Error("initializeWasm() must be awaited first!");
7226 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
7227 return decodeArray(nativeResponseValue);
7229 // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7230 export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7231 if(!isWasmInitialized) {
7232 throw new Error("initializeWasm() must be awaited first!");
7234 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7235 // debug statements here
7237 // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7238 export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7239 if(!isWasmInitialized) {
7240 throw new Error("initializeWasm() must be awaited first!");
7242 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
7243 return decodeArray(nativeResponseValue);
7245 // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7246 export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7247 if(!isWasmInitialized) {
7248 throw new Error("initializeWasm() must be awaited first!");
7250 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7251 // debug statements here
7253 // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
7254 export function AcceptChannel_clone(orig: number): number {
7255 if(!isWasmInitialized) {
7256 throw new Error("initializeWasm() must be awaited first!");
7258 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
7259 return nativeResponseValue;
7261 // void FundingCreated_free(struct LDKFundingCreated this_obj);
7262 export function FundingCreated_free(this_obj: number): void {
7263 if(!isWasmInitialized) {
7264 throw new Error("initializeWasm() must be awaited first!");
7266 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
7267 // debug statements here
7269 // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7270 export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
7271 if(!isWasmInitialized) {
7272 throw new Error("initializeWasm() must be awaited first!");
7274 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
7275 return decodeArray(nativeResponseValue);
7277 // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7278 export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7279 if(!isWasmInitialized) {
7280 throw new Error("initializeWasm() must be awaited first!");
7282 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
7283 // debug statements here
7285 // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7286 export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
7287 if(!isWasmInitialized) {
7288 throw new Error("initializeWasm() must be awaited first!");
7290 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
7291 return decodeArray(nativeResponseValue);
7293 // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7294 export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
7295 if(!isWasmInitialized) {
7296 throw new Error("initializeWasm() must be awaited first!");
7298 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
7299 // debug statements here
7301 // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7302 export function FundingCreated_get_funding_output_index(this_ptr: number): number {
7303 if(!isWasmInitialized) {
7304 throw new Error("initializeWasm() must be awaited first!");
7306 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
7307 return nativeResponseValue;
7309 // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
7310 export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
7311 if(!isWasmInitialized) {
7312 throw new Error("initializeWasm() must be awaited first!");
7314 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
7315 // debug statements here
7317 // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7318 export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
7319 if(!isWasmInitialized) {
7320 throw new Error("initializeWasm() must be awaited first!");
7322 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
7323 return decodeArray(nativeResponseValue);
7325 // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
7326 export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
7327 if(!isWasmInitialized) {
7328 throw new Error("initializeWasm() must be awaited first!");
7330 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
7331 // debug statements here
7333 // 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);
7334 export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
7335 if(!isWasmInitialized) {
7336 throw new Error("initializeWasm() must be awaited first!");
7338 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
7339 return nativeResponseValue;
7341 // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
7342 export function FundingCreated_clone(orig: number): number {
7343 if(!isWasmInitialized) {
7344 throw new Error("initializeWasm() must be awaited first!");
7346 const nativeResponseValue = wasm.FundingCreated_clone(orig);
7347 return nativeResponseValue;
7349 // void FundingSigned_free(struct LDKFundingSigned this_obj);
7350 export function FundingSigned_free(this_obj: number): void {
7351 if(!isWasmInitialized) {
7352 throw new Error("initializeWasm() must be awaited first!");
7354 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
7355 // debug statements here
7357 // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
7358 export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
7359 if(!isWasmInitialized) {
7360 throw new Error("initializeWasm() must be awaited first!");
7362 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
7363 return decodeArray(nativeResponseValue);
7365 // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7366 export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7367 if(!isWasmInitialized) {
7368 throw new Error("initializeWasm() must be awaited first!");
7370 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
7371 // debug statements here
7373 // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
7374 export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
7375 if(!isWasmInitialized) {
7376 throw new Error("initializeWasm() must be awaited first!");
7378 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
7379 return decodeArray(nativeResponseValue);
7381 // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7382 export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7383 if(!isWasmInitialized) {
7384 throw new Error("initializeWasm() must be awaited first!");
7386 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
7387 // debug statements here
7389 // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
7390 export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
7391 if(!isWasmInitialized) {
7392 throw new Error("initializeWasm() must be awaited first!");
7394 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
7395 return nativeResponseValue;
7397 // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
7398 export function FundingSigned_clone(orig: number): number {
7399 if(!isWasmInitialized) {
7400 throw new Error("initializeWasm() must be awaited first!");
7402 const nativeResponseValue = wasm.FundingSigned_clone(orig);
7403 return nativeResponseValue;
7405 // void FundingLocked_free(struct LDKFundingLocked this_obj);
7406 export function FundingLocked_free(this_obj: number): void {
7407 if(!isWasmInitialized) {
7408 throw new Error("initializeWasm() must be awaited first!");
7410 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
7411 // debug statements here
7413 // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
7414 export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
7415 if(!isWasmInitialized) {
7416 throw new Error("initializeWasm() must be awaited first!");
7418 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
7419 return decodeArray(nativeResponseValue);
7421 // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7422 export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
7423 if(!isWasmInitialized) {
7424 throw new Error("initializeWasm() must be awaited first!");
7426 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
7427 // debug statements here
7429 // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
7430 export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
7431 if(!isWasmInitialized) {
7432 throw new Error("initializeWasm() must be awaited first!");
7434 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
7435 return decodeArray(nativeResponseValue);
7437 // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7438 export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7439 if(!isWasmInitialized) {
7440 throw new Error("initializeWasm() must be awaited first!");
7442 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
7443 // debug statements here
7445 // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
7446 export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
7447 if(!isWasmInitialized) {
7448 throw new Error("initializeWasm() must be awaited first!");
7450 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
7451 return nativeResponseValue;
7453 // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
7454 export function FundingLocked_clone(orig: number): number {
7455 if(!isWasmInitialized) {
7456 throw new Error("initializeWasm() must be awaited first!");
7458 const nativeResponseValue = wasm.FundingLocked_clone(orig);
7459 return nativeResponseValue;
7461 // void Shutdown_free(struct LDKShutdown this_obj);
7462 export function Shutdown_free(this_obj: number): void {
7463 if(!isWasmInitialized) {
7464 throw new Error("initializeWasm() must be awaited first!");
7466 const nativeResponseValue = wasm.Shutdown_free(this_obj);
7467 // debug statements here
7469 // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
7470 export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
7471 if(!isWasmInitialized) {
7472 throw new Error("initializeWasm() must be awaited first!");
7474 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
7475 return decodeArray(nativeResponseValue);
7477 // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7478 export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
7479 if(!isWasmInitialized) {
7480 throw new Error("initializeWasm() must be awaited first!");
7482 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
7483 // debug statements here
7485 // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
7486 export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
7487 if(!isWasmInitialized) {
7488 throw new Error("initializeWasm() must be awaited first!");
7490 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
7491 return decodeArray(nativeResponseValue);
7493 // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7494 export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
7495 if(!isWasmInitialized) {
7496 throw new Error("initializeWasm() must be awaited first!");
7498 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
7499 // debug statements here
7501 // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
7502 export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
7503 if(!isWasmInitialized) {
7504 throw new Error("initializeWasm() must be awaited first!");
7506 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
7507 return nativeResponseValue;
7509 // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
7510 export function Shutdown_clone(orig: number): number {
7511 if(!isWasmInitialized) {
7512 throw new Error("initializeWasm() must be awaited first!");
7514 const nativeResponseValue = wasm.Shutdown_clone(orig);
7515 return nativeResponseValue;
7517 // void ClosingSigned_free(struct LDKClosingSigned this_obj);
7518 export function ClosingSigned_free(this_obj: number): void {
7519 if(!isWasmInitialized) {
7520 throw new Error("initializeWasm() must be awaited first!");
7522 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
7523 // debug statements here
7525 // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
7526 export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
7527 if(!isWasmInitialized) {
7528 throw new Error("initializeWasm() must be awaited first!");
7530 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
7531 return decodeArray(nativeResponseValue);
7533 // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7534 export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7535 if(!isWasmInitialized) {
7536 throw new Error("initializeWasm() must be awaited first!");
7538 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
7539 // debug statements here
7541 // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
7542 export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
7543 if(!isWasmInitialized) {
7544 throw new Error("initializeWasm() must be awaited first!");
7546 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
7547 return nativeResponseValue;
7549 // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
7550 export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
7551 if(!isWasmInitialized) {
7552 throw new Error("initializeWasm() must be awaited first!");
7554 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
7555 // debug statements here
7557 // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
7558 export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
7559 if(!isWasmInitialized) {
7560 throw new Error("initializeWasm() must be awaited first!");
7562 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
7563 return decodeArray(nativeResponseValue);
7565 // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7566 export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7567 if(!isWasmInitialized) {
7568 throw new Error("initializeWasm() must be awaited first!");
7570 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
7571 // debug statements here
7573 // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
7574 export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
7575 if(!isWasmInitialized) {
7576 throw new Error("initializeWasm() must be awaited first!");
7578 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
7579 return nativeResponseValue;
7581 // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
7582 export function ClosingSigned_clone(orig: number): number {
7583 if(!isWasmInitialized) {
7584 throw new Error("initializeWasm() must be awaited first!");
7586 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
7587 return nativeResponseValue;
7589 // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
7590 export function UpdateAddHTLC_free(this_obj: number): void {
7591 if(!isWasmInitialized) {
7592 throw new Error("initializeWasm() must be awaited first!");
7594 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
7595 // debug statements here
7597 // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7598 export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
7599 if(!isWasmInitialized) {
7600 throw new Error("initializeWasm() must be awaited first!");
7602 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
7603 return decodeArray(nativeResponseValue);
7605 // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7606 export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7607 if(!isWasmInitialized) {
7608 throw new Error("initializeWasm() must be awaited first!");
7610 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
7611 // debug statements here
7613 // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7614 export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
7615 if(!isWasmInitialized) {
7616 throw new Error("initializeWasm() must be awaited first!");
7618 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
7619 return nativeResponseValue;
7621 // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7622 export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
7623 if(!isWasmInitialized) {
7624 throw new Error("initializeWasm() must be awaited first!");
7626 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
7627 // debug statements here
7629 // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7630 export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
7631 if(!isWasmInitialized) {
7632 throw new Error("initializeWasm() must be awaited first!");
7634 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
7635 return nativeResponseValue;
7637 // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7638 export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
7639 if(!isWasmInitialized) {
7640 throw new Error("initializeWasm() must be awaited first!");
7642 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
7643 // debug statements here
7645 // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7646 export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
7647 if(!isWasmInitialized) {
7648 throw new Error("initializeWasm() must be awaited first!");
7650 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
7651 return decodeArray(nativeResponseValue);
7653 // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7654 export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
7655 if(!isWasmInitialized) {
7656 throw new Error("initializeWasm() must be awaited first!");
7658 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
7659 // debug statements here
7661 // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7662 export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
7663 if(!isWasmInitialized) {
7664 throw new Error("initializeWasm() must be awaited first!");
7666 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
7667 return nativeResponseValue;
7669 // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
7670 export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
7671 if(!isWasmInitialized) {
7672 throw new Error("initializeWasm() must be awaited first!");
7674 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
7675 // debug statements here
7677 // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
7678 export function UpdateAddHTLC_clone(orig: number): number {
7679 if(!isWasmInitialized) {
7680 throw new Error("initializeWasm() must be awaited first!");
7682 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
7683 return nativeResponseValue;
7685 // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
7686 export function UpdateFulfillHTLC_free(this_obj: number): void {
7687 if(!isWasmInitialized) {
7688 throw new Error("initializeWasm() must be awaited first!");
7690 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
7691 // debug statements here
7693 // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7694 export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
7695 if(!isWasmInitialized) {
7696 throw new Error("initializeWasm() must be awaited first!");
7698 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
7699 return decodeArray(nativeResponseValue);
7701 // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7702 export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7703 if(!isWasmInitialized) {
7704 throw new Error("initializeWasm() must be awaited first!");
7706 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
7707 // debug statements here
7709 // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
7710 export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
7711 if(!isWasmInitialized) {
7712 throw new Error("initializeWasm() must be awaited first!");
7714 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
7715 return nativeResponseValue;
7717 // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
7718 export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
7719 if(!isWasmInitialized) {
7720 throw new Error("initializeWasm() must be awaited first!");
7722 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
7723 // debug statements here
7725 // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7726 export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
7727 if(!isWasmInitialized) {
7728 throw new Error("initializeWasm() must be awaited first!");
7730 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
7731 return decodeArray(nativeResponseValue);
7733 // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7734 export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
7735 if(!isWasmInitialized) {
7736 throw new Error("initializeWasm() must be awaited first!");
7738 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
7739 // debug statements here
7741 // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
7742 export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
7743 if(!isWasmInitialized) {
7744 throw new Error("initializeWasm() must be awaited first!");
7746 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
7747 return nativeResponseValue;
7749 // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
7750 export function UpdateFulfillHTLC_clone(orig: number): number {
7751 if(!isWasmInitialized) {
7752 throw new Error("initializeWasm() must be awaited first!");
7754 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
7755 return nativeResponseValue;
7757 // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
7758 export function UpdateFailHTLC_free(this_obj: number): void {
7759 if(!isWasmInitialized) {
7760 throw new Error("initializeWasm() must be awaited first!");
7762 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
7763 // debug statements here
7765 // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
7766 export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
7767 if(!isWasmInitialized) {
7768 throw new Error("initializeWasm() must be awaited first!");
7770 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
7771 return decodeArray(nativeResponseValue);
7773 // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7774 export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7775 if(!isWasmInitialized) {
7776 throw new Error("initializeWasm() must be awaited first!");
7778 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
7779 // debug statements here
7781 // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
7782 export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
7783 if(!isWasmInitialized) {
7784 throw new Error("initializeWasm() must be awaited first!");
7786 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
7787 return nativeResponseValue;
7789 // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
7790 export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
7791 if(!isWasmInitialized) {
7792 throw new Error("initializeWasm() must be awaited first!");
7794 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
7795 // debug statements here
7797 // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
7798 export function UpdateFailHTLC_clone(orig: number): number {
7799 if(!isWasmInitialized) {
7800 throw new Error("initializeWasm() must be awaited first!");
7802 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
7803 return nativeResponseValue;
7805 // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
7806 export function UpdateFailMalformedHTLC_free(this_obj: number): void {
7807 if(!isWasmInitialized) {
7808 throw new Error("initializeWasm() must be awaited first!");
7810 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
7811 // debug statements here
7813 // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
7814 export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
7815 if(!isWasmInitialized) {
7816 throw new Error("initializeWasm() must be awaited first!");
7818 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
7819 return decodeArray(nativeResponseValue);
7821 // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7822 export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7823 if(!isWasmInitialized) {
7824 throw new Error("initializeWasm() must be awaited first!");
7826 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
7827 // debug statements here
7829 // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
7830 export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
7831 if(!isWasmInitialized) {
7832 throw new Error("initializeWasm() must be awaited first!");
7834 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
7835 return nativeResponseValue;
7837 // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
7838 export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
7839 if(!isWasmInitialized) {
7840 throw new Error("initializeWasm() must be awaited first!");
7842 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
7843 // debug statements here
7845 // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
7846 export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
7847 if(!isWasmInitialized) {
7848 throw new Error("initializeWasm() must be awaited first!");
7850 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
7851 return nativeResponseValue;
7853 // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
7854 export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
7855 if(!isWasmInitialized) {
7856 throw new Error("initializeWasm() must be awaited first!");
7858 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
7859 // debug statements here
7861 // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
7862 export function UpdateFailMalformedHTLC_clone(orig: number): number {
7863 if(!isWasmInitialized) {
7864 throw new Error("initializeWasm() must be awaited first!");
7866 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
7867 return nativeResponseValue;
7869 // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
7870 export function CommitmentSigned_free(this_obj: number): void {
7871 if(!isWasmInitialized) {
7872 throw new Error("initializeWasm() must be awaited first!");
7874 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
7875 // debug statements here
7877 // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
7878 export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
7879 if(!isWasmInitialized) {
7880 throw new Error("initializeWasm() must be awaited first!");
7882 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
7883 return decodeArray(nativeResponseValue);
7885 // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7886 export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7887 if(!isWasmInitialized) {
7888 throw new Error("initializeWasm() must be awaited first!");
7890 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
7891 // debug statements here
7893 // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
7894 export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
7895 if(!isWasmInitialized) {
7896 throw new Error("initializeWasm() must be awaited first!");
7898 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
7899 return decodeArray(nativeResponseValue);
7901 // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7902 export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7903 if(!isWasmInitialized) {
7904 throw new Error("initializeWasm() must be awaited first!");
7906 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
7907 // debug statements here
7909 // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
7910 export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
7911 if(!isWasmInitialized) {
7912 throw new Error("initializeWasm() must be awaited first!");
7914 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
7915 // debug statements here
7917 // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
7918 export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
7919 if(!isWasmInitialized) {
7920 throw new Error("initializeWasm() must be awaited first!");
7922 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
7923 return nativeResponseValue;
7925 // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
7926 export function CommitmentSigned_clone(orig: number): number {
7927 if(!isWasmInitialized) {
7928 throw new Error("initializeWasm() must be awaited first!");
7930 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
7931 return nativeResponseValue;
7933 // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
7934 export function RevokeAndACK_free(this_obj: number): void {
7935 if(!isWasmInitialized) {
7936 throw new Error("initializeWasm() must be awaited first!");
7938 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
7939 // debug statements here
7941 // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
7942 export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
7943 if(!isWasmInitialized) {
7944 throw new Error("initializeWasm() must be awaited first!");
7946 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
7947 return decodeArray(nativeResponseValue);
7949 // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7950 export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
7951 if(!isWasmInitialized) {
7952 throw new Error("initializeWasm() must be awaited first!");
7954 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
7955 // debug statements here
7957 // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
7958 export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
7959 if(!isWasmInitialized) {
7960 throw new Error("initializeWasm() must be awaited first!");
7962 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
7963 return decodeArray(nativeResponseValue);
7965 // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7966 export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
7967 if(!isWasmInitialized) {
7968 throw new Error("initializeWasm() must be awaited first!");
7970 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
7971 // debug statements here
7973 // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
7974 export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
7975 if(!isWasmInitialized) {
7976 throw new Error("initializeWasm() must be awaited first!");
7978 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
7979 return decodeArray(nativeResponseValue);
7981 // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7982 export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7983 if(!isWasmInitialized) {
7984 throw new Error("initializeWasm() must be awaited first!");
7986 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
7987 // debug statements here
7989 // 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);
7990 export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
7991 if(!isWasmInitialized) {
7992 throw new Error("initializeWasm() must be awaited first!");
7994 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
7995 return nativeResponseValue;
7997 // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
7998 export function RevokeAndACK_clone(orig: number): number {
7999 if(!isWasmInitialized) {
8000 throw new Error("initializeWasm() must be awaited first!");
8002 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
8003 return nativeResponseValue;
8005 // void UpdateFee_free(struct LDKUpdateFee this_obj);
8006 export function UpdateFee_free(this_obj: number): void {
8007 if(!isWasmInitialized) {
8008 throw new Error("initializeWasm() must be awaited first!");
8010 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
8011 // debug statements here
8013 // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
8014 export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
8015 if(!isWasmInitialized) {
8016 throw new Error("initializeWasm() must be awaited first!");
8018 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
8019 return decodeArray(nativeResponseValue);
8021 // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8022 export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
8023 if(!isWasmInitialized) {
8024 throw new Error("initializeWasm() must be awaited first!");
8026 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
8027 // debug statements here
8029 // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
8030 export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
8031 if(!isWasmInitialized) {
8032 throw new Error("initializeWasm() must be awaited first!");
8034 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
8035 return nativeResponseValue;
8037 // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
8038 export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
8039 if(!isWasmInitialized) {
8040 throw new Error("initializeWasm() must be awaited first!");
8042 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
8043 // debug statements here
8045 // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
8046 export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
8047 if(!isWasmInitialized) {
8048 throw new Error("initializeWasm() must be awaited first!");
8050 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
8051 return nativeResponseValue;
8053 // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
8054 export function UpdateFee_clone(orig: number): number {
8055 if(!isWasmInitialized) {
8056 throw new Error("initializeWasm() must be awaited first!");
8058 const nativeResponseValue = wasm.UpdateFee_clone(orig);
8059 return nativeResponseValue;
8061 // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
8062 export function DataLossProtect_free(this_obj: number): void {
8063 if(!isWasmInitialized) {
8064 throw new Error("initializeWasm() must be awaited first!");
8066 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
8067 // debug statements here
8069 // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
8070 export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
8071 if(!isWasmInitialized) {
8072 throw new Error("initializeWasm() must be awaited first!");
8074 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
8075 return decodeArray(nativeResponseValue);
8077 // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8078 export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
8079 if(!isWasmInitialized) {
8080 throw new Error("initializeWasm() must be awaited first!");
8082 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
8083 // debug statements here
8085 // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
8086 export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
8087 if(!isWasmInitialized) {
8088 throw new Error("initializeWasm() must be awaited first!");
8090 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
8091 return decodeArray(nativeResponseValue);
8093 // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8094 export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8095 if(!isWasmInitialized) {
8096 throw new Error("initializeWasm() must be awaited first!");
8098 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
8099 // debug statements here
8101 // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
8102 export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
8103 if(!isWasmInitialized) {
8104 throw new Error("initializeWasm() must be awaited first!");
8106 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
8107 return nativeResponseValue;
8109 // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
8110 export function DataLossProtect_clone(orig: number): number {
8111 if(!isWasmInitialized) {
8112 throw new Error("initializeWasm() must be awaited first!");
8114 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
8115 return nativeResponseValue;
8117 // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
8118 export function ChannelReestablish_free(this_obj: number): void {
8119 if(!isWasmInitialized) {
8120 throw new Error("initializeWasm() must be awaited first!");
8122 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
8123 // debug statements here
8125 // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
8126 export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
8127 if(!isWasmInitialized) {
8128 throw new Error("initializeWasm() must be awaited first!");
8130 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
8131 return decodeArray(nativeResponseValue);
8133 // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8134 export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
8135 if(!isWasmInitialized) {
8136 throw new Error("initializeWasm() must be awaited first!");
8138 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
8139 // debug statements here
8141 // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8142 export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
8143 if(!isWasmInitialized) {
8144 throw new Error("initializeWasm() must be awaited first!");
8146 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
8147 return nativeResponseValue;
8149 // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8150 export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
8151 if(!isWasmInitialized) {
8152 throw new Error("initializeWasm() must be awaited first!");
8154 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
8155 // debug statements here
8157 // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8158 export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
8159 if(!isWasmInitialized) {
8160 throw new Error("initializeWasm() must be awaited first!");
8162 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
8163 return nativeResponseValue;
8165 // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8166 export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
8167 if(!isWasmInitialized) {
8168 throw new Error("initializeWasm() must be awaited first!");
8170 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
8171 // debug statements here
8173 // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
8174 export function ChannelReestablish_clone(orig: number): number {
8175 if(!isWasmInitialized) {
8176 throw new Error("initializeWasm() must be awaited first!");
8178 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
8179 return nativeResponseValue;
8181 // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
8182 export function AnnouncementSignatures_free(this_obj: number): void {
8183 if(!isWasmInitialized) {
8184 throw new Error("initializeWasm() must be awaited first!");
8186 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
8187 // debug statements here
8189 // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
8190 export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
8191 if(!isWasmInitialized) {
8192 throw new Error("initializeWasm() must be awaited first!");
8194 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
8195 return decodeArray(nativeResponseValue);
8197 // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8198 export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
8199 if(!isWasmInitialized) {
8200 throw new Error("initializeWasm() must be awaited first!");
8202 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
8203 // debug statements here
8205 // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8206 export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
8207 if(!isWasmInitialized) {
8208 throw new Error("initializeWasm() must be awaited first!");
8210 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
8211 return nativeResponseValue;
8213 // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
8214 export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
8215 if(!isWasmInitialized) {
8216 throw new Error("initializeWasm() must be awaited first!");
8218 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
8219 // debug statements here
8221 // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8222 export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
8223 if(!isWasmInitialized) {
8224 throw new Error("initializeWasm() must be awaited first!");
8226 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
8227 return decodeArray(nativeResponseValue);
8229 // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8230 export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
8231 if(!isWasmInitialized) {
8232 throw new Error("initializeWasm() must be awaited first!");
8234 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
8235 // debug statements here
8237 // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8238 export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
8239 if(!isWasmInitialized) {
8240 throw new Error("initializeWasm() must be awaited first!");
8242 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
8243 return decodeArray(nativeResponseValue);
8245 // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8246 export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
8247 if(!isWasmInitialized) {
8248 throw new Error("initializeWasm() must be awaited first!");
8250 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
8251 // debug statements here
8253 // 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);
8254 export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
8255 if(!isWasmInitialized) {
8256 throw new Error("initializeWasm() must be awaited first!");
8258 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
8259 return nativeResponseValue;
8261 // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
8262 export function AnnouncementSignatures_clone(orig: number): number {
8263 if(!isWasmInitialized) {
8264 throw new Error("initializeWasm() must be awaited first!");
8266 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
8267 return nativeResponseValue;
8269 // void NetAddress_free(struct LDKNetAddress this_ptr);
8270 export function NetAddress_free(this_ptr: number): void {
8271 if(!isWasmInitialized) {
8272 throw new Error("initializeWasm() must be awaited first!");
8274 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
8275 // debug statements here
8277 // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
8278 export function NetAddress_clone(orig: number): number {
8279 if(!isWasmInitialized) {
8280 throw new Error("initializeWasm() must be awaited first!");
8282 const nativeResponseValue = wasm.NetAddress_clone(orig);
8283 return nativeResponseValue;
8285 // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
8286 export function NetAddress_write(obj: number): Uint8Array {
8287 if(!isWasmInitialized) {
8288 throw new Error("initializeWasm() must be awaited first!");
8290 const nativeResponseValue = wasm.NetAddress_write(obj);
8291 return decodeArray(nativeResponseValue);
8293 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
8294 export function Result_read(ser: Uint8Array): number {
8295 if(!isWasmInitialized) {
8296 throw new Error("initializeWasm() must be awaited first!");
8298 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
8299 return nativeResponseValue;
8301 // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
8302 export function UnsignedNodeAnnouncement_free(this_obj: number): void {
8303 if(!isWasmInitialized) {
8304 throw new Error("initializeWasm() must be awaited first!");
8306 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
8307 // debug statements here
8309 // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8310 export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
8311 if(!isWasmInitialized) {
8312 throw new Error("initializeWasm() must be awaited first!");
8314 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
8315 return nativeResponseValue;
8317 // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
8318 export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
8319 if(!isWasmInitialized) {
8320 throw new Error("initializeWasm() must be awaited first!");
8322 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
8323 // debug statements here
8325 // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8326 export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
8327 if(!isWasmInitialized) {
8328 throw new Error("initializeWasm() must be awaited first!");
8330 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
8331 return nativeResponseValue;
8333 // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
8334 export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
8335 if(!isWasmInitialized) {
8336 throw new Error("initializeWasm() must be awaited first!");
8338 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
8339 // debug statements here
8341 // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8342 export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
8343 if(!isWasmInitialized) {
8344 throw new Error("initializeWasm() must be awaited first!");
8346 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
8347 return decodeArray(nativeResponseValue);
8349 // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8350 export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
8351 if(!isWasmInitialized) {
8352 throw new Error("initializeWasm() must be awaited first!");
8354 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
8355 // debug statements here
8357 // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
8358 export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
8359 if(!isWasmInitialized) {
8360 throw new Error("initializeWasm() must be awaited first!");
8362 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
8363 return decodeArray(nativeResponseValue);
8365 // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
8366 export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
8367 if(!isWasmInitialized) {
8368 throw new Error("initializeWasm() must be awaited first!");
8370 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
8371 // debug statements here
8373 // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
8374 export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
8375 if(!isWasmInitialized) {
8376 throw new Error("initializeWasm() must be awaited first!");
8378 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
8379 return decodeArray(nativeResponseValue);
8381 // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8382 export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
8383 if(!isWasmInitialized) {
8384 throw new Error("initializeWasm() must be awaited first!");
8386 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
8387 // debug statements here
8389 // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
8390 export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
8391 if(!isWasmInitialized) {
8392 throw new Error("initializeWasm() must be awaited first!");
8394 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
8395 // debug statements here
8397 // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
8398 export function UnsignedNodeAnnouncement_clone(orig: number): number {
8399 if(!isWasmInitialized) {
8400 throw new Error("initializeWasm() must be awaited first!");
8402 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
8403 return nativeResponseValue;
8405 // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
8406 export function NodeAnnouncement_free(this_obj: number): void {
8407 if(!isWasmInitialized) {
8408 throw new Error("initializeWasm() must be awaited first!");
8410 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
8411 // debug statements here
8413 // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8414 export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
8415 if(!isWasmInitialized) {
8416 throw new Error("initializeWasm() must be awaited first!");
8418 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
8419 return decodeArray(nativeResponseValue);
8421 // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8422 export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
8423 if(!isWasmInitialized) {
8424 throw new Error("initializeWasm() must be awaited first!");
8426 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
8427 // debug statements here
8429 // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8430 export function NodeAnnouncement_get_contents(this_ptr: number): number {
8431 if(!isWasmInitialized) {
8432 throw new Error("initializeWasm() must be awaited first!");
8434 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
8435 return nativeResponseValue;
8437 // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
8438 export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
8439 if(!isWasmInitialized) {
8440 throw new Error("initializeWasm() must be awaited first!");
8442 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
8443 // debug statements here
8445 // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
8446 export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
8447 if(!isWasmInitialized) {
8448 throw new Error("initializeWasm() must be awaited first!");
8450 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
8451 return nativeResponseValue;
8453 // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
8454 export function NodeAnnouncement_clone(orig: number): number {
8455 if(!isWasmInitialized) {
8456 throw new Error("initializeWasm() must be awaited first!");
8458 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
8459 return nativeResponseValue;
8461 // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
8462 export function UnsignedChannelAnnouncement_free(this_obj: number): void {
8463 if(!isWasmInitialized) {
8464 throw new Error("initializeWasm() must be awaited first!");
8466 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
8467 // debug statements here
8469 // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8470 export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
8471 if(!isWasmInitialized) {
8472 throw new Error("initializeWasm() must be awaited first!");
8474 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
8475 return nativeResponseValue;
8477 // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
8478 export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
8479 if(!isWasmInitialized) {
8480 throw new Error("initializeWasm() must be awaited first!");
8482 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
8483 // debug statements here
8485 // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
8486 export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
8487 if(!isWasmInitialized) {
8488 throw new Error("initializeWasm() must be awaited first!");
8490 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
8491 return decodeArray(nativeResponseValue);
8493 // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8494 export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8495 if(!isWasmInitialized) {
8496 throw new Error("initializeWasm() must be awaited first!");
8498 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
8499 // debug statements here
8501 // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8502 export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
8503 if(!isWasmInitialized) {
8504 throw new Error("initializeWasm() must be awaited first!");
8506 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
8507 return nativeResponseValue;
8509 // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
8510 export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
8511 if(!isWasmInitialized) {
8512 throw new Error("initializeWasm() must be awaited first!");
8514 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
8515 // debug statements here
8517 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8518 export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
8519 if(!isWasmInitialized) {
8520 throw new Error("initializeWasm() must be awaited first!");
8522 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
8523 return decodeArray(nativeResponseValue);
8525 // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8526 export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
8527 if(!isWasmInitialized) {
8528 throw new Error("initializeWasm() must be awaited first!");
8530 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
8531 // debug statements here
8533 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8534 export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
8535 if(!isWasmInitialized) {
8536 throw new Error("initializeWasm() must be awaited first!");
8538 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
8539 return decodeArray(nativeResponseValue);
8541 // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8542 export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
8543 if(!isWasmInitialized) {
8544 throw new Error("initializeWasm() must be awaited first!");
8546 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
8547 // debug statements here
8549 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8550 export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
8551 if(!isWasmInitialized) {
8552 throw new Error("initializeWasm() must be awaited first!");
8554 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
8555 return decodeArray(nativeResponseValue);
8557 // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8558 export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
8559 if(!isWasmInitialized) {
8560 throw new Error("initializeWasm() must be awaited first!");
8562 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
8563 // debug statements here
8565 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8566 export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
8567 if(!isWasmInitialized) {
8568 throw new Error("initializeWasm() must be awaited first!");
8570 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
8571 return decodeArray(nativeResponseValue);
8573 // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8574 export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
8575 if(!isWasmInitialized) {
8576 throw new Error("initializeWasm() must be awaited first!");
8578 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
8579 // debug statements here
8581 // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
8582 export function UnsignedChannelAnnouncement_clone(orig: number): number {
8583 if(!isWasmInitialized) {
8584 throw new Error("initializeWasm() must be awaited first!");
8586 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
8587 return nativeResponseValue;
8589 // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
8590 export function ChannelAnnouncement_free(this_obj: number): void {
8591 if(!isWasmInitialized) {
8592 throw new Error("initializeWasm() must be awaited first!");
8594 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
8595 // debug statements here
8597 // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8598 export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
8599 if(!isWasmInitialized) {
8600 throw new Error("initializeWasm() must be awaited first!");
8602 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
8603 return decodeArray(nativeResponseValue);
8605 // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8606 export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
8607 if(!isWasmInitialized) {
8608 throw new Error("initializeWasm() must be awaited first!");
8610 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
8611 // debug statements here
8613 // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8614 export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
8615 if(!isWasmInitialized) {
8616 throw new Error("initializeWasm() must be awaited first!");
8618 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
8619 return decodeArray(nativeResponseValue);
8621 // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8622 export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
8623 if(!isWasmInitialized) {
8624 throw new Error("initializeWasm() must be awaited first!");
8626 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
8627 // debug statements here
8629 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8630 export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
8631 if(!isWasmInitialized) {
8632 throw new Error("initializeWasm() must be awaited first!");
8634 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
8635 return decodeArray(nativeResponseValue);
8637 // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8638 export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
8639 if(!isWasmInitialized) {
8640 throw new Error("initializeWasm() must be awaited first!");
8642 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
8643 // debug statements here
8645 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8646 export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
8647 if(!isWasmInitialized) {
8648 throw new Error("initializeWasm() must be awaited first!");
8650 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
8651 return decodeArray(nativeResponseValue);
8653 // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8654 export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
8655 if(!isWasmInitialized) {
8656 throw new Error("initializeWasm() must be awaited first!");
8658 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
8659 // debug statements here
8661 // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8662 export function ChannelAnnouncement_get_contents(this_ptr: number): number {
8663 if(!isWasmInitialized) {
8664 throw new Error("initializeWasm() must be awaited first!");
8666 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
8667 return nativeResponseValue;
8669 // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
8670 export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
8671 if(!isWasmInitialized) {
8672 throw new Error("initializeWasm() must be awaited first!");
8674 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
8675 // debug statements here
8677 // 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);
8678 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 {
8679 if(!isWasmInitialized) {
8680 throw new Error("initializeWasm() must be awaited first!");
8682 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);
8683 return nativeResponseValue;
8685 // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
8686 export function ChannelAnnouncement_clone(orig: number): number {
8687 if(!isWasmInitialized) {
8688 throw new Error("initializeWasm() must be awaited first!");
8690 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
8691 return nativeResponseValue;
8693 // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
8694 export function UnsignedChannelUpdate_free(this_obj: number): void {
8695 if(!isWasmInitialized) {
8696 throw new Error("initializeWasm() must be awaited first!");
8698 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
8699 // debug statements here
8701 // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
8702 export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
8703 if(!isWasmInitialized) {
8704 throw new Error("initializeWasm() must be awaited first!");
8706 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
8707 return decodeArray(nativeResponseValue);
8709 // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8710 export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8711 if(!isWasmInitialized) {
8712 throw new Error("initializeWasm() must be awaited first!");
8714 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
8715 // debug statements here
8717 // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8718 export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
8719 if(!isWasmInitialized) {
8720 throw new Error("initializeWasm() must be awaited first!");
8722 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
8723 return nativeResponseValue;
8725 // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
8726 export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
8727 if(!isWasmInitialized) {
8728 throw new Error("initializeWasm() must be awaited first!");
8730 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
8731 // debug statements here
8733 // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8734 export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
8735 if(!isWasmInitialized) {
8736 throw new Error("initializeWasm() must be awaited first!");
8738 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
8739 return nativeResponseValue;
8741 // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8742 export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
8743 if(!isWasmInitialized) {
8744 throw new Error("initializeWasm() must be awaited first!");
8746 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
8747 // debug statements here
8749 // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8750 export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
8751 if(!isWasmInitialized) {
8752 throw new Error("initializeWasm() must be awaited first!");
8754 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
8755 return nativeResponseValue;
8757 // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
8758 export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
8759 if(!isWasmInitialized) {
8760 throw new Error("initializeWasm() must be awaited first!");
8762 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
8763 // debug statements here
8765 // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8766 export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
8767 if(!isWasmInitialized) {
8768 throw new Error("initializeWasm() must be awaited first!");
8770 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
8771 return nativeResponseValue;
8773 // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
8774 export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
8775 if(!isWasmInitialized) {
8776 throw new Error("initializeWasm() must be awaited first!");
8778 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
8779 // debug statements here
8781 // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8782 export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
8783 if(!isWasmInitialized) {
8784 throw new Error("initializeWasm() must be awaited first!");
8786 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
8787 return nativeResponseValue;
8789 // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
8790 export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
8791 if(!isWasmInitialized) {
8792 throw new Error("initializeWasm() must be awaited first!");
8794 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
8795 // debug statements here
8797 // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8798 export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
8799 if(!isWasmInitialized) {
8800 throw new Error("initializeWasm() must be awaited first!");
8802 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
8803 return nativeResponseValue;
8805 // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8806 export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
8807 if(!isWasmInitialized) {
8808 throw new Error("initializeWasm() must be awaited first!");
8810 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
8811 // debug statements here
8813 // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8814 export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
8815 if(!isWasmInitialized) {
8816 throw new Error("initializeWasm() must be awaited first!");
8818 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
8819 return nativeResponseValue;
8821 // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8822 export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
8823 if(!isWasmInitialized) {
8824 throw new Error("initializeWasm() must be awaited first!");
8826 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
8827 // debug statements here
8829 // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
8830 export function UnsignedChannelUpdate_clone(orig: number): number {
8831 if(!isWasmInitialized) {
8832 throw new Error("initializeWasm() must be awaited first!");
8834 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
8835 return nativeResponseValue;
8837 // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
8838 export function ChannelUpdate_free(this_obj: number): void {
8839 if(!isWasmInitialized) {
8840 throw new Error("initializeWasm() must be awaited first!");
8842 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
8843 // debug statements here
8845 // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
8846 export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
8847 if(!isWasmInitialized) {
8848 throw new Error("initializeWasm() must be awaited first!");
8850 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
8851 return decodeArray(nativeResponseValue);
8853 // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
8854 export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
8855 if(!isWasmInitialized) {
8856 throw new Error("initializeWasm() must be awaited first!");
8858 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
8859 // debug statements here
8861 // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
8862 export function ChannelUpdate_get_contents(this_ptr: number): number {
8863 if(!isWasmInitialized) {
8864 throw new Error("initializeWasm() must be awaited first!");
8866 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
8867 return nativeResponseValue;
8869 // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
8870 export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
8871 if(!isWasmInitialized) {
8872 throw new Error("initializeWasm() must be awaited first!");
8874 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
8875 // debug statements here
8877 // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
8878 export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
8879 if(!isWasmInitialized) {
8880 throw new Error("initializeWasm() must be awaited first!");
8882 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
8883 return nativeResponseValue;
8885 // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
8886 export function ChannelUpdate_clone(orig: number): number {
8887 if(!isWasmInitialized) {
8888 throw new Error("initializeWasm() must be awaited first!");
8890 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
8891 return nativeResponseValue;
8893 // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
8894 export function QueryChannelRange_free(this_obj: number): void {
8895 if(!isWasmInitialized) {
8896 throw new Error("initializeWasm() must be awaited first!");
8898 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
8899 // debug statements here
8901 // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
8902 export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
8903 if(!isWasmInitialized) {
8904 throw new Error("initializeWasm() must be awaited first!");
8906 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
8907 return decodeArray(nativeResponseValue);
8909 // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8910 export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8911 if(!isWasmInitialized) {
8912 throw new Error("initializeWasm() must be awaited first!");
8914 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
8915 // debug statements here
8917 // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
8918 export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
8919 if(!isWasmInitialized) {
8920 throw new Error("initializeWasm() must be awaited first!");
8922 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
8923 return nativeResponseValue;
8925 // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8926 export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
8927 if(!isWasmInitialized) {
8928 throw new Error("initializeWasm() must be awaited first!");
8930 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
8931 // debug statements here
8933 // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
8934 export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
8935 if(!isWasmInitialized) {
8936 throw new Error("initializeWasm() must be awaited first!");
8938 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
8939 return nativeResponseValue;
8941 // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8942 export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
8943 if(!isWasmInitialized) {
8944 throw new Error("initializeWasm() must be awaited first!");
8946 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
8947 // debug statements here
8949 // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
8950 export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
8951 if(!isWasmInitialized) {
8952 throw new Error("initializeWasm() must be awaited first!");
8954 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
8955 return nativeResponseValue;
8957 // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
8958 export function QueryChannelRange_clone(orig: number): number {
8959 if(!isWasmInitialized) {
8960 throw new Error("initializeWasm() must be awaited first!");
8962 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
8963 return nativeResponseValue;
8965 // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
8966 export function ReplyChannelRange_free(this_obj: number): void {
8967 if(!isWasmInitialized) {
8968 throw new Error("initializeWasm() must be awaited first!");
8970 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
8971 // debug statements here
8973 // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
8974 export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
8975 if(!isWasmInitialized) {
8976 throw new Error("initializeWasm() must be awaited first!");
8978 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
8979 return decodeArray(nativeResponseValue);
8981 // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8982 export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8983 if(!isWasmInitialized) {
8984 throw new Error("initializeWasm() must be awaited first!");
8986 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
8987 // debug statements here
8989 // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
8990 export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
8991 if(!isWasmInitialized) {
8992 throw new Error("initializeWasm() must be awaited first!");
8994 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
8995 return nativeResponseValue;
8997 // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8998 export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
8999 if(!isWasmInitialized) {
9000 throw new Error("initializeWasm() must be awaited first!");
9002 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
9003 // debug statements here
9005 // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9006 export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
9007 if(!isWasmInitialized) {
9008 throw new Error("initializeWasm() must be awaited first!");
9010 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
9011 return nativeResponseValue;
9013 // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9014 export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
9015 if(!isWasmInitialized) {
9016 throw new Error("initializeWasm() must be awaited first!");
9018 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
9019 // debug statements here
9021 // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9022 export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
9023 if(!isWasmInitialized) {
9024 throw new Error("initializeWasm() must be awaited first!");
9026 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
9027 return nativeResponseValue;
9029 // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
9030 export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
9031 if(!isWasmInitialized) {
9032 throw new Error("initializeWasm() must be awaited first!");
9034 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
9035 // debug statements here
9037 // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9038 export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
9039 if(!isWasmInitialized) {
9040 throw new Error("initializeWasm() must be awaited first!");
9042 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
9043 // debug statements here
9045 // 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);
9046 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 {
9047 if(!isWasmInitialized) {
9048 throw new Error("initializeWasm() must be awaited first!");
9050 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
9051 return nativeResponseValue;
9053 // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
9054 export function ReplyChannelRange_clone(orig: number): number {
9055 if(!isWasmInitialized) {
9056 throw new Error("initializeWasm() must be awaited first!");
9058 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
9059 return nativeResponseValue;
9061 // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
9062 export function QueryShortChannelIds_free(this_obj: number): void {
9063 if(!isWasmInitialized) {
9064 throw new Error("initializeWasm() must be awaited first!");
9066 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
9067 // debug statements here
9069 // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
9070 export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
9071 if(!isWasmInitialized) {
9072 throw new Error("initializeWasm() must be awaited first!");
9074 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
9075 return decodeArray(nativeResponseValue);
9077 // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9078 export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9079 if(!isWasmInitialized) {
9080 throw new Error("initializeWasm() must be awaited first!");
9082 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
9083 // debug statements here
9085 // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9086 export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
9087 if(!isWasmInitialized) {
9088 throw new Error("initializeWasm() must be awaited first!");
9090 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
9091 // debug statements here
9093 // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
9094 export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
9095 if(!isWasmInitialized) {
9096 throw new Error("initializeWasm() must be awaited first!");
9098 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
9099 return nativeResponseValue;
9101 // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
9102 export function QueryShortChannelIds_clone(orig: number): number {
9103 if(!isWasmInitialized) {
9104 throw new Error("initializeWasm() must be awaited first!");
9106 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
9107 return nativeResponseValue;
9109 // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
9110 export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
9111 if(!isWasmInitialized) {
9112 throw new Error("initializeWasm() must be awaited first!");
9114 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
9115 // debug statements here
9117 // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
9118 export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
9119 if(!isWasmInitialized) {
9120 throw new Error("initializeWasm() must be awaited first!");
9122 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
9123 return decodeArray(nativeResponseValue);
9125 // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9126 export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9127 if(!isWasmInitialized) {
9128 throw new Error("initializeWasm() must be awaited first!");
9130 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
9131 // debug statements here
9133 // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
9134 export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
9135 if(!isWasmInitialized) {
9136 throw new Error("initializeWasm() must be awaited first!");
9138 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
9139 return nativeResponseValue;
9141 // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
9142 export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
9143 if(!isWasmInitialized) {
9144 throw new Error("initializeWasm() must be awaited first!");
9146 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
9147 // debug statements here
9149 // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
9150 export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
9151 if(!isWasmInitialized) {
9152 throw new Error("initializeWasm() must be awaited first!");
9154 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
9155 return nativeResponseValue;
9157 // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
9158 export function ReplyShortChannelIdsEnd_clone(orig: number): number {
9159 if(!isWasmInitialized) {
9160 throw new Error("initializeWasm() must be awaited first!");
9162 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
9163 return nativeResponseValue;
9165 // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
9166 export function GossipTimestampFilter_free(this_obj: number): void {
9167 if(!isWasmInitialized) {
9168 throw new Error("initializeWasm() must be awaited first!");
9170 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
9171 // debug statements here
9173 // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
9174 export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
9175 if(!isWasmInitialized) {
9176 throw new Error("initializeWasm() must be awaited first!");
9178 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
9179 return decodeArray(nativeResponseValue);
9181 // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9182 export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9183 if(!isWasmInitialized) {
9184 throw new Error("initializeWasm() must be awaited first!");
9186 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
9187 // debug statements here
9189 // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9190 export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
9191 if(!isWasmInitialized) {
9192 throw new Error("initializeWasm() must be awaited first!");
9194 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
9195 return nativeResponseValue;
9197 // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9198 export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
9199 if(!isWasmInitialized) {
9200 throw new Error("initializeWasm() must be awaited first!");
9202 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
9203 // debug statements here
9205 // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9206 export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
9207 if(!isWasmInitialized) {
9208 throw new Error("initializeWasm() must be awaited first!");
9210 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
9211 return nativeResponseValue;
9213 // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9214 export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
9215 if(!isWasmInitialized) {
9216 throw new Error("initializeWasm() must be awaited first!");
9218 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
9219 // debug statements here
9221 // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
9222 export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
9223 if(!isWasmInitialized) {
9224 throw new Error("initializeWasm() must be awaited first!");
9226 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
9227 return nativeResponseValue;
9229 // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
9230 export function GossipTimestampFilter_clone(orig: number): number {
9231 if(!isWasmInitialized) {
9232 throw new Error("initializeWasm() must be awaited first!");
9234 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
9235 return nativeResponseValue;
9237 // void ErrorAction_free(struct LDKErrorAction this_ptr);
9238 export function ErrorAction_free(this_ptr: number): void {
9239 if(!isWasmInitialized) {
9240 throw new Error("initializeWasm() must be awaited first!");
9242 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
9243 // debug statements here
9245 // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
9246 export function ErrorAction_clone(orig: number): number {
9247 if(!isWasmInitialized) {
9248 throw new Error("initializeWasm() must be awaited first!");
9250 const nativeResponseValue = wasm.ErrorAction_clone(orig);
9251 return nativeResponseValue;
9253 // void LightningError_free(struct LDKLightningError this_obj);
9254 export function LightningError_free(this_obj: number): void {
9255 if(!isWasmInitialized) {
9256 throw new Error("initializeWasm() must be awaited first!");
9258 const nativeResponseValue = wasm.LightningError_free(this_obj);
9259 // debug statements here
9261 // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
9262 export function LightningError_get_err(this_ptr: number): String {
9263 if(!isWasmInitialized) {
9264 throw new Error("initializeWasm() must be awaited first!");
9266 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
9267 return nativeResponseValue;
9269 // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9270 export function LightningError_set_err(this_ptr: number, val: Uint8Array): void {
9271 if(!isWasmInitialized) {
9272 throw new Error("initializeWasm() must be awaited first!");
9274 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, encodeArray(val));
9275 // debug statements here
9277 // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
9278 export function LightningError_get_action(this_ptr: number): number {
9279 if(!isWasmInitialized) {
9280 throw new Error("initializeWasm() must be awaited first!");
9282 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
9283 return nativeResponseValue;
9285 // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
9286 export function LightningError_set_action(this_ptr: number, val: number): void {
9287 if(!isWasmInitialized) {
9288 throw new Error("initializeWasm() must be awaited first!");
9290 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
9291 // debug statements here
9293 // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
9294 export function LightningError_new(err_arg: Uint8Array, action_arg: number): number {
9295 if(!isWasmInitialized) {
9296 throw new Error("initializeWasm() must be awaited first!");
9298 const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
9299 return nativeResponseValue;
9301 // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
9302 export function LightningError_clone(orig: number): number {
9303 if(!isWasmInitialized) {
9304 throw new Error("initializeWasm() must be awaited first!");
9306 const nativeResponseValue = wasm.LightningError_clone(orig);
9307 return nativeResponseValue;
9309 // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
9310 export function CommitmentUpdate_free(this_obj: number): void {
9311 if(!isWasmInitialized) {
9312 throw new Error("initializeWasm() must be awaited first!");
9314 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
9315 // debug statements here
9317 // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
9318 export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
9319 if(!isWasmInitialized) {
9320 throw new Error("initializeWasm() must be awaited first!");
9322 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
9323 // debug statements here
9325 // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
9326 export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
9327 if(!isWasmInitialized) {
9328 throw new Error("initializeWasm() must be awaited first!");
9330 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
9331 // debug statements here
9333 // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
9334 export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
9335 if(!isWasmInitialized) {
9336 throw new Error("initializeWasm() must be awaited first!");
9338 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
9339 // debug statements here
9341 // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
9342 export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
9343 if(!isWasmInitialized) {
9344 throw new Error("initializeWasm() must be awaited first!");
9346 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
9347 // debug statements here
9349 // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9350 export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
9351 if(!isWasmInitialized) {
9352 throw new Error("initializeWasm() must be awaited first!");
9354 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
9355 return nativeResponseValue;
9357 // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
9358 export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
9359 if(!isWasmInitialized) {
9360 throw new Error("initializeWasm() must be awaited first!");
9362 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
9363 // debug statements here
9365 // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9366 export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
9367 if(!isWasmInitialized) {
9368 throw new Error("initializeWasm() must be awaited first!");
9370 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
9371 return nativeResponseValue;
9373 // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
9374 export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
9375 if(!isWasmInitialized) {
9376 throw new Error("initializeWasm() must be awaited first!");
9378 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
9379 // debug statements here
9381 // 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);
9382 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 {
9383 if(!isWasmInitialized) {
9384 throw new Error("initializeWasm() must be awaited first!");
9386 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);
9387 return nativeResponseValue;
9389 // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
9390 export function CommitmentUpdate_clone(orig: number): number {
9391 if(!isWasmInitialized) {
9392 throw new Error("initializeWasm() must be awaited first!");
9394 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
9395 return nativeResponseValue;
9397 // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
9398 export function HTLCFailChannelUpdate_free(this_ptr: number): void {
9399 if(!isWasmInitialized) {
9400 throw new Error("initializeWasm() must be awaited first!");
9402 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
9403 // debug statements here
9405 // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
9406 export function HTLCFailChannelUpdate_clone(orig: number): number {
9407 if(!isWasmInitialized) {
9408 throw new Error("initializeWasm() must be awaited first!");
9410 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
9411 return nativeResponseValue;
9413 // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
9414 export function ChannelMessageHandler_free(this_ptr: number): void {
9415 if(!isWasmInitialized) {
9416 throw new Error("initializeWasm() must be awaited first!");
9418 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
9419 // debug statements here
9421 // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
9422 export function RoutingMessageHandler_free(this_ptr: number): void {
9423 if(!isWasmInitialized) {
9424 throw new Error("initializeWasm() must be awaited first!");
9426 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
9427 // debug statements here
9429 // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
9430 export function AcceptChannel_write(obj: number): Uint8Array {
9431 if(!isWasmInitialized) {
9432 throw new Error("initializeWasm() must be awaited first!");
9434 const nativeResponseValue = wasm.AcceptChannel_write(obj);
9435 return decodeArray(nativeResponseValue);
9437 // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
9438 export function AcceptChannel_read(ser: Uint8Array): number {
9439 if(!isWasmInitialized) {
9440 throw new Error("initializeWasm() must be awaited first!");
9442 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
9443 return nativeResponseValue;
9445 // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
9446 export function AnnouncementSignatures_write(obj: number): Uint8Array {
9447 if(!isWasmInitialized) {
9448 throw new Error("initializeWasm() must be awaited first!");
9450 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
9451 return decodeArray(nativeResponseValue);
9453 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
9454 export function AnnouncementSignatures_read(ser: Uint8Array): number {
9455 if(!isWasmInitialized) {
9456 throw new Error("initializeWasm() must be awaited first!");
9458 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
9459 return nativeResponseValue;
9461 // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
9462 export function ChannelReestablish_write(obj: number): Uint8Array {
9463 if(!isWasmInitialized) {
9464 throw new Error("initializeWasm() must be awaited first!");
9466 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
9467 return decodeArray(nativeResponseValue);
9469 // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
9470 export function ChannelReestablish_read(ser: Uint8Array): number {
9471 if(!isWasmInitialized) {
9472 throw new Error("initializeWasm() must be awaited first!");
9474 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
9475 return nativeResponseValue;
9477 // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
9478 export function ClosingSigned_write(obj: number): Uint8Array {
9479 if(!isWasmInitialized) {
9480 throw new Error("initializeWasm() must be awaited first!");
9482 const nativeResponseValue = wasm.ClosingSigned_write(obj);
9483 return decodeArray(nativeResponseValue);
9485 // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
9486 export function ClosingSigned_read(ser: Uint8Array): number {
9487 if(!isWasmInitialized) {
9488 throw new Error("initializeWasm() must be awaited first!");
9490 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
9491 return nativeResponseValue;
9493 // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
9494 export function CommitmentSigned_write(obj: number): Uint8Array {
9495 if(!isWasmInitialized) {
9496 throw new Error("initializeWasm() must be awaited first!");
9498 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
9499 return decodeArray(nativeResponseValue);
9501 // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
9502 export function CommitmentSigned_read(ser: Uint8Array): number {
9503 if(!isWasmInitialized) {
9504 throw new Error("initializeWasm() must be awaited first!");
9506 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
9507 return nativeResponseValue;
9509 // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
9510 export function FundingCreated_write(obj: number): Uint8Array {
9511 if(!isWasmInitialized) {
9512 throw new Error("initializeWasm() must be awaited first!");
9514 const nativeResponseValue = wasm.FundingCreated_write(obj);
9515 return decodeArray(nativeResponseValue);
9517 // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
9518 export function FundingCreated_read(ser: Uint8Array): number {
9519 if(!isWasmInitialized) {
9520 throw new Error("initializeWasm() must be awaited first!");
9522 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
9523 return nativeResponseValue;
9525 // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
9526 export function FundingSigned_write(obj: number): Uint8Array {
9527 if(!isWasmInitialized) {
9528 throw new Error("initializeWasm() must be awaited first!");
9530 const nativeResponseValue = wasm.FundingSigned_write(obj);
9531 return decodeArray(nativeResponseValue);
9533 // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
9534 export function FundingSigned_read(ser: Uint8Array): number {
9535 if(!isWasmInitialized) {
9536 throw new Error("initializeWasm() must be awaited first!");
9538 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
9539 return nativeResponseValue;
9541 // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
9542 export function FundingLocked_write(obj: number): Uint8Array {
9543 if(!isWasmInitialized) {
9544 throw new Error("initializeWasm() must be awaited first!");
9546 const nativeResponseValue = wasm.FundingLocked_write(obj);
9547 return decodeArray(nativeResponseValue);
9549 // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
9550 export function FundingLocked_read(ser: Uint8Array): number {
9551 if(!isWasmInitialized) {
9552 throw new Error("initializeWasm() must be awaited first!");
9554 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
9555 return nativeResponseValue;
9557 // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
9558 export function Init_write(obj: number): Uint8Array {
9559 if(!isWasmInitialized) {
9560 throw new Error("initializeWasm() must be awaited first!");
9562 const nativeResponseValue = wasm.Init_write(obj);
9563 return decodeArray(nativeResponseValue);
9565 // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
9566 export function Init_read(ser: Uint8Array): number {
9567 if(!isWasmInitialized) {
9568 throw new Error("initializeWasm() must be awaited first!");
9570 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
9571 return nativeResponseValue;
9573 // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
9574 export function OpenChannel_write(obj: number): Uint8Array {
9575 if(!isWasmInitialized) {
9576 throw new Error("initializeWasm() must be awaited first!");
9578 const nativeResponseValue = wasm.OpenChannel_write(obj);
9579 return decodeArray(nativeResponseValue);
9581 // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
9582 export function OpenChannel_read(ser: Uint8Array): number {
9583 if(!isWasmInitialized) {
9584 throw new Error("initializeWasm() must be awaited first!");
9586 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
9587 return nativeResponseValue;
9589 // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
9590 export function RevokeAndACK_write(obj: number): Uint8Array {
9591 if(!isWasmInitialized) {
9592 throw new Error("initializeWasm() must be awaited first!");
9594 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
9595 return decodeArray(nativeResponseValue);
9597 // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
9598 export function RevokeAndACK_read(ser: Uint8Array): number {
9599 if(!isWasmInitialized) {
9600 throw new Error("initializeWasm() must be awaited first!");
9602 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
9603 return nativeResponseValue;
9605 // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
9606 export function Shutdown_write(obj: number): Uint8Array {
9607 if(!isWasmInitialized) {
9608 throw new Error("initializeWasm() must be awaited first!");
9610 const nativeResponseValue = wasm.Shutdown_write(obj);
9611 return decodeArray(nativeResponseValue);
9613 // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
9614 export function Shutdown_read(ser: Uint8Array): number {
9615 if(!isWasmInitialized) {
9616 throw new Error("initializeWasm() must be awaited first!");
9618 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
9619 return nativeResponseValue;
9621 // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
9622 export function UpdateFailHTLC_write(obj: number): Uint8Array {
9623 if(!isWasmInitialized) {
9624 throw new Error("initializeWasm() must be awaited first!");
9626 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
9627 return decodeArray(nativeResponseValue);
9629 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
9630 export function UpdateFailHTLC_read(ser: Uint8Array): number {
9631 if(!isWasmInitialized) {
9632 throw new Error("initializeWasm() must be awaited first!");
9634 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
9635 return nativeResponseValue;
9637 // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
9638 export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
9639 if(!isWasmInitialized) {
9640 throw new Error("initializeWasm() must be awaited first!");
9642 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
9643 return decodeArray(nativeResponseValue);
9645 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
9646 export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
9647 if(!isWasmInitialized) {
9648 throw new Error("initializeWasm() must be awaited first!");
9650 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
9651 return nativeResponseValue;
9653 // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
9654 export function UpdateFee_write(obj: number): Uint8Array {
9655 if(!isWasmInitialized) {
9656 throw new Error("initializeWasm() must be awaited first!");
9658 const nativeResponseValue = wasm.UpdateFee_write(obj);
9659 return decodeArray(nativeResponseValue);
9661 // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
9662 export function UpdateFee_read(ser: Uint8Array): number {
9663 if(!isWasmInitialized) {
9664 throw new Error("initializeWasm() must be awaited first!");
9666 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
9667 return nativeResponseValue;
9669 // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
9670 export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
9671 if(!isWasmInitialized) {
9672 throw new Error("initializeWasm() must be awaited first!");
9674 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
9675 return decodeArray(nativeResponseValue);
9677 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
9678 export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
9679 if(!isWasmInitialized) {
9680 throw new Error("initializeWasm() must be awaited first!");
9682 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
9683 return nativeResponseValue;
9685 // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
9686 export function UpdateAddHTLC_write(obj: number): Uint8Array {
9687 if(!isWasmInitialized) {
9688 throw new Error("initializeWasm() must be awaited first!");
9690 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
9691 return decodeArray(nativeResponseValue);
9693 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
9694 export function UpdateAddHTLC_read(ser: Uint8Array): number {
9695 if(!isWasmInitialized) {
9696 throw new Error("initializeWasm() must be awaited first!");
9698 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
9699 return nativeResponseValue;
9701 // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
9702 export function Ping_write(obj: number): Uint8Array {
9703 if(!isWasmInitialized) {
9704 throw new Error("initializeWasm() must be awaited first!");
9706 const nativeResponseValue = wasm.Ping_write(obj);
9707 return decodeArray(nativeResponseValue);
9709 // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
9710 export function Ping_read(ser: Uint8Array): number {
9711 if(!isWasmInitialized) {
9712 throw new Error("initializeWasm() must be awaited first!");
9714 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
9715 return nativeResponseValue;
9717 // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
9718 export function Pong_write(obj: number): Uint8Array {
9719 if(!isWasmInitialized) {
9720 throw new Error("initializeWasm() must be awaited first!");
9722 const nativeResponseValue = wasm.Pong_write(obj);
9723 return decodeArray(nativeResponseValue);
9725 // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
9726 export function Pong_read(ser: Uint8Array): number {
9727 if(!isWasmInitialized) {
9728 throw new Error("initializeWasm() must be awaited first!");
9730 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
9731 return nativeResponseValue;
9733 // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
9734 export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
9735 if(!isWasmInitialized) {
9736 throw new Error("initializeWasm() must be awaited first!");
9738 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
9739 return decodeArray(nativeResponseValue);
9741 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
9742 export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
9743 if(!isWasmInitialized) {
9744 throw new Error("initializeWasm() must be awaited first!");
9746 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
9747 return nativeResponseValue;
9749 // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
9750 export function ChannelAnnouncement_write(obj: number): Uint8Array {
9751 if(!isWasmInitialized) {
9752 throw new Error("initializeWasm() must be awaited first!");
9754 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
9755 return decodeArray(nativeResponseValue);
9757 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
9758 export function ChannelAnnouncement_read(ser: Uint8Array): number {
9759 if(!isWasmInitialized) {
9760 throw new Error("initializeWasm() must be awaited first!");
9762 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
9763 return nativeResponseValue;
9765 // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
9766 export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
9767 if(!isWasmInitialized) {
9768 throw new Error("initializeWasm() must be awaited first!");
9770 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
9771 return decodeArray(nativeResponseValue);
9773 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
9774 export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
9775 if(!isWasmInitialized) {
9776 throw new Error("initializeWasm() must be awaited first!");
9778 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
9779 return nativeResponseValue;
9781 // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
9782 export function ChannelUpdate_write(obj: number): Uint8Array {
9783 if(!isWasmInitialized) {
9784 throw new Error("initializeWasm() must be awaited first!");
9786 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
9787 return decodeArray(nativeResponseValue);
9789 // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
9790 export function ChannelUpdate_read(ser: Uint8Array): number {
9791 if(!isWasmInitialized) {
9792 throw new Error("initializeWasm() must be awaited first!");
9794 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
9795 return nativeResponseValue;
9797 // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
9798 export function ErrorMessage_write(obj: number): Uint8Array {
9799 if(!isWasmInitialized) {
9800 throw new Error("initializeWasm() must be awaited first!");
9802 const nativeResponseValue = wasm.ErrorMessage_write(obj);
9803 return decodeArray(nativeResponseValue);
9805 // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
9806 export function ErrorMessage_read(ser: Uint8Array): number {
9807 if(!isWasmInitialized) {
9808 throw new Error("initializeWasm() must be awaited first!");
9810 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
9811 return nativeResponseValue;
9813 // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
9814 export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
9815 if(!isWasmInitialized) {
9816 throw new Error("initializeWasm() must be awaited first!");
9818 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
9819 return decodeArray(nativeResponseValue);
9821 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
9822 export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
9823 if(!isWasmInitialized) {
9824 throw new Error("initializeWasm() must be awaited first!");
9826 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
9827 return nativeResponseValue;
9829 // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
9830 export function NodeAnnouncement_write(obj: number): Uint8Array {
9831 if(!isWasmInitialized) {
9832 throw new Error("initializeWasm() must be awaited first!");
9834 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
9835 return decodeArray(nativeResponseValue);
9837 // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
9838 export function NodeAnnouncement_read(ser: Uint8Array): number {
9839 if(!isWasmInitialized) {
9840 throw new Error("initializeWasm() must be awaited first!");
9842 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
9843 return nativeResponseValue;
9845 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
9846 export function QueryShortChannelIds_read(ser: Uint8Array): number {
9847 if(!isWasmInitialized) {
9848 throw new Error("initializeWasm() must be awaited first!");
9850 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
9851 return nativeResponseValue;
9853 // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
9854 export function QueryShortChannelIds_write(obj: number): Uint8Array {
9855 if(!isWasmInitialized) {
9856 throw new Error("initializeWasm() must be awaited first!");
9858 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
9859 return decodeArray(nativeResponseValue);
9861 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
9862 export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
9863 if(!isWasmInitialized) {
9864 throw new Error("initializeWasm() must be awaited first!");
9866 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
9867 return nativeResponseValue;
9869 // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
9870 export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
9871 if(!isWasmInitialized) {
9872 throw new Error("initializeWasm() must be awaited first!");
9874 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
9875 return decodeArray(nativeResponseValue);
9877 // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
9878 export function QueryChannelRange_read(ser: Uint8Array): number {
9879 if(!isWasmInitialized) {
9880 throw new Error("initializeWasm() must be awaited first!");
9882 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
9883 return nativeResponseValue;
9885 // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
9886 export function QueryChannelRange_write(obj: number): Uint8Array {
9887 if(!isWasmInitialized) {
9888 throw new Error("initializeWasm() must be awaited first!");
9890 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
9891 return decodeArray(nativeResponseValue);
9893 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
9894 export function ReplyChannelRange_read(ser: Uint8Array): number {
9895 if(!isWasmInitialized) {
9896 throw new Error("initializeWasm() must be awaited first!");
9898 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
9899 return nativeResponseValue;
9901 // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
9902 export function ReplyChannelRange_write(obj: number): Uint8Array {
9903 if(!isWasmInitialized) {
9904 throw new Error("initializeWasm() must be awaited first!");
9906 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
9907 return decodeArray(nativeResponseValue);
9909 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
9910 export function GossipTimestampFilter_read(ser: Uint8Array): number {
9911 if(!isWasmInitialized) {
9912 throw new Error("initializeWasm() must be awaited first!");
9914 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
9915 return nativeResponseValue;
9917 // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
9918 export function GossipTimestampFilter_write(obj: number): Uint8Array {
9919 if(!isWasmInitialized) {
9920 throw new Error("initializeWasm() must be awaited first!");
9922 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
9923 return decodeArray(nativeResponseValue);
9925 // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
9926 export function IgnoringMessageHandler_free(this_obj: number): void {
9927 if(!isWasmInitialized) {
9928 throw new Error("initializeWasm() must be awaited first!");
9930 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
9931 // debug statements here
9933 // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
9934 export function IgnoringMessageHandler_new(): number {
9935 if(!isWasmInitialized) {
9936 throw new Error("initializeWasm() must be awaited first!");
9938 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
9939 return nativeResponseValue;
9941 // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
9942 export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
9943 if(!isWasmInitialized) {
9944 throw new Error("initializeWasm() must be awaited first!");
9946 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
9947 return nativeResponseValue;
9949 // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
9950 export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
9951 if(!isWasmInitialized) {
9952 throw new Error("initializeWasm() must be awaited first!");
9954 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
9955 return nativeResponseValue;
9957 // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
9958 export function ErroringMessageHandler_free(this_obj: number): void {
9959 if(!isWasmInitialized) {
9960 throw new Error("initializeWasm() must be awaited first!");
9962 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
9963 // debug statements here
9965 // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
9966 export function ErroringMessageHandler_new(): number {
9967 if(!isWasmInitialized) {
9968 throw new Error("initializeWasm() must be awaited first!");
9970 const nativeResponseValue = wasm.ErroringMessageHandler_new();
9971 return nativeResponseValue;
9973 // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
9974 export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
9975 if(!isWasmInitialized) {
9976 throw new Error("initializeWasm() must be awaited first!");
9978 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
9979 return nativeResponseValue;
9981 // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
9982 export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
9983 if(!isWasmInitialized) {
9984 throw new Error("initializeWasm() must be awaited first!");
9986 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
9987 return nativeResponseValue;
9989 // void MessageHandler_free(struct LDKMessageHandler this_obj);
9990 export function MessageHandler_free(this_obj: number): void {
9991 if(!isWasmInitialized) {
9992 throw new Error("initializeWasm() must be awaited first!");
9994 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
9995 // debug statements here
9997 // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
9998 export function MessageHandler_get_chan_handler(this_ptr: number): number {
9999 if(!isWasmInitialized) {
10000 throw new Error("initializeWasm() must be awaited first!");
10002 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
10003 return nativeResponseValue;
10005 // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
10006 export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
10007 if(!isWasmInitialized) {
10008 throw new Error("initializeWasm() must be awaited first!");
10010 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
10011 // debug statements here
10013 // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10014 export function MessageHandler_get_route_handler(this_ptr: number): number {
10015 if(!isWasmInitialized) {
10016 throw new Error("initializeWasm() must be awaited first!");
10018 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
10019 return nativeResponseValue;
10021 // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
10022 export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
10023 if(!isWasmInitialized) {
10024 throw new Error("initializeWasm() must be awaited first!");
10026 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
10027 // debug statements here
10029 // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
10030 export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
10031 if(!isWasmInitialized) {
10032 throw new Error("initializeWasm() must be awaited first!");
10034 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
10035 return nativeResponseValue;
10037 // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
10038 export function SocketDescriptor_clone(orig: number): number {
10039 if(!isWasmInitialized) {
10040 throw new Error("initializeWasm() must be awaited first!");
10042 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
10043 return nativeResponseValue;
10045 // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
10046 export function SocketDescriptor_free(this_ptr: number): void {
10047 if(!isWasmInitialized) {
10048 throw new Error("initializeWasm() must be awaited first!");
10050 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
10051 // debug statements here
10053 // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
10054 export function PeerHandleError_free(this_obj: number): void {
10055 if(!isWasmInitialized) {
10056 throw new Error("initializeWasm() must be awaited first!");
10058 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
10059 // debug statements here
10061 // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
10062 export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
10063 if(!isWasmInitialized) {
10064 throw new Error("initializeWasm() must be awaited first!");
10066 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
10067 return nativeResponseValue;
10069 // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
10070 export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
10071 if(!isWasmInitialized) {
10072 throw new Error("initializeWasm() must be awaited first!");
10074 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
10075 // debug statements here
10077 // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
10078 export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
10079 if(!isWasmInitialized) {
10080 throw new Error("initializeWasm() must be awaited first!");
10082 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
10083 return nativeResponseValue;
10085 // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
10086 export function PeerHandleError_clone(orig: number): number {
10087 if(!isWasmInitialized) {
10088 throw new Error("initializeWasm() must be awaited first!");
10090 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
10091 return nativeResponseValue;
10093 // void PeerManager_free(struct LDKPeerManager this_obj);
10094 export function PeerManager_free(this_obj: number): void {
10095 if(!isWasmInitialized) {
10096 throw new Error("initializeWasm() must be awaited first!");
10098 const nativeResponseValue = wasm.PeerManager_free(this_obj);
10099 // debug statements here
10101 // 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);
10102 export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
10103 if(!isWasmInitialized) {
10104 throw new Error("initializeWasm() must be awaited first!");
10106 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
10107 return nativeResponseValue;
10109 // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
10110 export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
10111 if(!isWasmInitialized) {
10112 throw new Error("initializeWasm() must be awaited first!");
10114 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
10115 return nativeResponseValue;
10117 // 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);
10118 export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
10119 if(!isWasmInitialized) {
10120 throw new Error("initializeWasm() must be awaited first!");
10122 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
10123 return nativeResponseValue;
10125 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
10126 export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
10127 if(!isWasmInitialized) {
10128 throw new Error("initializeWasm() must be awaited first!");
10130 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
10131 return nativeResponseValue;
10133 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10134 export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
10135 if(!isWasmInitialized) {
10136 throw new Error("initializeWasm() must be awaited first!");
10138 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
10139 return nativeResponseValue;
10141 // 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);
10142 export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
10143 if(!isWasmInitialized) {
10144 throw new Error("initializeWasm() must be awaited first!");
10146 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
10147 return nativeResponseValue;
10149 // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
10150 export function PeerManager_process_events(this_arg: number): void {
10151 if(!isWasmInitialized) {
10152 throw new Error("initializeWasm() must be awaited first!");
10154 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
10155 // debug statements here
10157 // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10158 export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
10159 if(!isWasmInitialized) {
10160 throw new Error("initializeWasm() must be awaited first!");
10162 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
10163 // debug statements here
10165 // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
10166 export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
10167 if(!isWasmInitialized) {
10168 throw new Error("initializeWasm() must be awaited first!");
10170 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
10171 // debug statements here
10173 // void PeerManager_timer_tick_occured(const struct LDKPeerManager *NONNULL_PTR this_arg);
10174 export function PeerManager_timer_tick_occured(this_arg: number): void {
10175 if(!isWasmInitialized) {
10176 throw new Error("initializeWasm() must be awaited first!");
10178 const nativeResponseValue = wasm.PeerManager_timer_tick_occured(this_arg);
10179 // debug statements here
10181 // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
10182 export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
10183 if(!isWasmInitialized) {
10184 throw new Error("initializeWasm() must be awaited first!");
10186 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
10187 return decodeArray(nativeResponseValue);
10189 // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
10190 export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
10191 if(!isWasmInitialized) {
10192 throw new Error("initializeWasm() must be awaited first!");
10194 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
10195 return nativeResponseValue;
10197 // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
10198 export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
10199 if(!isWasmInitialized) {
10200 throw new Error("initializeWasm() must be awaited first!");
10202 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
10203 return nativeResponseValue;
10205 // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
10206 export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
10207 if(!isWasmInitialized) {
10208 throw new Error("initializeWasm() must be awaited first!");
10210 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
10211 return nativeResponseValue;
10213 // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
10214 export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
10215 if(!isWasmInitialized) {
10216 throw new Error("initializeWasm() must be awaited first!");
10218 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
10219 return nativeResponseValue;
10221 // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
10222 export function TxCreationKeys_free(this_obj: number): void {
10223 if(!isWasmInitialized) {
10224 throw new Error("initializeWasm() must be awaited first!");
10226 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
10227 // debug statements here
10229 // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10230 export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
10231 if(!isWasmInitialized) {
10232 throw new Error("initializeWasm() must be awaited first!");
10234 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
10235 return decodeArray(nativeResponseValue);
10237 // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10238 export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10239 if(!isWasmInitialized) {
10240 throw new Error("initializeWasm() must be awaited first!");
10242 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
10243 // debug statements here
10245 // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10246 export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
10247 if(!isWasmInitialized) {
10248 throw new Error("initializeWasm() must be awaited first!");
10250 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
10251 return decodeArray(nativeResponseValue);
10253 // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10254 export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
10255 if(!isWasmInitialized) {
10256 throw new Error("initializeWasm() must be awaited first!");
10258 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
10259 // debug statements here
10261 // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10262 export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
10263 if(!isWasmInitialized) {
10264 throw new Error("initializeWasm() must be awaited first!");
10266 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
10267 return decodeArray(nativeResponseValue);
10269 // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10270 export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
10271 if(!isWasmInitialized) {
10272 throw new Error("initializeWasm() must be awaited first!");
10274 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
10275 // debug statements here
10277 // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10278 export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
10279 if(!isWasmInitialized) {
10280 throw new Error("initializeWasm() must be awaited first!");
10282 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
10283 return decodeArray(nativeResponseValue);
10285 // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10286 export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
10287 if(!isWasmInitialized) {
10288 throw new Error("initializeWasm() must be awaited first!");
10290 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
10291 // debug statements here
10293 // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10294 export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
10295 if(!isWasmInitialized) {
10296 throw new Error("initializeWasm() must be awaited first!");
10298 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
10299 return decodeArray(nativeResponseValue);
10301 // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10302 export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
10303 if(!isWasmInitialized) {
10304 throw new Error("initializeWasm() must be awaited first!");
10306 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
10307 // debug statements here
10309 // 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);
10310 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 {
10311 if(!isWasmInitialized) {
10312 throw new Error("initializeWasm() must be awaited first!");
10314 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));
10315 return nativeResponseValue;
10317 // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
10318 export function TxCreationKeys_clone(orig: number): number {
10319 if(!isWasmInitialized) {
10320 throw new Error("initializeWasm() must be awaited first!");
10322 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
10323 return nativeResponseValue;
10325 // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
10326 export function TxCreationKeys_write(obj: number): Uint8Array {
10327 if(!isWasmInitialized) {
10328 throw new Error("initializeWasm() must be awaited first!");
10330 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
10331 return decodeArray(nativeResponseValue);
10333 // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
10334 export function TxCreationKeys_read(ser: Uint8Array): number {
10335 if(!isWasmInitialized) {
10336 throw new Error("initializeWasm() must be awaited first!");
10338 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
10339 return nativeResponseValue;
10341 // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
10342 export function ChannelPublicKeys_free(this_obj: number): void {
10343 if(!isWasmInitialized) {
10344 throw new Error("initializeWasm() must be awaited first!");
10346 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
10347 // debug statements here
10349 // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10350 export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
10351 if(!isWasmInitialized) {
10352 throw new Error("initializeWasm() must be awaited first!");
10354 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
10355 return decodeArray(nativeResponseValue);
10357 // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10358 export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10359 if(!isWasmInitialized) {
10360 throw new Error("initializeWasm() must be awaited first!");
10362 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
10363 // debug statements here
10365 // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10366 export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
10367 if(!isWasmInitialized) {
10368 throw new Error("initializeWasm() must be awaited first!");
10370 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
10371 return decodeArray(nativeResponseValue);
10373 // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10374 export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10375 if(!isWasmInitialized) {
10376 throw new Error("initializeWasm() must be awaited first!");
10378 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
10379 // debug statements here
10381 // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10382 export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
10383 if(!isWasmInitialized) {
10384 throw new Error("initializeWasm() must be awaited first!");
10386 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
10387 return decodeArray(nativeResponseValue);
10389 // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10390 export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
10391 if(!isWasmInitialized) {
10392 throw new Error("initializeWasm() must be awaited first!");
10394 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
10395 // debug statements here
10397 // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10398 export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10399 if(!isWasmInitialized) {
10400 throw new Error("initializeWasm() must be awaited first!");
10402 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
10403 return decodeArray(nativeResponseValue);
10405 // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10406 export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10407 if(!isWasmInitialized) {
10408 throw new Error("initializeWasm() must be awaited first!");
10410 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10411 // debug statements here
10413 // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10414 export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
10415 if(!isWasmInitialized) {
10416 throw new Error("initializeWasm() must be awaited first!");
10418 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
10419 return decodeArray(nativeResponseValue);
10421 // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10422 export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10423 if(!isWasmInitialized) {
10424 throw new Error("initializeWasm() must be awaited first!");
10426 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
10427 // debug statements here
10429 // 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);
10430 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 {
10431 if(!isWasmInitialized) {
10432 throw new Error("initializeWasm() must be awaited first!");
10434 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));
10435 return nativeResponseValue;
10437 // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
10438 export function ChannelPublicKeys_clone(orig: number): number {
10439 if(!isWasmInitialized) {
10440 throw new Error("initializeWasm() must be awaited first!");
10442 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
10443 return nativeResponseValue;
10445 // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
10446 export function ChannelPublicKeys_write(obj: number): Uint8Array {
10447 if(!isWasmInitialized) {
10448 throw new Error("initializeWasm() must be awaited first!");
10450 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
10451 return decodeArray(nativeResponseValue);
10453 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
10454 export function ChannelPublicKeys_read(ser: Uint8Array): number {
10455 if(!isWasmInitialized) {
10456 throw new Error("initializeWasm() must be awaited first!");
10458 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
10459 return nativeResponseValue;
10461 // 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);
10462 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 {
10463 if(!isWasmInitialized) {
10464 throw new Error("initializeWasm() must be awaited first!");
10466 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));
10467 return nativeResponseValue;
10469 // 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);
10470 export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
10471 if(!isWasmInitialized) {
10472 throw new Error("initializeWasm() must be awaited first!");
10474 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
10475 return nativeResponseValue;
10477 // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
10478 export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
10479 if(!isWasmInitialized) {
10480 throw new Error("initializeWasm() must be awaited first!");
10482 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
10483 return decodeArray(nativeResponseValue);
10485 // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
10486 export function HTLCOutputInCommitment_free(this_obj: number): void {
10487 if(!isWasmInitialized) {
10488 throw new Error("initializeWasm() must be awaited first!");
10490 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
10491 // debug statements here
10493 // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10494 export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
10495 if(!isWasmInitialized) {
10496 throw new Error("initializeWasm() must be awaited first!");
10498 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
10499 return nativeResponseValue;
10501 // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
10502 export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
10503 if(!isWasmInitialized) {
10504 throw new Error("initializeWasm() must be awaited first!");
10506 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
10507 // debug statements here
10509 // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10510 export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
10511 if(!isWasmInitialized) {
10512 throw new Error("initializeWasm() must be awaited first!");
10514 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
10515 return nativeResponseValue;
10517 // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
10518 export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
10519 if(!isWasmInitialized) {
10520 throw new Error("initializeWasm() must be awaited first!");
10522 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
10523 // debug statements here
10525 // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10526 export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
10527 if(!isWasmInitialized) {
10528 throw new Error("initializeWasm() must be awaited first!");
10530 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
10531 return nativeResponseValue;
10533 // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
10534 export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
10535 if(!isWasmInitialized) {
10536 throw new Error("initializeWasm() must be awaited first!");
10538 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
10539 // debug statements here
10541 // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
10542 export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
10543 if(!isWasmInitialized) {
10544 throw new Error("initializeWasm() must be awaited first!");
10546 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
10547 return decodeArray(nativeResponseValue);
10549 // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10550 export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
10551 if(!isWasmInitialized) {
10552 throw new Error("initializeWasm() must be awaited first!");
10554 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
10555 // debug statements here
10557 // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
10558 export function HTLCOutputInCommitment_clone(orig: number): number {
10559 if(!isWasmInitialized) {
10560 throw new Error("initializeWasm() must be awaited first!");
10562 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
10563 return nativeResponseValue;
10565 // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
10566 export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
10567 if(!isWasmInitialized) {
10568 throw new Error("initializeWasm() must be awaited first!");
10570 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
10571 return decodeArray(nativeResponseValue);
10573 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
10574 export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
10575 if(!isWasmInitialized) {
10576 throw new Error("initializeWasm() must be awaited first!");
10578 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
10579 return nativeResponseValue;
10581 // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
10582 export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
10583 if(!isWasmInitialized) {
10584 throw new Error("initializeWasm() must be awaited first!");
10586 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
10587 return decodeArray(nativeResponseValue);
10589 // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
10590 export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
10591 if(!isWasmInitialized) {
10592 throw new Error("initializeWasm() must be awaited first!");
10594 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
10595 return decodeArray(nativeResponseValue);
10597 // 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);
10598 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 {
10599 if(!isWasmInitialized) {
10600 throw new Error("initializeWasm() must be awaited first!");
10602 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(prev_hash), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
10603 return decodeArray(nativeResponseValue);
10605 // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
10606 export function ChannelTransactionParameters_free(this_obj: number): void {
10607 if(!isWasmInitialized) {
10608 throw new Error("initializeWasm() must be awaited first!");
10610 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
10611 // debug statements here
10613 // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10614 export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
10615 if(!isWasmInitialized) {
10616 throw new Error("initializeWasm() must be awaited first!");
10618 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
10619 return nativeResponseValue;
10621 // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
10622 export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
10623 if(!isWasmInitialized) {
10624 throw new Error("initializeWasm() must be awaited first!");
10626 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
10627 // debug statements here
10629 // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10630 export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
10631 if(!isWasmInitialized) {
10632 throw new Error("initializeWasm() must be awaited first!");
10634 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
10635 return nativeResponseValue;
10637 // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10638 export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
10639 if(!isWasmInitialized) {
10640 throw new Error("initializeWasm() must be awaited first!");
10642 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
10643 // debug statements here
10645 // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10646 export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
10647 if(!isWasmInitialized) {
10648 throw new Error("initializeWasm() must be awaited first!");
10650 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
10651 return nativeResponseValue;
10653 // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
10654 export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
10655 if(!isWasmInitialized) {
10656 throw new Error("initializeWasm() must be awaited first!");
10658 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
10659 // debug statements here
10661 // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10662 export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
10663 if(!isWasmInitialized) {
10664 throw new Error("initializeWasm() must be awaited first!");
10666 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
10667 return nativeResponseValue;
10669 // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
10670 export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
10671 if(!isWasmInitialized) {
10672 throw new Error("initializeWasm() must be awaited first!");
10674 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
10675 // debug statements here
10677 // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10678 export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
10679 if(!isWasmInitialized) {
10680 throw new Error("initializeWasm() must be awaited first!");
10682 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
10683 return nativeResponseValue;
10685 // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
10686 export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
10687 if(!isWasmInitialized) {
10688 throw new Error("initializeWasm() must be awaited first!");
10690 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
10691 // debug statements here
10693 // 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);
10694 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 {
10695 if(!isWasmInitialized) {
10696 throw new Error("initializeWasm() must be awaited first!");
10698 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
10699 return nativeResponseValue;
10701 // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
10702 export function ChannelTransactionParameters_clone(orig: number): number {
10703 if(!isWasmInitialized) {
10704 throw new Error("initializeWasm() must be awaited first!");
10706 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
10707 return nativeResponseValue;
10709 // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
10710 export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
10711 if(!isWasmInitialized) {
10712 throw new Error("initializeWasm() must be awaited first!");
10714 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
10715 // debug statements here
10717 // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
10718 export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
10719 if(!isWasmInitialized) {
10720 throw new Error("initializeWasm() must be awaited first!");
10722 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
10723 return nativeResponseValue;
10725 // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
10726 export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
10727 if(!isWasmInitialized) {
10728 throw new Error("initializeWasm() must be awaited first!");
10730 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
10731 // debug statements here
10733 // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
10734 export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
10735 if(!isWasmInitialized) {
10736 throw new Error("initializeWasm() must be awaited first!");
10738 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
10739 return nativeResponseValue;
10741 // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10742 export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
10743 if(!isWasmInitialized) {
10744 throw new Error("initializeWasm() must be awaited first!");
10746 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
10747 // debug statements here
10749 // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
10750 export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
10751 if(!isWasmInitialized) {
10752 throw new Error("initializeWasm() must be awaited first!");
10754 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
10755 return nativeResponseValue;
10757 // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
10758 export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
10759 if(!isWasmInitialized) {
10760 throw new Error("initializeWasm() must be awaited first!");
10762 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
10763 return nativeResponseValue;
10765 // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10766 export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
10767 if(!isWasmInitialized) {
10768 throw new Error("initializeWasm() must be awaited first!");
10770 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
10771 return nativeResponseValue;
10773 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10774 export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
10775 if(!isWasmInitialized) {
10776 throw new Error("initializeWasm() must be awaited first!");
10778 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
10779 return nativeResponseValue;
10781 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10782 export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
10783 if(!isWasmInitialized) {
10784 throw new Error("initializeWasm() must be awaited first!");
10786 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
10787 return nativeResponseValue;
10789 // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
10790 export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
10791 if(!isWasmInitialized) {
10792 throw new Error("initializeWasm() must be awaited first!");
10794 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
10795 return decodeArray(nativeResponseValue);
10797 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
10798 export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
10799 if(!isWasmInitialized) {
10800 throw new Error("initializeWasm() must be awaited first!");
10802 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
10803 return nativeResponseValue;
10805 // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
10806 export function ChannelTransactionParameters_write(obj: number): Uint8Array {
10807 if(!isWasmInitialized) {
10808 throw new Error("initializeWasm() must be awaited first!");
10810 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
10811 return decodeArray(nativeResponseValue);
10813 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
10814 export function ChannelTransactionParameters_read(ser: Uint8Array): number {
10815 if(!isWasmInitialized) {
10816 throw new Error("initializeWasm() must be awaited first!");
10818 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
10819 return nativeResponseValue;
10821 // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
10822 export function DirectedChannelTransactionParameters_free(this_obj: number): void {
10823 if(!isWasmInitialized) {
10824 throw new Error("initializeWasm() must be awaited first!");
10826 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
10827 // debug statements here
10829 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10830 export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
10831 if(!isWasmInitialized) {
10832 throw new Error("initializeWasm() must be awaited first!");
10834 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
10835 return nativeResponseValue;
10837 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10838 export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
10839 if(!isWasmInitialized) {
10840 throw new Error("initializeWasm() must be awaited first!");
10842 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
10843 return nativeResponseValue;
10845 // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10846 export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
10847 if(!isWasmInitialized) {
10848 throw new Error("initializeWasm() must be awaited first!");
10850 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
10851 return nativeResponseValue;
10853 // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10854 export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
10855 if(!isWasmInitialized) {
10856 throw new Error("initializeWasm() must be awaited first!");
10858 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
10859 return nativeResponseValue;
10861 // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10862 export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
10863 if(!isWasmInitialized) {
10864 throw new Error("initializeWasm() must be awaited first!");
10866 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
10867 return nativeResponseValue;
10869 // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
10870 export function HolderCommitmentTransaction_free(this_obj: number): void {
10871 if(!isWasmInitialized) {
10872 throw new Error("initializeWasm() must be awaited first!");
10874 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
10875 // debug statements here
10877 // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
10878 export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
10879 if(!isWasmInitialized) {
10880 throw new Error("initializeWasm() must be awaited first!");
10882 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
10883 return decodeArray(nativeResponseValue);
10885 // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
10886 export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
10887 if(!isWasmInitialized) {
10888 throw new Error("initializeWasm() must be awaited first!");
10890 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
10891 // debug statements here
10893 // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
10894 export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
10895 if(!isWasmInitialized) {
10896 throw new Error("initializeWasm() must be awaited first!");
10898 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
10899 // debug statements here
10901 // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
10902 export function HolderCommitmentTransaction_clone(orig: number): number {
10903 if(!isWasmInitialized) {
10904 throw new Error("initializeWasm() must be awaited first!");
10906 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
10907 return nativeResponseValue;
10909 // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
10910 export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
10911 if(!isWasmInitialized) {
10912 throw new Error("initializeWasm() must be awaited first!");
10914 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
10915 return decodeArray(nativeResponseValue);
10917 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
10918 export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
10919 if(!isWasmInitialized) {
10920 throw new Error("initializeWasm() must be awaited first!");
10922 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
10923 return nativeResponseValue;
10925 // 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);
10926 export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
10927 if(!isWasmInitialized) {
10928 throw new Error("initializeWasm() must be awaited first!");
10930 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
10931 return nativeResponseValue;
10933 // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
10934 export function BuiltCommitmentTransaction_free(this_obj: number): void {
10935 if(!isWasmInitialized) {
10936 throw new Error("initializeWasm() must be awaited first!");
10938 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
10939 // debug statements here
10941 // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
10942 export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
10943 if(!isWasmInitialized) {
10944 throw new Error("initializeWasm() must be awaited first!");
10946 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
10947 return decodeArray(nativeResponseValue);
10949 // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
10950 export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
10951 if(!isWasmInitialized) {
10952 throw new Error("initializeWasm() must be awaited first!");
10954 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
10955 // debug statements here
10957 // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
10958 export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
10959 if(!isWasmInitialized) {
10960 throw new Error("initializeWasm() must be awaited first!");
10962 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
10963 return decodeArray(nativeResponseValue);
10965 // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10966 export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
10967 if(!isWasmInitialized) {
10968 throw new Error("initializeWasm() must be awaited first!");
10970 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
10971 // debug statements here
10973 // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
10974 export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
10975 if(!isWasmInitialized) {
10976 throw new Error("initializeWasm() must be awaited first!");
10978 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
10979 return nativeResponseValue;
10981 // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
10982 export function BuiltCommitmentTransaction_clone(orig: number): number {
10983 if(!isWasmInitialized) {
10984 throw new Error("initializeWasm() must be awaited first!");
10986 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
10987 return nativeResponseValue;
10989 // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
10990 export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
10991 if(!isWasmInitialized) {
10992 throw new Error("initializeWasm() must be awaited first!");
10994 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
10995 return decodeArray(nativeResponseValue);
10997 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
10998 export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
10999 if(!isWasmInitialized) {
11000 throw new Error("initializeWasm() must be awaited first!");
11002 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
11003 return nativeResponseValue;
11005 // 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);
11006 export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11007 if(!isWasmInitialized) {
11008 throw new Error("initializeWasm() must be awaited first!");
11010 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
11011 return decodeArray(nativeResponseValue);
11013 // 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);
11014 export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11015 if(!isWasmInitialized) {
11016 throw new Error("initializeWasm() must be awaited first!");
11018 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
11019 return decodeArray(nativeResponseValue);
11021 // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
11022 export function CommitmentTransaction_free(this_obj: number): void {
11023 if(!isWasmInitialized) {
11024 throw new Error("initializeWasm() must be awaited first!");
11026 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
11027 // debug statements here
11029 // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
11030 export function CommitmentTransaction_clone(orig: number): number {
11031 if(!isWasmInitialized) {
11032 throw new Error("initializeWasm() must be awaited first!");
11034 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
11035 return nativeResponseValue;
11037 // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
11038 export function CommitmentTransaction_write(obj: number): Uint8Array {
11039 if(!isWasmInitialized) {
11040 throw new Error("initializeWasm() must be awaited first!");
11042 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
11043 return decodeArray(nativeResponseValue);
11045 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
11046 export function CommitmentTransaction_read(ser: Uint8Array): number {
11047 if(!isWasmInitialized) {
11048 throw new Error("initializeWasm() must be awaited first!");
11050 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
11051 return nativeResponseValue;
11053 // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11054 export function CommitmentTransaction_commitment_number(this_arg: number): number {
11055 if(!isWasmInitialized) {
11056 throw new Error("initializeWasm() must be awaited first!");
11058 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
11059 return nativeResponseValue;
11061 // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11062 export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
11063 if(!isWasmInitialized) {
11064 throw new Error("initializeWasm() must be awaited first!");
11066 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
11067 return nativeResponseValue;
11069 // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11070 export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
11071 if(!isWasmInitialized) {
11072 throw new Error("initializeWasm() must be awaited first!");
11074 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
11075 return nativeResponseValue;
11077 // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11078 export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
11079 if(!isWasmInitialized) {
11080 throw new Error("initializeWasm() must be awaited first!");
11082 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
11083 return nativeResponseValue;
11085 // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11086 export function CommitmentTransaction_trust(this_arg: number): number {
11087 if(!isWasmInitialized) {
11088 throw new Error("initializeWasm() must be awaited first!");
11090 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
11091 return nativeResponseValue;
11093 // 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);
11094 export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
11095 if(!isWasmInitialized) {
11096 throw new Error("initializeWasm() must be awaited first!");
11098 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
11099 return nativeResponseValue;
11101 // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
11102 export function TrustedCommitmentTransaction_free(this_obj: number): void {
11103 if(!isWasmInitialized) {
11104 throw new Error("initializeWasm() must be awaited first!");
11106 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
11107 // debug statements here
11109 // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11110 export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
11111 if(!isWasmInitialized) {
11112 throw new Error("initializeWasm() must be awaited first!");
11114 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
11115 return decodeArray(nativeResponseValue);
11117 // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11118 export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
11119 if(!isWasmInitialized) {
11120 throw new Error("initializeWasm() must be awaited first!");
11122 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
11123 return nativeResponseValue;
11125 // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11126 export function TrustedCommitmentTransaction_keys(this_arg: number): number {
11127 if(!isWasmInitialized) {
11128 throw new Error("initializeWasm() must be awaited first!");
11130 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
11131 return nativeResponseValue;
11133 // 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);
11134 export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
11135 if(!isWasmInitialized) {
11136 throw new Error("initializeWasm() must be awaited first!");
11138 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
11139 return nativeResponseValue;
11141 // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
11142 export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
11143 if(!isWasmInitialized) {
11144 throw new Error("initializeWasm() must be awaited first!");
11146 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
11147 return nativeResponseValue;
11149 // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
11150 export function InitFeatures_clone(orig: number): number {
11151 if(!isWasmInitialized) {
11152 throw new Error("initializeWasm() must be awaited first!");
11154 const nativeResponseValue = wasm.InitFeatures_clone(orig);
11155 return nativeResponseValue;
11157 // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
11158 export function NodeFeatures_clone(orig: number): number {
11159 if(!isWasmInitialized) {
11160 throw new Error("initializeWasm() must be awaited first!");
11162 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
11163 return nativeResponseValue;
11165 // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
11166 export function ChannelFeatures_clone(orig: number): number {
11167 if(!isWasmInitialized) {
11168 throw new Error("initializeWasm() must be awaited first!");
11170 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
11171 return nativeResponseValue;
11173 // void InitFeatures_free(struct LDKInitFeatures this_obj);
11174 export function InitFeatures_free(this_obj: number): void {
11175 if(!isWasmInitialized) {
11176 throw new Error("initializeWasm() must be awaited first!");
11178 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
11179 // debug statements here
11181 // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
11182 export function NodeFeatures_free(this_obj: number): void {
11183 if(!isWasmInitialized) {
11184 throw new Error("initializeWasm() must be awaited first!");
11186 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
11187 // debug statements here
11189 // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
11190 export function ChannelFeatures_free(this_obj: number): void {
11191 if(!isWasmInitialized) {
11192 throw new Error("initializeWasm() must be awaited first!");
11194 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
11195 // debug statements here
11197 // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
11198 export function InitFeatures_empty(): number {
11199 if(!isWasmInitialized) {
11200 throw new Error("initializeWasm() must be awaited first!");
11202 const nativeResponseValue = wasm.InitFeatures_empty();
11203 return nativeResponseValue;
11205 // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
11206 export function InitFeatures_known(): number {
11207 if(!isWasmInitialized) {
11208 throw new Error("initializeWasm() must be awaited first!");
11210 const nativeResponseValue = wasm.InitFeatures_known();
11211 return nativeResponseValue;
11213 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
11214 export function NodeFeatures_empty(): number {
11215 if(!isWasmInitialized) {
11216 throw new Error("initializeWasm() must be awaited first!");
11218 const nativeResponseValue = wasm.NodeFeatures_empty();
11219 return nativeResponseValue;
11221 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
11222 export function NodeFeatures_known(): number {
11223 if(!isWasmInitialized) {
11224 throw new Error("initializeWasm() must be awaited first!");
11226 const nativeResponseValue = wasm.NodeFeatures_known();
11227 return nativeResponseValue;
11229 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
11230 export function ChannelFeatures_empty(): number {
11231 if(!isWasmInitialized) {
11232 throw new Error("initializeWasm() must be awaited first!");
11234 const nativeResponseValue = wasm.ChannelFeatures_empty();
11235 return nativeResponseValue;
11237 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
11238 export function ChannelFeatures_known(): number {
11239 if(!isWasmInitialized) {
11240 throw new Error("initializeWasm() must be awaited first!");
11242 const nativeResponseValue = wasm.ChannelFeatures_known();
11243 return nativeResponseValue;
11245 // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
11246 export function InitFeatures_write(obj: number): Uint8Array {
11247 if(!isWasmInitialized) {
11248 throw new Error("initializeWasm() must be awaited first!");
11250 const nativeResponseValue = wasm.InitFeatures_write(obj);
11251 return decodeArray(nativeResponseValue);
11253 // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
11254 export function NodeFeatures_write(obj: number): Uint8Array {
11255 if(!isWasmInitialized) {
11256 throw new Error("initializeWasm() must be awaited first!");
11258 const nativeResponseValue = wasm.NodeFeatures_write(obj);
11259 return decodeArray(nativeResponseValue);
11261 // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
11262 export function ChannelFeatures_write(obj: number): Uint8Array {
11263 if(!isWasmInitialized) {
11264 throw new Error("initializeWasm() must be awaited first!");
11266 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
11267 return decodeArray(nativeResponseValue);
11269 // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
11270 export function InitFeatures_read(ser: Uint8Array): number {
11271 if(!isWasmInitialized) {
11272 throw new Error("initializeWasm() must be awaited first!");
11274 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
11275 return nativeResponseValue;
11277 // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
11278 export function NodeFeatures_read(ser: Uint8Array): number {
11279 if(!isWasmInitialized) {
11280 throw new Error("initializeWasm() must be awaited first!");
11282 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
11283 return nativeResponseValue;
11285 // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
11286 export function ChannelFeatures_read(ser: Uint8Array): number {
11287 if(!isWasmInitialized) {
11288 throw new Error("initializeWasm() must be awaited first!");
11290 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
11291 return nativeResponseValue;
11293 // void RouteHop_free(struct LDKRouteHop this_obj);
11294 export function RouteHop_free(this_obj: number): void {
11295 if(!isWasmInitialized) {
11296 throw new Error("initializeWasm() must be awaited first!");
11298 const nativeResponseValue = wasm.RouteHop_free(this_obj);
11299 // debug statements here
11301 // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11302 export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
11303 if(!isWasmInitialized) {
11304 throw new Error("initializeWasm() must be awaited first!");
11306 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
11307 return decodeArray(nativeResponseValue);
11309 // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11310 export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
11311 if(!isWasmInitialized) {
11312 throw new Error("initializeWasm() must be awaited first!");
11314 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
11315 // debug statements here
11317 // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11318 export function RouteHop_get_node_features(this_ptr: number): number {
11319 if(!isWasmInitialized) {
11320 throw new Error("initializeWasm() must be awaited first!");
11322 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
11323 return nativeResponseValue;
11325 // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11326 export function RouteHop_set_node_features(this_ptr: number, val: number): void {
11327 if(!isWasmInitialized) {
11328 throw new Error("initializeWasm() must be awaited first!");
11330 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
11331 // debug statements here
11333 // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11334 export function RouteHop_get_short_channel_id(this_ptr: number): number {
11335 if(!isWasmInitialized) {
11336 throw new Error("initializeWasm() must be awaited first!");
11338 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
11339 return nativeResponseValue;
11341 // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11342 export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
11343 if(!isWasmInitialized) {
11344 throw new Error("initializeWasm() must be awaited first!");
11346 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
11347 // debug statements here
11349 // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11350 export function RouteHop_get_channel_features(this_ptr: number): number {
11351 if(!isWasmInitialized) {
11352 throw new Error("initializeWasm() must be awaited first!");
11354 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
11355 return nativeResponseValue;
11357 // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11358 export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
11359 if(!isWasmInitialized) {
11360 throw new Error("initializeWasm() must be awaited first!");
11362 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
11363 // debug statements here
11365 // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11366 export function RouteHop_get_fee_msat(this_ptr: number): number {
11367 if(!isWasmInitialized) {
11368 throw new Error("initializeWasm() must be awaited first!");
11370 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
11371 return nativeResponseValue;
11373 // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11374 export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
11375 if(!isWasmInitialized) {
11376 throw new Error("initializeWasm() must be awaited first!");
11378 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
11379 // debug statements here
11381 // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11382 export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
11383 if(!isWasmInitialized) {
11384 throw new Error("initializeWasm() must be awaited first!");
11386 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
11387 return nativeResponseValue;
11389 // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
11390 export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11391 if(!isWasmInitialized) {
11392 throw new Error("initializeWasm() must be awaited first!");
11394 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
11395 // debug statements here
11397 // 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);
11398 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 {
11399 if(!isWasmInitialized) {
11400 throw new Error("initializeWasm() must be awaited first!");
11402 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);
11403 return nativeResponseValue;
11405 // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
11406 export function RouteHop_clone(orig: number): number {
11407 if(!isWasmInitialized) {
11408 throw new Error("initializeWasm() must be awaited first!");
11410 const nativeResponseValue = wasm.RouteHop_clone(orig);
11411 return nativeResponseValue;
11413 // void Route_free(struct LDKRoute this_obj);
11414 export function Route_free(this_obj: number): void {
11415 if(!isWasmInitialized) {
11416 throw new Error("initializeWasm() must be awaited first!");
11418 const nativeResponseValue = wasm.Route_free(this_obj);
11419 // debug statements here
11421 // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
11422 export function Route_set_paths(this_ptr: number, val: number[][]): void {
11423 if(!isWasmInitialized) {
11424 throw new Error("initializeWasm() must be awaited first!");
11426 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
11427 // debug statements here
11429 // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
11430 export function Route_new(paths_arg: number[][]): number {
11431 if(!isWasmInitialized) {
11432 throw new Error("initializeWasm() must be awaited first!");
11434 const nativeResponseValue = wasm.Route_new(paths_arg);
11435 return nativeResponseValue;
11437 // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
11438 export function Route_clone(orig: number): number {
11439 if(!isWasmInitialized) {
11440 throw new Error("initializeWasm() must be awaited first!");
11442 const nativeResponseValue = wasm.Route_clone(orig);
11443 return nativeResponseValue;
11445 // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
11446 export function Route_write(obj: number): Uint8Array {
11447 if(!isWasmInitialized) {
11448 throw new Error("initializeWasm() must be awaited first!");
11450 const nativeResponseValue = wasm.Route_write(obj);
11451 return decodeArray(nativeResponseValue);
11453 // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
11454 export function Route_read(ser: Uint8Array): number {
11455 if(!isWasmInitialized) {
11456 throw new Error("initializeWasm() must be awaited first!");
11458 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
11459 return nativeResponseValue;
11461 // void RouteHint_free(struct LDKRouteHint this_obj);
11462 export function RouteHint_free(this_obj: number): void {
11463 if(!isWasmInitialized) {
11464 throw new Error("initializeWasm() must be awaited first!");
11466 const nativeResponseValue = wasm.RouteHint_free(this_obj);
11467 // debug statements here
11469 // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11470 export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
11471 if(!isWasmInitialized) {
11472 throw new Error("initializeWasm() must be awaited first!");
11474 const nativeResponseValue = wasm.RouteHint_get_src_node_id(this_ptr);
11475 return decodeArray(nativeResponseValue);
11477 // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11478 export function RouteHint_set_src_node_id(this_ptr: number, val: Uint8Array): void {
11479 if(!isWasmInitialized) {
11480 throw new Error("initializeWasm() must be awaited first!");
11482 const nativeResponseValue = wasm.RouteHint_set_src_node_id(this_ptr, encodeArray(val));
11483 // debug statements here
11485 // uint64_t RouteHint_get_short_channel_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11486 export function RouteHint_get_short_channel_id(this_ptr: number): number {
11487 if(!isWasmInitialized) {
11488 throw new Error("initializeWasm() must be awaited first!");
11490 const nativeResponseValue = wasm.RouteHint_get_short_channel_id(this_ptr);
11491 return nativeResponseValue;
11493 // void RouteHint_set_short_channel_id(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
11494 export function RouteHint_set_short_channel_id(this_ptr: number, val: number): void {
11495 if(!isWasmInitialized) {
11496 throw new Error("initializeWasm() must be awaited first!");
11498 const nativeResponseValue = wasm.RouteHint_set_short_channel_id(this_ptr, val);
11499 // debug statements here
11501 // struct LDKRoutingFees RouteHint_get_fees(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11502 export function RouteHint_get_fees(this_ptr: number): number {
11503 if(!isWasmInitialized) {
11504 throw new Error("initializeWasm() must be awaited first!");
11506 const nativeResponseValue = wasm.RouteHint_get_fees(this_ptr);
11507 return nativeResponseValue;
11509 // void RouteHint_set_fees(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11510 export function RouteHint_set_fees(this_ptr: number, val: number): void {
11511 if(!isWasmInitialized) {
11512 throw new Error("initializeWasm() must be awaited first!");
11514 const nativeResponseValue = wasm.RouteHint_set_fees(this_ptr, val);
11515 // debug statements here
11517 // uint16_t RouteHint_get_cltv_expiry_delta(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11518 export function RouteHint_get_cltv_expiry_delta(this_ptr: number): number {
11519 if(!isWasmInitialized) {
11520 throw new Error("initializeWasm() must be awaited first!");
11522 const nativeResponseValue = wasm.RouteHint_get_cltv_expiry_delta(this_ptr);
11523 return nativeResponseValue;
11525 // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
11526 export function RouteHint_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11527 if(!isWasmInitialized) {
11528 throw new Error("initializeWasm() must be awaited first!");
11530 const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
11531 // debug statements here
11533 // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
11534 export function RouteHint_clone(orig: number): number {
11535 if(!isWasmInitialized) {
11536 throw new Error("initializeWasm() must be awaited first!");
11538 const nativeResponseValue = wasm.RouteHint_clone(orig);
11539 return nativeResponseValue;
11541 // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
11542 export function get_route(our_node_id: Uint8Array, network: number, payee: Uint8Array, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
11543 if(!isWasmInitialized) {
11544 throw new Error("initializeWasm() must be awaited first!");
11546 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), first_hops, last_hops, final_value_msat, final_cltv, logger);
11547 return nativeResponseValue;
11549 // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
11550 export function NetworkGraph_free(this_obj: number): void {
11551 if(!isWasmInitialized) {
11552 throw new Error("initializeWasm() must be awaited first!");
11554 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
11555 // debug statements here
11557 // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
11558 export function NetworkGraph_clone(orig: number): number {
11559 if(!isWasmInitialized) {
11560 throw new Error("initializeWasm() must be awaited first!");
11562 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
11563 return nativeResponseValue;
11565 // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
11566 export function LockedNetworkGraph_free(this_obj: number): void {
11567 if(!isWasmInitialized) {
11568 throw new Error("initializeWasm() must be awaited first!");
11570 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_obj);
11571 // debug statements here
11573 // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
11574 export function NetGraphMsgHandler_free(this_obj: number): void {
11575 if(!isWasmInitialized) {
11576 throw new Error("initializeWasm() must be awaited first!");
11578 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
11579 // debug statements here
11581 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
11582 export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
11583 if(!isWasmInitialized) {
11584 throw new Error("initializeWasm() must be awaited first!");
11586 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
11587 return nativeResponseValue;
11589 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
11590 export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
11591 if(!isWasmInitialized) {
11592 throw new Error("initializeWasm() must be awaited first!");
11594 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
11595 return nativeResponseValue;
11597 // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
11598 export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
11599 if(!isWasmInitialized) {
11600 throw new Error("initializeWasm() must be awaited first!");
11602 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
11603 // debug statements here
11605 // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11606 export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
11607 if(!isWasmInitialized) {
11608 throw new Error("initializeWasm() must be awaited first!");
11610 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
11611 return nativeResponseValue;
11613 // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
11614 export function LockedNetworkGraph_graph(this_arg: number): number {
11615 if(!isWasmInitialized) {
11616 throw new Error("initializeWasm() must be awaited first!");
11618 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
11619 return nativeResponseValue;
11621 // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11622 export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
11623 if(!isWasmInitialized) {
11624 throw new Error("initializeWasm() must be awaited first!");
11626 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
11627 return nativeResponseValue;
11629 // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11630 export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
11631 if(!isWasmInitialized) {
11632 throw new Error("initializeWasm() must be awaited first!");
11634 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
11635 return nativeResponseValue;
11637 // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
11638 export function DirectionalChannelInfo_free(this_obj: number): void {
11639 if(!isWasmInitialized) {
11640 throw new Error("initializeWasm() must be awaited first!");
11642 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
11643 // debug statements here
11645 // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11646 export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
11647 if(!isWasmInitialized) {
11648 throw new Error("initializeWasm() must be awaited first!");
11650 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
11651 return nativeResponseValue;
11653 // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
11654 export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
11655 if(!isWasmInitialized) {
11656 throw new Error("initializeWasm() must be awaited first!");
11658 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
11659 // debug statements here
11661 // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11662 export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
11663 if(!isWasmInitialized) {
11664 throw new Error("initializeWasm() must be awaited first!");
11666 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
11667 return nativeResponseValue;
11669 // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
11670 export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
11671 if(!isWasmInitialized) {
11672 throw new Error("initializeWasm() must be awaited first!");
11674 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
11675 // debug statements here
11677 // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11678 export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
11679 if(!isWasmInitialized) {
11680 throw new Error("initializeWasm() must be awaited first!");
11682 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
11683 return nativeResponseValue;
11685 // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
11686 export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11687 if(!isWasmInitialized) {
11688 throw new Error("initializeWasm() must be awaited first!");
11690 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
11691 // debug statements here
11693 // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11694 export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
11695 if(!isWasmInitialized) {
11696 throw new Error("initializeWasm() must be awaited first!");
11698 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
11699 return nativeResponseValue;
11701 // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
11702 export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
11703 if(!isWasmInitialized) {
11704 throw new Error("initializeWasm() must be awaited first!");
11706 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
11707 // debug statements here
11709 // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11710 export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
11711 if(!isWasmInitialized) {
11712 throw new Error("initializeWasm() must be awaited first!");
11714 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
11715 return nativeResponseValue;
11717 // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11718 export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
11719 if(!isWasmInitialized) {
11720 throw new Error("initializeWasm() must be awaited first!");
11722 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
11723 // debug statements here
11725 // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11726 export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
11727 if(!isWasmInitialized) {
11728 throw new Error("initializeWasm() must be awaited first!");
11730 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
11731 return nativeResponseValue;
11733 // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
11734 export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
11735 if(!isWasmInitialized) {
11736 throw new Error("initializeWasm() must be awaited first!");
11738 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
11739 // debug statements here
11741 // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
11742 export function DirectionalChannelInfo_clone(orig: number): number {
11743 if(!isWasmInitialized) {
11744 throw new Error("initializeWasm() must be awaited first!");
11746 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
11747 return nativeResponseValue;
11749 // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
11750 export function DirectionalChannelInfo_write(obj: number): Uint8Array {
11751 if(!isWasmInitialized) {
11752 throw new Error("initializeWasm() must be awaited first!");
11754 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
11755 return decodeArray(nativeResponseValue);
11757 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
11758 export function DirectionalChannelInfo_read(ser: Uint8Array): number {
11759 if(!isWasmInitialized) {
11760 throw new Error("initializeWasm() must be awaited first!");
11762 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
11763 return nativeResponseValue;
11765 // void ChannelInfo_free(struct LDKChannelInfo this_obj);
11766 export function ChannelInfo_free(this_obj: number): void {
11767 if(!isWasmInitialized) {
11768 throw new Error("initializeWasm() must be awaited first!");
11770 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
11771 // debug statements here
11773 // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11774 export function ChannelInfo_get_features(this_ptr: number): number {
11775 if(!isWasmInitialized) {
11776 throw new Error("initializeWasm() must be awaited first!");
11778 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
11779 return nativeResponseValue;
11781 // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11782 export function ChannelInfo_set_features(this_ptr: number, val: number): void {
11783 if(!isWasmInitialized) {
11784 throw new Error("initializeWasm() must be awaited first!");
11786 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
11787 // debug statements here
11789 // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11790 export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
11791 if(!isWasmInitialized) {
11792 throw new Error("initializeWasm() must be awaited first!");
11794 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
11795 return decodeArray(nativeResponseValue);
11797 // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11798 export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
11799 if(!isWasmInitialized) {
11800 throw new Error("initializeWasm() must be awaited first!");
11802 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
11803 // debug statements here
11805 // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11806 export function ChannelInfo_get_one_to_two(this_ptr: number): number {
11807 if(!isWasmInitialized) {
11808 throw new Error("initializeWasm() must be awaited first!");
11810 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
11811 return nativeResponseValue;
11813 // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
11814 export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
11815 if(!isWasmInitialized) {
11816 throw new Error("initializeWasm() must be awaited first!");
11818 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
11819 // debug statements here
11821 // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11822 export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
11823 if(!isWasmInitialized) {
11824 throw new Error("initializeWasm() must be awaited first!");
11826 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
11827 return decodeArray(nativeResponseValue);
11829 // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11830 export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
11831 if(!isWasmInitialized) {
11832 throw new Error("initializeWasm() must be awaited first!");
11834 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
11835 // debug statements here
11837 // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11838 export function ChannelInfo_get_two_to_one(this_ptr: number): number {
11839 if(!isWasmInitialized) {
11840 throw new Error("initializeWasm() must be awaited first!");
11842 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
11843 return nativeResponseValue;
11845 // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
11846 export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
11847 if(!isWasmInitialized) {
11848 throw new Error("initializeWasm() must be awaited first!");
11850 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
11851 // debug statements here
11853 // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11854 export function ChannelInfo_get_announcement_message(this_ptr: number): number {
11855 if(!isWasmInitialized) {
11856 throw new Error("initializeWasm() must be awaited first!");
11858 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
11859 return nativeResponseValue;
11861 // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
11862 export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
11863 if(!isWasmInitialized) {
11864 throw new Error("initializeWasm() must be awaited first!");
11866 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
11867 // debug statements here
11869 // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
11870 export function ChannelInfo_clone(orig: number): number {
11871 if(!isWasmInitialized) {
11872 throw new Error("initializeWasm() must be awaited first!");
11874 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
11875 return nativeResponseValue;
11877 // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
11878 export function ChannelInfo_write(obj: number): Uint8Array {
11879 if(!isWasmInitialized) {
11880 throw new Error("initializeWasm() must be awaited first!");
11882 const nativeResponseValue = wasm.ChannelInfo_write(obj);
11883 return decodeArray(nativeResponseValue);
11885 // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
11886 export function ChannelInfo_read(ser: Uint8Array): number {
11887 if(!isWasmInitialized) {
11888 throw new Error("initializeWasm() must be awaited first!");
11890 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
11891 return nativeResponseValue;
11893 // void RoutingFees_free(struct LDKRoutingFees this_obj);
11894 export function RoutingFees_free(this_obj: number): void {
11895 if(!isWasmInitialized) {
11896 throw new Error("initializeWasm() must be awaited first!");
11898 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
11899 // debug statements here
11901 // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
11902 export function RoutingFees_get_base_msat(this_ptr: number): number {
11903 if(!isWasmInitialized) {
11904 throw new Error("initializeWasm() must be awaited first!");
11906 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
11907 return nativeResponseValue;
11909 // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
11910 export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
11911 if(!isWasmInitialized) {
11912 throw new Error("initializeWasm() must be awaited first!");
11914 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
11915 // debug statements here
11917 // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
11918 export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
11919 if(!isWasmInitialized) {
11920 throw new Error("initializeWasm() must be awaited first!");
11922 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
11923 return nativeResponseValue;
11925 // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
11926 export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
11927 if(!isWasmInitialized) {
11928 throw new Error("initializeWasm() must be awaited first!");
11930 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
11931 // debug statements here
11933 // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
11934 export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
11935 if(!isWasmInitialized) {
11936 throw new Error("initializeWasm() must be awaited first!");
11938 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
11939 return nativeResponseValue;
11941 // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
11942 export function RoutingFees_clone(orig: number): number {
11943 if(!isWasmInitialized) {
11944 throw new Error("initializeWasm() must be awaited first!");
11946 const nativeResponseValue = wasm.RoutingFees_clone(orig);
11947 return nativeResponseValue;
11949 // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
11950 export function RoutingFees_read(ser: Uint8Array): number {
11951 if(!isWasmInitialized) {
11952 throw new Error("initializeWasm() must be awaited first!");
11954 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
11955 return nativeResponseValue;
11957 // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
11958 export function RoutingFees_write(obj: number): Uint8Array {
11959 if(!isWasmInitialized) {
11960 throw new Error("initializeWasm() must be awaited first!");
11962 const nativeResponseValue = wasm.RoutingFees_write(obj);
11963 return decodeArray(nativeResponseValue);
11965 // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
11966 export function NodeAnnouncementInfo_free(this_obj: number): void {
11967 if(!isWasmInitialized) {
11968 throw new Error("initializeWasm() must be awaited first!");
11970 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
11971 // debug statements here
11973 // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
11974 export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
11975 if(!isWasmInitialized) {
11976 throw new Error("initializeWasm() must be awaited first!");
11978 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
11979 return nativeResponseValue;
11981 // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11982 export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
11983 if(!isWasmInitialized) {
11984 throw new Error("initializeWasm() must be awaited first!");
11986 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
11987 // debug statements here
11989 // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
11990 export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
11991 if(!isWasmInitialized) {
11992 throw new Error("initializeWasm() must be awaited first!");
11994 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
11995 return nativeResponseValue;
11997 // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
11998 export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
11999 if(!isWasmInitialized) {
12000 throw new Error("initializeWasm() must be awaited first!");
12002 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
12003 // debug statements here
12005 // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
12006 export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
12007 if(!isWasmInitialized) {
12008 throw new Error("initializeWasm() must be awaited first!");
12010 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
12011 return decodeArray(nativeResponseValue);
12013 // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
12014 export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
12015 if(!isWasmInitialized) {
12016 throw new Error("initializeWasm() must be awaited first!");
12018 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
12019 // debug statements here
12021 // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
12022 export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
12023 if(!isWasmInitialized) {
12024 throw new Error("initializeWasm() must be awaited first!");
12026 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
12027 return decodeArray(nativeResponseValue);
12029 // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12030 export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
12031 if(!isWasmInitialized) {
12032 throw new Error("initializeWasm() must be awaited first!");
12034 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
12035 // debug statements here
12037 // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
12038 export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
12039 if(!isWasmInitialized) {
12040 throw new Error("initializeWasm() must be awaited first!");
12042 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
12043 // debug statements here
12045 // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12046 export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
12047 if(!isWasmInitialized) {
12048 throw new Error("initializeWasm() must be awaited first!");
12050 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
12051 return nativeResponseValue;
12053 // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
12054 export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
12055 if(!isWasmInitialized) {
12056 throw new Error("initializeWasm() must be awaited first!");
12058 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
12059 // debug statements here
12061 // 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);
12062 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 {
12063 if(!isWasmInitialized) {
12064 throw new Error("initializeWasm() must be awaited first!");
12066 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
12067 return nativeResponseValue;
12069 // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
12070 export function NodeAnnouncementInfo_clone(orig: number): number {
12071 if(!isWasmInitialized) {
12072 throw new Error("initializeWasm() must be awaited first!");
12074 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
12075 return nativeResponseValue;
12077 // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
12078 export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
12079 if(!isWasmInitialized) {
12080 throw new Error("initializeWasm() must be awaited first!");
12082 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
12083 return decodeArray(nativeResponseValue);
12085 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
12086 export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
12087 if(!isWasmInitialized) {
12088 throw new Error("initializeWasm() must be awaited first!");
12090 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
12091 return nativeResponseValue;
12093 // void NodeInfo_free(struct LDKNodeInfo this_obj);
12094 export function NodeInfo_free(this_obj: number): void {
12095 if(!isWasmInitialized) {
12096 throw new Error("initializeWasm() must be awaited first!");
12098 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
12099 // debug statements here
12101 // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12102 export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
12103 if(!isWasmInitialized) {
12104 throw new Error("initializeWasm() must be awaited first!");
12106 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
12107 // debug statements here
12109 // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12110 export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
12111 if(!isWasmInitialized) {
12112 throw new Error("initializeWasm() must be awaited first!");
12114 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
12115 return nativeResponseValue;
12117 // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12118 export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
12119 if(!isWasmInitialized) {
12120 throw new Error("initializeWasm() must be awaited first!");
12122 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
12123 // debug statements here
12125 // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12126 export function NodeInfo_get_announcement_info(this_ptr: number): number {
12127 if(!isWasmInitialized) {
12128 throw new Error("initializeWasm() must be awaited first!");
12130 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
12131 return nativeResponseValue;
12133 // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
12134 export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
12135 if(!isWasmInitialized) {
12136 throw new Error("initializeWasm() must be awaited first!");
12138 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
12139 // debug statements here
12141 // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
12142 export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
12143 if(!isWasmInitialized) {
12144 throw new Error("initializeWasm() must be awaited first!");
12146 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
12147 return nativeResponseValue;
12149 // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
12150 export function NodeInfo_clone(orig: number): number {
12151 if(!isWasmInitialized) {
12152 throw new Error("initializeWasm() must be awaited first!");
12154 const nativeResponseValue = wasm.NodeInfo_clone(orig);
12155 return nativeResponseValue;
12157 // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
12158 export function NodeInfo_write(obj: number): Uint8Array {
12159 if(!isWasmInitialized) {
12160 throw new Error("initializeWasm() must be awaited first!");
12162 const nativeResponseValue = wasm.NodeInfo_write(obj);
12163 return decodeArray(nativeResponseValue);
12165 // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
12166 export function NodeInfo_read(ser: Uint8Array): number {
12167 if(!isWasmInitialized) {
12168 throw new Error("initializeWasm() must be awaited first!");
12170 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
12171 return nativeResponseValue;
12173 // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
12174 export function NetworkGraph_write(obj: number): Uint8Array {
12175 if(!isWasmInitialized) {
12176 throw new Error("initializeWasm() must be awaited first!");
12178 const nativeResponseValue = wasm.NetworkGraph_write(obj);
12179 return decodeArray(nativeResponseValue);
12181 // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
12182 export function NetworkGraph_read(ser: Uint8Array): number {
12183 if(!isWasmInitialized) {
12184 throw new Error("initializeWasm() must be awaited first!");
12186 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
12187 return nativeResponseValue;
12189 // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
12190 export function NetworkGraph_new(genesis_hash: Uint8Array): number {
12191 if(!isWasmInitialized) {
12192 throw new Error("initializeWasm() must be awaited first!");
12194 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
12195 return nativeResponseValue;
12197 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
12198 export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
12199 if(!isWasmInitialized) {
12200 throw new Error("initializeWasm() must be awaited first!");
12202 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
12203 return nativeResponseValue;
12205 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
12206 export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
12207 if(!isWasmInitialized) {
12208 throw new Error("initializeWasm() must be awaited first!");
12210 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
12211 return nativeResponseValue;
12213 // 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);
12214 export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
12215 if(!isWasmInitialized) {
12216 throw new Error("initializeWasm() must be awaited first!");
12218 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
12219 return nativeResponseValue;
12221 // 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);
12222 export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
12223 if(!isWasmInitialized) {
12224 throw new Error("initializeWasm() must be awaited first!");
12226 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
12227 return nativeResponseValue;
12229 // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
12230 export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
12231 if(!isWasmInitialized) {
12232 throw new Error("initializeWasm() must be awaited first!");
12234 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
12235 // debug statements here
12237 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
12238 export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
12239 if(!isWasmInitialized) {
12240 throw new Error("initializeWasm() must be awaited first!");
12242 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
12243 return nativeResponseValue;
12245 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
12246 export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
12247 if(!isWasmInitialized) {
12248 throw new Error("initializeWasm() must be awaited first!");
12250 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
12251 return nativeResponseValue;
12254 export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
12255 if(isWasmInitialized && !allowDoubleInitialization) {
12258 const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
12259 wasm = wasmInstance.exports;
12260 isWasmInitialized = true;