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_u32TxOutZ_new(number a, number b);
502 public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
503 public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
504 public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
505 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
506 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
507 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
508 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
509 public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
510 public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
511 public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
512 public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
513 public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
514 public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
515 public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
516 public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
517 public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
521 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
523 export interface LDKSign {
524 get_per_commitment_point (idx: number): Uint8Array;
525 release_commitment_secret (idx: number): Uint8Array;
526 channel_keys_id (): Uint8Array;
527 sign_counterparty_commitment (commitment_tx: number): number;
528 sign_holder_commitment_and_htlcs (commitment_tx: number): number;
529 sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
530 sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
531 sign_closing_transaction (closing_tx: Uint8Array): number;
532 sign_channel_announcement (msg: number): number;
533 ready_channel (channel_parameters: number): void;
534 write (): Uint8Array;
537 export function LDKSign_new(impl: LDKSign, pubkeys: number): number {
538 throw new Error('unimplemented'); // TODO: bind to WASM
541 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
544 // LDKPublicKey Sign_get_per_commitment_point LDKSign* this_arg, uint64_t idx
545 export function Sign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
546 if(!isWasmInitialized) {
547 throw new Error("initializeWasm() must be awaited first!");
549 const nativeResponseValue = wasm.Sign_get_per_commitment_point(this_arg, idx);
550 return decodeArray(nativeResponseValue);
552 // LDKThirtyTwoBytes Sign_release_commitment_secret LDKSign* this_arg, uint64_t idx
553 export function Sign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
554 if(!isWasmInitialized) {
555 throw new Error("initializeWasm() must be awaited first!");
557 const nativeResponseValue = wasm.Sign_release_commitment_secret(this_arg, idx);
558 return decodeArray(nativeResponseValue);
560 // LDKThirtyTwoBytes Sign_channel_keys_id LDKSign* this_arg
561 export function Sign_channel_keys_id(this_arg: number): Uint8Array {
562 if(!isWasmInitialized) {
563 throw new Error("initializeWasm() must be awaited first!");
565 const nativeResponseValue = wasm.Sign_channel_keys_id(this_arg);
566 return decodeArray(nativeResponseValue);
568 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_counterparty_commitment LDKSign* this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
569 export function Sign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
570 if(!isWasmInitialized) {
571 throw new Error("initializeWasm() must be awaited first!");
573 const nativeResponseValue = wasm.Sign_sign_counterparty_commitment(this_arg, commitment_tx);
574 return nativeResponseValue;
576 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_holder_commitment_and_htlcs LDKSign* this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
577 export function Sign_sign_holder_commitment_and_htlcs(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_holder_commitment_and_htlcs(this_arg, commitment_tx);
582 return nativeResponseValue;
584 // LDKCResult_SignatureNoneZ Sign_sign_justice_transaction LDKSign* 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
585 export function Sign_sign_justice_transaction(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
586 if(!isWasmInitialized) {
587 throw new Error("initializeWasm() must be awaited first!");
589 const nativeResponseValue = wasm.Sign_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
590 return nativeResponseValue;
592 // LDKCResult_SignatureNoneZ Sign_sign_counterparty_htlc_transaction LDKSign* this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
593 export function Sign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
594 if(!isWasmInitialized) {
595 throw new Error("initializeWasm() must be awaited first!");
597 const nativeResponseValue = wasm.Sign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
598 return nativeResponseValue;
600 // LDKCResult_SignatureNoneZ Sign_sign_closing_transaction LDKSign* this_arg, struct LDKTransaction closing_tx
601 export function Sign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
602 if(!isWasmInitialized) {
603 throw new Error("initializeWasm() must be awaited first!");
605 const nativeResponseValue = wasm.Sign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
606 return nativeResponseValue;
608 // LDKCResult_SignatureNoneZ Sign_sign_channel_announcement LDKSign* this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
609 export function Sign_sign_channel_announcement(this_arg: number, msg: number): number {
610 if(!isWasmInitialized) {
611 throw new Error("initializeWasm() must be awaited first!");
613 const nativeResponseValue = wasm.Sign_sign_channel_announcement(this_arg, msg);
614 return nativeResponseValue;
616 // void Sign_ready_channel LDKSign* this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
617 export function Sign_ready_channel(this_arg: number, channel_parameters: number): void {
618 if(!isWasmInitialized) {
619 throw new Error("initializeWasm() must be awaited first!");
621 const nativeResponseValue = wasm.Sign_ready_channel(this_arg, channel_parameters);
622 // debug statements here
624 // LDKCVec_u8Z Sign_write LDKSign* this_arg
625 export function Sign_write(this_arg: number): Uint8Array {
626 if(!isWasmInitialized) {
627 throw new Error("initializeWasm() must be awaited first!");
629 const nativeResponseValue = wasm.Sign_write(this_arg);
630 return decodeArray(nativeResponseValue);
632 // LDKChannelPublicKeys Sign_get_pubkeys LDKSign* this_arg
633 export function Sign_get_pubkeys(this_arg: number): number {
634 if(!isWasmInitialized) {
635 throw new Error("initializeWasm() must be awaited first!");
637 const nativeResponseValue = wasm.Sign_get_pubkeys(this_arg);
638 return nativeResponseValue;
640 public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
641 public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
642 public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
643 public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
644 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
645 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
646 public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
647 public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
648 public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
649 public static class LDKAPIError {
650 private LDKAPIError() {}
651 export class APIMisuseError extends LDKAPIError {
652 public Uint8Array err;
653 APIMisuseError(Uint8Array err) { this.err = err; }
655 export class FeeRateTooHigh extends LDKAPIError {
656 public Uint8Array err;
657 public number feerate;
658 FeeRateTooHigh(Uint8Array err, number feerate) { this.err = err; this.feerate = feerate; }
660 export class RouteError extends LDKAPIError {
662 RouteError(String err) { this.err = err; }
664 export class ChannelUnavailable extends LDKAPIError {
665 public Uint8Array err;
666 ChannelUnavailable(Uint8Array err) { this.err = err; }
668 export class MonitorUpdateFailed extends LDKAPIError {
669 MonitorUpdateFailed() { }
671 static native void init();
673 static { LDKAPIError.init(); }
674 public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
675 public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
676 public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
677 public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
678 public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
679 public static native long LDKCVec_APIErrorZ_new(number[] elems);
680 public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
681 public static class LDKPaymentSendFailure {
682 private LDKPaymentSendFailure() {}
683 export class ParameterError extends LDKPaymentSendFailure {
686 export class PathParameterError extends LDKPaymentSendFailure {
687 PathParameterError() { }
689 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
690 AllFailedRetrySafe() { }
692 export class PartialFailure extends LDKPaymentSendFailure {
695 static native void init();
697 static { LDKPaymentSendFailure.init(); }
698 public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
699 public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
700 public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
701 public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
702 public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
706 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
708 export interface LDKWatch {
709 watch_channel (funding_txo: number, monitor: number): number;
710 update_channel (funding_txo: number, update: number): number;
711 release_pending_monitor_events (): number[];
714 export function LDKWatch_new(impl: LDKWatch): number {
715 throw new Error('unimplemented'); // TODO: bind to WASM
718 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
721 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch* this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
722 export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
723 if(!isWasmInitialized) {
724 throw new Error("initializeWasm() must be awaited first!");
726 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
727 return nativeResponseValue;
729 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch* this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
730 export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
731 if(!isWasmInitialized) {
732 throw new Error("initializeWasm() must be awaited first!");
734 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
735 return nativeResponseValue;
737 // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch* this_arg
738 export function Watch_release_pending_monitor_events(this_arg: number): number[] {
739 if(!isWasmInitialized) {
740 throw new Error("initializeWasm() must be awaited first!");
742 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
743 return nativeResponseValue;
748 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
750 export interface LDKBroadcasterInterface {
751 broadcast_transaction (tx: Uint8Array): void;
754 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
755 throw new Error('unimplemented'); // TODO: bind to WASM
758 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
761 // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface* this_arg, struct LDKTransaction tx
762 export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
763 if(!isWasmInitialized) {
764 throw new Error("initializeWasm() must be awaited first!");
766 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
767 // debug statements here
769 public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
770 public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
771 public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
775 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
777 export interface LDKKeysInterface {
778 get_node_secret (): Uint8Array;
779 get_destination_script (): Uint8Array;
780 get_shutdown_pubkey (): Uint8Array;
781 get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
782 get_secure_random_bytes (): Uint8Array;
783 read_chan_signer (reader: Uint8Array): number;
786 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
787 throw new Error('unimplemented'); // TODO: bind to WASM
790 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
793 // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface* this_arg
794 export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
795 if(!isWasmInitialized) {
796 throw new Error("initializeWasm() must be awaited first!");
798 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
799 return decodeArray(nativeResponseValue);
801 // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface* this_arg
802 export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
803 if(!isWasmInitialized) {
804 throw new Error("initializeWasm() must be awaited first!");
806 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
807 return decodeArray(nativeResponseValue);
809 // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface* this_arg
810 export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
811 if(!isWasmInitialized) {
812 throw new Error("initializeWasm() must be awaited first!");
814 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
815 return decodeArray(nativeResponseValue);
817 // LDKSign KeysInterface_get_channel_signer LDKKeysInterface* this_arg, bool inbound, uint64_t channel_value_satoshis
818 export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
819 if(!isWasmInitialized) {
820 throw new Error("initializeWasm() must be awaited first!");
822 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
823 return nativeResponseValue;
825 // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface* this_arg
826 export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
827 if(!isWasmInitialized) {
828 throw new Error("initializeWasm() must be awaited first!");
830 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
831 return decodeArray(nativeResponseValue);
833 // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
834 export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
835 if(!isWasmInitialized) {
836 throw new Error("initializeWasm() must be awaited first!");
838 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
839 return nativeResponseValue;
844 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
846 export interface LDKFeeEstimator {
847 get_est_sat_per_1000_weight (confirmation_target: LDKConfirmationTarget): number;
850 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
851 throw new Error('unimplemented'); // TODO: bind to WASM
854 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
857 // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator* this_arg, enum LDKConfirmationTarget confirmation_target
858 export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: LDKConfirmationTarget): number {
859 if(!isWasmInitialized) {
860 throw new Error("initializeWasm() must be awaited first!");
862 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
863 return nativeResponseValue;
868 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
870 export interface LDKLogger {
871 log (record: String): void;
874 export function LDKLogger_new(impl: LDKLogger): number {
875 throw new Error('unimplemented'); // TODO: bind to WASM
878 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
881 public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
882 public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
883 public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
884 public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
885 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
886 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
887 public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
888 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
889 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
890 public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
891 public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
892 public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
893 public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
894 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
895 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
896 public static native long LDKCVec_TxOutZ_new(number[] elems);
897 public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
898 public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
899 public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
900 public static native long LDKCVec_RouteHopZ_new(number[] elems);
901 public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
902 public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
903 public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
904 public static native long LDKCVec_RouteHintZ_new(number[] elems);
905 public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
906 public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
907 public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
908 public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
909 public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
910 public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
911 public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
912 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
913 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
914 public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
915 public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
916 public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
917 public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
918 public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
919 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
920 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
921 public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
922 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
923 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
924 public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
925 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
926 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
927 public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
928 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
929 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
930 public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
931 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
932 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
933 public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
934 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
935 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
936 public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
937 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
938 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
939 public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
940 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
941 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
942 public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
943 public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
944 public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
945 public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
946 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
947 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
948 public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
949 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
950 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
951 public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
952 public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
953 public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
954 public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
955 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
956 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
957 public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
958 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
959 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
960 public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
961 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
962 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
963 public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
964 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
965 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
966 public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
967 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
968 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
969 public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
970 public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
971 public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
972 public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
973 public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
974 public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
975 public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
976 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
977 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
978 public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
979 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
980 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
981 public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
982 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
983 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
984 public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
985 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
986 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
987 public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
988 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
989 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
990 public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
991 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
992 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
993 public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
994 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
995 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
996 public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
997 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
998 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
999 public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1000 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1001 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1002 public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1003 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1004 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1005 public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1006 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1007 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1008 public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1009 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1010 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1014 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1016 export interface LDKMessageSendEventsProvider {
1017 get_and_clear_pending_msg_events (): number[];
1020 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1021 throw new Error('unimplemented'); // TODO: bind to WASM
1024 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1027 // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider* this_arg
1028 export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1029 if(!isWasmInitialized) {
1030 throw new Error("initializeWasm() must be awaited first!");
1032 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1033 return nativeResponseValue;
1038 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1040 export interface LDKEventsProvider {
1041 get_and_clear_pending_events (): number[];
1044 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1045 throw new Error('unimplemented'); // TODO: bind to WASM
1048 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1051 // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider* this_arg
1052 export function EventsProvider_get_and_clear_pending_events(this_arg: number): number[] {
1053 if(!isWasmInitialized) {
1054 throw new Error("initializeWasm() must be awaited first!");
1056 const nativeResponseValue = wasm.EventsProvider_get_and_clear_pending_events(this_arg);
1057 return nativeResponseValue;
1062 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1064 export interface LDKAccess {
1065 get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1068 export function LDKAccess_new(impl: LDKAccess): number {
1069 throw new Error('unimplemented'); // TODO: bind to WASM
1072 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1075 // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess* this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1076 export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1077 if(!isWasmInitialized) {
1078 throw new Error("initializeWasm() must be awaited first!");
1080 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1081 return nativeResponseValue;
1086 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1088 export interface LDKListen {
1089 block_connected (block: Uint8Array, height: number): void;
1090 block_disconnected (header: Uint8Array, height: number): void;
1093 export function LDKListen_new(impl: LDKListen): number {
1094 throw new Error('unimplemented'); // TODO: bind to WASM
1097 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1100 // void Listen_block_connected LDKListen* this_arg, struct LDKu8slice block, uint32_t height
1101 export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1102 if(!isWasmInitialized) {
1103 throw new Error("initializeWasm() must be awaited first!");
1105 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1106 // debug statements here
1108 // void Listen_block_disconnected LDKListen* this_arg, const uint8_t (*header)[80], uint32_t height
1109 export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1110 if(!isWasmInitialized) {
1111 throw new Error("initializeWasm() must be awaited first!");
1113 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1114 // debug statements here
1119 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1121 export interface LDKFilter {
1122 register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1123 register_output (outpoint: number, script_pubkey: Uint8Array): void;
1126 export function LDKFilter_new(impl: LDKFilter): number {
1127 throw new Error('unimplemented'); // TODO: bind to WASM
1130 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1133 // void Filter_register_tx LDKFilter* this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1134 export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1135 if(!isWasmInitialized) {
1136 throw new Error("initializeWasm() must be awaited first!");
1138 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1139 // debug statements here
1141 // void Filter_register_output LDKFilter* this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
1142 export function Filter_register_output(this_arg: number, outpoint: number, script_pubkey: Uint8Array): void {
1143 if(!isWasmInitialized) {
1144 throw new Error("initializeWasm() must be awaited first!");
1146 const nativeResponseValue = wasm.Filter_register_output(this_arg, outpoint, encodeArray(script_pubkey));
1147 // debug statements here
1152 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1154 export interface LDKPersist {
1155 persist_new_channel (id: number, data: number): number;
1156 update_persisted_channel (id: number, update: number, data: number): number;
1159 export function LDKPersist_new(impl: LDKPersist): number {
1160 throw new Error('unimplemented'); // TODO: bind to WASM
1163 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1166 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist* this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1167 export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1168 if(!isWasmInitialized) {
1169 throw new Error("initializeWasm() must be awaited first!");
1171 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1172 return nativeResponseValue;
1174 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist* this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
1175 export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1176 if(!isWasmInitialized) {
1177 throw new Error("initializeWasm() must be awaited first!");
1179 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1180 return nativeResponseValue;
1185 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1187 export interface LDKChannelMessageHandler {
1188 handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1189 handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1190 handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1191 handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1192 handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1193 handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1194 handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1195 handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1196 handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1197 handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1198 handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1199 handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1200 handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1201 handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1202 handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1203 peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1204 peer_connected (their_node_id: Uint8Array, msg: number): void;
1205 handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1206 handle_error (their_node_id: Uint8Array, msg: number): void;
1209 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1210 throw new Error('unimplemented'); // TODO: bind to WASM
1213 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1216 // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg
1217 export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1218 if(!isWasmInitialized) {
1219 throw new Error("initializeWasm() must be awaited first!");
1221 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1222 // debug statements here
1224 // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg
1225 export function ChannelMessageHandler_handle_accept_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_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1230 // debug statements here
1232 // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1233 export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1234 if(!isWasmInitialized) {
1235 throw new Error("initializeWasm() must be awaited first!");
1237 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1238 // debug statements here
1240 // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1241 export function ChannelMessageHandler_handle_funding_signed(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_signed(this_arg, encodeArray(their_node_id), msg);
1246 // debug statements here
1248 // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1249 export function ChannelMessageHandler_handle_funding_locked(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_locked(this_arg, encodeArray(their_node_id), msg);
1254 // debug statements here
1256 // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInitFeatures *NONNULL_PTR their_features, const struct LDKShutdown *NONNULL_PTR msg
1257 export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1258 if(!isWasmInitialized) {
1259 throw new Error("initializeWasm() must be awaited first!");
1261 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1262 // debug statements here
1264 // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1265 export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1266 if(!isWasmInitialized) {
1267 throw new Error("initializeWasm() must be awaited first!");
1269 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1270 // debug statements here
1272 // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1273 export function ChannelMessageHandler_handle_update_add_htlc(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_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1278 // debug statements here
1280 // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1281 export function ChannelMessageHandler_handle_update_fulfill_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_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1286 // debug statements here
1288 // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1289 export function ChannelMessageHandler_handle_update_fail_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_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1294 // debug statements here
1296 // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1297 export function ChannelMessageHandler_handle_update_fail_malformed_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_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1302 // debug statements here
1304 // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1305 export function ChannelMessageHandler_handle_commitment_signed(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_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1310 // debug statements here
1312 // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1313 export function ChannelMessageHandler_handle_revoke_and_ack(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_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1318 // debug statements here
1320 // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1321 export function ChannelMessageHandler_handle_update_fee(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_update_fee(this_arg, encodeArray(their_node_id), msg);
1326 // debug statements here
1328 // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1329 export function ChannelMessageHandler_handle_announcement_signatures(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_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1334 // debug statements here
1336 // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1337 export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1338 if(!isWasmInitialized) {
1339 throw new Error("initializeWasm() must be awaited first!");
1341 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1342 // debug statements here
1344 // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1345 export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1346 if(!isWasmInitialized) {
1347 throw new Error("initializeWasm() must be awaited first!");
1349 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1350 // debug statements here
1352 // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1353 export function ChannelMessageHandler_handle_channel_reestablish(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_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1358 // debug statements here
1360 // void ChannelMessageHandler_handle_error LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1361 export function ChannelMessageHandler_handle_error(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_error(this_arg, encodeArray(their_node_id), msg);
1366 // debug statements here
1371 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1373 export interface LDKRoutingMessageHandler {
1374 handle_node_announcement (msg: number): number;
1375 handle_channel_announcement (msg: number): number;
1376 handle_channel_update (msg: number): number;
1377 handle_htlc_fail_channel_update (update: number): void;
1378 get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1379 get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1380 sync_routing_table (their_node_id: Uint8Array, init: number): void;
1381 handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1382 handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1383 handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1384 handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1387 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1388 throw new Error('unimplemented'); // TODO: bind to WASM
1391 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1394 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler* this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1395 export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1396 if(!isWasmInitialized) {
1397 throw new Error("initializeWasm() must be awaited first!");
1399 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1400 return nativeResponseValue;
1402 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler* this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1403 export function RoutingMessageHandler_handle_channel_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_channel_announcement(this_arg, msg);
1408 return nativeResponseValue;
1410 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler* this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1411 export function RoutingMessageHandler_handle_channel_update(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_update(this_arg, msg);
1416 return nativeResponseValue;
1418 // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler* this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1419 export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1420 if(!isWasmInitialized) {
1421 throw new Error("initializeWasm() must be awaited first!");
1423 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1424 // debug statements here
1426 // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler* this_arg, uint64_t starting_point, uint8_t batch_amount
1427 export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1428 if(!isWasmInitialized) {
1429 throw new Error("initializeWasm() must be awaited first!");
1431 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1432 return nativeResponseValue;
1434 // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler* this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1435 export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1436 if(!isWasmInitialized) {
1437 throw new Error("initializeWasm() must be awaited first!");
1439 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1440 return nativeResponseValue;
1442 // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1443 export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1444 if(!isWasmInitialized) {
1445 throw new Error("initializeWasm() must be awaited first!");
1447 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1448 // debug statements here
1450 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1451 export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1452 if(!isWasmInitialized) {
1453 throw new Error("initializeWasm() must be awaited first!");
1455 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1456 return nativeResponseValue;
1458 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1459 export function RoutingMessageHandler_handle_reply_short_channel_ids_end(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_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1464 return nativeResponseValue;
1466 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1467 export function RoutingMessageHandler_handle_query_channel_range(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_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1472 return nativeResponseValue;
1474 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1475 export function RoutingMessageHandler_handle_query_short_channel_ids(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_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1480 return nativeResponseValue;
1485 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1487 export interface LDKSocketDescriptor {
1488 send_data (data: Uint8Array, resume_read: boolean): number;
1489 disconnect_socket (): void;
1490 eq (other_arg: number): boolean;
1494 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1495 throw new Error('unimplemented'); // TODO: bind to WASM
1498 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1501 // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor* this_arg, struct LDKu8slice data, bool resume_read
1502 export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1503 if(!isWasmInitialized) {
1504 throw new Error("initializeWasm() must be awaited first!");
1506 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1507 return nativeResponseValue;
1509 // void SocketDescriptor_disconnect_socket LDKSocketDescriptor* this_arg
1510 export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1511 if(!isWasmInitialized) {
1512 throw new Error("initializeWasm() must be awaited first!");
1514 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1515 // debug statements here
1517 // uint64_t SocketDescriptor_hash LDKSocketDescriptor* this_arg
1518 export function SocketDescriptor_hash(this_arg: number): number {
1519 if(!isWasmInitialized) {
1520 throw new Error("initializeWasm() must be awaited first!");
1522 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1523 return nativeResponseValue;
1525 // void Transaction_free(struct LDKTransaction _res);
1526 export function Transaction_free(_res: Uint8Array): void {
1527 if(!isWasmInitialized) {
1528 throw new Error("initializeWasm() must be awaited first!");
1530 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1531 // debug statements here
1533 // void TxOut_free(struct LDKTxOut _res);
1534 export function TxOut_free(_res: number): void {
1535 if(!isWasmInitialized) {
1536 throw new Error("initializeWasm() must be awaited first!");
1538 const nativeResponseValue = wasm.TxOut_free(_res);
1539 // debug statements here
1541 // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1542 export function TxOut_clone(orig: number): number {
1543 if(!isWasmInitialized) {
1544 throw new Error("initializeWasm() must be awaited first!");
1546 const nativeResponseValue = wasm.TxOut_clone(orig);
1547 return nativeResponseValue;
1549 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1550 export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1551 if(!isWasmInitialized) {
1552 throw new Error("initializeWasm() must be awaited first!");
1554 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1555 return nativeResponseValue;
1557 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1558 export function CResult_SecretKeyErrorZ_err(e: LDKSecp256k1Error): number {
1559 if(!isWasmInitialized) {
1560 throw new Error("initializeWasm() must be awaited first!");
1562 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1563 return nativeResponseValue;
1565 // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1566 export function CResult_SecretKeyErrorZ_free(_res: number): void {
1567 if(!isWasmInitialized) {
1568 throw new Error("initializeWasm() must be awaited first!");
1570 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1571 // debug statements here
1573 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1574 export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1575 if(!isWasmInitialized) {
1576 throw new Error("initializeWasm() must be awaited first!");
1578 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1579 return nativeResponseValue;
1581 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1582 export function CResult_PublicKeyErrorZ_err(e: LDKSecp256k1Error): number {
1583 if(!isWasmInitialized) {
1584 throw new Error("initializeWasm() must be awaited first!");
1586 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1587 return nativeResponseValue;
1589 // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1590 export function CResult_PublicKeyErrorZ_free(_res: number): void {
1591 if(!isWasmInitialized) {
1592 throw new Error("initializeWasm() must be awaited first!");
1594 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1595 // debug statements here
1597 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1598 export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1599 if(!isWasmInitialized) {
1600 throw new Error("initializeWasm() must be awaited first!");
1602 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1603 return nativeResponseValue;
1605 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1606 export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1607 if(!isWasmInitialized) {
1608 throw new Error("initializeWasm() must be awaited first!");
1610 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1611 return nativeResponseValue;
1613 // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1614 export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1615 if(!isWasmInitialized) {
1616 throw new Error("initializeWasm() must be awaited first!");
1618 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1619 // debug statements here
1621 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1622 export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
1623 if(!isWasmInitialized) {
1624 throw new Error("initializeWasm() must be awaited first!");
1626 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
1627 return nativeResponseValue;
1629 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1630 export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
1631 if(!isWasmInitialized) {
1632 throw new Error("initializeWasm() must be awaited first!");
1634 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
1635 return nativeResponseValue;
1637 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1638 export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
1639 if(!isWasmInitialized) {
1640 throw new Error("initializeWasm() must be awaited first!");
1642 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
1643 return nativeResponseValue;
1645 // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1646 export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
1647 if(!isWasmInitialized) {
1648 throw new Error("initializeWasm() must be awaited first!");
1650 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
1651 // debug statements here
1653 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1654 export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
1655 if(!isWasmInitialized) {
1656 throw new Error("initializeWasm() must be awaited first!");
1658 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
1659 return nativeResponseValue;
1661 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1662 export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
1663 if(!isWasmInitialized) {
1664 throw new Error("initializeWasm() must be awaited first!");
1666 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
1667 return nativeResponseValue;
1669 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
1670 export function CResult_TxCreationKeysErrorZ_err(e: LDKSecp256k1Error): number {
1671 if(!isWasmInitialized) {
1672 throw new Error("initializeWasm() must be awaited first!");
1674 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
1675 return nativeResponseValue;
1677 // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
1678 export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
1679 if(!isWasmInitialized) {
1680 throw new Error("initializeWasm() must be awaited first!");
1682 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
1683 // debug statements here
1685 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
1686 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
1687 if(!isWasmInitialized) {
1688 throw new Error("initializeWasm() must be awaited first!");
1690 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
1691 return nativeResponseValue;
1693 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
1694 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
1695 if(!isWasmInitialized) {
1696 throw new Error("initializeWasm() must be awaited first!");
1698 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
1699 return nativeResponseValue;
1701 // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
1702 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
1703 if(!isWasmInitialized) {
1704 throw new Error("initializeWasm() must be awaited first!");
1706 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
1707 // debug statements here
1709 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
1710 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
1711 if(!isWasmInitialized) {
1712 throw new Error("initializeWasm() must be awaited first!");
1714 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
1715 return nativeResponseValue;
1717 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
1718 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1719 if(!isWasmInitialized) {
1720 throw new Error("initializeWasm() must be awaited first!");
1722 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
1723 return nativeResponseValue;
1725 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1726 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1727 if(!isWasmInitialized) {
1728 throw new Error("initializeWasm() must be awaited first!");
1730 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
1731 return nativeResponseValue;
1733 // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
1734 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1735 if(!isWasmInitialized) {
1736 throw new Error("initializeWasm() must be awaited first!");
1738 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
1739 // debug statements here
1741 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1742 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1743 if(!isWasmInitialized) {
1744 throw new Error("initializeWasm() must be awaited first!");
1746 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
1747 return nativeResponseValue;
1749 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
1750 export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1751 if(!isWasmInitialized) {
1752 throw new Error("initializeWasm() must be awaited first!");
1754 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
1755 return nativeResponseValue;
1757 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1758 export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1759 if(!isWasmInitialized) {
1760 throw new Error("initializeWasm() must be awaited first!");
1762 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
1763 return nativeResponseValue;
1765 // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
1766 export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1767 if(!isWasmInitialized) {
1768 throw new Error("initializeWasm() must be awaited first!");
1770 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
1771 // debug statements here
1773 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1774 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1775 if(!isWasmInitialized) {
1776 throw new Error("initializeWasm() must be awaited first!");
1778 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
1779 return nativeResponseValue;
1781 // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1782 export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
1783 if(!isWasmInitialized) {
1784 throw new Error("initializeWasm() must be awaited first!");
1786 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
1787 // debug statements here
1789 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
1790 export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1791 if(!isWasmInitialized) {
1792 throw new Error("initializeWasm() must be awaited first!");
1794 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
1795 return nativeResponseValue;
1797 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1798 export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
1799 if(!isWasmInitialized) {
1800 throw new Error("initializeWasm() must be awaited first!");
1802 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
1803 return nativeResponseValue;
1805 // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
1806 export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1807 if(!isWasmInitialized) {
1808 throw new Error("initializeWasm() must be awaited first!");
1810 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
1811 // debug statements here
1813 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1814 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1815 if(!isWasmInitialized) {
1816 throw new Error("initializeWasm() must be awaited first!");
1818 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
1819 return nativeResponseValue;
1821 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
1822 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1823 if(!isWasmInitialized) {
1824 throw new Error("initializeWasm() must be awaited first!");
1826 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
1827 return nativeResponseValue;
1829 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1830 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
1831 if(!isWasmInitialized) {
1832 throw new Error("initializeWasm() must be awaited first!");
1834 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
1835 return nativeResponseValue;
1837 // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
1838 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1839 if(!isWasmInitialized) {
1840 throw new Error("initializeWasm() must be awaited first!");
1842 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
1843 // debug statements here
1845 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1846 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1847 if(!isWasmInitialized) {
1848 throw new Error("initializeWasm() must be awaited first!");
1850 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
1851 return nativeResponseValue;
1853 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
1854 export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
1855 if(!isWasmInitialized) {
1856 throw new Error("initializeWasm() must be awaited first!");
1858 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
1859 return nativeResponseValue;
1861 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1862 export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
1863 if(!isWasmInitialized) {
1864 throw new Error("initializeWasm() must be awaited first!");
1866 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
1867 return nativeResponseValue;
1869 // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
1870 export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
1871 if(!isWasmInitialized) {
1872 throw new Error("initializeWasm() must be awaited first!");
1874 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
1875 // debug statements here
1877 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1878 export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1879 if(!isWasmInitialized) {
1880 throw new Error("initializeWasm() must be awaited first!");
1882 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
1883 return nativeResponseValue;
1885 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
1886 export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
1887 if(!isWasmInitialized) {
1888 throw new Error("initializeWasm() must be awaited first!");
1890 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
1891 return nativeResponseValue;
1893 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
1894 export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
1895 if(!isWasmInitialized) {
1896 throw new Error("initializeWasm() must be awaited first!");
1898 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
1899 return nativeResponseValue;
1901 // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
1902 export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
1903 if(!isWasmInitialized) {
1904 throw new Error("initializeWasm() must be awaited first!");
1906 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
1907 // debug statements here
1909 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
1910 export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
1911 if(!isWasmInitialized) {
1912 throw new Error("initializeWasm() must be awaited first!");
1914 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
1915 return nativeResponseValue;
1917 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
1918 export function CResult_CVec_SignatureZNoneZ_err(): number {
1919 if(!isWasmInitialized) {
1920 throw new Error("initializeWasm() must be awaited first!");
1922 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
1923 return nativeResponseValue;
1925 // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
1926 export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
1927 if(!isWasmInitialized) {
1928 throw new Error("initializeWasm() must be awaited first!");
1930 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
1931 // debug statements here
1933 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
1934 export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
1935 if(!isWasmInitialized) {
1936 throw new Error("initializeWasm() must be awaited first!");
1938 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
1939 return nativeResponseValue;
1941 // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
1942 export function CVec_MessageSendEventZ_free(_res: number[]): void {
1943 if(!isWasmInitialized) {
1944 throw new Error("initializeWasm() must be awaited first!");
1946 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
1947 // debug statements here
1949 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
1950 export function CResult_boolLightningErrorZ_ok(o: boolean): number {
1951 if(!isWasmInitialized) {
1952 throw new Error("initializeWasm() must be awaited first!");
1954 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
1955 return nativeResponseValue;
1957 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
1958 export function CResult_boolLightningErrorZ_err(e: number): number {
1959 if(!isWasmInitialized) {
1960 throw new Error("initializeWasm() must be awaited first!");
1962 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
1963 return nativeResponseValue;
1965 // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
1966 export function CResult_boolLightningErrorZ_free(_res: number): void {
1967 if(!isWasmInitialized) {
1968 throw new Error("initializeWasm() must be awaited first!");
1970 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
1971 // debug statements here
1973 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
1974 export function CResult_boolLightningErrorZ_clone(orig: number): number {
1975 if(!isWasmInitialized) {
1976 throw new Error("initializeWasm() must be awaited first!");
1978 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
1979 return nativeResponseValue;
1981 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
1982 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
1983 if(!isWasmInitialized) {
1984 throw new Error("initializeWasm() must be awaited first!");
1986 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
1987 return nativeResponseValue;
1989 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
1990 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
1991 if(!isWasmInitialized) {
1992 throw new Error("initializeWasm() must be awaited first!");
1994 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
1995 return nativeResponseValue;
1997 // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
1998 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
1999 if(!isWasmInitialized) {
2000 throw new Error("initializeWasm() must be awaited first!");
2002 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
2003 // debug statements here
2005 // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2006 export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
2007 if(!isWasmInitialized) {
2008 throw new Error("initializeWasm() must be awaited first!");
2010 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
2011 // debug statements here
2013 // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2014 export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
2015 if(!isWasmInitialized) {
2016 throw new Error("initializeWasm() must be awaited first!");
2018 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
2019 // debug statements here
2021 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2022 export function CResult_NoneLightningErrorZ_ok(): number {
2023 if(!isWasmInitialized) {
2024 throw new Error("initializeWasm() must be awaited first!");
2026 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
2027 return nativeResponseValue;
2029 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2030 export function CResult_NoneLightningErrorZ_err(e: number): number {
2031 if(!isWasmInitialized) {
2032 throw new Error("initializeWasm() must be awaited first!");
2034 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
2035 return nativeResponseValue;
2037 // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2038 export function CResult_NoneLightningErrorZ_free(_res: number): void {
2039 if(!isWasmInitialized) {
2040 throw new Error("initializeWasm() must be awaited first!");
2042 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
2043 // debug statements here
2045 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
2046 export function CResult_NoneLightningErrorZ_clone(orig: number): number {
2047 if(!isWasmInitialized) {
2048 throw new Error("initializeWasm() must be awaited first!");
2050 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
2051 return nativeResponseValue;
2053 // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
2054 export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
2055 if(!isWasmInitialized) {
2056 throw new Error("initializeWasm() must be awaited first!");
2058 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
2059 // debug statements here
2061 // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2062 export function CVec_u8Z_free(_res: Uint8Array): void {
2063 if(!isWasmInitialized) {
2064 throw new Error("initializeWasm() must be awaited first!");
2066 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
2067 // debug statements here
2069 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
2070 export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
2071 if(!isWasmInitialized) {
2072 throw new Error("initializeWasm() must be awaited first!");
2074 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
2075 return nativeResponseValue;
2077 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2078 export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
2079 if(!isWasmInitialized) {
2080 throw new Error("initializeWasm() must be awaited first!");
2082 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
2083 return nativeResponseValue;
2085 // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
2086 export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
2087 if(!isWasmInitialized) {
2088 throw new Error("initializeWasm() must be awaited first!");
2090 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
2091 // debug statements here
2093 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
2094 export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
2095 if(!isWasmInitialized) {
2096 throw new Error("initializeWasm() must be awaited first!");
2098 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
2099 return nativeResponseValue;
2101 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
2102 export function CResult_NonePeerHandleErrorZ_ok(): number {
2103 if(!isWasmInitialized) {
2104 throw new Error("initializeWasm() must be awaited first!");
2106 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
2107 return nativeResponseValue;
2109 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
2110 export function CResult_NonePeerHandleErrorZ_err(e: number): number {
2111 if(!isWasmInitialized) {
2112 throw new Error("initializeWasm() must be awaited first!");
2114 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
2115 return nativeResponseValue;
2117 // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
2118 export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
2119 if(!isWasmInitialized) {
2120 throw new Error("initializeWasm() must be awaited first!");
2122 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
2123 // debug statements here
2125 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
2126 export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
2127 if(!isWasmInitialized) {
2128 throw new Error("initializeWasm() must be awaited first!");
2130 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
2131 return nativeResponseValue;
2133 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
2134 export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
2135 if(!isWasmInitialized) {
2136 throw new Error("initializeWasm() must be awaited first!");
2138 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
2139 return nativeResponseValue;
2141 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2142 export function CResult_boolPeerHandleErrorZ_err(e: number): number {
2143 if(!isWasmInitialized) {
2144 throw new Error("initializeWasm() must be awaited first!");
2146 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
2147 return nativeResponseValue;
2149 // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
2150 export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
2151 if(!isWasmInitialized) {
2152 throw new Error("initializeWasm() must be awaited first!");
2154 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
2155 // debug statements here
2157 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
2158 export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
2159 if(!isWasmInitialized) {
2160 throw new Error("initializeWasm() must be awaited first!");
2162 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
2163 return nativeResponseValue;
2165 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
2166 export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
2167 if(!isWasmInitialized) {
2168 throw new Error("initializeWasm() must be awaited first!");
2170 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
2171 return nativeResponseValue;
2173 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2174 export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
2175 if(!isWasmInitialized) {
2176 throw new Error("initializeWasm() must be awaited first!");
2178 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
2179 return nativeResponseValue;
2181 // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2182 export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
2183 if(!isWasmInitialized) {
2184 throw new Error("initializeWasm() must be awaited first!");
2186 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
2187 // debug statements here
2189 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2190 export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
2191 if(!isWasmInitialized) {
2192 throw new Error("initializeWasm() must be awaited first!");
2194 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
2195 return nativeResponseValue;
2197 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2198 export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
2199 if(!isWasmInitialized) {
2200 throw new Error("initializeWasm() must be awaited first!");
2202 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
2203 return nativeResponseValue;
2205 // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2206 export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
2207 if(!isWasmInitialized) {
2208 throw new Error("initializeWasm() must be awaited first!");
2210 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
2211 // debug statements here
2213 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2214 export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
2215 if(!isWasmInitialized) {
2216 throw new Error("initializeWasm() must be awaited first!");
2218 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
2219 return nativeResponseValue;
2221 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2222 export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
2223 if(!isWasmInitialized) {
2224 throw new Error("initializeWasm() must be awaited first!");
2226 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
2227 return nativeResponseValue;
2229 // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2230 export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
2231 if(!isWasmInitialized) {
2232 throw new Error("initializeWasm() must be awaited first!");
2234 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
2235 // debug statements here
2237 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
2238 export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
2239 if(!isWasmInitialized) {
2240 throw new Error("initializeWasm() must be awaited first!");
2242 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
2243 return nativeResponseValue;
2245 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
2246 export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
2247 if(!isWasmInitialized) {
2248 throw new Error("initializeWasm() must be awaited first!");
2250 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
2251 return nativeResponseValue;
2253 // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
2254 export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
2255 if(!isWasmInitialized) {
2256 throw new Error("initializeWasm() must be awaited first!");
2258 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
2259 // debug statements here
2261 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
2262 export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
2263 if(!isWasmInitialized) {
2264 throw new Error("initializeWasm() must be awaited first!");
2266 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
2267 return nativeResponseValue;
2269 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
2270 export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
2271 if(!isWasmInitialized) {
2272 throw new Error("initializeWasm() must be awaited first!");
2274 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
2275 return nativeResponseValue;
2277 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2278 export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
2279 if(!isWasmInitialized) {
2280 throw new Error("initializeWasm() must be awaited first!");
2282 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
2283 return nativeResponseValue;
2285 // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
2286 export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
2287 if(!isWasmInitialized) {
2288 throw new Error("initializeWasm() must be awaited first!");
2290 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
2291 // debug statements here
2293 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2294 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
2295 if(!isWasmInitialized) {
2296 throw new Error("initializeWasm() must be awaited first!");
2298 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
2299 return nativeResponseValue;
2301 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
2302 export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
2303 if(!isWasmInitialized) {
2304 throw new Error("initializeWasm() must be awaited first!");
2306 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
2307 return nativeResponseValue;
2309 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2310 export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
2311 if(!isWasmInitialized) {
2312 throw new Error("initializeWasm() must be awaited first!");
2314 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
2315 return nativeResponseValue;
2317 // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
2318 export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
2319 if(!isWasmInitialized) {
2320 throw new Error("initializeWasm() must be awaited first!");
2322 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
2323 // debug statements here
2325 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2326 export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
2327 if(!isWasmInitialized) {
2328 throw new Error("initializeWasm() must be awaited first!");
2330 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
2331 return nativeResponseValue;
2333 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2334 export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
2335 if(!isWasmInitialized) {
2336 throw new Error("initializeWasm() must be awaited first!");
2338 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
2339 return nativeResponseValue;
2341 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2342 export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
2343 if(!isWasmInitialized) {
2344 throw new Error("initializeWasm() must be awaited first!");
2346 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
2347 return nativeResponseValue;
2349 // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2350 export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
2351 if(!isWasmInitialized) {
2352 throw new Error("initializeWasm() must be awaited first!");
2354 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
2355 // debug statements here
2357 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
2358 export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
2359 if(!isWasmInitialized) {
2360 throw new Error("initializeWasm() must be awaited first!");
2362 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
2363 return nativeResponseValue;
2365 // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
2366 export function CVec_NetAddressZ_free(_res: number[]): void {
2367 if(!isWasmInitialized) {
2368 throw new Error("initializeWasm() must be awaited first!");
2370 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
2371 // debug statements here
2373 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2374 export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
2375 if(!isWasmInitialized) {
2376 throw new Error("initializeWasm() must be awaited first!");
2378 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
2379 return nativeResponseValue;
2381 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2382 export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
2383 if(!isWasmInitialized) {
2384 throw new Error("initializeWasm() must be awaited first!");
2386 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
2387 return nativeResponseValue;
2389 // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
2390 export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
2391 if(!isWasmInitialized) {
2392 throw new Error("initializeWasm() must be awaited first!");
2394 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
2395 // debug statements here
2397 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
2398 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
2399 if(!isWasmInitialized) {
2400 throw new Error("initializeWasm() must be awaited first!");
2402 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
2403 return nativeResponseValue;
2405 // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
2406 export function CVec_u64Z_free(_res: number[]): void {
2407 if(!isWasmInitialized) {
2408 throw new Error("initializeWasm() must be awaited first!");
2410 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
2411 // debug statements here
2413 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
2414 export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
2415 if(!isWasmInitialized) {
2416 throw new Error("initializeWasm() must be awaited first!");
2418 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
2419 return nativeResponseValue;
2421 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
2422 export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
2423 if(!isWasmInitialized) {
2424 throw new Error("initializeWasm() must be awaited first!");
2426 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
2427 return nativeResponseValue;
2429 // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
2430 export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
2431 if(!isWasmInitialized) {
2432 throw new Error("initializeWasm() must be awaited first!");
2434 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
2435 // debug statements here
2437 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
2438 export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
2439 if(!isWasmInitialized) {
2440 throw new Error("initializeWasm() must be awaited first!");
2442 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
2443 return nativeResponseValue;
2445 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
2446 export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
2447 if(!isWasmInitialized) {
2448 throw new Error("initializeWasm() must be awaited first!");
2450 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
2451 return nativeResponseValue;
2453 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
2454 export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
2455 if(!isWasmInitialized) {
2456 throw new Error("initializeWasm() must be awaited first!");
2458 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
2459 return nativeResponseValue;
2461 // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
2462 export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
2463 if(!isWasmInitialized) {
2464 throw new Error("initializeWasm() must be awaited first!");
2466 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
2467 // debug statements here
2469 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
2470 export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
2471 if(!isWasmInitialized) {
2472 throw new Error("initializeWasm() must be awaited first!");
2474 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
2475 return nativeResponseValue;
2477 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2478 export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2479 if(!isWasmInitialized) {
2480 throw new Error("initializeWasm() must be awaited first!");
2482 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2483 return nativeResponseValue;
2485 // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2486 export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2487 if(!isWasmInitialized) {
2488 throw new Error("initializeWasm() must be awaited first!");
2490 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2491 // debug statements here
2493 // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2494 export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2495 if(!isWasmInitialized) {
2496 throw new Error("initializeWasm() must be awaited first!");
2498 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2499 // debug statements here
2501 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2502 export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2503 if(!isWasmInitialized) {
2504 throw new Error("initializeWasm() must be awaited first!");
2506 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2507 return nativeResponseValue;
2509 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2510 export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
2511 if(!isWasmInitialized) {
2512 throw new Error("initializeWasm() must be awaited first!");
2514 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2515 return nativeResponseValue;
2517 // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2518 export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2519 if(!isWasmInitialized) {
2520 throw new Error("initializeWasm() must be awaited first!");
2522 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2523 // debug statements here
2525 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2526 export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2527 if(!isWasmInitialized) {
2528 throw new Error("initializeWasm() must be awaited first!");
2530 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2531 return nativeResponseValue;
2533 // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2534 export function CVec_MonitorEventZ_free(_res: number[]): void {
2535 if(!isWasmInitialized) {
2536 throw new Error("initializeWasm() must be awaited first!");
2538 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2539 // debug statements here
2541 // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
2542 export function CVec_EventZ_free(_res: number[]): void {
2543 if(!isWasmInitialized) {
2544 throw new Error("initializeWasm() must be awaited first!");
2546 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
2547 // debug statements here
2549 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
2550 export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
2551 if(!isWasmInitialized) {
2552 throw new Error("initializeWasm() must be awaited first!");
2554 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
2555 return nativeResponseValue;
2557 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
2558 export function CResult_OutPointDecodeErrorZ_err(e: number): number {
2559 if(!isWasmInitialized) {
2560 throw new Error("initializeWasm() must be awaited first!");
2562 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
2563 return nativeResponseValue;
2565 // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
2566 export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
2567 if(!isWasmInitialized) {
2568 throw new Error("initializeWasm() must be awaited first!");
2570 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
2571 // debug statements here
2573 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
2574 export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
2575 if(!isWasmInitialized) {
2576 throw new Error("initializeWasm() must be awaited first!");
2578 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
2579 return nativeResponseValue;
2581 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
2582 export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
2583 if(!isWasmInitialized) {
2584 throw new Error("initializeWasm() must be awaited first!");
2586 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
2587 return nativeResponseValue;
2589 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2590 export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
2591 if(!isWasmInitialized) {
2592 throw new Error("initializeWasm() must be awaited first!");
2594 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
2595 return nativeResponseValue;
2597 // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
2598 export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
2599 if(!isWasmInitialized) {
2600 throw new Error("initializeWasm() must be awaited first!");
2602 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
2603 // debug statements here
2605 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
2606 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
2607 if(!isWasmInitialized) {
2608 throw new Error("initializeWasm() must be awaited first!");
2610 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
2611 return nativeResponseValue;
2613 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
2614 export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
2615 if(!isWasmInitialized) {
2616 throw new Error("initializeWasm() must be awaited first!");
2618 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
2619 return nativeResponseValue;
2621 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2622 export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
2623 if(!isWasmInitialized) {
2624 throw new Error("initializeWasm() must be awaited first!");
2626 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
2627 return nativeResponseValue;
2629 // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
2630 export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
2631 if(!isWasmInitialized) {
2632 throw new Error("initializeWasm() must be awaited first!");
2634 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
2635 // debug statements here
2637 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
2638 export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
2639 if(!isWasmInitialized) {
2640 throw new Error("initializeWasm() must be awaited first!");
2642 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
2643 return nativeResponseValue;
2645 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
2646 export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
2647 if(!isWasmInitialized) {
2648 throw new Error("initializeWasm() must be awaited first!");
2650 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
2651 return nativeResponseValue;
2653 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
2654 export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
2655 if(!isWasmInitialized) {
2656 throw new Error("initializeWasm() must be awaited first!");
2658 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
2659 return nativeResponseValue;
2661 // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
2662 export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
2663 if(!isWasmInitialized) {
2664 throw new Error("initializeWasm() must be awaited first!");
2666 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
2667 // debug statements here
2669 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
2670 export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
2671 if(!isWasmInitialized) {
2672 throw new Error("initializeWasm() must be awaited first!");
2674 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
2675 return nativeResponseValue;
2677 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
2678 export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
2679 if(!isWasmInitialized) {
2680 throw new Error("initializeWasm() must be awaited first!");
2682 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
2683 return nativeResponseValue;
2685 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
2686 export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
2687 if(!isWasmInitialized) {
2688 throw new Error("initializeWasm() must be awaited first!");
2690 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
2691 return nativeResponseValue;
2693 // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
2694 export function C2Tuple_OutPointScriptZ_free(_res: number): void {
2695 if(!isWasmInitialized) {
2696 throw new Error("initializeWasm() must be awaited first!");
2698 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
2699 // debug statements here
2701 // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
2702 export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
2703 if(!isWasmInitialized) {
2704 throw new Error("initializeWasm() must be awaited first!");
2706 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
2707 // debug statements here
2709 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
2710 export function C2Tuple_u32TxOutZ_clone(orig: number): number {
2711 if(!isWasmInitialized) {
2712 throw new Error("initializeWasm() must be awaited first!");
2714 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
2715 return nativeResponseValue;
2717 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
2718 export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
2719 if(!isWasmInitialized) {
2720 throw new Error("initializeWasm() must be awaited first!");
2722 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
2723 return nativeResponseValue;
2725 // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
2726 export function C2Tuple_u32TxOutZ_free(_res: number): void {
2727 if(!isWasmInitialized) {
2728 throw new Error("initializeWasm() must be awaited first!");
2730 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
2731 // debug statements here
2733 // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
2734 export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
2735 if(!isWasmInitialized) {
2736 throw new Error("initializeWasm() must be awaited first!");
2738 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
2739 // debug statements here
2741 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
2742 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_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_u32TxOutZZZ_new(encodeArray(a), b);
2747 return nativeResponseValue;
2749 // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
2750 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
2751 if(!isWasmInitialized) {
2752 throw new Error("initializeWasm() must be awaited first!");
2754 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
2755 // debug statements here
2757 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
2758 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
2759 if(!isWasmInitialized) {
2760 throw new Error("initializeWasm() must be awaited first!");
2762 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
2763 // debug statements here
2765 // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
2766 export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
2767 if(!isWasmInitialized) {
2768 throw new Error("initializeWasm() must be awaited first!");
2770 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
2771 return nativeResponseValue;
2773 // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
2774 export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
2775 if(!isWasmInitialized) {
2776 throw new Error("initializeWasm() must be awaited first!");
2778 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
2779 // debug statements here
2781 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
2782 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
2783 if(!isWasmInitialized) {
2784 throw new Error("initializeWasm() must be awaited first!");
2786 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
2787 return nativeResponseValue;
2789 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
2790 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
2791 if(!isWasmInitialized) {
2792 throw new Error("initializeWasm() must be awaited first!");
2794 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
2795 return nativeResponseValue;
2797 // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
2798 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
2799 if(!isWasmInitialized) {
2800 throw new Error("initializeWasm() must be awaited first!");
2802 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
2803 // debug statements here
2805 // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2806 export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2807 if(!isWasmInitialized) {
2808 throw new Error("initializeWasm() must be awaited first!");
2810 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2811 // debug statements here
2813 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2814 export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2815 if(!isWasmInitialized) {
2816 throw new Error("initializeWasm() must be awaited first!");
2818 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2819 return nativeResponseValue;
2821 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2822 export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
2823 if(!isWasmInitialized) {
2824 throw new Error("initializeWasm() must be awaited first!");
2826 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2827 return nativeResponseValue;
2829 // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2830 export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2831 if(!isWasmInitialized) {
2832 throw new Error("initializeWasm() must be awaited first!");
2834 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2835 // debug statements here
2837 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2838 export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2839 if(!isWasmInitialized) {
2840 throw new Error("initializeWasm() must be awaited first!");
2842 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2843 return nativeResponseValue;
2845 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
2846 export function CResult_NoneAPIErrorZ_ok(): number {
2847 if(!isWasmInitialized) {
2848 throw new Error("initializeWasm() must be awaited first!");
2850 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
2851 return nativeResponseValue;
2853 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
2854 export function CResult_NoneAPIErrorZ_err(e: number): number {
2855 if(!isWasmInitialized) {
2856 throw new Error("initializeWasm() must be awaited first!");
2858 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
2859 return nativeResponseValue;
2861 // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
2862 export function CResult_NoneAPIErrorZ_free(_res: number): void {
2863 if(!isWasmInitialized) {
2864 throw new Error("initializeWasm() must be awaited first!");
2866 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
2867 // debug statements here
2869 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
2870 export function CResult_NoneAPIErrorZ_clone(orig: number): number {
2871 if(!isWasmInitialized) {
2872 throw new Error("initializeWasm() must be awaited first!");
2874 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
2875 return nativeResponseValue;
2877 // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
2878 export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
2879 if(!isWasmInitialized) {
2880 throw new Error("initializeWasm() must be awaited first!");
2882 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
2883 // debug statements here
2885 // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
2886 export function CVec_APIErrorZ_free(_res: number[]): void {
2887 if(!isWasmInitialized) {
2888 throw new Error("initializeWasm() must be awaited first!");
2890 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
2891 // debug statements here
2893 // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2894 export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2895 if(!isWasmInitialized) {
2896 throw new Error("initializeWasm() must be awaited first!");
2898 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2899 // debug statements here
2901 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
2902 export function CResult_NonePaymentSendFailureZ_ok(): number {
2903 if(!isWasmInitialized) {
2904 throw new Error("initializeWasm() must be awaited first!");
2906 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
2907 return nativeResponseValue;
2909 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
2910 export function CResult_NonePaymentSendFailureZ_err(e: number): number {
2911 if(!isWasmInitialized) {
2912 throw new Error("initializeWasm() must be awaited first!");
2914 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
2915 return nativeResponseValue;
2917 // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
2918 export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
2919 if(!isWasmInitialized) {
2920 throw new Error("initializeWasm() must be awaited first!");
2922 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
2923 // debug statements here
2925 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
2926 export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
2927 if(!isWasmInitialized) {
2928 throw new Error("initializeWasm() must be awaited first!");
2930 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
2931 return nativeResponseValue;
2933 // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
2934 export function CVec_ChannelMonitorZ_free(_res: number[]): void {
2935 if(!isWasmInitialized) {
2936 throw new Error("initializeWasm() must be awaited first!");
2938 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
2939 // debug statements here
2941 // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
2942 export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
2943 if(!isWasmInitialized) {
2944 throw new Error("initializeWasm() must be awaited first!");
2946 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
2947 return nativeResponseValue;
2949 // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
2950 export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
2951 if(!isWasmInitialized) {
2952 throw new Error("initializeWasm() must be awaited first!");
2954 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
2955 // debug statements here
2957 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
2958 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
2959 if(!isWasmInitialized) {
2960 throw new Error("initializeWasm() must be awaited first!");
2962 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
2963 return nativeResponseValue;
2965 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
2966 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
2967 if(!isWasmInitialized) {
2968 throw new Error("initializeWasm() must be awaited first!");
2970 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
2971 return nativeResponseValue;
2973 // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
2974 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
2975 if(!isWasmInitialized) {
2976 throw new Error("initializeWasm() must be awaited first!");
2978 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
2979 // debug statements here
2981 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
2982 export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
2983 if(!isWasmInitialized) {
2984 throw new Error("initializeWasm() must be awaited first!");
2986 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
2987 return nativeResponseValue;
2989 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2990 export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
2991 if(!isWasmInitialized) {
2992 throw new Error("initializeWasm() must be awaited first!");
2994 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
2995 return nativeResponseValue;
2997 // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
2998 export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
2999 if(!isWasmInitialized) {
3000 throw new Error("initializeWasm() must be awaited first!");
3002 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
3003 // debug statements here
3005 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3006 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3007 if(!isWasmInitialized) {
3008 throw new Error("initializeWasm() must be awaited first!");
3010 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
3011 return nativeResponseValue;
3013 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
3014 export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
3015 if(!isWasmInitialized) {
3016 throw new Error("initializeWasm() must be awaited first!");
3018 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
3019 return nativeResponseValue;
3021 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
3022 export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
3023 if(!isWasmInitialized) {
3024 throw new Error("initializeWasm() must be awaited first!");
3026 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
3027 return nativeResponseValue;
3029 // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
3030 export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
3031 if(!isWasmInitialized) {
3032 throw new Error("initializeWasm() must be awaited first!");
3034 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
3035 // debug statements here
3037 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
3038 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
3039 if(!isWasmInitialized) {
3040 throw new Error("initializeWasm() must be awaited first!");
3042 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
3043 return nativeResponseValue;
3045 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
3046 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
3047 if(!isWasmInitialized) {
3048 throw new Error("initializeWasm() must be awaited first!");
3050 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
3051 return nativeResponseValue;
3053 // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
3054 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
3055 if(!isWasmInitialized) {
3056 throw new Error("initializeWasm() must be awaited first!");
3058 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
3059 // debug statements here
3061 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
3062 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
3063 if(!isWasmInitialized) {
3064 throw new Error("initializeWasm() must be awaited first!");
3066 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
3067 return nativeResponseValue;
3069 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3070 export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3071 if(!isWasmInitialized) {
3072 throw new Error("initializeWasm() must be awaited first!");
3074 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3075 return nativeResponseValue;
3077 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3078 export function CResult_SignatureNoneZ_err(): number {
3079 if(!isWasmInitialized) {
3080 throw new Error("initializeWasm() must be awaited first!");
3082 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3083 return nativeResponseValue;
3085 // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3086 export function CResult_SignatureNoneZ_free(_res: number): void {
3087 if(!isWasmInitialized) {
3088 throw new Error("initializeWasm() must be awaited first!");
3090 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3091 // debug statements here
3093 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3094 export function CResult_SignatureNoneZ_clone(orig: number): number {
3095 if(!isWasmInitialized) {
3096 throw new Error("initializeWasm() must be awaited first!");
3098 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3099 return nativeResponseValue;
3101 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
3102 export function CResult_SignDecodeErrorZ_ok(o: number): number {
3103 if(!isWasmInitialized) {
3104 throw new Error("initializeWasm() must be awaited first!");
3106 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
3107 return nativeResponseValue;
3109 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
3110 export function CResult_SignDecodeErrorZ_err(e: number): number {
3111 if(!isWasmInitialized) {
3112 throw new Error("initializeWasm() must be awaited first!");
3114 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
3115 return nativeResponseValue;
3117 // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
3118 export function CResult_SignDecodeErrorZ_free(_res: number): void {
3119 if(!isWasmInitialized) {
3120 throw new Error("initializeWasm() must be awaited first!");
3122 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
3123 // debug statements here
3125 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
3126 export function CResult_SignDecodeErrorZ_clone(orig: number): number {
3127 if(!isWasmInitialized) {
3128 throw new Error("initializeWasm() must be awaited first!");
3130 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
3131 return nativeResponseValue;
3133 // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3134 export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3135 if(!isWasmInitialized) {
3136 throw new Error("initializeWasm() must be awaited first!");
3138 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3139 // debug statements here
3141 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3142 export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3143 if(!isWasmInitialized) {
3144 throw new Error("initializeWasm() must be awaited first!");
3146 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3147 return nativeResponseValue;
3149 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3150 export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3151 if(!isWasmInitialized) {
3152 throw new Error("initializeWasm() must be awaited first!");
3154 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3155 return nativeResponseValue;
3157 // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3158 export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3159 if(!isWasmInitialized) {
3160 throw new Error("initializeWasm() must be awaited first!");
3162 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3163 // debug statements here
3165 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3166 export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3167 if(!isWasmInitialized) {
3168 throw new Error("initializeWasm() must be awaited first!");
3170 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3171 return nativeResponseValue;
3173 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3174 export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3175 if(!isWasmInitialized) {
3176 throw new Error("initializeWasm() must be awaited first!");
3178 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3179 return nativeResponseValue;
3181 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3182 export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3183 if(!isWasmInitialized) {
3184 throw new Error("initializeWasm() must be awaited first!");
3186 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3187 return nativeResponseValue;
3189 // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3190 export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3191 if(!isWasmInitialized) {
3192 throw new Error("initializeWasm() must be awaited first!");
3194 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3195 // debug statements here
3197 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3198 export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3199 if(!isWasmInitialized) {
3200 throw new Error("initializeWasm() must be awaited first!");
3202 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3203 return nativeResponseValue;
3205 // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3206 export function CVec_TxOutZ_free(_res: number[]): void {
3207 if(!isWasmInitialized) {
3208 throw new Error("initializeWasm() must be awaited first!");
3210 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3211 // debug statements here
3213 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3214 export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3215 if(!isWasmInitialized) {
3216 throw new Error("initializeWasm() must be awaited first!");
3218 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3219 return nativeResponseValue;
3221 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3222 export function CResult_TransactionNoneZ_err(): number {
3223 if(!isWasmInitialized) {
3224 throw new Error("initializeWasm() must be awaited first!");
3226 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3227 return nativeResponseValue;
3229 // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3230 export function CResult_TransactionNoneZ_free(_res: number): void {
3231 if(!isWasmInitialized) {
3232 throw new Error("initializeWasm() must be awaited first!");
3234 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3235 // debug statements here
3237 // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
3238 export function CVec_RouteHopZ_free(_res: number[]): void {
3239 if(!isWasmInitialized) {
3240 throw new Error("initializeWasm() must be awaited first!");
3242 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
3243 // debug statements here
3245 // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
3246 export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
3247 if(!isWasmInitialized) {
3248 throw new Error("initializeWasm() must be awaited first!");
3250 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
3251 // debug statements here
3253 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
3254 export function CResult_RouteDecodeErrorZ_ok(o: number): number {
3255 if(!isWasmInitialized) {
3256 throw new Error("initializeWasm() must be awaited first!");
3258 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
3259 return nativeResponseValue;
3261 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
3262 export function CResult_RouteDecodeErrorZ_err(e: number): number {
3263 if(!isWasmInitialized) {
3264 throw new Error("initializeWasm() must be awaited first!");
3266 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
3267 return nativeResponseValue;
3269 // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3270 export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3271 if(!isWasmInitialized) {
3272 throw new Error("initializeWasm() must be awaited first!");
3274 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3275 // debug statements here
3277 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3278 export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3279 if(!isWasmInitialized) {
3280 throw new Error("initializeWasm() must be awaited first!");
3282 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3283 return nativeResponseValue;
3285 // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3286 export function CVec_RouteHintZ_free(_res: number[]): void {
3287 if(!isWasmInitialized) {
3288 throw new Error("initializeWasm() must be awaited first!");
3290 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3291 // debug statements here
3293 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3294 export function CResult_RouteLightningErrorZ_ok(o: number): number {
3295 if(!isWasmInitialized) {
3296 throw new Error("initializeWasm() must be awaited first!");
3298 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3299 return nativeResponseValue;
3301 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3302 export function CResult_RouteLightningErrorZ_err(e: number): number {
3303 if(!isWasmInitialized) {
3304 throw new Error("initializeWasm() must be awaited first!");
3306 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3307 return nativeResponseValue;
3309 // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3310 export function CResult_RouteLightningErrorZ_free(_res: number): void {
3311 if(!isWasmInitialized) {
3312 throw new Error("initializeWasm() must be awaited first!");
3314 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3315 // debug statements here
3317 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3318 export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3319 if(!isWasmInitialized) {
3320 throw new Error("initializeWasm() must be awaited first!");
3322 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3323 return nativeResponseValue;
3325 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
3326 export function CResult_NetAddressu8Z_ok(o: number): number {
3327 if(!isWasmInitialized) {
3328 throw new Error("initializeWasm() must be awaited first!");
3330 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
3331 return nativeResponseValue;
3333 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
3334 export function CResult_NetAddressu8Z_err(e: number): number {
3335 if(!isWasmInitialized) {
3336 throw new Error("initializeWasm() must be awaited first!");
3338 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
3339 return nativeResponseValue;
3341 // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
3342 export function CResult_NetAddressu8Z_free(_res: number): void {
3343 if(!isWasmInitialized) {
3344 throw new Error("initializeWasm() must be awaited first!");
3346 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
3347 // debug statements here
3349 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
3350 export function CResult_NetAddressu8Z_clone(orig: number): number {
3351 if(!isWasmInitialized) {
3352 throw new Error("initializeWasm() must be awaited first!");
3354 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
3355 return nativeResponseValue;
3357 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
3358 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
3359 if(!isWasmInitialized) {
3360 throw new Error("initializeWasm() must be awaited first!");
3362 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
3363 return nativeResponseValue;
3365 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
3366 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
3367 if(!isWasmInitialized) {
3368 throw new Error("initializeWasm() must be awaited first!");
3370 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
3371 return nativeResponseValue;
3373 // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
3374 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
3375 if(!isWasmInitialized) {
3376 throw new Error("initializeWasm() must be awaited first!");
3378 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
3379 // debug statements here
3381 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
3382 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
3383 if(!isWasmInitialized) {
3384 throw new Error("initializeWasm() must be awaited first!");
3386 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
3387 return nativeResponseValue;
3389 // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
3390 export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
3391 if(!isWasmInitialized) {
3392 throw new Error("initializeWasm() must be awaited first!");
3394 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
3395 // debug statements here
3397 // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
3398 export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
3399 if(!isWasmInitialized) {
3400 throw new Error("initializeWasm() must be awaited first!");
3402 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
3403 // debug statements here
3405 // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
3406 export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
3407 if(!isWasmInitialized) {
3408 throw new Error("initializeWasm() must be awaited first!");
3410 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
3411 // debug statements here
3413 // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
3414 export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
3415 if(!isWasmInitialized) {
3416 throw new Error("initializeWasm() must be awaited first!");
3418 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
3419 // debug statements here
3421 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
3422 export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
3423 if(!isWasmInitialized) {
3424 throw new Error("initializeWasm() must be awaited first!");
3426 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
3427 return nativeResponseValue;
3429 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
3430 export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
3431 if(!isWasmInitialized) {
3432 throw new Error("initializeWasm() must be awaited first!");
3434 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
3435 return nativeResponseValue;
3437 // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
3438 export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
3439 if(!isWasmInitialized) {
3440 throw new Error("initializeWasm() must be awaited first!");
3442 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
3443 // debug statements here
3445 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
3446 export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
3447 if(!isWasmInitialized) {
3448 throw new Error("initializeWasm() must be awaited first!");
3450 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
3451 return nativeResponseValue;
3453 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
3454 export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
3455 if(!isWasmInitialized) {
3456 throw new Error("initializeWasm() must be awaited first!");
3458 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
3459 return nativeResponseValue;
3461 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
3462 export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
3463 if(!isWasmInitialized) {
3464 throw new Error("initializeWasm() must be awaited first!");
3466 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
3467 return nativeResponseValue;
3469 // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
3470 export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
3471 if(!isWasmInitialized) {
3472 throw new Error("initializeWasm() must be awaited first!");
3474 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
3475 // debug statements here
3477 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
3478 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
3479 if(!isWasmInitialized) {
3480 throw new Error("initializeWasm() must be awaited first!");
3482 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
3483 return nativeResponseValue;
3485 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
3486 export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
3487 if(!isWasmInitialized) {
3488 throw new Error("initializeWasm() must be awaited first!");
3490 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
3491 return nativeResponseValue;
3493 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
3494 export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
3495 if(!isWasmInitialized) {
3496 throw new Error("initializeWasm() must be awaited first!");
3498 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
3499 return nativeResponseValue;
3501 // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
3502 export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
3503 if(!isWasmInitialized) {
3504 throw new Error("initializeWasm() must be awaited first!");
3506 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
3507 // debug statements here
3509 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
3510 export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
3511 if(!isWasmInitialized) {
3512 throw new Error("initializeWasm() must be awaited first!");
3514 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
3515 return nativeResponseValue;
3517 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
3518 export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
3519 if(!isWasmInitialized) {
3520 throw new Error("initializeWasm() must be awaited first!");
3522 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
3523 return nativeResponseValue;
3525 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3526 export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
3527 if(!isWasmInitialized) {
3528 throw new Error("initializeWasm() must be awaited first!");
3530 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
3531 return nativeResponseValue;
3533 // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
3534 export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
3535 if(!isWasmInitialized) {
3536 throw new Error("initializeWasm() must be awaited first!");
3538 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
3539 // debug statements here
3541 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
3542 export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
3543 if(!isWasmInitialized) {
3544 throw new Error("initializeWasm() must be awaited first!");
3546 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
3547 return nativeResponseValue;
3549 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
3550 export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
3551 if(!isWasmInitialized) {
3552 throw new Error("initializeWasm() must be awaited first!");
3554 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
3555 return nativeResponseValue;
3557 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
3558 export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
3559 if(!isWasmInitialized) {
3560 throw new Error("initializeWasm() must be awaited first!");
3562 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
3563 return nativeResponseValue;
3565 // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
3566 export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
3567 if(!isWasmInitialized) {
3568 throw new Error("initializeWasm() must be awaited first!");
3570 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
3571 // debug statements here
3573 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
3574 export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
3575 if(!isWasmInitialized) {
3576 throw new Error("initializeWasm() must be awaited first!");
3578 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
3579 return nativeResponseValue;
3581 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
3582 export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
3583 if(!isWasmInitialized) {
3584 throw new Error("initializeWasm() must be awaited first!");
3586 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
3587 return nativeResponseValue;
3589 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
3590 export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
3591 if(!isWasmInitialized) {
3592 throw new Error("initializeWasm() must be awaited first!");
3594 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
3595 return nativeResponseValue;
3597 // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
3598 export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
3599 if(!isWasmInitialized) {
3600 throw new Error("initializeWasm() must be awaited first!");
3602 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
3603 // debug statements here
3605 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
3606 export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
3607 if(!isWasmInitialized) {
3608 throw new Error("initializeWasm() must be awaited first!");
3610 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
3611 return nativeResponseValue;
3613 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
3614 export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
3615 if(!isWasmInitialized) {
3616 throw new Error("initializeWasm() must be awaited first!");
3618 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
3619 return nativeResponseValue;
3621 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3622 export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
3623 if(!isWasmInitialized) {
3624 throw new Error("initializeWasm() must be awaited first!");
3626 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
3627 return nativeResponseValue;
3629 // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
3630 export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
3631 if(!isWasmInitialized) {
3632 throw new Error("initializeWasm() must be awaited first!");
3634 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
3635 // debug statements here
3637 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
3638 export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
3639 if(!isWasmInitialized) {
3640 throw new Error("initializeWasm() must be awaited first!");
3642 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
3643 return nativeResponseValue;
3645 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
3646 export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
3647 if(!isWasmInitialized) {
3648 throw new Error("initializeWasm() must be awaited first!");
3650 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
3651 return nativeResponseValue;
3653 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
3654 export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
3655 if(!isWasmInitialized) {
3656 throw new Error("initializeWasm() must be awaited first!");
3658 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
3659 return nativeResponseValue;
3661 // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
3662 export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
3663 if(!isWasmInitialized) {
3664 throw new Error("initializeWasm() must be awaited first!");
3666 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
3667 // debug statements here
3669 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
3670 export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
3671 if(!isWasmInitialized) {
3672 throw new Error("initializeWasm() must be awaited first!");
3674 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
3675 return nativeResponseValue;
3677 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
3678 export function CResult_InitDecodeErrorZ_ok(o: number): number {
3679 if(!isWasmInitialized) {
3680 throw new Error("initializeWasm() must be awaited first!");
3682 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
3683 return nativeResponseValue;
3685 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
3686 export function CResult_InitDecodeErrorZ_err(e: number): number {
3687 if(!isWasmInitialized) {
3688 throw new Error("initializeWasm() must be awaited first!");
3690 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
3691 return nativeResponseValue;
3693 // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
3694 export function CResult_InitDecodeErrorZ_free(_res: number): void {
3695 if(!isWasmInitialized) {
3696 throw new Error("initializeWasm() must be awaited first!");
3698 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
3699 // debug statements here
3701 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
3702 export function CResult_InitDecodeErrorZ_clone(orig: number): number {
3703 if(!isWasmInitialized) {
3704 throw new Error("initializeWasm() must be awaited first!");
3706 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
3707 return nativeResponseValue;
3709 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
3710 export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
3711 if(!isWasmInitialized) {
3712 throw new Error("initializeWasm() must be awaited first!");
3714 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
3715 return nativeResponseValue;
3717 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
3718 export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
3719 if(!isWasmInitialized) {
3720 throw new Error("initializeWasm() must be awaited first!");
3722 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
3723 return nativeResponseValue;
3725 // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
3726 export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
3727 if(!isWasmInitialized) {
3728 throw new Error("initializeWasm() must be awaited first!");
3730 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
3731 // debug statements here
3733 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
3734 export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
3735 if(!isWasmInitialized) {
3736 throw new Error("initializeWasm() must be awaited first!");
3738 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
3739 return nativeResponseValue;
3741 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
3742 export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
3743 if(!isWasmInitialized) {
3744 throw new Error("initializeWasm() must be awaited first!");
3746 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
3747 return nativeResponseValue;
3749 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
3750 export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
3751 if(!isWasmInitialized) {
3752 throw new Error("initializeWasm() must be awaited first!");
3754 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
3755 return nativeResponseValue;
3757 // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
3758 export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
3759 if(!isWasmInitialized) {
3760 throw new Error("initializeWasm() must be awaited first!");
3762 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
3763 // debug statements here
3765 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
3766 export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
3767 if(!isWasmInitialized) {
3768 throw new Error("initializeWasm() must be awaited first!");
3770 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
3771 return nativeResponseValue;
3773 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
3774 export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
3775 if(!isWasmInitialized) {
3776 throw new Error("initializeWasm() must be awaited first!");
3778 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
3779 return nativeResponseValue;
3781 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
3782 export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
3783 if(!isWasmInitialized) {
3784 throw new Error("initializeWasm() must be awaited first!");
3786 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
3787 return nativeResponseValue;
3789 // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
3790 export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
3791 if(!isWasmInitialized) {
3792 throw new Error("initializeWasm() must be awaited first!");
3794 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
3795 // debug statements here
3797 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
3798 export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
3799 if(!isWasmInitialized) {
3800 throw new Error("initializeWasm() must be awaited first!");
3802 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
3803 return nativeResponseValue;
3805 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
3806 export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
3807 if(!isWasmInitialized) {
3808 throw new Error("initializeWasm() must be awaited first!");
3810 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
3811 return nativeResponseValue;
3813 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3814 export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
3815 if(!isWasmInitialized) {
3816 throw new Error("initializeWasm() must be awaited first!");
3818 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
3819 return nativeResponseValue;
3821 // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
3822 export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
3823 if(!isWasmInitialized) {
3824 throw new Error("initializeWasm() must be awaited first!");
3826 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
3827 // debug statements here
3829 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
3830 export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
3831 if(!isWasmInitialized) {
3832 throw new Error("initializeWasm() must be awaited first!");
3834 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
3835 return nativeResponseValue;
3837 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
3838 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
3839 if(!isWasmInitialized) {
3840 throw new Error("initializeWasm() must be awaited first!");
3842 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
3843 return nativeResponseValue;
3845 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3846 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
3847 if(!isWasmInitialized) {
3848 throw new Error("initializeWasm() must be awaited first!");
3850 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
3851 return nativeResponseValue;
3853 // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
3854 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
3855 if(!isWasmInitialized) {
3856 throw new Error("initializeWasm() must be awaited first!");
3858 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
3859 // debug statements here
3861 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
3862 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
3863 if(!isWasmInitialized) {
3864 throw new Error("initializeWasm() must be awaited first!");
3866 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
3867 return nativeResponseValue;
3869 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
3870 export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
3871 if(!isWasmInitialized) {
3872 throw new Error("initializeWasm() must be awaited first!");
3874 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
3875 return nativeResponseValue;
3877 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
3878 export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
3879 if(!isWasmInitialized) {
3880 throw new Error("initializeWasm() must be awaited first!");
3882 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
3883 return nativeResponseValue;
3885 // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
3886 export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
3887 if(!isWasmInitialized) {
3888 throw new Error("initializeWasm() must be awaited first!");
3890 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
3891 // debug statements here
3893 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
3894 export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
3895 if(!isWasmInitialized) {
3896 throw new Error("initializeWasm() must be awaited first!");
3898 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
3899 return nativeResponseValue;
3901 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
3902 export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
3903 if(!isWasmInitialized) {
3904 throw new Error("initializeWasm() must be awaited first!");
3906 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
3907 return nativeResponseValue;
3909 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3910 export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
3911 if(!isWasmInitialized) {
3912 throw new Error("initializeWasm() must be awaited first!");
3914 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
3915 return nativeResponseValue;
3917 // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
3918 export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
3919 if(!isWasmInitialized) {
3920 throw new Error("initializeWasm() must be awaited first!");
3922 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
3923 // debug statements here
3925 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
3926 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
3927 if(!isWasmInitialized) {
3928 throw new Error("initializeWasm() must be awaited first!");
3930 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
3931 return nativeResponseValue;
3933 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
3934 export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
3935 if(!isWasmInitialized) {
3936 throw new Error("initializeWasm() must be awaited first!");
3938 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
3939 return nativeResponseValue;
3941 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3942 export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
3943 if(!isWasmInitialized) {
3944 throw new Error("initializeWasm() must be awaited first!");
3946 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
3947 return nativeResponseValue;
3949 // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
3950 export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
3951 if(!isWasmInitialized) {
3952 throw new Error("initializeWasm() must be awaited first!");
3954 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
3955 // debug statements here
3957 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
3958 export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
3959 if(!isWasmInitialized) {
3960 throw new Error("initializeWasm() must be awaited first!");
3962 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
3963 return nativeResponseValue;
3965 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
3966 export function CResult_PingDecodeErrorZ_ok(o: number): number {
3967 if(!isWasmInitialized) {
3968 throw new Error("initializeWasm() must be awaited first!");
3970 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
3971 return nativeResponseValue;
3973 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
3974 export function CResult_PingDecodeErrorZ_err(e: number): number {
3975 if(!isWasmInitialized) {
3976 throw new Error("initializeWasm() must be awaited first!");
3978 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
3979 return nativeResponseValue;
3981 // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
3982 export function CResult_PingDecodeErrorZ_free(_res: number): void {
3983 if(!isWasmInitialized) {
3984 throw new Error("initializeWasm() must be awaited first!");
3986 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
3987 // debug statements here
3989 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
3990 export function CResult_PingDecodeErrorZ_clone(orig: number): number {
3991 if(!isWasmInitialized) {
3992 throw new Error("initializeWasm() must be awaited first!");
3994 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
3995 return nativeResponseValue;
3997 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
3998 export function CResult_PongDecodeErrorZ_ok(o: number): number {
3999 if(!isWasmInitialized) {
4000 throw new Error("initializeWasm() must be awaited first!");
4002 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
4003 return nativeResponseValue;
4005 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
4006 export function CResult_PongDecodeErrorZ_err(e: number): number {
4007 if(!isWasmInitialized) {
4008 throw new Error("initializeWasm() must be awaited first!");
4010 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
4011 return nativeResponseValue;
4013 // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
4014 export function CResult_PongDecodeErrorZ_free(_res: number): void {
4015 if(!isWasmInitialized) {
4016 throw new Error("initializeWasm() must be awaited first!");
4018 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
4019 // debug statements here
4021 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
4022 export function CResult_PongDecodeErrorZ_clone(orig: number): number {
4023 if(!isWasmInitialized) {
4024 throw new Error("initializeWasm() must be awaited first!");
4026 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
4027 return nativeResponseValue;
4029 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
4030 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
4031 if(!isWasmInitialized) {
4032 throw new Error("initializeWasm() must be awaited first!");
4034 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
4035 return nativeResponseValue;
4037 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4038 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
4039 if(!isWasmInitialized) {
4040 throw new Error("initializeWasm() must be awaited first!");
4042 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
4043 return nativeResponseValue;
4045 // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
4046 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
4047 if(!isWasmInitialized) {
4048 throw new Error("initializeWasm() must be awaited first!");
4050 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
4051 // debug statements here
4053 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4054 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
4055 if(!isWasmInitialized) {
4056 throw new Error("initializeWasm() must be awaited first!");
4058 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
4059 return nativeResponseValue;
4061 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
4062 export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
4063 if(!isWasmInitialized) {
4064 throw new Error("initializeWasm() must be awaited first!");
4066 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
4067 return nativeResponseValue;
4069 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4070 export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
4071 if(!isWasmInitialized) {
4072 throw new Error("initializeWasm() must be awaited first!");
4074 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
4075 return nativeResponseValue;
4077 // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
4078 export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
4079 if(!isWasmInitialized) {
4080 throw new Error("initializeWasm() must be awaited first!");
4082 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
4083 // debug statements here
4085 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4086 export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
4087 if(!isWasmInitialized) {
4088 throw new Error("initializeWasm() must be awaited first!");
4090 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
4091 return nativeResponseValue;
4093 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
4094 export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
4095 if(!isWasmInitialized) {
4096 throw new Error("initializeWasm() must be awaited first!");
4098 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
4099 return nativeResponseValue;
4101 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4102 export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
4103 if(!isWasmInitialized) {
4104 throw new Error("initializeWasm() must be awaited first!");
4106 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
4107 return nativeResponseValue;
4109 // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
4110 export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
4111 if(!isWasmInitialized) {
4112 throw new Error("initializeWasm() must be awaited first!");
4114 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
4115 // debug statements here
4117 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4118 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
4119 if(!isWasmInitialized) {
4120 throw new Error("initializeWasm() must be awaited first!");
4122 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
4123 return nativeResponseValue;
4125 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
4126 export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
4127 if(!isWasmInitialized) {
4128 throw new Error("initializeWasm() must be awaited first!");
4130 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
4131 return nativeResponseValue;
4133 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4134 export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
4135 if(!isWasmInitialized) {
4136 throw new Error("initializeWasm() must be awaited first!");
4138 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
4139 return nativeResponseValue;
4141 // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
4142 export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
4143 if(!isWasmInitialized) {
4144 throw new Error("initializeWasm() must be awaited first!");
4146 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
4147 // debug statements here
4149 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4150 export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
4151 if(!isWasmInitialized) {
4152 throw new Error("initializeWasm() must be awaited first!");
4154 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
4155 return nativeResponseValue;
4157 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
4158 export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
4159 if(!isWasmInitialized) {
4160 throw new Error("initializeWasm() must be awaited first!");
4162 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
4163 return nativeResponseValue;
4165 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
4166 export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
4167 if(!isWasmInitialized) {
4168 throw new Error("initializeWasm() must be awaited first!");
4170 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
4171 return nativeResponseValue;
4173 // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
4174 export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
4175 if(!isWasmInitialized) {
4176 throw new Error("initializeWasm() must be awaited first!");
4178 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
4179 // debug statements here
4181 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
4182 export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
4183 if(!isWasmInitialized) {
4184 throw new Error("initializeWasm() must be awaited first!");
4186 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
4187 return nativeResponseValue;
4189 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
4190 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
4191 if(!isWasmInitialized) {
4192 throw new Error("initializeWasm() must be awaited first!");
4194 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
4195 return nativeResponseValue;
4197 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4198 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
4199 if(!isWasmInitialized) {
4200 throw new Error("initializeWasm() must be awaited first!");
4202 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
4203 return nativeResponseValue;
4205 // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
4206 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
4207 if(!isWasmInitialized) {
4208 throw new Error("initializeWasm() must be awaited first!");
4210 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
4211 // debug statements here
4213 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4214 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4215 if(!isWasmInitialized) {
4216 throw new Error("initializeWasm() must be awaited first!");
4218 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
4219 return nativeResponseValue;
4221 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
4222 export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
4223 if(!isWasmInitialized) {
4224 throw new Error("initializeWasm() must be awaited first!");
4226 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
4227 return nativeResponseValue;
4229 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4230 export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
4231 if(!isWasmInitialized) {
4232 throw new Error("initializeWasm() must be awaited first!");
4234 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
4235 return nativeResponseValue;
4237 // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
4238 export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
4239 if(!isWasmInitialized) {
4240 throw new Error("initializeWasm() must be awaited first!");
4242 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
4243 // debug statements here
4245 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4246 export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4247 if(!isWasmInitialized) {
4248 throw new Error("initializeWasm() must be awaited first!");
4250 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
4251 return nativeResponseValue;
4253 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
4254 export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
4255 if(!isWasmInitialized) {
4256 throw new Error("initializeWasm() must be awaited first!");
4258 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
4259 return nativeResponseValue;
4261 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
4262 export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
4263 if(!isWasmInitialized) {
4264 throw new Error("initializeWasm() must be awaited first!");
4266 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
4267 return nativeResponseValue;
4269 // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
4270 export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
4271 if(!isWasmInitialized) {
4272 throw new Error("initializeWasm() must be awaited first!");
4274 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
4275 // debug statements here
4277 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
4278 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
4279 if(!isWasmInitialized) {
4280 throw new Error("initializeWasm() must be awaited first!");
4282 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
4283 return nativeResponseValue;
4285 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
4286 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
4287 if(!isWasmInitialized) {
4288 throw new Error("initializeWasm() must be awaited first!");
4290 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
4291 return nativeResponseValue;
4293 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
4294 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
4295 if(!isWasmInitialized) {
4296 throw new Error("initializeWasm() must be awaited first!");
4298 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
4299 return nativeResponseValue;
4301 // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
4302 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
4303 if(!isWasmInitialized) {
4304 throw new Error("initializeWasm() must be awaited first!");
4306 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
4307 // debug statements here
4309 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
4310 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
4311 if(!isWasmInitialized) {
4312 throw new Error("initializeWasm() must be awaited first!");
4314 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
4315 return nativeResponseValue;
4317 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
4318 export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
4319 if(!isWasmInitialized) {
4320 throw new Error("initializeWasm() must be awaited first!");
4322 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
4323 return nativeResponseValue;
4325 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4326 export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
4327 if(!isWasmInitialized) {
4328 throw new Error("initializeWasm() must be awaited first!");
4330 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
4331 return nativeResponseValue;
4333 // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
4334 export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
4335 if(!isWasmInitialized) {
4336 throw new Error("initializeWasm() must be awaited first!");
4338 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
4339 // debug statements here
4341 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4342 export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
4343 if(!isWasmInitialized) {
4344 throw new Error("initializeWasm() must be awaited first!");
4346 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
4347 return nativeResponseValue;
4349 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
4350 export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
4351 if(!isWasmInitialized) {
4352 throw new Error("initializeWasm() must be awaited first!");
4354 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
4355 return nativeResponseValue;
4357 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4358 export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
4359 if(!isWasmInitialized) {
4360 throw new Error("initializeWasm() must be awaited first!");
4362 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
4363 return nativeResponseValue;
4365 // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
4366 export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
4367 if(!isWasmInitialized) {
4368 throw new Error("initializeWasm() must be awaited first!");
4370 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
4371 // debug statements here
4373 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4374 export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
4375 if(!isWasmInitialized) {
4376 throw new Error("initializeWasm() must be awaited first!");
4378 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
4379 return nativeResponseValue;
4381 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
4382 export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
4383 if(!isWasmInitialized) {
4384 throw new Error("initializeWasm() must be awaited first!");
4386 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
4387 return nativeResponseValue;
4389 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
4390 export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
4391 if(!isWasmInitialized) {
4392 throw new Error("initializeWasm() must be awaited first!");
4394 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
4395 return nativeResponseValue;
4397 // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
4398 export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
4399 if(!isWasmInitialized) {
4400 throw new Error("initializeWasm() must be awaited first!");
4402 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
4403 // debug statements here
4405 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
4406 export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
4407 if(!isWasmInitialized) {
4408 throw new Error("initializeWasm() must be awaited first!");
4410 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
4411 return nativeResponseValue;
4413 // void Event_free(struct LDKEvent this_ptr);
4414 export function Event_free(this_ptr: number): void {
4415 if(!isWasmInitialized) {
4416 throw new Error("initializeWasm() must be awaited first!");
4418 const nativeResponseValue = wasm.Event_free(this_ptr);
4419 // debug statements here
4421 // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
4422 export function Event_clone(orig: number): number {
4423 if(!isWasmInitialized) {
4424 throw new Error("initializeWasm() must be awaited first!");
4426 const nativeResponseValue = wasm.Event_clone(orig);
4427 return nativeResponseValue;
4429 // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
4430 export function Event_write(obj: number): Uint8Array {
4431 if(!isWasmInitialized) {
4432 throw new Error("initializeWasm() must be awaited first!");
4434 const nativeResponseValue = wasm.Event_write(obj);
4435 return decodeArray(nativeResponseValue);
4437 // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
4438 export function MessageSendEvent_free(this_ptr: number): void {
4439 if(!isWasmInitialized) {
4440 throw new Error("initializeWasm() must be awaited first!");
4442 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
4443 // debug statements here
4445 // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
4446 export function MessageSendEvent_clone(orig: number): number {
4447 if(!isWasmInitialized) {
4448 throw new Error("initializeWasm() must be awaited first!");
4450 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
4451 return nativeResponseValue;
4453 // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
4454 export function MessageSendEventsProvider_free(this_ptr: number): void {
4455 if(!isWasmInitialized) {
4456 throw new Error("initializeWasm() must be awaited first!");
4458 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
4459 // debug statements here
4461 // void EventsProvider_free(struct LDKEventsProvider this_ptr);
4462 export function EventsProvider_free(this_ptr: number): void {
4463 if(!isWasmInitialized) {
4464 throw new Error("initializeWasm() must be awaited first!");
4466 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
4467 // debug statements here
4469 // void APIError_free(struct LDKAPIError this_ptr);
4470 export function APIError_free(this_ptr: number): void {
4471 if(!isWasmInitialized) {
4472 throw new Error("initializeWasm() must be awaited first!");
4474 const nativeResponseValue = wasm.APIError_free(this_ptr);
4475 // debug statements here
4477 // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
4478 export function APIError_clone(orig: number): number {
4479 if(!isWasmInitialized) {
4480 throw new Error("initializeWasm() must be awaited first!");
4482 const nativeResponseValue = wasm.APIError_clone(orig);
4483 return nativeResponseValue;
4485 // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
4486 export function Level_clone(orig: number): LDKLevel {
4487 if(!isWasmInitialized) {
4488 throw new Error("initializeWasm() must be awaited first!");
4490 const nativeResponseValue = wasm.Level_clone(orig);
4491 return nativeResponseValue;
4493 // MUST_USE_RES enum LDKLevel Level_max(void);
4494 export function Level_max(): LDKLevel {
4495 if(!isWasmInitialized) {
4496 throw new Error("initializeWasm() must be awaited first!");
4498 const nativeResponseValue = wasm.Level_max();
4499 return nativeResponseValue;
4501 // void Logger_free(struct LDKLogger this_ptr);
4502 export function Logger_free(this_ptr: number): void {
4503 if(!isWasmInitialized) {
4504 throw new Error("initializeWasm() must be awaited first!");
4506 const nativeResponseValue = wasm.Logger_free(this_ptr);
4507 // debug statements here
4509 // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_ptr);
4510 export function ChannelHandshakeConfig_free(this_ptr: number): void {
4511 if(!isWasmInitialized) {
4512 throw new Error("initializeWasm() must be awaited first!");
4514 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_ptr);
4515 // debug statements here
4517 // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4518 export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
4519 if(!isWasmInitialized) {
4520 throw new Error("initializeWasm() must be awaited first!");
4522 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
4523 return nativeResponseValue;
4525 // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
4526 export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
4527 if(!isWasmInitialized) {
4528 throw new Error("initializeWasm() must be awaited first!");
4530 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
4531 // debug statements here
4533 // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4534 export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
4535 if(!isWasmInitialized) {
4536 throw new Error("initializeWasm() must be awaited first!");
4538 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
4539 return nativeResponseValue;
4541 // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
4542 export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
4543 if(!isWasmInitialized) {
4544 throw new Error("initializeWasm() must be awaited first!");
4546 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
4547 // debug statements here
4549 // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4550 export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
4551 if(!isWasmInitialized) {
4552 throw new Error("initializeWasm() must be awaited first!");
4554 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
4555 return nativeResponseValue;
4557 // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
4558 export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
4559 if(!isWasmInitialized) {
4560 throw new Error("initializeWasm() must be awaited first!");
4562 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
4563 // debug statements here
4565 // 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);
4566 export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
4567 if(!isWasmInitialized) {
4568 throw new Error("initializeWasm() must be awaited first!");
4570 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
4571 return nativeResponseValue;
4573 // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
4574 export function ChannelHandshakeConfig_clone(orig: number): number {
4575 if(!isWasmInitialized) {
4576 throw new Error("initializeWasm() must be awaited first!");
4578 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
4579 return nativeResponseValue;
4581 // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
4582 export function ChannelHandshakeConfig_default(): number {
4583 if(!isWasmInitialized) {
4584 throw new Error("initializeWasm() must be awaited first!");
4586 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
4587 return nativeResponseValue;
4589 // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_ptr);
4590 export function ChannelHandshakeLimits_free(this_ptr: number): void {
4591 if(!isWasmInitialized) {
4592 throw new Error("initializeWasm() must be awaited first!");
4594 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_ptr);
4595 // debug statements here
4597 // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4598 export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
4599 if(!isWasmInitialized) {
4600 throw new Error("initializeWasm() must be awaited first!");
4602 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
4603 return nativeResponseValue;
4605 // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4606 export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
4607 if(!isWasmInitialized) {
4608 throw new Error("initializeWasm() must be awaited first!");
4610 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
4611 // debug statements here
4613 // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4614 export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
4615 if(!isWasmInitialized) {
4616 throw new Error("initializeWasm() must be awaited first!");
4618 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
4619 return nativeResponseValue;
4621 // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4622 export function ChannelHandshakeLimits_set_max_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.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
4627 // debug statements here
4629 // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4630 export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
4631 if(!isWasmInitialized) {
4632 throw new Error("initializeWasm() must be awaited first!");
4634 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
4635 return nativeResponseValue;
4637 // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4638 export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
4639 if(!isWasmInitialized) {
4640 throw new Error("initializeWasm() must be awaited first!");
4642 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
4643 // debug statements here
4645 // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4646 export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
4647 if(!isWasmInitialized) {
4648 throw new Error("initializeWasm() must be awaited first!");
4650 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
4651 return nativeResponseValue;
4653 // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4654 export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
4655 if(!isWasmInitialized) {
4656 throw new Error("initializeWasm() must be awaited first!");
4658 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
4659 // debug statements here
4661 // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4662 export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
4663 if(!isWasmInitialized) {
4664 throw new Error("initializeWasm() must be awaited first!");
4666 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
4667 return nativeResponseValue;
4669 // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4670 export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(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_max_accepted_htlcs(this_ptr, val);
4675 // debug statements here
4677 // uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4678 export function ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr: number): number {
4679 if(!isWasmInitialized) {
4680 throw new Error("initializeWasm() must be awaited first!");
4682 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr);
4683 return nativeResponseValue;
4685 // void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4686 export function ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr: number, val: number): void {
4687 if(!isWasmInitialized) {
4688 throw new Error("initializeWasm() must be awaited first!");
4690 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr, val);
4691 // debug statements here
4693 // uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4694 export function ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr: number): number {
4695 if(!isWasmInitialized) {
4696 throw new Error("initializeWasm() must be awaited first!");
4698 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr);
4699 return nativeResponseValue;
4701 // void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4702 export function ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr: number, val: number): void {
4703 if(!isWasmInitialized) {
4704 throw new Error("initializeWasm() must be awaited first!");
4706 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr, val);
4707 // debug statements here
4709 // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4710 export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
4711 if(!isWasmInitialized) {
4712 throw new Error("initializeWasm() must be awaited first!");
4714 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
4715 return nativeResponseValue;
4717 // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
4718 export function ChannelHandshakeLimits_set_max_minimum_depth(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_minimum_depth(this_ptr, val);
4723 // debug statements here
4725 // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4726 export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
4727 if(!isWasmInitialized) {
4728 throw new Error("initializeWasm() must be awaited first!");
4730 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
4731 return nativeResponseValue;
4733 // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
4734 export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
4735 if(!isWasmInitialized) {
4736 throw new Error("initializeWasm() must be awaited first!");
4738 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
4739 // debug statements here
4741 // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4742 export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
4743 if(!isWasmInitialized) {
4744 throw new Error("initializeWasm() must be awaited first!");
4746 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
4747 return nativeResponseValue;
4749 // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4750 export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
4751 if(!isWasmInitialized) {
4752 throw new Error("initializeWasm() must be awaited first!");
4754 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
4755 // debug statements here
4757 // 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);
4758 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 {
4759 if(!isWasmInitialized) {
4760 throw new Error("initializeWasm() must be awaited first!");
4762 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);
4763 return nativeResponseValue;
4765 // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
4766 export function ChannelHandshakeLimits_clone(orig: number): number {
4767 if(!isWasmInitialized) {
4768 throw new Error("initializeWasm() must be awaited first!");
4770 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
4771 return nativeResponseValue;
4773 // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
4774 export function ChannelHandshakeLimits_default(): number {
4775 if(!isWasmInitialized) {
4776 throw new Error("initializeWasm() must be awaited first!");
4778 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
4779 return nativeResponseValue;
4781 // void ChannelConfig_free(struct LDKChannelConfig this_ptr);
4782 export function ChannelConfig_free(this_ptr: number): void {
4783 if(!isWasmInitialized) {
4784 throw new Error("initializeWasm() must be awaited first!");
4786 const nativeResponseValue = wasm.ChannelConfig_free(this_ptr);
4787 // debug statements here
4789 // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4790 export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
4791 if(!isWasmInitialized) {
4792 throw new Error("initializeWasm() must be awaited first!");
4794 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
4795 return nativeResponseValue;
4797 // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
4798 export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
4799 if(!isWasmInitialized) {
4800 throw new Error("initializeWasm() must be awaited first!");
4802 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
4803 // debug statements here
4805 // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4806 export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
4807 if(!isWasmInitialized) {
4808 throw new Error("initializeWasm() must be awaited first!");
4810 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
4811 return nativeResponseValue;
4813 // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
4814 export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
4815 if(!isWasmInitialized) {
4816 throw new Error("initializeWasm() must be awaited first!");
4818 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
4819 // debug statements here
4821 // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4822 export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
4823 if(!isWasmInitialized) {
4824 throw new Error("initializeWasm() must be awaited first!");
4826 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
4827 return nativeResponseValue;
4829 // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
4830 export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
4831 if(!isWasmInitialized) {
4832 throw new Error("initializeWasm() must be awaited first!");
4834 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
4835 // debug statements here
4837 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
4838 export function ChannelConfig_new(fee_proportional_millionths_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
4839 if(!isWasmInitialized) {
4840 throw new Error("initializeWasm() must be awaited first!");
4842 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
4843 return nativeResponseValue;
4845 // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
4846 export function ChannelConfig_clone(orig: number): number {
4847 if(!isWasmInitialized) {
4848 throw new Error("initializeWasm() must be awaited first!");
4850 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
4851 return nativeResponseValue;
4853 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
4854 export function ChannelConfig_default(): number {
4855 if(!isWasmInitialized) {
4856 throw new Error("initializeWasm() must be awaited first!");
4858 const nativeResponseValue = wasm.ChannelConfig_default();
4859 return nativeResponseValue;
4861 // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
4862 export function ChannelConfig_write(obj: number): Uint8Array {
4863 if(!isWasmInitialized) {
4864 throw new Error("initializeWasm() must be awaited first!");
4866 const nativeResponseValue = wasm.ChannelConfig_write(obj);
4867 return decodeArray(nativeResponseValue);
4869 // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
4870 export function ChannelConfig_read(ser: Uint8Array): number {
4871 if(!isWasmInitialized) {
4872 throw new Error("initializeWasm() must be awaited first!");
4874 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
4875 return nativeResponseValue;
4877 // void UserConfig_free(struct LDKUserConfig this_ptr);
4878 export function UserConfig_free(this_ptr: number): void {
4879 if(!isWasmInitialized) {
4880 throw new Error("initializeWasm() must be awaited first!");
4882 const nativeResponseValue = wasm.UserConfig_free(this_ptr);
4883 // debug statements here
4885 // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4886 export function UserConfig_get_own_channel_config(this_ptr: number): number {
4887 if(!isWasmInitialized) {
4888 throw new Error("initializeWasm() must be awaited first!");
4890 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
4891 return nativeResponseValue;
4893 // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
4894 export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
4895 if(!isWasmInitialized) {
4896 throw new Error("initializeWasm() must be awaited first!");
4898 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
4899 // debug statements here
4901 // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4902 export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
4903 if(!isWasmInitialized) {
4904 throw new Error("initializeWasm() must be awaited first!");
4906 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
4907 return nativeResponseValue;
4909 // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
4910 export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
4911 if(!isWasmInitialized) {
4912 throw new Error("initializeWasm() must be awaited first!");
4914 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
4915 // debug statements here
4917 // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4918 export function UserConfig_get_channel_options(this_ptr: number): number {
4919 if(!isWasmInitialized) {
4920 throw new Error("initializeWasm() must be awaited first!");
4922 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
4923 return nativeResponseValue;
4925 // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
4926 export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
4927 if(!isWasmInitialized) {
4928 throw new Error("initializeWasm() must be awaited first!");
4930 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
4931 // debug statements here
4933 // 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);
4934 export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
4935 if(!isWasmInitialized) {
4936 throw new Error("initializeWasm() must be awaited first!");
4938 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
4939 return nativeResponseValue;
4941 // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
4942 export function UserConfig_clone(orig: number): number {
4943 if(!isWasmInitialized) {
4944 throw new Error("initializeWasm() must be awaited first!");
4946 const nativeResponseValue = wasm.UserConfig_clone(orig);
4947 return nativeResponseValue;
4949 // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
4950 export function UserConfig_default(): number {
4951 if(!isWasmInitialized) {
4952 throw new Error("initializeWasm() must be awaited first!");
4954 const nativeResponseValue = wasm.UserConfig_default();
4955 return nativeResponseValue;
4957 // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
4958 export function AccessError_clone(orig: number): LDKAccessError {
4959 if(!isWasmInitialized) {
4960 throw new Error("initializeWasm() must be awaited first!");
4962 const nativeResponseValue = wasm.AccessError_clone(orig);
4963 return nativeResponseValue;
4965 // void Access_free(struct LDKAccess this_ptr);
4966 export function Access_free(this_ptr: number): void {
4967 if(!isWasmInitialized) {
4968 throw new Error("initializeWasm() must be awaited first!");
4970 const nativeResponseValue = wasm.Access_free(this_ptr);
4971 // debug statements here
4973 // void Listen_free(struct LDKListen this_ptr);
4974 export function Listen_free(this_ptr: number): void {
4975 if(!isWasmInitialized) {
4976 throw new Error("initializeWasm() must be awaited first!");
4978 const nativeResponseValue = wasm.Listen_free(this_ptr);
4979 // debug statements here
4981 // void Watch_free(struct LDKWatch this_ptr);
4982 export function Watch_free(this_ptr: number): void {
4983 if(!isWasmInitialized) {
4984 throw new Error("initializeWasm() must be awaited first!");
4986 const nativeResponseValue = wasm.Watch_free(this_ptr);
4987 // debug statements here
4989 // void Filter_free(struct LDKFilter this_ptr);
4990 export function Filter_free(this_ptr: number): void {
4991 if(!isWasmInitialized) {
4992 throw new Error("initializeWasm() must be awaited first!");
4994 const nativeResponseValue = wasm.Filter_free(this_ptr);
4995 // debug statements here
4997 // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
4998 export function BroadcasterInterface_free(this_ptr: number): void {
4999 if(!isWasmInitialized) {
5000 throw new Error("initializeWasm() must be awaited first!");
5002 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
5003 // debug statements here
5005 // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
5006 export function ConfirmationTarget_clone(orig: number): LDKConfirmationTarget {
5007 if(!isWasmInitialized) {
5008 throw new Error("initializeWasm() must be awaited first!");
5010 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
5011 return nativeResponseValue;
5013 // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
5014 export function FeeEstimator_free(this_ptr: number): void {
5015 if(!isWasmInitialized) {
5016 throw new Error("initializeWasm() must be awaited first!");
5018 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
5019 // debug statements here
5021 // void ChainMonitor_free(struct LDKChainMonitor this_ptr);
5022 export function ChainMonitor_free(this_ptr: number): void {
5023 if(!isWasmInitialized) {
5024 throw new Error("initializeWasm() must be awaited first!");
5026 const nativeResponseValue = wasm.ChainMonitor_free(this_ptr);
5027 // debug statements here
5029 // void ChainMonitor_block_connected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
5030 export function ChainMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
5031 if(!isWasmInitialized) {
5032 throw new Error("initializeWasm() must be awaited first!");
5034 const nativeResponseValue = wasm.ChainMonitor_block_connected(this_arg, encodeArray(header), txdata, height);
5035 // debug statements here
5037 // void ChainMonitor_block_disconnected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t disconnected_height);
5038 export function ChainMonitor_block_disconnected(this_arg: number, header: Uint8Array, disconnected_height: number): void {
5039 if(!isWasmInitialized) {
5040 throw new Error("initializeWasm() must be awaited first!");
5042 const nativeResponseValue = wasm.ChainMonitor_block_disconnected(this_arg, encodeArray(header), disconnected_height);
5043 // debug statements here
5045 // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
5046 export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
5047 if(!isWasmInitialized) {
5048 throw new Error("initializeWasm() must be awaited first!");
5050 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
5051 return nativeResponseValue;
5053 // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5054 export function ChainMonitor_as_Watch(this_arg: number): number {
5055 if(!isWasmInitialized) {
5056 throw new Error("initializeWasm() must be awaited first!");
5058 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
5059 return nativeResponseValue;
5061 // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5062 export function ChainMonitor_as_EventsProvider(this_arg: number): number {
5063 if(!isWasmInitialized) {
5064 throw new Error("initializeWasm() must be awaited first!");
5066 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
5067 return nativeResponseValue;
5069 // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_ptr);
5070 export function ChannelMonitorUpdate_free(this_ptr: number): void {
5071 if(!isWasmInitialized) {
5072 throw new Error("initializeWasm() must be awaited first!");
5074 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_ptr);
5075 // debug statements here
5077 // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
5078 export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
5079 if(!isWasmInitialized) {
5080 throw new Error("initializeWasm() must be awaited first!");
5082 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
5083 return nativeResponseValue;
5085 // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
5086 export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
5087 if(!isWasmInitialized) {
5088 throw new Error("initializeWasm() must be awaited first!");
5090 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
5091 // debug statements here
5093 // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
5094 export function ChannelMonitorUpdate_clone(orig: number): number {
5095 if(!isWasmInitialized) {
5096 throw new Error("initializeWasm() must be awaited first!");
5098 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
5099 return nativeResponseValue;
5101 // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
5102 export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
5103 if(!isWasmInitialized) {
5104 throw new Error("initializeWasm() must be awaited first!");
5106 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
5107 return decodeArray(nativeResponseValue);
5109 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
5110 export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
5111 if(!isWasmInitialized) {
5112 throw new Error("initializeWasm() must be awaited first!");
5114 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
5115 return nativeResponseValue;
5117 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
5118 export function ChannelMonitorUpdateErr_clone(orig: number): LDKChannelMonitorUpdateErr {
5119 if(!isWasmInitialized) {
5120 throw new Error("initializeWasm() must be awaited first!");
5122 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
5123 return nativeResponseValue;
5125 // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_ptr);
5126 export function MonitorUpdateError_free(this_ptr: number): void {
5127 if(!isWasmInitialized) {
5128 throw new Error("initializeWasm() must be awaited first!");
5130 const nativeResponseValue = wasm.MonitorUpdateError_free(this_ptr);
5131 // debug statements here
5133 // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
5134 export function MonitorUpdateError_clone(orig: number): number {
5135 if(!isWasmInitialized) {
5136 throw new Error("initializeWasm() must be awaited first!");
5138 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
5139 return nativeResponseValue;
5141 // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
5142 export function MonitorEvent_free(this_ptr: number): void {
5143 if(!isWasmInitialized) {
5144 throw new Error("initializeWasm() must be awaited first!");
5146 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
5147 // debug statements here
5149 // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
5150 export function MonitorEvent_clone(orig: number): number {
5151 if(!isWasmInitialized) {
5152 throw new Error("initializeWasm() must be awaited first!");
5154 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
5155 return nativeResponseValue;
5157 // void HTLCUpdate_free(struct LDKHTLCUpdate this_ptr);
5158 export function HTLCUpdate_free(this_ptr: number): void {
5159 if(!isWasmInitialized) {
5160 throw new Error("initializeWasm() must be awaited first!");
5162 const nativeResponseValue = wasm.HTLCUpdate_free(this_ptr);
5163 // debug statements here
5165 // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
5166 export function HTLCUpdate_clone(orig: number): number {
5167 if(!isWasmInitialized) {
5168 throw new Error("initializeWasm() must be awaited first!");
5170 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
5171 return nativeResponseValue;
5173 // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
5174 export function HTLCUpdate_write(obj: number): Uint8Array {
5175 if(!isWasmInitialized) {
5176 throw new Error("initializeWasm() must be awaited first!");
5178 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
5179 return decodeArray(nativeResponseValue);
5181 // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
5182 export function HTLCUpdate_read(ser: Uint8Array): number {
5183 if(!isWasmInitialized) {
5184 throw new Error("initializeWasm() must be awaited first!");
5186 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
5187 return nativeResponseValue;
5189 // void ChannelMonitor_free(struct LDKChannelMonitor this_ptr);
5190 export function ChannelMonitor_free(this_ptr: number): void {
5191 if(!isWasmInitialized) {
5192 throw new Error("initializeWasm() must be awaited first!");
5194 const nativeResponseValue = wasm.ChannelMonitor_free(this_ptr);
5195 // debug statements here
5197 // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
5198 export function ChannelMonitor_clone(orig: number): number {
5199 if(!isWasmInitialized) {
5200 throw new Error("initializeWasm() must be awaited first!");
5202 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
5203 return nativeResponseValue;
5205 // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
5206 export function ChannelMonitor_write(obj: number): Uint8Array {
5207 if(!isWasmInitialized) {
5208 throw new Error("initializeWasm() must be awaited first!");
5210 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
5211 return decodeArray(nativeResponseValue);
5213 // 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);
5214 export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
5215 if(!isWasmInitialized) {
5216 throw new Error("initializeWasm() must be awaited first!");
5218 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
5219 return nativeResponseValue;
5221 // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5222 export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
5223 if(!isWasmInitialized) {
5224 throw new Error("initializeWasm() must be awaited first!");
5226 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
5227 return nativeResponseValue;
5229 // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5230 export function ChannelMonitor_get_funding_txo(this_arg: number): number {
5231 if(!isWasmInitialized) {
5232 throw new Error("initializeWasm() must be awaited first!");
5234 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
5235 return nativeResponseValue;
5237 // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5238 export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
5239 if(!isWasmInitialized) {
5240 throw new Error("initializeWasm() must be awaited first!");
5242 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
5243 return nativeResponseValue;
5245 // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5246 export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
5247 if(!isWasmInitialized) {
5248 throw new Error("initializeWasm() must be awaited first!");
5250 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
5251 return nativeResponseValue;
5253 // 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);
5254 export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
5255 if(!isWasmInitialized) {
5256 throw new Error("initializeWasm() must be awaited first!");
5258 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
5259 return nativeResponseValue;
5261 // 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);
5262 export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5263 if(!isWasmInitialized) {
5264 throw new Error("initializeWasm() must be awaited first!");
5266 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
5267 return nativeResponseValue;
5269 // 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);
5270 export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
5271 if(!isWasmInitialized) {
5272 throw new Error("initializeWasm() must be awaited first!");
5274 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
5275 // debug statements here
5277 // void Persist_free(struct LDKPersist this_ptr);
5278 export function Persist_free(this_ptr: number): void {
5279 if(!isWasmInitialized) {
5280 throw new Error("initializeWasm() must be awaited first!");
5282 const nativeResponseValue = wasm.Persist_free(this_ptr);
5283 // debug statements here
5285 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
5286 export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
5287 if(!isWasmInitialized) {
5288 throw new Error("initializeWasm() must be awaited first!");
5290 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
5291 return nativeResponseValue;
5293 // void OutPoint_free(struct LDKOutPoint this_ptr);
5294 export function OutPoint_free(this_ptr: number): void {
5295 if(!isWasmInitialized) {
5296 throw new Error("initializeWasm() must be awaited first!");
5298 const nativeResponseValue = wasm.OutPoint_free(this_ptr);
5299 // debug statements here
5301 // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
5302 export function OutPoint_get_txid(this_ptr: number): Uint8Array {
5303 if(!isWasmInitialized) {
5304 throw new Error("initializeWasm() must be awaited first!");
5306 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
5307 return decodeArray(nativeResponseValue);
5309 // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5310 export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
5311 if(!isWasmInitialized) {
5312 throw new Error("initializeWasm() must be awaited first!");
5314 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
5315 // debug statements here
5317 // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
5318 export function OutPoint_get_index(this_ptr: number): number {
5319 if(!isWasmInitialized) {
5320 throw new Error("initializeWasm() must be awaited first!");
5322 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
5323 return nativeResponseValue;
5325 // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
5326 export function OutPoint_set_index(this_ptr: number, val: number): void {
5327 if(!isWasmInitialized) {
5328 throw new Error("initializeWasm() must be awaited first!");
5330 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
5331 // debug statements here
5333 // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
5334 export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
5335 if(!isWasmInitialized) {
5336 throw new Error("initializeWasm() must be awaited first!");
5338 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
5339 return nativeResponseValue;
5341 // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
5342 export function OutPoint_clone(orig: number): number {
5343 if(!isWasmInitialized) {
5344 throw new Error("initializeWasm() must be awaited first!");
5346 const nativeResponseValue = wasm.OutPoint_clone(orig);
5347 return nativeResponseValue;
5349 // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
5350 export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
5351 if(!isWasmInitialized) {
5352 throw new Error("initializeWasm() must be awaited first!");
5354 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
5355 return decodeArray(nativeResponseValue);
5357 // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
5358 export function OutPoint_write(obj: number): Uint8Array {
5359 if(!isWasmInitialized) {
5360 throw new Error("initializeWasm() must be awaited first!");
5362 const nativeResponseValue = wasm.OutPoint_write(obj);
5363 return decodeArray(nativeResponseValue);
5365 // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
5366 export function OutPoint_read(ser: Uint8Array): number {
5367 if(!isWasmInitialized) {
5368 throw new Error("initializeWasm() must be awaited first!");
5370 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
5371 return nativeResponseValue;
5373 // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_ptr);
5374 export function DelayedPaymentOutputDescriptor_free(this_ptr: number): void {
5375 if(!isWasmInitialized) {
5376 throw new Error("initializeWasm() must be awaited first!");
5378 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_ptr);
5379 // debug statements here
5381 // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5382 export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5383 if(!isWasmInitialized) {
5384 throw new Error("initializeWasm() must be awaited first!");
5386 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
5387 return nativeResponseValue;
5389 // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5390 export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5391 if(!isWasmInitialized) {
5392 throw new Error("initializeWasm() must be awaited first!");
5394 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5395 // debug statements here
5397 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5398 export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
5399 if(!isWasmInitialized) {
5400 throw new Error("initializeWasm() must be awaited first!");
5402 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
5403 return decodeArray(nativeResponseValue);
5405 // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5406 export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5407 if(!isWasmInitialized) {
5408 throw new Error("initializeWasm() must be awaited first!");
5410 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
5411 // debug statements here
5413 // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5414 export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
5415 if(!isWasmInitialized) {
5416 throw new Error("initializeWasm() must be awaited first!");
5418 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
5419 return nativeResponseValue;
5421 // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
5422 export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
5423 if(!isWasmInitialized) {
5424 throw new Error("initializeWasm() must be awaited first!");
5426 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
5427 // debug statements here
5429 // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5430 export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5431 if(!isWasmInitialized) {
5432 throw new Error("initializeWasm() must be awaited first!");
5434 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
5435 // debug statements here
5437 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5438 export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
5439 if(!isWasmInitialized) {
5440 throw new Error("initializeWasm() must be awaited first!");
5442 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
5443 return decodeArray(nativeResponseValue);
5445 // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5446 export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
5447 if(!isWasmInitialized) {
5448 throw new Error("initializeWasm() must be awaited first!");
5450 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
5451 // debug statements here
5453 // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5454 export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5455 if(!isWasmInitialized) {
5456 throw new Error("initializeWasm() must be awaited first!");
5458 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5459 return decodeArray(nativeResponseValue);
5461 // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5462 export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5463 if(!isWasmInitialized) {
5464 throw new Error("initializeWasm() must be awaited first!");
5466 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5467 // debug statements here
5469 // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5470 export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5471 if(!isWasmInitialized) {
5472 throw new Error("initializeWasm() must be awaited first!");
5474 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5475 return nativeResponseValue;
5477 // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5478 export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5479 if(!isWasmInitialized) {
5480 throw new Error("initializeWasm() must be awaited first!");
5482 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5483 // debug statements here
5485 // 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);
5486 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 {
5487 if(!isWasmInitialized) {
5488 throw new Error("initializeWasm() must be awaited first!");
5490 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);
5491 return nativeResponseValue;
5493 // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
5494 export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
5495 if(!isWasmInitialized) {
5496 throw new Error("initializeWasm() must be awaited first!");
5498 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
5499 return nativeResponseValue;
5501 // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_ptr);
5502 export function StaticPaymentOutputDescriptor_free(this_ptr: number): void {
5503 if(!isWasmInitialized) {
5504 throw new Error("initializeWasm() must be awaited first!");
5506 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_ptr);
5507 // debug statements here
5509 // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5510 export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5511 if(!isWasmInitialized) {
5512 throw new Error("initializeWasm() must be awaited first!");
5514 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
5515 return nativeResponseValue;
5517 // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5518 export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5519 if(!isWasmInitialized) {
5520 throw new Error("initializeWasm() must be awaited first!");
5522 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5523 // debug statements here
5525 // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5526 export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5527 if(!isWasmInitialized) {
5528 throw new Error("initializeWasm() must be awaited first!");
5530 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
5531 // debug statements here
5533 // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5534 export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5535 if(!isWasmInitialized) {
5536 throw new Error("initializeWasm() must be awaited first!");
5538 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5539 return decodeArray(nativeResponseValue);
5541 // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5542 export function StaticPaymentOutputDescriptor_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.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5547 // debug statements here
5549 // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5550 export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5551 if(!isWasmInitialized) {
5552 throw new Error("initializeWasm() must be awaited first!");
5554 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5555 return nativeResponseValue;
5557 // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5558 export function StaticPaymentOutputDescriptor_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.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5563 // debug statements here
5565 // 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);
5566 export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, 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.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
5571 return nativeResponseValue;
5573 // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
5574 export function StaticPaymentOutputDescriptor_clone(orig: number): number {
5575 if(!isWasmInitialized) {
5576 throw new Error("initializeWasm() must be awaited first!");
5578 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
5579 return nativeResponseValue;
5581 // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
5582 export function SpendableOutputDescriptor_free(this_ptr: number): void {
5583 if(!isWasmInitialized) {
5584 throw new Error("initializeWasm() must be awaited first!");
5586 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
5587 // debug statements here
5589 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
5590 export function SpendableOutputDescriptor_clone(orig: number): number {
5591 if(!isWasmInitialized) {
5592 throw new Error("initializeWasm() must be awaited first!");
5594 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
5595 return nativeResponseValue;
5597 // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
5598 export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
5599 if(!isWasmInitialized) {
5600 throw new Error("initializeWasm() must be awaited first!");
5602 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
5603 return decodeArray(nativeResponseValue);
5605 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
5606 export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
5607 if(!isWasmInitialized) {
5608 throw new Error("initializeWasm() must be awaited first!");
5610 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
5611 return nativeResponseValue;
5613 // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
5614 export function Sign_clone(orig: number): number {
5615 if(!isWasmInitialized) {
5616 throw new Error("initializeWasm() must be awaited first!");
5618 const nativeResponseValue = wasm.Sign_clone(orig);
5619 return nativeResponseValue;
5621 // void Sign_free(struct LDKSign this_ptr);
5622 export function Sign_free(this_ptr: number): void {
5623 if(!isWasmInitialized) {
5624 throw new Error("initializeWasm() must be awaited first!");
5626 const nativeResponseValue = wasm.Sign_free(this_ptr);
5627 // debug statements here
5629 // void KeysInterface_free(struct LDKKeysInterface this_ptr);
5630 export function KeysInterface_free(this_ptr: number): void {
5631 if(!isWasmInitialized) {
5632 throw new Error("initializeWasm() must be awaited first!");
5634 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
5635 // debug statements here
5637 // void InMemorySigner_free(struct LDKInMemorySigner this_ptr);
5638 export function InMemorySigner_free(this_ptr: number): void {
5639 if(!isWasmInitialized) {
5640 throw new Error("initializeWasm() must be awaited first!");
5642 const nativeResponseValue = wasm.InMemorySigner_free(this_ptr);
5643 // debug statements here
5645 // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5646 export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
5647 if(!isWasmInitialized) {
5648 throw new Error("initializeWasm() must be awaited first!");
5650 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
5651 return decodeArray(nativeResponseValue);
5653 // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5654 export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
5655 if(!isWasmInitialized) {
5656 throw new Error("initializeWasm() must be awaited first!");
5658 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
5659 // debug statements here
5661 // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5662 export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
5663 if(!isWasmInitialized) {
5664 throw new Error("initializeWasm() must be awaited first!");
5666 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
5667 return decodeArray(nativeResponseValue);
5669 // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5670 export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
5671 if(!isWasmInitialized) {
5672 throw new Error("initializeWasm() must be awaited first!");
5674 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
5675 // debug statements here
5677 // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5678 export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
5679 if(!isWasmInitialized) {
5680 throw new Error("initializeWasm() must be awaited first!");
5682 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
5683 return decodeArray(nativeResponseValue);
5685 // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5686 export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
5687 if(!isWasmInitialized) {
5688 throw new Error("initializeWasm() must be awaited first!");
5690 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
5691 // debug statements here
5693 // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5694 export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
5695 if(!isWasmInitialized) {
5696 throw new Error("initializeWasm() must be awaited first!");
5698 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
5699 return decodeArray(nativeResponseValue);
5701 // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5702 export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
5703 if(!isWasmInitialized) {
5704 throw new Error("initializeWasm() must be awaited first!");
5706 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
5707 // debug statements here
5709 // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5710 export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
5711 if(!isWasmInitialized) {
5712 throw new Error("initializeWasm() must be awaited first!");
5714 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
5715 return decodeArray(nativeResponseValue);
5717 // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5718 export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
5719 if(!isWasmInitialized) {
5720 throw new Error("initializeWasm() must be awaited first!");
5722 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
5723 // debug statements here
5725 // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5726 export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
5727 if(!isWasmInitialized) {
5728 throw new Error("initializeWasm() must be awaited first!");
5730 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
5731 return decodeArray(nativeResponseValue);
5733 // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5734 export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
5735 if(!isWasmInitialized) {
5736 throw new Error("initializeWasm() must be awaited first!");
5738 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
5739 // debug statements here
5741 // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
5742 export function InMemorySigner_clone(orig: number): number {
5743 if(!isWasmInitialized) {
5744 throw new Error("initializeWasm() must be awaited first!");
5746 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
5747 return nativeResponseValue;
5749 // 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);
5750 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 {
5751 if(!isWasmInitialized) {
5752 throw new Error("initializeWasm() must be awaited first!");
5754 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));
5755 return nativeResponseValue;
5757 // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5758 export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
5759 if(!isWasmInitialized) {
5760 throw new Error("initializeWasm() must be awaited first!");
5762 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
5763 return nativeResponseValue;
5765 // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5766 export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
5767 if(!isWasmInitialized) {
5768 throw new Error("initializeWasm() must be awaited first!");
5770 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
5771 return nativeResponseValue;
5773 // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5774 export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
5775 if(!isWasmInitialized) {
5776 throw new Error("initializeWasm() must be awaited first!");
5778 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
5779 return nativeResponseValue;
5781 // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5782 export function InMemorySigner_is_outbound(this_arg: number): boolean {
5783 if(!isWasmInitialized) {
5784 throw new Error("initializeWasm() must be awaited first!");
5786 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
5787 return nativeResponseValue;
5789 // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5790 export function InMemorySigner_funding_outpoint(this_arg: number): number {
5791 if(!isWasmInitialized) {
5792 throw new Error("initializeWasm() must be awaited first!");
5794 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
5795 return nativeResponseValue;
5797 // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5798 export function InMemorySigner_get_channel_parameters(this_arg: number): number {
5799 if(!isWasmInitialized) {
5800 throw new Error("initializeWasm() must be awaited first!");
5802 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
5803 return nativeResponseValue;
5805 // 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);
5806 export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
5807 if(!isWasmInitialized) {
5808 throw new Error("initializeWasm() must be awaited first!");
5810 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
5811 return nativeResponseValue;
5813 // 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);
5814 export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
5815 if(!isWasmInitialized) {
5816 throw new Error("initializeWasm() must be awaited first!");
5818 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
5819 return nativeResponseValue;
5821 // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
5822 export function InMemorySigner_as_Sign(this_arg: number): number {
5823 if(!isWasmInitialized) {
5824 throw new Error("initializeWasm() must be awaited first!");
5826 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
5827 return nativeResponseValue;
5829 // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
5830 export function InMemorySigner_write(obj: number): Uint8Array {
5831 if(!isWasmInitialized) {
5832 throw new Error("initializeWasm() must be awaited first!");
5834 const nativeResponseValue = wasm.InMemorySigner_write(obj);
5835 return decodeArray(nativeResponseValue);
5837 // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
5838 export function InMemorySigner_read(ser: Uint8Array): number {
5839 if(!isWasmInitialized) {
5840 throw new Error("initializeWasm() must be awaited first!");
5842 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
5843 return nativeResponseValue;
5845 // void KeysManager_free(struct LDKKeysManager this_ptr);
5846 export function KeysManager_free(this_ptr: number): void {
5847 if(!isWasmInitialized) {
5848 throw new Error("initializeWasm() must be awaited first!");
5850 const nativeResponseValue = wasm.KeysManager_free(this_ptr);
5851 // debug statements here
5853 // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
5854 export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
5855 if(!isWasmInitialized) {
5856 throw new Error("initializeWasm() must be awaited first!");
5858 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
5859 return nativeResponseValue;
5861 // 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]);
5862 export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
5863 if(!isWasmInitialized) {
5864 throw new Error("initializeWasm() must be awaited first!");
5866 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
5867 return nativeResponseValue;
5869 // 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);
5870 export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
5871 if(!isWasmInitialized) {
5872 throw new Error("initializeWasm() must be awaited first!");
5874 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
5875 return nativeResponseValue;
5877 // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
5878 export function KeysManager_as_KeysInterface(this_arg: number): number {
5879 if(!isWasmInitialized) {
5880 throw new Error("initializeWasm() must be awaited first!");
5882 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
5883 return nativeResponseValue;
5885 // void ChannelManager_free(struct LDKChannelManager this_ptr);
5886 export function ChannelManager_free(this_ptr: number): void {
5887 if(!isWasmInitialized) {
5888 throw new Error("initializeWasm() must be awaited first!");
5890 const nativeResponseValue = wasm.ChannelManager_free(this_ptr);
5891 // debug statements here
5893 // void ChainParameters_free(struct LDKChainParameters this_ptr);
5894 export function ChainParameters_free(this_ptr: number): void {
5895 if(!isWasmInitialized) {
5896 throw new Error("initializeWasm() must be awaited first!");
5898 const nativeResponseValue = wasm.ChainParameters_free(this_ptr);
5899 // debug statements here
5901 // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
5902 export function ChainParameters_get_network(this_ptr: number): LDKNetwork {
5903 if(!isWasmInitialized) {
5904 throw new Error("initializeWasm() must be awaited first!");
5906 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
5907 return nativeResponseValue;
5909 // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
5910 export function ChainParameters_set_network(this_ptr: number, val: LDKNetwork): void {
5911 if(!isWasmInitialized) {
5912 throw new Error("initializeWasm() must be awaited first!");
5914 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
5915 // debug statements here
5917 // const uint8_t (*ChainParameters_get_latest_hash(const struct LDKChainParameters *NONNULL_PTR this_ptr))[32];
5918 export function ChainParameters_get_latest_hash(this_ptr: number): Uint8Array {
5919 if(!isWasmInitialized) {
5920 throw new Error("initializeWasm() must be awaited first!");
5922 const nativeResponseValue = wasm.ChainParameters_get_latest_hash(this_ptr);
5923 return decodeArray(nativeResponseValue);
5925 // void ChainParameters_set_latest_hash(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5926 export function ChainParameters_set_latest_hash(this_ptr: number, val: Uint8Array): void {
5927 if(!isWasmInitialized) {
5928 throw new Error("initializeWasm() must be awaited first!");
5930 const nativeResponseValue = wasm.ChainParameters_set_latest_hash(this_ptr, encodeArray(val));
5931 // debug statements here
5933 // uintptr_t ChainParameters_get_latest_height(const struct LDKChainParameters *NONNULL_PTR this_ptr);
5934 export function ChainParameters_get_latest_height(this_ptr: number): number {
5935 if(!isWasmInitialized) {
5936 throw new Error("initializeWasm() must be awaited first!");
5938 const nativeResponseValue = wasm.ChainParameters_get_latest_height(this_ptr);
5939 return nativeResponseValue;
5941 // void ChainParameters_set_latest_height(struct LDKChainParameters *NONNULL_PTR this_ptr, uintptr_t val);
5942 export function ChainParameters_set_latest_height(this_ptr: number, val: number): void {
5943 if(!isWasmInitialized) {
5944 throw new Error("initializeWasm() must be awaited first!");
5946 const nativeResponseValue = wasm.ChainParameters_set_latest_height(this_ptr, val);
5947 // debug statements here
5949 // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKThirtyTwoBytes latest_hash_arg, uintptr_t latest_height_arg);
5950 export function ChainParameters_new(network_arg: LDKNetwork, latest_hash_arg: Uint8Array, latest_height_arg: number): number {
5951 if(!isWasmInitialized) {
5952 throw new Error("initializeWasm() must be awaited first!");
5954 const nativeResponseValue = wasm.ChainParameters_new(network_arg, encodeArray(latest_hash_arg), latest_height_arg);
5955 return nativeResponseValue;
5957 // void ChannelDetails_free(struct LDKChannelDetails this_ptr);
5958 export function ChannelDetails_free(this_ptr: number): void {
5959 if(!isWasmInitialized) {
5960 throw new Error("initializeWasm() must be awaited first!");
5962 const nativeResponseValue = wasm.ChannelDetails_free(this_ptr);
5963 // debug statements here
5965 // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
5966 export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
5967 if(!isWasmInitialized) {
5968 throw new Error("initializeWasm() must be awaited first!");
5970 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
5971 return decodeArray(nativeResponseValue);
5973 // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5974 export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
5975 if(!isWasmInitialized) {
5976 throw new Error("initializeWasm() must be awaited first!");
5978 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
5979 // debug statements here
5981 // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
5982 export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
5983 if(!isWasmInitialized) {
5984 throw new Error("initializeWasm() must be awaited first!");
5986 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
5987 return decodeArray(nativeResponseValue);
5989 // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5990 export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
5991 if(!isWasmInitialized) {
5992 throw new Error("initializeWasm() must be awaited first!");
5994 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
5995 // debug statements here
5997 // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
5998 export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
5999 if(!isWasmInitialized) {
6000 throw new Error("initializeWasm() must be awaited first!");
6002 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
6003 return nativeResponseValue;
6005 // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6006 export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
6007 if(!isWasmInitialized) {
6008 throw new Error("initializeWasm() must be awaited first!");
6010 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
6011 // debug statements here
6013 // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6014 export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
6015 if(!isWasmInitialized) {
6016 throw new Error("initializeWasm() must be awaited first!");
6018 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
6019 return nativeResponseValue;
6021 // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6022 export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
6023 if(!isWasmInitialized) {
6024 throw new Error("initializeWasm() must be awaited first!");
6026 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
6027 // debug statements here
6029 // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6030 export function ChannelDetails_get_user_id(this_ptr: number): number {
6031 if(!isWasmInitialized) {
6032 throw new Error("initializeWasm() must be awaited first!");
6034 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
6035 return nativeResponseValue;
6037 // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6038 export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
6039 if(!isWasmInitialized) {
6040 throw new Error("initializeWasm() must be awaited first!");
6042 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
6043 // debug statements here
6045 // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6046 export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
6047 if(!isWasmInitialized) {
6048 throw new Error("initializeWasm() must be awaited first!");
6050 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
6051 return nativeResponseValue;
6053 // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6054 export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
6055 if(!isWasmInitialized) {
6056 throw new Error("initializeWasm() must be awaited first!");
6058 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
6059 // debug statements here
6061 // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6062 export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
6063 if(!isWasmInitialized) {
6064 throw new Error("initializeWasm() must be awaited first!");
6066 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
6067 return nativeResponseValue;
6069 // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6070 export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
6071 if(!isWasmInitialized) {
6072 throw new Error("initializeWasm() must be awaited first!");
6074 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
6075 // debug statements here
6077 // bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6078 export function ChannelDetails_get_is_live(this_ptr: number): boolean {
6079 if(!isWasmInitialized) {
6080 throw new Error("initializeWasm() must be awaited first!");
6082 const nativeResponseValue = wasm.ChannelDetails_get_is_live(this_ptr);
6083 return nativeResponseValue;
6085 // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
6086 export function ChannelDetails_set_is_live(this_ptr: number, val: boolean): void {
6087 if(!isWasmInitialized) {
6088 throw new Error("initializeWasm() must be awaited first!");
6090 const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
6091 // debug statements here
6093 // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
6094 export function ChannelDetails_clone(orig: number): number {
6095 if(!isWasmInitialized) {
6096 throw new Error("initializeWasm() must be awaited first!");
6098 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
6099 return nativeResponseValue;
6101 // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
6102 export function PaymentSendFailure_free(this_ptr: number): void {
6103 if(!isWasmInitialized) {
6104 throw new Error("initializeWasm() must be awaited first!");
6106 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
6107 // debug statements here
6109 // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
6110 export function PaymentSendFailure_clone(orig: number): number {
6111 if(!isWasmInitialized) {
6112 throw new Error("initializeWasm() must be awaited first!");
6114 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
6115 return nativeResponseValue;
6117 // 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);
6118 export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
6119 if(!isWasmInitialized) {
6120 throw new Error("initializeWasm() must be awaited first!");
6122 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
6123 return nativeResponseValue;
6125 // 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);
6126 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 {
6127 if(!isWasmInitialized) {
6128 throw new Error("initializeWasm() must be awaited first!");
6130 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
6131 return nativeResponseValue;
6133 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6134 export function ChannelManager_list_channels(this_arg: number): number[] {
6135 if(!isWasmInitialized) {
6136 throw new Error("initializeWasm() must be awaited first!");
6138 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
6139 return nativeResponseValue;
6141 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6142 export function ChannelManager_list_usable_channels(this_arg: number): number[] {
6143 if(!isWasmInitialized) {
6144 throw new Error("initializeWasm() must be awaited first!");
6146 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
6147 return nativeResponseValue;
6149 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6150 export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
6151 if(!isWasmInitialized) {
6152 throw new Error("initializeWasm() must be awaited first!");
6154 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
6155 return nativeResponseValue;
6157 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6158 export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
6159 if(!isWasmInitialized) {
6160 throw new Error("initializeWasm() must be awaited first!");
6162 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
6163 return nativeResponseValue;
6165 // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6166 export function ChannelManager_force_close_all_channels(this_arg: number): void {
6167 if(!isWasmInitialized) {
6168 throw new Error("initializeWasm() must be awaited first!");
6170 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
6171 // debug statements here
6173 // 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);
6174 export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
6175 if(!isWasmInitialized) {
6176 throw new Error("initializeWasm() must be awaited first!");
6178 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
6179 return nativeResponseValue;
6181 // void ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKOutPoint funding_txo);
6182 export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_txo: number): void {
6183 if(!isWasmInitialized) {
6184 throw new Error("initializeWasm() must be awaited first!");
6186 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), funding_txo);
6187 // debug statements here
6189 // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
6190 export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
6191 if(!isWasmInitialized) {
6192 throw new Error("initializeWasm() must be awaited first!");
6194 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
6195 // debug statements here
6197 // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
6198 export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
6199 if(!isWasmInitialized) {
6200 throw new Error("initializeWasm() must be awaited first!");
6202 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
6203 // debug statements here
6205 // void ChannelManager_timer_chan_freshness_every_min(const struct LDKChannelManager *NONNULL_PTR this_arg);
6206 export function ChannelManager_timer_chan_freshness_every_min(this_arg: number): void {
6207 if(!isWasmInitialized) {
6208 throw new Error("initializeWasm() must be awaited first!");
6210 const nativeResponseValue = wasm.ChannelManager_timer_chan_freshness_every_min(this_arg);
6211 // debug statements here
6213 // 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);
6214 export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): boolean {
6215 if(!isWasmInitialized) {
6216 throw new Error("initializeWasm() must be awaited first!");
6218 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash), encodeArray(payment_secret));
6219 return nativeResponseValue;
6221 // 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);
6222 export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array, payment_secret: Uint8Array, expected_amount: number): boolean {
6223 if(!isWasmInitialized) {
6224 throw new Error("initializeWasm() must be awaited first!");
6226 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage), encodeArray(payment_secret), expected_amount);
6227 return nativeResponseValue;
6229 // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
6230 export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
6231 if(!isWasmInitialized) {
6232 throw new Error("initializeWasm() must be awaited first!");
6234 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
6235 return decodeArray(nativeResponseValue);
6237 // 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);
6238 export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
6239 if(!isWasmInitialized) {
6240 throw new Error("initializeWasm() must be awaited first!");
6242 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
6243 // debug statements here
6245 // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6246 export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
6247 if(!isWasmInitialized) {
6248 throw new Error("initializeWasm() must be awaited first!");
6250 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
6251 return nativeResponseValue;
6253 // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6254 export function ChannelManager_as_EventsProvider(this_arg: number): number {
6255 if(!isWasmInitialized) {
6256 throw new Error("initializeWasm() must be awaited first!");
6258 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
6259 return nativeResponseValue;
6261 // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
6262 export function ChannelManager_as_Listen(this_arg: number): number {
6263 if(!isWasmInitialized) {
6264 throw new Error("initializeWasm() must be awaited first!");
6266 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
6267 return nativeResponseValue;
6269 // void ChannelManager_block_connected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
6270 export function ChannelManager_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
6271 if(!isWasmInitialized) {
6272 throw new Error("initializeWasm() must be awaited first!");
6274 const nativeResponseValue = wasm.ChannelManager_block_connected(this_arg, encodeArray(header), txdata, height);
6275 // debug statements here
6277 // void ChannelManager_block_disconnected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80]);
6278 export function ChannelManager_block_disconnected(this_arg: number, header: Uint8Array): void {
6279 if(!isWasmInitialized) {
6280 throw new Error("initializeWasm() must be awaited first!");
6282 const nativeResponseValue = wasm.ChannelManager_block_disconnected(this_arg, encodeArray(header));
6283 // debug statements here
6285 // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
6286 export function ChannelManager_await_persistable_update(this_arg: number): void {
6287 if(!isWasmInitialized) {
6288 throw new Error("initializeWasm() must be awaited first!");
6290 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
6291 // debug statements here
6293 // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
6294 export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
6295 if(!isWasmInitialized) {
6296 throw new Error("initializeWasm() must be awaited first!");
6298 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
6299 return nativeResponseValue;
6301 // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
6302 export function ChannelManager_write(obj: number): Uint8Array {
6303 if(!isWasmInitialized) {
6304 throw new Error("initializeWasm() must be awaited first!");
6306 const nativeResponseValue = wasm.ChannelManager_write(obj);
6307 return decodeArray(nativeResponseValue);
6309 // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_ptr);
6310 export function ChannelManagerReadArgs_free(this_ptr: number): void {
6311 if(!isWasmInitialized) {
6312 throw new Error("initializeWasm() must be awaited first!");
6314 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_ptr);
6315 // debug statements here
6317 // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6318 export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
6319 if(!isWasmInitialized) {
6320 throw new Error("initializeWasm() must be awaited first!");
6322 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
6323 return nativeResponseValue;
6325 // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
6326 export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
6327 if(!isWasmInitialized) {
6328 throw new Error("initializeWasm() must be awaited first!");
6330 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
6331 // debug statements here
6333 // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6334 export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
6335 if(!isWasmInitialized) {
6336 throw new Error("initializeWasm() must be awaited first!");
6338 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
6339 return nativeResponseValue;
6341 // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
6342 export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
6343 if(!isWasmInitialized) {
6344 throw new Error("initializeWasm() must be awaited first!");
6346 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
6347 // debug statements here
6349 // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6350 export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
6351 if(!isWasmInitialized) {
6352 throw new Error("initializeWasm() must be awaited first!");
6354 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
6355 return nativeResponseValue;
6357 // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
6358 export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
6359 if(!isWasmInitialized) {
6360 throw new Error("initializeWasm() must be awaited first!");
6362 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
6363 // debug statements here
6365 // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6366 export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
6367 if(!isWasmInitialized) {
6368 throw new Error("initializeWasm() must be awaited first!");
6370 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
6371 return nativeResponseValue;
6373 // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
6374 export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
6375 if(!isWasmInitialized) {
6376 throw new Error("initializeWasm() must be awaited first!");
6378 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
6379 // debug statements here
6381 // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6382 export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
6383 if(!isWasmInitialized) {
6384 throw new Error("initializeWasm() must be awaited first!");
6386 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
6387 return nativeResponseValue;
6389 // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
6390 export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
6391 if(!isWasmInitialized) {
6392 throw new Error("initializeWasm() must be awaited first!");
6394 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
6395 // debug statements here
6397 // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6398 export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
6399 if(!isWasmInitialized) {
6400 throw new Error("initializeWasm() must be awaited first!");
6402 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
6403 return nativeResponseValue;
6405 // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
6406 export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
6407 if(!isWasmInitialized) {
6408 throw new Error("initializeWasm() must be awaited first!");
6410 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
6411 // debug statements here
6413 // 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);
6414 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 {
6415 if(!isWasmInitialized) {
6416 throw new Error("initializeWasm() must be awaited first!");
6418 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
6419 return nativeResponseValue;
6421 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
6422 export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
6423 if(!isWasmInitialized) {
6424 throw new Error("initializeWasm() must be awaited first!");
6426 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
6427 return nativeResponseValue;
6429 // void DecodeError_free(struct LDKDecodeError this_ptr);
6430 export function DecodeError_free(this_ptr: number): void {
6431 if(!isWasmInitialized) {
6432 throw new Error("initializeWasm() must be awaited first!");
6434 const nativeResponseValue = wasm.DecodeError_free(this_ptr);
6435 // debug statements here
6437 // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
6438 export function DecodeError_clone(orig: number): number {
6439 if(!isWasmInitialized) {
6440 throw new Error("initializeWasm() must be awaited first!");
6442 const nativeResponseValue = wasm.DecodeError_clone(orig);
6443 return nativeResponseValue;
6445 // void Init_free(struct LDKInit this_ptr);
6446 export function Init_free(this_ptr: number): void {
6447 if(!isWasmInitialized) {
6448 throw new Error("initializeWasm() must be awaited first!");
6450 const nativeResponseValue = wasm.Init_free(this_ptr);
6451 // debug statements here
6453 // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
6454 export function Init_get_features(this_ptr: number): number {
6455 if(!isWasmInitialized) {
6456 throw new Error("initializeWasm() must be awaited first!");
6458 const nativeResponseValue = wasm.Init_get_features(this_ptr);
6459 return nativeResponseValue;
6461 // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6462 export function Init_set_features(this_ptr: number, val: number): void {
6463 if(!isWasmInitialized) {
6464 throw new Error("initializeWasm() must be awaited first!");
6466 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
6467 // debug statements here
6469 // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
6470 export function Init_new(features_arg: number): number {
6471 if(!isWasmInitialized) {
6472 throw new Error("initializeWasm() must be awaited first!");
6474 const nativeResponseValue = wasm.Init_new(features_arg);
6475 return nativeResponseValue;
6477 // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
6478 export function Init_clone(orig: number): number {
6479 if(!isWasmInitialized) {
6480 throw new Error("initializeWasm() must be awaited first!");
6482 const nativeResponseValue = wasm.Init_clone(orig);
6483 return nativeResponseValue;
6485 // void ErrorMessage_free(struct LDKErrorMessage this_ptr);
6486 export function ErrorMessage_free(this_ptr: number): void {
6487 if(!isWasmInitialized) {
6488 throw new Error("initializeWasm() must be awaited first!");
6490 const nativeResponseValue = wasm.ErrorMessage_free(this_ptr);
6491 // debug statements here
6493 // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
6494 export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
6495 if(!isWasmInitialized) {
6496 throw new Error("initializeWasm() must be awaited first!");
6498 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
6499 return decodeArray(nativeResponseValue);
6501 // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6502 export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
6503 if(!isWasmInitialized) {
6504 throw new Error("initializeWasm() must be awaited first!");
6506 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
6507 // debug statements here
6509 // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
6510 export function ErrorMessage_get_data(this_ptr: number): String {
6511 if(!isWasmInitialized) {
6512 throw new Error("initializeWasm() must be awaited first!");
6514 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
6515 return nativeResponseValue;
6517 // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
6518 export function ErrorMessage_set_data(this_ptr: number, val: Uint8Array): void {
6519 if(!isWasmInitialized) {
6520 throw new Error("initializeWasm() must be awaited first!");
6522 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, encodeArray(val));
6523 // debug statements here
6525 // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
6526 export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: Uint8Array): number {
6527 if(!isWasmInitialized) {
6528 throw new Error("initializeWasm() must be awaited first!");
6530 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
6531 return nativeResponseValue;
6533 // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
6534 export function ErrorMessage_clone(orig: number): number {
6535 if(!isWasmInitialized) {
6536 throw new Error("initializeWasm() must be awaited first!");
6538 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
6539 return nativeResponseValue;
6541 // void Ping_free(struct LDKPing this_ptr);
6542 export function Ping_free(this_ptr: number): void {
6543 if(!isWasmInitialized) {
6544 throw new Error("initializeWasm() must be awaited first!");
6546 const nativeResponseValue = wasm.Ping_free(this_ptr);
6547 // debug statements here
6549 // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
6550 export function Ping_get_ponglen(this_ptr: number): number {
6551 if(!isWasmInitialized) {
6552 throw new Error("initializeWasm() must be awaited first!");
6554 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
6555 return nativeResponseValue;
6557 // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6558 export function Ping_set_ponglen(this_ptr: number, val: number): void {
6559 if(!isWasmInitialized) {
6560 throw new Error("initializeWasm() must be awaited first!");
6562 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
6563 // debug statements here
6565 // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
6566 export function Ping_get_byteslen(this_ptr: number): number {
6567 if(!isWasmInitialized) {
6568 throw new Error("initializeWasm() must be awaited first!");
6570 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
6571 return nativeResponseValue;
6573 // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6574 export function Ping_set_byteslen(this_ptr: number, val: number): void {
6575 if(!isWasmInitialized) {
6576 throw new Error("initializeWasm() must be awaited first!");
6578 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
6579 // debug statements here
6581 // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
6582 export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
6583 if(!isWasmInitialized) {
6584 throw new Error("initializeWasm() must be awaited first!");
6586 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
6587 return nativeResponseValue;
6589 // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
6590 export function Ping_clone(orig: number): number {
6591 if(!isWasmInitialized) {
6592 throw new Error("initializeWasm() must be awaited first!");
6594 const nativeResponseValue = wasm.Ping_clone(orig);
6595 return nativeResponseValue;
6597 // void Pong_free(struct LDKPong this_ptr);
6598 export function Pong_free(this_ptr: number): void {
6599 if(!isWasmInitialized) {
6600 throw new Error("initializeWasm() must be awaited first!");
6602 const nativeResponseValue = wasm.Pong_free(this_ptr);
6603 // debug statements here
6605 // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
6606 export function Pong_get_byteslen(this_ptr: number): number {
6607 if(!isWasmInitialized) {
6608 throw new Error("initializeWasm() must be awaited first!");
6610 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
6611 return nativeResponseValue;
6613 // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
6614 export function Pong_set_byteslen(this_ptr: number, val: number): void {
6615 if(!isWasmInitialized) {
6616 throw new Error("initializeWasm() must be awaited first!");
6618 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
6619 // debug statements here
6621 // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
6622 export function Pong_new(byteslen_arg: number): number {
6623 if(!isWasmInitialized) {
6624 throw new Error("initializeWasm() must be awaited first!");
6626 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
6627 return nativeResponseValue;
6629 // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
6630 export function Pong_clone(orig: number): number {
6631 if(!isWasmInitialized) {
6632 throw new Error("initializeWasm() must be awaited first!");
6634 const nativeResponseValue = wasm.Pong_clone(orig);
6635 return nativeResponseValue;
6637 // void OpenChannel_free(struct LDKOpenChannel this_ptr);
6638 export function OpenChannel_free(this_ptr: number): void {
6639 if(!isWasmInitialized) {
6640 throw new Error("initializeWasm() must be awaited first!");
6642 const nativeResponseValue = wasm.OpenChannel_free(this_ptr);
6643 // debug statements here
6645 // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
6646 export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
6647 if(!isWasmInitialized) {
6648 throw new Error("initializeWasm() must be awaited first!");
6650 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
6651 return decodeArray(nativeResponseValue);
6653 // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6654 export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6655 if(!isWasmInitialized) {
6656 throw new Error("initializeWasm() must be awaited first!");
6658 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
6659 // debug statements here
6661 // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
6662 export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
6663 if(!isWasmInitialized) {
6664 throw new Error("initializeWasm() must be awaited first!");
6666 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
6667 return decodeArray(nativeResponseValue);
6669 // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6670 export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
6671 if(!isWasmInitialized) {
6672 throw new Error("initializeWasm() must be awaited first!");
6674 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
6675 // debug statements here
6677 // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6678 export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
6679 if(!isWasmInitialized) {
6680 throw new Error("initializeWasm() must be awaited first!");
6682 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
6683 return nativeResponseValue;
6685 // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6686 export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
6687 if(!isWasmInitialized) {
6688 throw new Error("initializeWasm() must be awaited first!");
6690 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
6691 // debug statements here
6693 // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6694 export function OpenChannel_get_push_msat(this_ptr: number): number {
6695 if(!isWasmInitialized) {
6696 throw new Error("initializeWasm() must be awaited first!");
6698 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
6699 return nativeResponseValue;
6701 // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6702 export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
6703 if(!isWasmInitialized) {
6704 throw new Error("initializeWasm() must be awaited first!");
6706 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
6707 // debug statements here
6709 // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6710 export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
6711 if(!isWasmInitialized) {
6712 throw new Error("initializeWasm() must be awaited first!");
6714 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
6715 return nativeResponseValue;
6717 // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6718 export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
6719 if(!isWasmInitialized) {
6720 throw new Error("initializeWasm() must be awaited first!");
6722 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
6723 // debug statements here
6725 // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6726 export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
6727 if(!isWasmInitialized) {
6728 throw new Error("initializeWasm() must be awaited first!");
6730 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
6731 return nativeResponseValue;
6733 // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6734 export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
6735 if(!isWasmInitialized) {
6736 throw new Error("initializeWasm() must be awaited first!");
6738 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
6739 // debug statements here
6741 // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6742 export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
6743 if(!isWasmInitialized) {
6744 throw new Error("initializeWasm() must be awaited first!");
6746 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
6747 return nativeResponseValue;
6749 // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6750 export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
6751 if(!isWasmInitialized) {
6752 throw new Error("initializeWasm() must be awaited first!");
6754 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
6755 // debug statements here
6757 // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6758 export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
6759 if(!isWasmInitialized) {
6760 throw new Error("initializeWasm() must be awaited first!");
6762 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
6763 return nativeResponseValue;
6765 // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6766 export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
6767 if(!isWasmInitialized) {
6768 throw new Error("initializeWasm() must be awaited first!");
6770 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
6771 // debug statements here
6773 // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6774 export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
6775 if(!isWasmInitialized) {
6776 throw new Error("initializeWasm() must be awaited first!");
6778 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
6779 return nativeResponseValue;
6781 // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
6782 export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
6783 if(!isWasmInitialized) {
6784 throw new Error("initializeWasm() must be awaited first!");
6786 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
6787 // debug statements here
6789 // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6790 export function OpenChannel_get_to_self_delay(this_ptr: number): number {
6791 if(!isWasmInitialized) {
6792 throw new Error("initializeWasm() must be awaited first!");
6794 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
6795 return nativeResponseValue;
6797 // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
6798 export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
6799 if(!isWasmInitialized) {
6800 throw new Error("initializeWasm() must be awaited first!");
6802 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
6803 // debug statements here
6805 // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6806 export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
6807 if(!isWasmInitialized) {
6808 throw new Error("initializeWasm() must be awaited first!");
6810 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
6811 return nativeResponseValue;
6813 // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
6814 export function OpenChannel_set_max_accepted_htlcs(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_accepted_htlcs(this_ptr, val);
6819 // debug statements here
6821 // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6822 export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
6823 if(!isWasmInitialized) {
6824 throw new Error("initializeWasm() must be awaited first!");
6826 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
6827 return decodeArray(nativeResponseValue);
6829 // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6830 export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
6831 if(!isWasmInitialized) {
6832 throw new Error("initializeWasm() must be awaited first!");
6834 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
6835 // debug statements here
6837 // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6838 export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
6839 if(!isWasmInitialized) {
6840 throw new Error("initializeWasm() must be awaited first!");
6842 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
6843 return decodeArray(nativeResponseValue);
6845 // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6846 export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
6847 if(!isWasmInitialized) {
6848 throw new Error("initializeWasm() must be awaited first!");
6850 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
6851 // debug statements here
6853 // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6854 export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
6855 if(!isWasmInitialized) {
6856 throw new Error("initializeWasm() must be awaited first!");
6858 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
6859 return decodeArray(nativeResponseValue);
6861 // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6862 export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
6863 if(!isWasmInitialized) {
6864 throw new Error("initializeWasm() must be awaited first!");
6866 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
6867 // debug statements here
6869 // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6870 export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
6871 if(!isWasmInitialized) {
6872 throw new Error("initializeWasm() must be awaited first!");
6874 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
6875 return decodeArray(nativeResponseValue);
6877 // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6878 export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
6879 if(!isWasmInitialized) {
6880 throw new Error("initializeWasm() must be awaited first!");
6882 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
6883 // debug statements here
6885 // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6886 export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
6887 if(!isWasmInitialized) {
6888 throw new Error("initializeWasm() must be awaited first!");
6890 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
6891 return decodeArray(nativeResponseValue);
6893 // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6894 export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
6895 if(!isWasmInitialized) {
6896 throw new Error("initializeWasm() must be awaited first!");
6898 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
6899 // debug statements here
6901 // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6902 export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
6903 if(!isWasmInitialized) {
6904 throw new Error("initializeWasm() must be awaited first!");
6906 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
6907 return decodeArray(nativeResponseValue);
6909 // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6910 export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
6911 if(!isWasmInitialized) {
6912 throw new Error("initializeWasm() must be awaited first!");
6914 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
6915 // debug statements here
6917 // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6918 export function OpenChannel_get_channel_flags(this_ptr: number): number {
6919 if(!isWasmInitialized) {
6920 throw new Error("initializeWasm() must be awaited first!");
6922 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
6923 return nativeResponseValue;
6925 // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
6926 export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
6927 if(!isWasmInitialized) {
6928 throw new Error("initializeWasm() must be awaited first!");
6930 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
6931 // debug statements here
6933 // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
6934 export function OpenChannel_clone(orig: number): number {
6935 if(!isWasmInitialized) {
6936 throw new Error("initializeWasm() must be awaited first!");
6938 const nativeResponseValue = wasm.OpenChannel_clone(orig);
6939 return nativeResponseValue;
6941 // void AcceptChannel_free(struct LDKAcceptChannel this_ptr);
6942 export function AcceptChannel_free(this_ptr: number): void {
6943 if(!isWasmInitialized) {
6944 throw new Error("initializeWasm() must be awaited first!");
6946 const nativeResponseValue = wasm.AcceptChannel_free(this_ptr);
6947 // debug statements here
6949 // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
6950 export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
6951 if(!isWasmInitialized) {
6952 throw new Error("initializeWasm() must be awaited first!");
6954 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
6955 return decodeArray(nativeResponseValue);
6957 // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6958 export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
6959 if(!isWasmInitialized) {
6960 throw new Error("initializeWasm() must be awaited first!");
6962 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
6963 // debug statements here
6965 // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6966 export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
6967 if(!isWasmInitialized) {
6968 throw new Error("initializeWasm() must be awaited first!");
6970 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
6971 return nativeResponseValue;
6973 // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
6974 export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
6975 if(!isWasmInitialized) {
6976 throw new Error("initializeWasm() must be awaited first!");
6978 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
6979 // debug statements here
6981 // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6982 export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
6983 if(!isWasmInitialized) {
6984 throw new Error("initializeWasm() must be awaited first!");
6986 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
6987 return nativeResponseValue;
6989 // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
6990 export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
6991 if(!isWasmInitialized) {
6992 throw new Error("initializeWasm() must be awaited first!");
6994 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
6995 // debug statements here
6997 // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6998 export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
6999 if(!isWasmInitialized) {
7000 throw new Error("initializeWasm() must be awaited first!");
7002 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
7003 return nativeResponseValue;
7005 // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7006 export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
7007 if(!isWasmInitialized) {
7008 throw new Error("initializeWasm() must be awaited first!");
7010 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
7011 // debug statements here
7013 // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7014 export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
7015 if(!isWasmInitialized) {
7016 throw new Error("initializeWasm() must be awaited first!");
7018 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
7019 return nativeResponseValue;
7021 // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7022 export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
7023 if(!isWasmInitialized) {
7024 throw new Error("initializeWasm() must be awaited first!");
7026 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
7027 // debug statements here
7029 // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7030 export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
7031 if(!isWasmInitialized) {
7032 throw new Error("initializeWasm() must be awaited first!");
7034 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
7035 return nativeResponseValue;
7037 // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
7038 export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
7039 if(!isWasmInitialized) {
7040 throw new Error("initializeWasm() must be awaited first!");
7042 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
7043 // debug statements here
7045 // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7046 export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
7047 if(!isWasmInitialized) {
7048 throw new Error("initializeWasm() must be awaited first!");
7050 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
7051 return nativeResponseValue;
7053 // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7054 export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
7055 if(!isWasmInitialized) {
7056 throw new Error("initializeWasm() must be awaited first!");
7058 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
7059 // debug statements here
7061 // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7062 export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
7063 if(!isWasmInitialized) {
7064 throw new Error("initializeWasm() must be awaited first!");
7066 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
7067 return nativeResponseValue;
7069 // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7070 export function AcceptChannel_set_max_accepted_htlcs(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_accepted_htlcs(this_ptr, val);
7075 // debug statements here
7077 // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7078 export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
7079 if(!isWasmInitialized) {
7080 throw new Error("initializeWasm() must be awaited first!");
7082 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
7083 return decodeArray(nativeResponseValue);
7085 // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7086 export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
7087 if(!isWasmInitialized) {
7088 throw new Error("initializeWasm() must be awaited first!");
7090 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
7091 // debug statements here
7093 // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7094 export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
7095 if(!isWasmInitialized) {
7096 throw new Error("initializeWasm() must be awaited first!");
7098 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
7099 return decodeArray(nativeResponseValue);
7101 // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7102 export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
7103 if(!isWasmInitialized) {
7104 throw new Error("initializeWasm() must be awaited first!");
7106 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
7107 // debug statements here
7109 // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7110 export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
7111 if(!isWasmInitialized) {
7112 throw new Error("initializeWasm() must be awaited first!");
7114 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
7115 return decodeArray(nativeResponseValue);
7117 // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7118 export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
7119 if(!isWasmInitialized) {
7120 throw new Error("initializeWasm() must be awaited first!");
7122 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
7123 // debug statements here
7125 // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7126 export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
7127 if(!isWasmInitialized) {
7128 throw new Error("initializeWasm() must be awaited first!");
7130 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
7131 return decodeArray(nativeResponseValue);
7133 // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7134 export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
7135 if(!isWasmInitialized) {
7136 throw new Error("initializeWasm() must be awaited first!");
7138 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
7139 // debug statements here
7141 // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7142 export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
7143 if(!isWasmInitialized) {
7144 throw new Error("initializeWasm() must be awaited first!");
7146 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
7147 return decodeArray(nativeResponseValue);
7149 // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7150 export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7151 if(!isWasmInitialized) {
7152 throw new Error("initializeWasm() must be awaited first!");
7154 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7155 // debug statements here
7157 // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7158 export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7159 if(!isWasmInitialized) {
7160 throw new Error("initializeWasm() must be awaited first!");
7162 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
7163 return decodeArray(nativeResponseValue);
7165 // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7166 export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7167 if(!isWasmInitialized) {
7168 throw new Error("initializeWasm() must be awaited first!");
7170 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7171 // debug statements here
7173 // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
7174 export function AcceptChannel_clone(orig: number): number {
7175 if(!isWasmInitialized) {
7176 throw new Error("initializeWasm() must be awaited first!");
7178 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
7179 return nativeResponseValue;
7181 // void FundingCreated_free(struct LDKFundingCreated this_ptr);
7182 export function FundingCreated_free(this_ptr: number): void {
7183 if(!isWasmInitialized) {
7184 throw new Error("initializeWasm() must be awaited first!");
7186 const nativeResponseValue = wasm.FundingCreated_free(this_ptr);
7187 // debug statements here
7189 // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7190 export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
7191 if(!isWasmInitialized) {
7192 throw new Error("initializeWasm() must be awaited first!");
7194 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
7195 return decodeArray(nativeResponseValue);
7197 // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7198 export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7199 if(!isWasmInitialized) {
7200 throw new Error("initializeWasm() must be awaited first!");
7202 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
7203 // debug statements here
7205 // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7206 export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
7207 if(!isWasmInitialized) {
7208 throw new Error("initializeWasm() must be awaited first!");
7210 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
7211 return decodeArray(nativeResponseValue);
7213 // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7214 export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
7215 if(!isWasmInitialized) {
7216 throw new Error("initializeWasm() must be awaited first!");
7218 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
7219 // debug statements here
7221 // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7222 export function FundingCreated_get_funding_output_index(this_ptr: number): number {
7223 if(!isWasmInitialized) {
7224 throw new Error("initializeWasm() must be awaited first!");
7226 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
7227 return nativeResponseValue;
7229 // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
7230 export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
7231 if(!isWasmInitialized) {
7232 throw new Error("initializeWasm() must be awaited first!");
7234 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
7235 // debug statements here
7237 // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7238 export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
7239 if(!isWasmInitialized) {
7240 throw new Error("initializeWasm() must be awaited first!");
7242 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
7243 return decodeArray(nativeResponseValue);
7245 // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
7246 export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
7247 if(!isWasmInitialized) {
7248 throw new Error("initializeWasm() must be awaited first!");
7250 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
7251 // debug statements here
7253 // 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);
7254 export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
7255 if(!isWasmInitialized) {
7256 throw new Error("initializeWasm() must be awaited first!");
7258 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
7259 return nativeResponseValue;
7261 // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
7262 export function FundingCreated_clone(orig: number): number {
7263 if(!isWasmInitialized) {
7264 throw new Error("initializeWasm() must be awaited first!");
7266 const nativeResponseValue = wasm.FundingCreated_clone(orig);
7267 return nativeResponseValue;
7269 // void FundingSigned_free(struct LDKFundingSigned this_ptr);
7270 export function FundingSigned_free(this_ptr: number): void {
7271 if(!isWasmInitialized) {
7272 throw new Error("initializeWasm() must be awaited first!");
7274 const nativeResponseValue = wasm.FundingSigned_free(this_ptr);
7275 // debug statements here
7277 // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
7278 export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
7279 if(!isWasmInitialized) {
7280 throw new Error("initializeWasm() must be awaited first!");
7282 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
7283 return decodeArray(nativeResponseValue);
7285 // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7286 export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7287 if(!isWasmInitialized) {
7288 throw new Error("initializeWasm() must be awaited first!");
7290 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
7291 // debug statements here
7293 // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
7294 export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
7295 if(!isWasmInitialized) {
7296 throw new Error("initializeWasm() must be awaited first!");
7298 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
7299 return decodeArray(nativeResponseValue);
7301 // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7302 export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7303 if(!isWasmInitialized) {
7304 throw new Error("initializeWasm() must be awaited first!");
7306 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
7307 // debug statements here
7309 // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
7310 export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
7311 if(!isWasmInitialized) {
7312 throw new Error("initializeWasm() must be awaited first!");
7314 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
7315 return nativeResponseValue;
7317 // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
7318 export function FundingSigned_clone(orig: number): number {
7319 if(!isWasmInitialized) {
7320 throw new Error("initializeWasm() must be awaited first!");
7322 const nativeResponseValue = wasm.FundingSigned_clone(orig);
7323 return nativeResponseValue;
7325 // void FundingLocked_free(struct LDKFundingLocked this_ptr);
7326 export function FundingLocked_free(this_ptr: number): void {
7327 if(!isWasmInitialized) {
7328 throw new Error("initializeWasm() must be awaited first!");
7330 const nativeResponseValue = wasm.FundingLocked_free(this_ptr);
7331 // debug statements here
7333 // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
7334 export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
7335 if(!isWasmInitialized) {
7336 throw new Error("initializeWasm() must be awaited first!");
7338 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
7339 return decodeArray(nativeResponseValue);
7341 // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7342 export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
7343 if(!isWasmInitialized) {
7344 throw new Error("initializeWasm() must be awaited first!");
7346 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
7347 // debug statements here
7349 // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
7350 export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
7351 if(!isWasmInitialized) {
7352 throw new Error("initializeWasm() must be awaited first!");
7354 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
7355 return decodeArray(nativeResponseValue);
7357 // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7358 export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7359 if(!isWasmInitialized) {
7360 throw new Error("initializeWasm() must be awaited first!");
7362 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
7363 // debug statements here
7365 // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
7366 export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
7367 if(!isWasmInitialized) {
7368 throw new Error("initializeWasm() must be awaited first!");
7370 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
7371 return nativeResponseValue;
7373 // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
7374 export function FundingLocked_clone(orig: number): number {
7375 if(!isWasmInitialized) {
7376 throw new Error("initializeWasm() must be awaited first!");
7378 const nativeResponseValue = wasm.FundingLocked_clone(orig);
7379 return nativeResponseValue;
7381 // void Shutdown_free(struct LDKShutdown this_ptr);
7382 export function Shutdown_free(this_ptr: number): void {
7383 if(!isWasmInitialized) {
7384 throw new Error("initializeWasm() must be awaited first!");
7386 const nativeResponseValue = wasm.Shutdown_free(this_ptr);
7387 // debug statements here
7389 // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
7390 export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
7391 if(!isWasmInitialized) {
7392 throw new Error("initializeWasm() must be awaited first!");
7394 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
7395 return decodeArray(nativeResponseValue);
7397 // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7398 export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
7399 if(!isWasmInitialized) {
7400 throw new Error("initializeWasm() must be awaited first!");
7402 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
7403 // debug statements here
7405 // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
7406 export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
7407 if(!isWasmInitialized) {
7408 throw new Error("initializeWasm() must be awaited first!");
7410 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
7411 return decodeArray(nativeResponseValue);
7413 // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7414 export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
7415 if(!isWasmInitialized) {
7416 throw new Error("initializeWasm() must be awaited first!");
7418 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
7419 // debug statements here
7421 // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
7422 export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
7423 if(!isWasmInitialized) {
7424 throw new Error("initializeWasm() must be awaited first!");
7426 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
7427 return nativeResponseValue;
7429 // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
7430 export function Shutdown_clone(orig: number): number {
7431 if(!isWasmInitialized) {
7432 throw new Error("initializeWasm() must be awaited first!");
7434 const nativeResponseValue = wasm.Shutdown_clone(orig);
7435 return nativeResponseValue;
7437 // void ClosingSigned_free(struct LDKClosingSigned this_ptr);
7438 export function ClosingSigned_free(this_ptr: number): void {
7439 if(!isWasmInitialized) {
7440 throw new Error("initializeWasm() must be awaited first!");
7442 const nativeResponseValue = wasm.ClosingSigned_free(this_ptr);
7443 // debug statements here
7445 // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
7446 export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
7447 if(!isWasmInitialized) {
7448 throw new Error("initializeWasm() must be awaited first!");
7450 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
7451 return decodeArray(nativeResponseValue);
7453 // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7454 export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7455 if(!isWasmInitialized) {
7456 throw new Error("initializeWasm() must be awaited first!");
7458 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
7459 // debug statements here
7461 // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
7462 export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
7463 if(!isWasmInitialized) {
7464 throw new Error("initializeWasm() must be awaited first!");
7466 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
7467 return nativeResponseValue;
7469 // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
7470 export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
7471 if(!isWasmInitialized) {
7472 throw new Error("initializeWasm() must be awaited first!");
7474 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
7475 // debug statements here
7477 // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
7478 export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
7479 if(!isWasmInitialized) {
7480 throw new Error("initializeWasm() must be awaited first!");
7482 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
7483 return decodeArray(nativeResponseValue);
7485 // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7486 export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7487 if(!isWasmInitialized) {
7488 throw new Error("initializeWasm() must be awaited first!");
7490 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
7491 // debug statements here
7493 // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
7494 export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
7495 if(!isWasmInitialized) {
7496 throw new Error("initializeWasm() must be awaited first!");
7498 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
7499 return nativeResponseValue;
7501 // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
7502 export function ClosingSigned_clone(orig: number): number {
7503 if(!isWasmInitialized) {
7504 throw new Error("initializeWasm() must be awaited first!");
7506 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
7507 return nativeResponseValue;
7509 // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_ptr);
7510 export function UpdateAddHTLC_free(this_ptr: number): void {
7511 if(!isWasmInitialized) {
7512 throw new Error("initializeWasm() must be awaited first!");
7514 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_ptr);
7515 // debug statements here
7517 // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7518 export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
7519 if(!isWasmInitialized) {
7520 throw new Error("initializeWasm() must be awaited first!");
7522 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
7523 return decodeArray(nativeResponseValue);
7525 // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7526 export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7527 if(!isWasmInitialized) {
7528 throw new Error("initializeWasm() must be awaited first!");
7530 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
7531 // debug statements here
7533 // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7534 export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
7535 if(!isWasmInitialized) {
7536 throw new Error("initializeWasm() must be awaited first!");
7538 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
7539 return nativeResponseValue;
7541 // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7542 export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
7543 if(!isWasmInitialized) {
7544 throw new Error("initializeWasm() must be awaited first!");
7546 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
7547 // debug statements here
7549 // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7550 export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
7551 if(!isWasmInitialized) {
7552 throw new Error("initializeWasm() must be awaited first!");
7554 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
7555 return nativeResponseValue;
7557 // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7558 export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
7559 if(!isWasmInitialized) {
7560 throw new Error("initializeWasm() must be awaited first!");
7562 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
7563 // debug statements here
7565 // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7566 export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
7567 if(!isWasmInitialized) {
7568 throw new Error("initializeWasm() must be awaited first!");
7570 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
7571 return decodeArray(nativeResponseValue);
7573 // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7574 export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
7575 if(!isWasmInitialized) {
7576 throw new Error("initializeWasm() must be awaited first!");
7578 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
7579 // debug statements here
7581 // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7582 export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
7583 if(!isWasmInitialized) {
7584 throw new Error("initializeWasm() must be awaited first!");
7586 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
7587 return nativeResponseValue;
7589 // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
7590 export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
7591 if(!isWasmInitialized) {
7592 throw new Error("initializeWasm() must be awaited first!");
7594 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
7595 // debug statements here
7597 // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
7598 export function UpdateAddHTLC_clone(orig: number): number {
7599 if(!isWasmInitialized) {
7600 throw new Error("initializeWasm() must be awaited first!");
7602 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
7603 return nativeResponseValue;
7605 // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_ptr);
7606 export function UpdateFulfillHTLC_free(this_ptr: number): void {
7607 if(!isWasmInitialized) {
7608 throw new Error("initializeWasm() must be awaited first!");
7610 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_ptr);
7611 // debug statements here
7613 // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7614 export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
7615 if(!isWasmInitialized) {
7616 throw new Error("initializeWasm() must be awaited first!");
7618 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
7619 return decodeArray(nativeResponseValue);
7621 // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7622 export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7623 if(!isWasmInitialized) {
7624 throw new Error("initializeWasm() must be awaited first!");
7626 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
7627 // debug statements here
7629 // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
7630 export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
7631 if(!isWasmInitialized) {
7632 throw new Error("initializeWasm() must be awaited first!");
7634 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
7635 return nativeResponseValue;
7637 // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
7638 export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
7639 if(!isWasmInitialized) {
7640 throw new Error("initializeWasm() must be awaited first!");
7642 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
7643 // debug statements here
7645 // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7646 export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
7647 if(!isWasmInitialized) {
7648 throw new Error("initializeWasm() must be awaited first!");
7650 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
7651 return decodeArray(nativeResponseValue);
7653 // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7654 export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
7655 if(!isWasmInitialized) {
7656 throw new Error("initializeWasm() must be awaited first!");
7658 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
7659 // debug statements here
7661 // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
7662 export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
7663 if(!isWasmInitialized) {
7664 throw new Error("initializeWasm() must be awaited first!");
7666 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
7667 return nativeResponseValue;
7669 // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
7670 export function UpdateFulfillHTLC_clone(orig: number): number {
7671 if(!isWasmInitialized) {
7672 throw new Error("initializeWasm() must be awaited first!");
7674 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
7675 return nativeResponseValue;
7677 // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_ptr);
7678 export function UpdateFailHTLC_free(this_ptr: number): void {
7679 if(!isWasmInitialized) {
7680 throw new Error("initializeWasm() must be awaited first!");
7682 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_ptr);
7683 // debug statements here
7685 // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
7686 export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
7687 if(!isWasmInitialized) {
7688 throw new Error("initializeWasm() must be awaited first!");
7690 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
7691 return decodeArray(nativeResponseValue);
7693 // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7694 export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7695 if(!isWasmInitialized) {
7696 throw new Error("initializeWasm() must be awaited first!");
7698 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
7699 // debug statements here
7701 // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
7702 export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
7703 if(!isWasmInitialized) {
7704 throw new Error("initializeWasm() must be awaited first!");
7706 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
7707 return nativeResponseValue;
7709 // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
7710 export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
7711 if(!isWasmInitialized) {
7712 throw new Error("initializeWasm() must be awaited first!");
7714 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
7715 // debug statements here
7717 // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
7718 export function UpdateFailHTLC_clone(orig: number): number {
7719 if(!isWasmInitialized) {
7720 throw new Error("initializeWasm() must be awaited first!");
7722 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
7723 return nativeResponseValue;
7725 // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_ptr);
7726 export function UpdateFailMalformedHTLC_free(this_ptr: number): void {
7727 if(!isWasmInitialized) {
7728 throw new Error("initializeWasm() must be awaited first!");
7730 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_ptr);
7731 // debug statements here
7733 // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
7734 export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
7735 if(!isWasmInitialized) {
7736 throw new Error("initializeWasm() must be awaited first!");
7738 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
7739 return decodeArray(nativeResponseValue);
7741 // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7742 export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7743 if(!isWasmInitialized) {
7744 throw new Error("initializeWasm() must be awaited first!");
7746 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
7747 // debug statements here
7749 // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
7750 export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
7751 if(!isWasmInitialized) {
7752 throw new Error("initializeWasm() must be awaited first!");
7754 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
7755 return nativeResponseValue;
7757 // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
7758 export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
7759 if(!isWasmInitialized) {
7760 throw new Error("initializeWasm() must be awaited first!");
7762 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
7763 // debug statements here
7765 // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
7766 export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
7767 if(!isWasmInitialized) {
7768 throw new Error("initializeWasm() must be awaited first!");
7770 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
7771 return nativeResponseValue;
7773 // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
7774 export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
7775 if(!isWasmInitialized) {
7776 throw new Error("initializeWasm() must be awaited first!");
7778 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
7779 // debug statements here
7781 // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
7782 export function UpdateFailMalformedHTLC_clone(orig: number): number {
7783 if(!isWasmInitialized) {
7784 throw new Error("initializeWasm() must be awaited first!");
7786 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
7787 return nativeResponseValue;
7789 // void CommitmentSigned_free(struct LDKCommitmentSigned this_ptr);
7790 export function CommitmentSigned_free(this_ptr: number): void {
7791 if(!isWasmInitialized) {
7792 throw new Error("initializeWasm() must be awaited first!");
7794 const nativeResponseValue = wasm.CommitmentSigned_free(this_ptr);
7795 // debug statements here
7797 // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
7798 export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
7799 if(!isWasmInitialized) {
7800 throw new Error("initializeWasm() must be awaited first!");
7802 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
7803 return decodeArray(nativeResponseValue);
7805 // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7806 export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7807 if(!isWasmInitialized) {
7808 throw new Error("initializeWasm() must be awaited first!");
7810 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
7811 // debug statements here
7813 // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
7814 export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
7815 if(!isWasmInitialized) {
7816 throw new Error("initializeWasm() must be awaited first!");
7818 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
7819 return decodeArray(nativeResponseValue);
7821 // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7822 export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7823 if(!isWasmInitialized) {
7824 throw new Error("initializeWasm() must be awaited first!");
7826 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
7827 // debug statements here
7829 // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
7830 export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
7831 if(!isWasmInitialized) {
7832 throw new Error("initializeWasm() must be awaited first!");
7834 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
7835 // debug statements here
7837 // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
7838 export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
7839 if(!isWasmInitialized) {
7840 throw new Error("initializeWasm() must be awaited first!");
7842 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
7843 return nativeResponseValue;
7845 // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
7846 export function CommitmentSigned_clone(orig: number): number {
7847 if(!isWasmInitialized) {
7848 throw new Error("initializeWasm() must be awaited first!");
7850 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
7851 return nativeResponseValue;
7853 // void RevokeAndACK_free(struct LDKRevokeAndACK this_ptr);
7854 export function RevokeAndACK_free(this_ptr: number): void {
7855 if(!isWasmInitialized) {
7856 throw new Error("initializeWasm() must be awaited first!");
7858 const nativeResponseValue = wasm.RevokeAndACK_free(this_ptr);
7859 // debug statements here
7861 // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
7862 export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
7863 if(!isWasmInitialized) {
7864 throw new Error("initializeWasm() must be awaited first!");
7866 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
7867 return decodeArray(nativeResponseValue);
7869 // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7870 export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
7871 if(!isWasmInitialized) {
7872 throw new Error("initializeWasm() must be awaited first!");
7874 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
7875 // debug statements here
7877 // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
7878 export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
7879 if(!isWasmInitialized) {
7880 throw new Error("initializeWasm() must be awaited first!");
7882 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
7883 return decodeArray(nativeResponseValue);
7885 // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7886 export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
7887 if(!isWasmInitialized) {
7888 throw new Error("initializeWasm() must be awaited first!");
7890 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
7891 // debug statements here
7893 // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
7894 export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
7895 if(!isWasmInitialized) {
7896 throw new Error("initializeWasm() must be awaited first!");
7898 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
7899 return decodeArray(nativeResponseValue);
7901 // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7902 export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7903 if(!isWasmInitialized) {
7904 throw new Error("initializeWasm() must be awaited first!");
7906 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
7907 // debug statements here
7909 // 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);
7910 export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
7911 if(!isWasmInitialized) {
7912 throw new Error("initializeWasm() must be awaited first!");
7914 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
7915 return nativeResponseValue;
7917 // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
7918 export function RevokeAndACK_clone(orig: number): number {
7919 if(!isWasmInitialized) {
7920 throw new Error("initializeWasm() must be awaited first!");
7922 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
7923 return nativeResponseValue;
7925 // void UpdateFee_free(struct LDKUpdateFee this_ptr);
7926 export function UpdateFee_free(this_ptr: number): void {
7927 if(!isWasmInitialized) {
7928 throw new Error("initializeWasm() must be awaited first!");
7930 const nativeResponseValue = wasm.UpdateFee_free(this_ptr);
7931 // debug statements here
7933 // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
7934 export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
7935 if(!isWasmInitialized) {
7936 throw new Error("initializeWasm() must be awaited first!");
7938 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
7939 return decodeArray(nativeResponseValue);
7941 // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7942 export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
7943 if(!isWasmInitialized) {
7944 throw new Error("initializeWasm() must be awaited first!");
7946 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
7947 // debug statements here
7949 // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
7950 export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
7951 if(!isWasmInitialized) {
7952 throw new Error("initializeWasm() must be awaited first!");
7954 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
7955 return nativeResponseValue;
7957 // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
7958 export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
7959 if(!isWasmInitialized) {
7960 throw new Error("initializeWasm() must be awaited first!");
7962 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
7963 // debug statements here
7965 // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
7966 export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
7967 if(!isWasmInitialized) {
7968 throw new Error("initializeWasm() must be awaited first!");
7970 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
7971 return nativeResponseValue;
7973 // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
7974 export function UpdateFee_clone(orig: number): number {
7975 if(!isWasmInitialized) {
7976 throw new Error("initializeWasm() must be awaited first!");
7978 const nativeResponseValue = wasm.UpdateFee_clone(orig);
7979 return nativeResponseValue;
7981 // void DataLossProtect_free(struct LDKDataLossProtect this_ptr);
7982 export function DataLossProtect_free(this_ptr: number): void {
7983 if(!isWasmInitialized) {
7984 throw new Error("initializeWasm() must be awaited first!");
7986 const nativeResponseValue = wasm.DataLossProtect_free(this_ptr);
7987 // debug statements here
7989 // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
7990 export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
7991 if(!isWasmInitialized) {
7992 throw new Error("initializeWasm() must be awaited first!");
7994 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
7995 return decodeArray(nativeResponseValue);
7997 // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7998 export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
7999 if(!isWasmInitialized) {
8000 throw new Error("initializeWasm() must be awaited first!");
8002 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
8003 // debug statements here
8005 // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
8006 export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
8007 if(!isWasmInitialized) {
8008 throw new Error("initializeWasm() must be awaited first!");
8010 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
8011 return decodeArray(nativeResponseValue);
8013 // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8014 export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8015 if(!isWasmInitialized) {
8016 throw new Error("initializeWasm() must be awaited first!");
8018 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
8019 // debug statements here
8021 // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
8022 export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
8023 if(!isWasmInitialized) {
8024 throw new Error("initializeWasm() must be awaited first!");
8026 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
8027 return nativeResponseValue;
8029 // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
8030 export function DataLossProtect_clone(orig: number): number {
8031 if(!isWasmInitialized) {
8032 throw new Error("initializeWasm() must be awaited first!");
8034 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
8035 return nativeResponseValue;
8037 // void ChannelReestablish_free(struct LDKChannelReestablish this_ptr);
8038 export function ChannelReestablish_free(this_ptr: number): void {
8039 if(!isWasmInitialized) {
8040 throw new Error("initializeWasm() must be awaited first!");
8042 const nativeResponseValue = wasm.ChannelReestablish_free(this_ptr);
8043 // debug statements here
8045 // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
8046 export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
8047 if(!isWasmInitialized) {
8048 throw new Error("initializeWasm() must be awaited first!");
8050 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
8051 return decodeArray(nativeResponseValue);
8053 // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8054 export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
8055 if(!isWasmInitialized) {
8056 throw new Error("initializeWasm() must be awaited first!");
8058 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
8059 // debug statements here
8061 // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8062 export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
8063 if(!isWasmInitialized) {
8064 throw new Error("initializeWasm() must be awaited first!");
8066 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
8067 return nativeResponseValue;
8069 // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8070 export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
8071 if(!isWasmInitialized) {
8072 throw new Error("initializeWasm() must be awaited first!");
8074 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
8075 // debug statements here
8077 // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8078 export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
8079 if(!isWasmInitialized) {
8080 throw new Error("initializeWasm() must be awaited first!");
8082 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
8083 return nativeResponseValue;
8085 // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8086 export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
8087 if(!isWasmInitialized) {
8088 throw new Error("initializeWasm() must be awaited first!");
8090 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
8091 // debug statements here
8093 // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
8094 export function ChannelReestablish_clone(orig: number): number {
8095 if(!isWasmInitialized) {
8096 throw new Error("initializeWasm() must be awaited first!");
8098 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
8099 return nativeResponseValue;
8101 // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_ptr);
8102 export function AnnouncementSignatures_free(this_ptr: number): void {
8103 if(!isWasmInitialized) {
8104 throw new Error("initializeWasm() must be awaited first!");
8106 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_ptr);
8107 // debug statements here
8109 // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
8110 export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
8111 if(!isWasmInitialized) {
8112 throw new Error("initializeWasm() must be awaited first!");
8114 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
8115 return decodeArray(nativeResponseValue);
8117 // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8118 export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
8119 if(!isWasmInitialized) {
8120 throw new Error("initializeWasm() must be awaited first!");
8122 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
8123 // debug statements here
8125 // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8126 export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
8127 if(!isWasmInitialized) {
8128 throw new Error("initializeWasm() must be awaited first!");
8130 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
8131 return nativeResponseValue;
8133 // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
8134 export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
8135 if(!isWasmInitialized) {
8136 throw new Error("initializeWasm() must be awaited first!");
8138 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
8139 // debug statements here
8141 // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8142 export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
8143 if(!isWasmInitialized) {
8144 throw new Error("initializeWasm() must be awaited first!");
8146 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
8147 return decodeArray(nativeResponseValue);
8149 // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8150 export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
8151 if(!isWasmInitialized) {
8152 throw new Error("initializeWasm() must be awaited first!");
8154 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
8155 // debug statements here
8157 // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8158 export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
8159 if(!isWasmInitialized) {
8160 throw new Error("initializeWasm() must be awaited first!");
8162 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
8163 return decodeArray(nativeResponseValue);
8165 // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8166 export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
8167 if(!isWasmInitialized) {
8168 throw new Error("initializeWasm() must be awaited first!");
8170 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
8171 // debug statements here
8173 // 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);
8174 export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
8175 if(!isWasmInitialized) {
8176 throw new Error("initializeWasm() must be awaited first!");
8178 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
8179 return nativeResponseValue;
8181 // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
8182 export function AnnouncementSignatures_clone(orig: number): number {
8183 if(!isWasmInitialized) {
8184 throw new Error("initializeWasm() must be awaited first!");
8186 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
8187 return nativeResponseValue;
8189 // void NetAddress_free(struct LDKNetAddress this_ptr);
8190 export function NetAddress_free(this_ptr: number): void {
8191 if(!isWasmInitialized) {
8192 throw new Error("initializeWasm() must be awaited first!");
8194 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
8195 // debug statements here
8197 // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
8198 export function NetAddress_clone(orig: number): number {
8199 if(!isWasmInitialized) {
8200 throw new Error("initializeWasm() must be awaited first!");
8202 const nativeResponseValue = wasm.NetAddress_clone(orig);
8203 return nativeResponseValue;
8205 // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
8206 export function NetAddress_write(obj: number): Uint8Array {
8207 if(!isWasmInitialized) {
8208 throw new Error("initializeWasm() must be awaited first!");
8210 const nativeResponseValue = wasm.NetAddress_write(obj);
8211 return decodeArray(nativeResponseValue);
8213 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
8214 export function Result_read(ser: Uint8Array): number {
8215 if(!isWasmInitialized) {
8216 throw new Error("initializeWasm() must be awaited first!");
8218 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
8219 return nativeResponseValue;
8221 // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_ptr);
8222 export function UnsignedNodeAnnouncement_free(this_ptr: number): void {
8223 if(!isWasmInitialized) {
8224 throw new Error("initializeWasm() must be awaited first!");
8226 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_ptr);
8227 // debug statements here
8229 // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8230 export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
8231 if(!isWasmInitialized) {
8232 throw new Error("initializeWasm() must be awaited first!");
8234 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
8235 return nativeResponseValue;
8237 // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
8238 export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
8239 if(!isWasmInitialized) {
8240 throw new Error("initializeWasm() must be awaited first!");
8242 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
8243 // debug statements here
8245 // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8246 export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
8247 if(!isWasmInitialized) {
8248 throw new Error("initializeWasm() must be awaited first!");
8250 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
8251 return nativeResponseValue;
8253 // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
8254 export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
8255 if(!isWasmInitialized) {
8256 throw new Error("initializeWasm() must be awaited first!");
8258 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
8259 // debug statements here
8261 // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8262 export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
8263 if(!isWasmInitialized) {
8264 throw new Error("initializeWasm() must be awaited first!");
8266 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
8267 return decodeArray(nativeResponseValue);
8269 // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8270 export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
8271 if(!isWasmInitialized) {
8272 throw new Error("initializeWasm() must be awaited first!");
8274 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
8275 // debug statements here
8277 // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
8278 export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
8279 if(!isWasmInitialized) {
8280 throw new Error("initializeWasm() must be awaited first!");
8282 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
8283 return decodeArray(nativeResponseValue);
8285 // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
8286 export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
8287 if(!isWasmInitialized) {
8288 throw new Error("initializeWasm() must be awaited first!");
8290 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
8291 // debug statements here
8293 // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
8294 export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
8295 if(!isWasmInitialized) {
8296 throw new Error("initializeWasm() must be awaited first!");
8298 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
8299 return decodeArray(nativeResponseValue);
8301 // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8302 export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
8303 if(!isWasmInitialized) {
8304 throw new Error("initializeWasm() must be awaited first!");
8306 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
8307 // debug statements here
8309 // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
8310 export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
8311 if(!isWasmInitialized) {
8312 throw new Error("initializeWasm() must be awaited first!");
8314 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
8315 // debug statements here
8317 // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
8318 export function UnsignedNodeAnnouncement_clone(orig: number): number {
8319 if(!isWasmInitialized) {
8320 throw new Error("initializeWasm() must be awaited first!");
8322 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
8323 return nativeResponseValue;
8325 // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_ptr);
8326 export function NodeAnnouncement_free(this_ptr: number): void {
8327 if(!isWasmInitialized) {
8328 throw new Error("initializeWasm() must be awaited first!");
8330 const nativeResponseValue = wasm.NodeAnnouncement_free(this_ptr);
8331 // debug statements here
8333 // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8334 export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
8335 if(!isWasmInitialized) {
8336 throw new Error("initializeWasm() must be awaited first!");
8338 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
8339 return decodeArray(nativeResponseValue);
8341 // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8342 export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
8343 if(!isWasmInitialized) {
8344 throw new Error("initializeWasm() must be awaited first!");
8346 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
8347 // debug statements here
8349 // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8350 export function NodeAnnouncement_get_contents(this_ptr: number): number {
8351 if(!isWasmInitialized) {
8352 throw new Error("initializeWasm() must be awaited first!");
8354 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
8355 return nativeResponseValue;
8357 // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
8358 export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
8359 if(!isWasmInitialized) {
8360 throw new Error("initializeWasm() must be awaited first!");
8362 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
8363 // debug statements here
8365 // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
8366 export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
8367 if(!isWasmInitialized) {
8368 throw new Error("initializeWasm() must be awaited first!");
8370 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
8371 return nativeResponseValue;
8373 // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
8374 export function NodeAnnouncement_clone(orig: number): number {
8375 if(!isWasmInitialized) {
8376 throw new Error("initializeWasm() must be awaited first!");
8378 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
8379 return nativeResponseValue;
8381 // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_ptr);
8382 export function UnsignedChannelAnnouncement_free(this_ptr: number): void {
8383 if(!isWasmInitialized) {
8384 throw new Error("initializeWasm() must be awaited first!");
8386 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_ptr);
8387 // debug statements here
8389 // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8390 export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
8391 if(!isWasmInitialized) {
8392 throw new Error("initializeWasm() must be awaited first!");
8394 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
8395 return nativeResponseValue;
8397 // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
8398 export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
8399 if(!isWasmInitialized) {
8400 throw new Error("initializeWasm() must be awaited first!");
8402 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
8403 // debug statements here
8405 // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
8406 export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
8407 if(!isWasmInitialized) {
8408 throw new Error("initializeWasm() must be awaited first!");
8410 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
8411 return decodeArray(nativeResponseValue);
8413 // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8414 export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8415 if(!isWasmInitialized) {
8416 throw new Error("initializeWasm() must be awaited first!");
8418 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
8419 // debug statements here
8421 // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8422 export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
8423 if(!isWasmInitialized) {
8424 throw new Error("initializeWasm() must be awaited first!");
8426 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
8427 return nativeResponseValue;
8429 // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
8430 export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
8431 if(!isWasmInitialized) {
8432 throw new Error("initializeWasm() must be awaited first!");
8434 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
8435 // debug statements here
8437 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8438 export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
8439 if(!isWasmInitialized) {
8440 throw new Error("initializeWasm() must be awaited first!");
8442 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
8443 return decodeArray(nativeResponseValue);
8445 // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8446 export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
8447 if(!isWasmInitialized) {
8448 throw new Error("initializeWasm() must be awaited first!");
8450 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
8451 // debug statements here
8453 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8454 export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
8455 if(!isWasmInitialized) {
8456 throw new Error("initializeWasm() must be awaited first!");
8458 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
8459 return decodeArray(nativeResponseValue);
8461 // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8462 export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
8463 if(!isWasmInitialized) {
8464 throw new Error("initializeWasm() must be awaited first!");
8466 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
8467 // debug statements here
8469 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8470 export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
8471 if(!isWasmInitialized) {
8472 throw new Error("initializeWasm() must be awaited first!");
8474 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
8475 return decodeArray(nativeResponseValue);
8477 // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8478 export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
8479 if(!isWasmInitialized) {
8480 throw new Error("initializeWasm() must be awaited first!");
8482 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
8483 // debug statements here
8485 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8486 export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
8487 if(!isWasmInitialized) {
8488 throw new Error("initializeWasm() must be awaited first!");
8490 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
8491 return decodeArray(nativeResponseValue);
8493 // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8494 export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
8495 if(!isWasmInitialized) {
8496 throw new Error("initializeWasm() must be awaited first!");
8498 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
8499 // debug statements here
8501 // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
8502 export function UnsignedChannelAnnouncement_clone(orig: number): number {
8503 if(!isWasmInitialized) {
8504 throw new Error("initializeWasm() must be awaited first!");
8506 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
8507 return nativeResponseValue;
8509 // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_ptr);
8510 export function ChannelAnnouncement_free(this_ptr: number): void {
8511 if(!isWasmInitialized) {
8512 throw new Error("initializeWasm() must be awaited first!");
8514 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_ptr);
8515 // debug statements here
8517 // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8518 export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
8519 if(!isWasmInitialized) {
8520 throw new Error("initializeWasm() must be awaited first!");
8522 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
8523 return decodeArray(nativeResponseValue);
8525 // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8526 export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
8527 if(!isWasmInitialized) {
8528 throw new Error("initializeWasm() must be awaited first!");
8530 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
8531 // debug statements here
8533 // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8534 export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
8535 if(!isWasmInitialized) {
8536 throw new Error("initializeWasm() must be awaited first!");
8538 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
8539 return decodeArray(nativeResponseValue);
8541 // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8542 export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
8543 if(!isWasmInitialized) {
8544 throw new Error("initializeWasm() must be awaited first!");
8546 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
8547 // debug statements here
8549 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8550 export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
8551 if(!isWasmInitialized) {
8552 throw new Error("initializeWasm() must be awaited first!");
8554 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
8555 return decodeArray(nativeResponseValue);
8557 // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8558 export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
8559 if(!isWasmInitialized) {
8560 throw new Error("initializeWasm() must be awaited first!");
8562 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
8563 // debug statements here
8565 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8566 export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
8567 if(!isWasmInitialized) {
8568 throw new Error("initializeWasm() must be awaited first!");
8570 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
8571 return decodeArray(nativeResponseValue);
8573 // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8574 export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
8575 if(!isWasmInitialized) {
8576 throw new Error("initializeWasm() must be awaited first!");
8578 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
8579 // debug statements here
8581 // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8582 export function ChannelAnnouncement_get_contents(this_ptr: number): number {
8583 if(!isWasmInitialized) {
8584 throw new Error("initializeWasm() must be awaited first!");
8586 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
8587 return nativeResponseValue;
8589 // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
8590 export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
8591 if(!isWasmInitialized) {
8592 throw new Error("initializeWasm() must be awaited first!");
8594 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
8595 // debug statements here
8597 // 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);
8598 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 {
8599 if(!isWasmInitialized) {
8600 throw new Error("initializeWasm() must be awaited first!");
8602 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);
8603 return nativeResponseValue;
8605 // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
8606 export function ChannelAnnouncement_clone(orig: number): number {
8607 if(!isWasmInitialized) {
8608 throw new Error("initializeWasm() must be awaited first!");
8610 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
8611 return nativeResponseValue;
8613 // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_ptr);
8614 export function UnsignedChannelUpdate_free(this_ptr: number): void {
8615 if(!isWasmInitialized) {
8616 throw new Error("initializeWasm() must be awaited first!");
8618 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_ptr);
8619 // debug statements here
8621 // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
8622 export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
8623 if(!isWasmInitialized) {
8624 throw new Error("initializeWasm() must be awaited first!");
8626 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
8627 return decodeArray(nativeResponseValue);
8629 // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8630 export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8631 if(!isWasmInitialized) {
8632 throw new Error("initializeWasm() must be awaited first!");
8634 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
8635 // debug statements here
8637 // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8638 export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
8639 if(!isWasmInitialized) {
8640 throw new Error("initializeWasm() must be awaited first!");
8642 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
8643 return nativeResponseValue;
8645 // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
8646 export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
8647 if(!isWasmInitialized) {
8648 throw new Error("initializeWasm() must be awaited first!");
8650 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
8651 // debug statements here
8653 // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8654 export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
8655 if(!isWasmInitialized) {
8656 throw new Error("initializeWasm() must be awaited first!");
8658 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
8659 return nativeResponseValue;
8661 // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8662 export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
8663 if(!isWasmInitialized) {
8664 throw new Error("initializeWasm() must be awaited first!");
8666 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
8667 // debug statements here
8669 // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8670 export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
8671 if(!isWasmInitialized) {
8672 throw new Error("initializeWasm() must be awaited first!");
8674 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
8675 return nativeResponseValue;
8677 // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
8678 export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
8679 if(!isWasmInitialized) {
8680 throw new Error("initializeWasm() must be awaited first!");
8682 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
8683 // debug statements here
8685 // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8686 export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
8687 if(!isWasmInitialized) {
8688 throw new Error("initializeWasm() must be awaited first!");
8690 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
8691 return nativeResponseValue;
8693 // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
8694 export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
8695 if(!isWasmInitialized) {
8696 throw new Error("initializeWasm() must be awaited first!");
8698 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
8699 // debug statements here
8701 // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8702 export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
8703 if(!isWasmInitialized) {
8704 throw new Error("initializeWasm() must be awaited first!");
8706 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
8707 return nativeResponseValue;
8709 // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
8710 export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
8711 if(!isWasmInitialized) {
8712 throw new Error("initializeWasm() must be awaited first!");
8714 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
8715 // debug statements here
8717 // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8718 export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
8719 if(!isWasmInitialized) {
8720 throw new Error("initializeWasm() must be awaited first!");
8722 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
8723 return nativeResponseValue;
8725 // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8726 export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
8727 if(!isWasmInitialized) {
8728 throw new Error("initializeWasm() must be awaited first!");
8730 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
8731 // debug statements here
8733 // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8734 export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
8735 if(!isWasmInitialized) {
8736 throw new Error("initializeWasm() must be awaited first!");
8738 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
8739 return nativeResponseValue;
8741 // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8742 export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
8743 if(!isWasmInitialized) {
8744 throw new Error("initializeWasm() must be awaited first!");
8746 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
8747 // debug statements here
8749 // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
8750 export function UnsignedChannelUpdate_clone(orig: number): number {
8751 if(!isWasmInitialized) {
8752 throw new Error("initializeWasm() must be awaited first!");
8754 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
8755 return nativeResponseValue;
8757 // void ChannelUpdate_free(struct LDKChannelUpdate this_ptr);
8758 export function ChannelUpdate_free(this_ptr: number): void {
8759 if(!isWasmInitialized) {
8760 throw new Error("initializeWasm() must be awaited first!");
8762 const nativeResponseValue = wasm.ChannelUpdate_free(this_ptr);
8763 // debug statements here
8765 // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
8766 export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
8767 if(!isWasmInitialized) {
8768 throw new Error("initializeWasm() must be awaited first!");
8770 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
8771 return decodeArray(nativeResponseValue);
8773 // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
8774 export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
8775 if(!isWasmInitialized) {
8776 throw new Error("initializeWasm() must be awaited first!");
8778 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
8779 // debug statements here
8781 // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
8782 export function ChannelUpdate_get_contents(this_ptr: number): number {
8783 if(!isWasmInitialized) {
8784 throw new Error("initializeWasm() must be awaited first!");
8786 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
8787 return nativeResponseValue;
8789 // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
8790 export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
8791 if(!isWasmInitialized) {
8792 throw new Error("initializeWasm() must be awaited first!");
8794 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
8795 // debug statements here
8797 // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
8798 export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
8799 if(!isWasmInitialized) {
8800 throw new Error("initializeWasm() must be awaited first!");
8802 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
8803 return nativeResponseValue;
8805 // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
8806 export function ChannelUpdate_clone(orig: number): number {
8807 if(!isWasmInitialized) {
8808 throw new Error("initializeWasm() must be awaited first!");
8810 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
8811 return nativeResponseValue;
8813 // void QueryChannelRange_free(struct LDKQueryChannelRange this_ptr);
8814 export function QueryChannelRange_free(this_ptr: number): void {
8815 if(!isWasmInitialized) {
8816 throw new Error("initializeWasm() must be awaited first!");
8818 const nativeResponseValue = wasm.QueryChannelRange_free(this_ptr);
8819 // debug statements here
8821 // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
8822 export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
8823 if(!isWasmInitialized) {
8824 throw new Error("initializeWasm() must be awaited first!");
8826 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
8827 return decodeArray(nativeResponseValue);
8829 // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8830 export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8831 if(!isWasmInitialized) {
8832 throw new Error("initializeWasm() must be awaited first!");
8834 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
8835 // debug statements here
8837 // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
8838 export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
8839 if(!isWasmInitialized) {
8840 throw new Error("initializeWasm() must be awaited first!");
8842 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
8843 return nativeResponseValue;
8845 // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8846 export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
8847 if(!isWasmInitialized) {
8848 throw new Error("initializeWasm() must be awaited first!");
8850 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
8851 // debug statements here
8853 // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
8854 export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
8855 if(!isWasmInitialized) {
8856 throw new Error("initializeWasm() must be awaited first!");
8858 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
8859 return nativeResponseValue;
8861 // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8862 export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
8863 if(!isWasmInitialized) {
8864 throw new Error("initializeWasm() must be awaited first!");
8866 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
8867 // debug statements here
8869 // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
8870 export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
8871 if(!isWasmInitialized) {
8872 throw new Error("initializeWasm() must be awaited first!");
8874 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
8875 return nativeResponseValue;
8877 // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
8878 export function QueryChannelRange_clone(orig: number): number {
8879 if(!isWasmInitialized) {
8880 throw new Error("initializeWasm() must be awaited first!");
8882 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
8883 return nativeResponseValue;
8885 // void ReplyChannelRange_free(struct LDKReplyChannelRange this_ptr);
8886 export function ReplyChannelRange_free(this_ptr: number): void {
8887 if(!isWasmInitialized) {
8888 throw new Error("initializeWasm() must be awaited first!");
8890 const nativeResponseValue = wasm.ReplyChannelRange_free(this_ptr);
8891 // debug statements here
8893 // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
8894 export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
8895 if(!isWasmInitialized) {
8896 throw new Error("initializeWasm() must be awaited first!");
8898 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
8899 return decodeArray(nativeResponseValue);
8901 // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8902 export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8903 if(!isWasmInitialized) {
8904 throw new Error("initializeWasm() must be awaited first!");
8906 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
8907 // debug statements here
8909 // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
8910 export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
8911 if(!isWasmInitialized) {
8912 throw new Error("initializeWasm() must be awaited first!");
8914 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
8915 return nativeResponseValue;
8917 // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8918 export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
8919 if(!isWasmInitialized) {
8920 throw new Error("initializeWasm() must be awaited first!");
8922 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
8923 // debug statements here
8925 // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
8926 export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
8927 if(!isWasmInitialized) {
8928 throw new Error("initializeWasm() must be awaited first!");
8930 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
8931 return nativeResponseValue;
8933 // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8934 export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
8935 if(!isWasmInitialized) {
8936 throw new Error("initializeWasm() must be awaited first!");
8938 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
8939 // debug statements here
8941 // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
8942 export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
8943 if(!isWasmInitialized) {
8944 throw new Error("initializeWasm() must be awaited first!");
8946 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
8947 return nativeResponseValue;
8949 // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
8950 export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
8951 if(!isWasmInitialized) {
8952 throw new Error("initializeWasm() must be awaited first!");
8954 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
8955 // debug statements here
8957 // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
8958 export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
8959 if(!isWasmInitialized) {
8960 throw new Error("initializeWasm() must be awaited first!");
8962 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
8963 // debug statements here
8965 // 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);
8966 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 {
8967 if(!isWasmInitialized) {
8968 throw new Error("initializeWasm() must be awaited first!");
8970 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
8971 return nativeResponseValue;
8973 // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
8974 export function ReplyChannelRange_clone(orig: number): number {
8975 if(!isWasmInitialized) {
8976 throw new Error("initializeWasm() must be awaited first!");
8978 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
8979 return nativeResponseValue;
8981 // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_ptr);
8982 export function QueryShortChannelIds_free(this_ptr: number): void {
8983 if(!isWasmInitialized) {
8984 throw new Error("initializeWasm() must be awaited first!");
8986 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_ptr);
8987 // debug statements here
8989 // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
8990 export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
8991 if(!isWasmInitialized) {
8992 throw new Error("initializeWasm() must be awaited first!");
8994 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
8995 return decodeArray(nativeResponseValue);
8997 // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8998 export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8999 if(!isWasmInitialized) {
9000 throw new Error("initializeWasm() must be awaited first!");
9002 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
9003 // debug statements here
9005 // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9006 export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
9007 if(!isWasmInitialized) {
9008 throw new Error("initializeWasm() must be awaited first!");
9010 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
9011 // debug statements here
9013 // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
9014 export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
9015 if(!isWasmInitialized) {
9016 throw new Error("initializeWasm() must be awaited first!");
9018 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
9019 return nativeResponseValue;
9021 // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
9022 export function QueryShortChannelIds_clone(orig: number): number {
9023 if(!isWasmInitialized) {
9024 throw new Error("initializeWasm() must be awaited first!");
9026 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
9027 return nativeResponseValue;
9029 // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_ptr);
9030 export function ReplyShortChannelIdsEnd_free(this_ptr: number): void {
9031 if(!isWasmInitialized) {
9032 throw new Error("initializeWasm() must be awaited first!");
9034 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_ptr);
9035 // debug statements here
9037 // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
9038 export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
9039 if(!isWasmInitialized) {
9040 throw new Error("initializeWasm() must be awaited first!");
9042 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
9043 return decodeArray(nativeResponseValue);
9045 // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9046 export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9047 if(!isWasmInitialized) {
9048 throw new Error("initializeWasm() must be awaited first!");
9050 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
9051 // debug statements here
9053 // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
9054 export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
9055 if(!isWasmInitialized) {
9056 throw new Error("initializeWasm() must be awaited first!");
9058 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
9059 return nativeResponseValue;
9061 // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
9062 export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
9063 if(!isWasmInitialized) {
9064 throw new Error("initializeWasm() must be awaited first!");
9066 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
9067 // debug statements here
9069 // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
9070 export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
9071 if(!isWasmInitialized) {
9072 throw new Error("initializeWasm() must be awaited first!");
9074 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
9075 return nativeResponseValue;
9077 // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
9078 export function ReplyShortChannelIdsEnd_clone(orig: number): number {
9079 if(!isWasmInitialized) {
9080 throw new Error("initializeWasm() must be awaited first!");
9082 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
9083 return nativeResponseValue;
9085 // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_ptr);
9086 export function GossipTimestampFilter_free(this_ptr: number): void {
9087 if(!isWasmInitialized) {
9088 throw new Error("initializeWasm() must be awaited first!");
9090 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_ptr);
9091 // debug statements here
9093 // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
9094 export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
9095 if(!isWasmInitialized) {
9096 throw new Error("initializeWasm() must be awaited first!");
9098 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
9099 return decodeArray(nativeResponseValue);
9101 // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9102 export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9103 if(!isWasmInitialized) {
9104 throw new Error("initializeWasm() must be awaited first!");
9106 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
9107 // debug statements here
9109 // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9110 export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
9111 if(!isWasmInitialized) {
9112 throw new Error("initializeWasm() must be awaited first!");
9114 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
9115 return nativeResponseValue;
9117 // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9118 export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
9119 if(!isWasmInitialized) {
9120 throw new Error("initializeWasm() must be awaited first!");
9122 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
9123 // debug statements here
9125 // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9126 export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
9127 if(!isWasmInitialized) {
9128 throw new Error("initializeWasm() must be awaited first!");
9130 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
9131 return nativeResponseValue;
9133 // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9134 export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
9135 if(!isWasmInitialized) {
9136 throw new Error("initializeWasm() must be awaited first!");
9138 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
9139 // debug statements here
9141 // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
9142 export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
9143 if(!isWasmInitialized) {
9144 throw new Error("initializeWasm() must be awaited first!");
9146 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
9147 return nativeResponseValue;
9149 // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
9150 export function GossipTimestampFilter_clone(orig: number): number {
9151 if(!isWasmInitialized) {
9152 throw new Error("initializeWasm() must be awaited first!");
9154 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
9155 return nativeResponseValue;
9157 // void ErrorAction_free(struct LDKErrorAction this_ptr);
9158 export function ErrorAction_free(this_ptr: number): void {
9159 if(!isWasmInitialized) {
9160 throw new Error("initializeWasm() must be awaited first!");
9162 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
9163 // debug statements here
9165 // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
9166 export function ErrorAction_clone(orig: number): number {
9167 if(!isWasmInitialized) {
9168 throw new Error("initializeWasm() must be awaited first!");
9170 const nativeResponseValue = wasm.ErrorAction_clone(orig);
9171 return nativeResponseValue;
9173 // void LightningError_free(struct LDKLightningError this_ptr);
9174 export function LightningError_free(this_ptr: number): void {
9175 if(!isWasmInitialized) {
9176 throw new Error("initializeWasm() must be awaited first!");
9178 const nativeResponseValue = wasm.LightningError_free(this_ptr);
9179 // debug statements here
9181 // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
9182 export function LightningError_get_err(this_ptr: number): String {
9183 if(!isWasmInitialized) {
9184 throw new Error("initializeWasm() must be awaited first!");
9186 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
9187 return nativeResponseValue;
9189 // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9190 export function LightningError_set_err(this_ptr: number, val: Uint8Array): void {
9191 if(!isWasmInitialized) {
9192 throw new Error("initializeWasm() must be awaited first!");
9194 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, encodeArray(val));
9195 // debug statements here
9197 // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
9198 export function LightningError_get_action(this_ptr: number): number {
9199 if(!isWasmInitialized) {
9200 throw new Error("initializeWasm() must be awaited first!");
9202 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
9203 return nativeResponseValue;
9205 // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
9206 export function LightningError_set_action(this_ptr: number, val: number): void {
9207 if(!isWasmInitialized) {
9208 throw new Error("initializeWasm() must be awaited first!");
9210 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
9211 // debug statements here
9213 // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
9214 export function LightningError_new(err_arg: Uint8Array, action_arg: number): number {
9215 if(!isWasmInitialized) {
9216 throw new Error("initializeWasm() must be awaited first!");
9218 const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
9219 return nativeResponseValue;
9221 // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
9222 export function LightningError_clone(orig: number): number {
9223 if(!isWasmInitialized) {
9224 throw new Error("initializeWasm() must be awaited first!");
9226 const nativeResponseValue = wasm.LightningError_clone(orig);
9227 return nativeResponseValue;
9229 // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_ptr);
9230 export function CommitmentUpdate_free(this_ptr: number): void {
9231 if(!isWasmInitialized) {
9232 throw new Error("initializeWasm() must be awaited first!");
9234 const nativeResponseValue = wasm.CommitmentUpdate_free(this_ptr);
9235 // debug statements here
9237 // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
9238 export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
9239 if(!isWasmInitialized) {
9240 throw new Error("initializeWasm() must be awaited first!");
9242 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
9243 // debug statements here
9245 // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
9246 export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
9247 if(!isWasmInitialized) {
9248 throw new Error("initializeWasm() must be awaited first!");
9250 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
9251 // debug statements here
9253 // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
9254 export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
9255 if(!isWasmInitialized) {
9256 throw new Error("initializeWasm() must be awaited first!");
9258 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
9259 // debug statements here
9261 // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
9262 export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
9263 if(!isWasmInitialized) {
9264 throw new Error("initializeWasm() must be awaited first!");
9266 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
9267 // debug statements here
9269 // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9270 export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
9271 if(!isWasmInitialized) {
9272 throw new Error("initializeWasm() must be awaited first!");
9274 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
9275 return nativeResponseValue;
9277 // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
9278 export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
9279 if(!isWasmInitialized) {
9280 throw new Error("initializeWasm() must be awaited first!");
9282 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
9283 // debug statements here
9285 // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9286 export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
9287 if(!isWasmInitialized) {
9288 throw new Error("initializeWasm() must be awaited first!");
9290 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
9291 return nativeResponseValue;
9293 // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
9294 export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
9295 if(!isWasmInitialized) {
9296 throw new Error("initializeWasm() must be awaited first!");
9298 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
9299 // debug statements here
9301 // 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);
9302 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 {
9303 if(!isWasmInitialized) {
9304 throw new Error("initializeWasm() must be awaited first!");
9306 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);
9307 return nativeResponseValue;
9309 // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
9310 export function CommitmentUpdate_clone(orig: number): number {
9311 if(!isWasmInitialized) {
9312 throw new Error("initializeWasm() must be awaited first!");
9314 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
9315 return nativeResponseValue;
9317 // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
9318 export function HTLCFailChannelUpdate_free(this_ptr: number): void {
9319 if(!isWasmInitialized) {
9320 throw new Error("initializeWasm() must be awaited first!");
9322 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
9323 // debug statements here
9325 // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
9326 export function HTLCFailChannelUpdate_clone(orig: number): number {
9327 if(!isWasmInitialized) {
9328 throw new Error("initializeWasm() must be awaited first!");
9330 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
9331 return nativeResponseValue;
9333 // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
9334 export function ChannelMessageHandler_free(this_ptr: number): void {
9335 if(!isWasmInitialized) {
9336 throw new Error("initializeWasm() must be awaited first!");
9338 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
9339 // debug statements here
9341 // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
9342 export function RoutingMessageHandler_free(this_ptr: number): void {
9343 if(!isWasmInitialized) {
9344 throw new Error("initializeWasm() must be awaited first!");
9346 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
9347 // debug statements here
9349 // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
9350 export function AcceptChannel_write(obj: number): Uint8Array {
9351 if(!isWasmInitialized) {
9352 throw new Error("initializeWasm() must be awaited first!");
9354 const nativeResponseValue = wasm.AcceptChannel_write(obj);
9355 return decodeArray(nativeResponseValue);
9357 // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
9358 export function AcceptChannel_read(ser: Uint8Array): number {
9359 if(!isWasmInitialized) {
9360 throw new Error("initializeWasm() must be awaited first!");
9362 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
9363 return nativeResponseValue;
9365 // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
9366 export function AnnouncementSignatures_write(obj: number): Uint8Array {
9367 if(!isWasmInitialized) {
9368 throw new Error("initializeWasm() must be awaited first!");
9370 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
9371 return decodeArray(nativeResponseValue);
9373 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
9374 export function AnnouncementSignatures_read(ser: Uint8Array): number {
9375 if(!isWasmInitialized) {
9376 throw new Error("initializeWasm() must be awaited first!");
9378 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
9379 return nativeResponseValue;
9381 // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
9382 export function ChannelReestablish_write(obj: number): Uint8Array {
9383 if(!isWasmInitialized) {
9384 throw new Error("initializeWasm() must be awaited first!");
9386 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
9387 return decodeArray(nativeResponseValue);
9389 // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
9390 export function ChannelReestablish_read(ser: Uint8Array): number {
9391 if(!isWasmInitialized) {
9392 throw new Error("initializeWasm() must be awaited first!");
9394 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
9395 return nativeResponseValue;
9397 // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
9398 export function ClosingSigned_write(obj: number): Uint8Array {
9399 if(!isWasmInitialized) {
9400 throw new Error("initializeWasm() must be awaited first!");
9402 const nativeResponseValue = wasm.ClosingSigned_write(obj);
9403 return decodeArray(nativeResponseValue);
9405 // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
9406 export function ClosingSigned_read(ser: Uint8Array): number {
9407 if(!isWasmInitialized) {
9408 throw new Error("initializeWasm() must be awaited first!");
9410 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
9411 return nativeResponseValue;
9413 // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
9414 export function CommitmentSigned_write(obj: number): Uint8Array {
9415 if(!isWasmInitialized) {
9416 throw new Error("initializeWasm() must be awaited first!");
9418 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
9419 return decodeArray(nativeResponseValue);
9421 // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
9422 export function CommitmentSigned_read(ser: Uint8Array): number {
9423 if(!isWasmInitialized) {
9424 throw new Error("initializeWasm() must be awaited first!");
9426 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
9427 return nativeResponseValue;
9429 // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
9430 export function FundingCreated_write(obj: number): Uint8Array {
9431 if(!isWasmInitialized) {
9432 throw new Error("initializeWasm() must be awaited first!");
9434 const nativeResponseValue = wasm.FundingCreated_write(obj);
9435 return decodeArray(nativeResponseValue);
9437 // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
9438 export function FundingCreated_read(ser: Uint8Array): number {
9439 if(!isWasmInitialized) {
9440 throw new Error("initializeWasm() must be awaited first!");
9442 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
9443 return nativeResponseValue;
9445 // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
9446 export function FundingSigned_write(obj: number): Uint8Array {
9447 if(!isWasmInitialized) {
9448 throw new Error("initializeWasm() must be awaited first!");
9450 const nativeResponseValue = wasm.FundingSigned_write(obj);
9451 return decodeArray(nativeResponseValue);
9453 // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
9454 export function FundingSigned_read(ser: Uint8Array): number {
9455 if(!isWasmInitialized) {
9456 throw new Error("initializeWasm() must be awaited first!");
9458 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
9459 return nativeResponseValue;
9461 // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
9462 export function FundingLocked_write(obj: number): Uint8Array {
9463 if(!isWasmInitialized) {
9464 throw new Error("initializeWasm() must be awaited first!");
9466 const nativeResponseValue = wasm.FundingLocked_write(obj);
9467 return decodeArray(nativeResponseValue);
9469 // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
9470 export function FundingLocked_read(ser: Uint8Array): number {
9471 if(!isWasmInitialized) {
9472 throw new Error("initializeWasm() must be awaited first!");
9474 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
9475 return nativeResponseValue;
9477 // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
9478 export function Init_write(obj: number): Uint8Array {
9479 if(!isWasmInitialized) {
9480 throw new Error("initializeWasm() must be awaited first!");
9482 const nativeResponseValue = wasm.Init_write(obj);
9483 return decodeArray(nativeResponseValue);
9485 // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
9486 export function Init_read(ser: Uint8Array): number {
9487 if(!isWasmInitialized) {
9488 throw new Error("initializeWasm() must be awaited first!");
9490 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
9491 return nativeResponseValue;
9493 // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
9494 export function OpenChannel_write(obj: number): Uint8Array {
9495 if(!isWasmInitialized) {
9496 throw new Error("initializeWasm() must be awaited first!");
9498 const nativeResponseValue = wasm.OpenChannel_write(obj);
9499 return decodeArray(nativeResponseValue);
9501 // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
9502 export function OpenChannel_read(ser: Uint8Array): number {
9503 if(!isWasmInitialized) {
9504 throw new Error("initializeWasm() must be awaited first!");
9506 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
9507 return nativeResponseValue;
9509 // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
9510 export function RevokeAndACK_write(obj: number): Uint8Array {
9511 if(!isWasmInitialized) {
9512 throw new Error("initializeWasm() must be awaited first!");
9514 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
9515 return decodeArray(nativeResponseValue);
9517 // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
9518 export function RevokeAndACK_read(ser: Uint8Array): number {
9519 if(!isWasmInitialized) {
9520 throw new Error("initializeWasm() must be awaited first!");
9522 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
9523 return nativeResponseValue;
9525 // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
9526 export function Shutdown_write(obj: number): Uint8Array {
9527 if(!isWasmInitialized) {
9528 throw new Error("initializeWasm() must be awaited first!");
9530 const nativeResponseValue = wasm.Shutdown_write(obj);
9531 return decodeArray(nativeResponseValue);
9533 // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
9534 export function Shutdown_read(ser: Uint8Array): number {
9535 if(!isWasmInitialized) {
9536 throw new Error("initializeWasm() must be awaited first!");
9538 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
9539 return nativeResponseValue;
9541 // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
9542 export function UpdateFailHTLC_write(obj: number): Uint8Array {
9543 if(!isWasmInitialized) {
9544 throw new Error("initializeWasm() must be awaited first!");
9546 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
9547 return decodeArray(nativeResponseValue);
9549 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
9550 export function UpdateFailHTLC_read(ser: Uint8Array): number {
9551 if(!isWasmInitialized) {
9552 throw new Error("initializeWasm() must be awaited first!");
9554 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
9555 return nativeResponseValue;
9557 // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
9558 export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
9559 if(!isWasmInitialized) {
9560 throw new Error("initializeWasm() must be awaited first!");
9562 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
9563 return decodeArray(nativeResponseValue);
9565 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
9566 export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
9567 if(!isWasmInitialized) {
9568 throw new Error("initializeWasm() must be awaited first!");
9570 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
9571 return nativeResponseValue;
9573 // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
9574 export function UpdateFee_write(obj: number): Uint8Array {
9575 if(!isWasmInitialized) {
9576 throw new Error("initializeWasm() must be awaited first!");
9578 const nativeResponseValue = wasm.UpdateFee_write(obj);
9579 return decodeArray(nativeResponseValue);
9581 // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
9582 export function UpdateFee_read(ser: Uint8Array): number {
9583 if(!isWasmInitialized) {
9584 throw new Error("initializeWasm() must be awaited first!");
9586 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
9587 return nativeResponseValue;
9589 // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
9590 export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
9591 if(!isWasmInitialized) {
9592 throw new Error("initializeWasm() must be awaited first!");
9594 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
9595 return decodeArray(nativeResponseValue);
9597 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
9598 export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
9599 if(!isWasmInitialized) {
9600 throw new Error("initializeWasm() must be awaited first!");
9602 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
9603 return nativeResponseValue;
9605 // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
9606 export function UpdateAddHTLC_write(obj: number): Uint8Array {
9607 if(!isWasmInitialized) {
9608 throw new Error("initializeWasm() must be awaited first!");
9610 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
9611 return decodeArray(nativeResponseValue);
9613 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
9614 export function UpdateAddHTLC_read(ser: Uint8Array): number {
9615 if(!isWasmInitialized) {
9616 throw new Error("initializeWasm() must be awaited first!");
9618 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
9619 return nativeResponseValue;
9621 // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
9622 export function Ping_write(obj: number): Uint8Array {
9623 if(!isWasmInitialized) {
9624 throw new Error("initializeWasm() must be awaited first!");
9626 const nativeResponseValue = wasm.Ping_write(obj);
9627 return decodeArray(nativeResponseValue);
9629 // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
9630 export function Ping_read(ser: Uint8Array): number {
9631 if(!isWasmInitialized) {
9632 throw new Error("initializeWasm() must be awaited first!");
9634 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
9635 return nativeResponseValue;
9637 // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
9638 export function Pong_write(obj: number): Uint8Array {
9639 if(!isWasmInitialized) {
9640 throw new Error("initializeWasm() must be awaited first!");
9642 const nativeResponseValue = wasm.Pong_write(obj);
9643 return decodeArray(nativeResponseValue);
9645 // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
9646 export function Pong_read(ser: Uint8Array): number {
9647 if(!isWasmInitialized) {
9648 throw new Error("initializeWasm() must be awaited first!");
9650 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
9651 return nativeResponseValue;
9653 // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
9654 export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
9655 if(!isWasmInitialized) {
9656 throw new Error("initializeWasm() must be awaited first!");
9658 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
9659 return decodeArray(nativeResponseValue);
9661 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
9662 export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
9663 if(!isWasmInitialized) {
9664 throw new Error("initializeWasm() must be awaited first!");
9666 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
9667 return nativeResponseValue;
9669 // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
9670 export function ChannelAnnouncement_write(obj: number): Uint8Array {
9671 if(!isWasmInitialized) {
9672 throw new Error("initializeWasm() must be awaited first!");
9674 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
9675 return decodeArray(nativeResponseValue);
9677 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
9678 export function ChannelAnnouncement_read(ser: Uint8Array): number {
9679 if(!isWasmInitialized) {
9680 throw new Error("initializeWasm() must be awaited first!");
9682 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
9683 return nativeResponseValue;
9685 // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
9686 export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
9687 if(!isWasmInitialized) {
9688 throw new Error("initializeWasm() must be awaited first!");
9690 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
9691 return decodeArray(nativeResponseValue);
9693 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
9694 export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
9695 if(!isWasmInitialized) {
9696 throw new Error("initializeWasm() must be awaited first!");
9698 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
9699 return nativeResponseValue;
9701 // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
9702 export function ChannelUpdate_write(obj: number): Uint8Array {
9703 if(!isWasmInitialized) {
9704 throw new Error("initializeWasm() must be awaited first!");
9706 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
9707 return decodeArray(nativeResponseValue);
9709 // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
9710 export function ChannelUpdate_read(ser: Uint8Array): number {
9711 if(!isWasmInitialized) {
9712 throw new Error("initializeWasm() must be awaited first!");
9714 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
9715 return nativeResponseValue;
9717 // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
9718 export function ErrorMessage_write(obj: number): Uint8Array {
9719 if(!isWasmInitialized) {
9720 throw new Error("initializeWasm() must be awaited first!");
9722 const nativeResponseValue = wasm.ErrorMessage_write(obj);
9723 return decodeArray(nativeResponseValue);
9725 // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
9726 export function ErrorMessage_read(ser: Uint8Array): number {
9727 if(!isWasmInitialized) {
9728 throw new Error("initializeWasm() must be awaited first!");
9730 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
9731 return nativeResponseValue;
9733 // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
9734 export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
9735 if(!isWasmInitialized) {
9736 throw new Error("initializeWasm() must be awaited first!");
9738 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
9739 return decodeArray(nativeResponseValue);
9741 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
9742 export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
9743 if(!isWasmInitialized) {
9744 throw new Error("initializeWasm() must be awaited first!");
9746 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
9747 return nativeResponseValue;
9749 // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
9750 export function NodeAnnouncement_write(obj: number): Uint8Array {
9751 if(!isWasmInitialized) {
9752 throw new Error("initializeWasm() must be awaited first!");
9754 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
9755 return decodeArray(nativeResponseValue);
9757 // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
9758 export function NodeAnnouncement_read(ser: Uint8Array): number {
9759 if(!isWasmInitialized) {
9760 throw new Error("initializeWasm() must be awaited first!");
9762 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
9763 return nativeResponseValue;
9765 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
9766 export function QueryShortChannelIds_read(ser: Uint8Array): number {
9767 if(!isWasmInitialized) {
9768 throw new Error("initializeWasm() must be awaited first!");
9770 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
9771 return nativeResponseValue;
9773 // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
9774 export function QueryShortChannelIds_write(obj: number): Uint8Array {
9775 if(!isWasmInitialized) {
9776 throw new Error("initializeWasm() must be awaited first!");
9778 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
9779 return decodeArray(nativeResponseValue);
9781 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
9782 export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
9783 if(!isWasmInitialized) {
9784 throw new Error("initializeWasm() must be awaited first!");
9786 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
9787 return nativeResponseValue;
9789 // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
9790 export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
9791 if(!isWasmInitialized) {
9792 throw new Error("initializeWasm() must be awaited first!");
9794 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
9795 return decodeArray(nativeResponseValue);
9797 // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
9798 export function QueryChannelRange_read(ser: Uint8Array): number {
9799 if(!isWasmInitialized) {
9800 throw new Error("initializeWasm() must be awaited first!");
9802 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
9803 return nativeResponseValue;
9805 // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
9806 export function QueryChannelRange_write(obj: number): Uint8Array {
9807 if(!isWasmInitialized) {
9808 throw new Error("initializeWasm() must be awaited first!");
9810 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
9811 return decodeArray(nativeResponseValue);
9813 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
9814 export function ReplyChannelRange_read(ser: Uint8Array): number {
9815 if(!isWasmInitialized) {
9816 throw new Error("initializeWasm() must be awaited first!");
9818 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
9819 return nativeResponseValue;
9821 // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
9822 export function ReplyChannelRange_write(obj: number): Uint8Array {
9823 if(!isWasmInitialized) {
9824 throw new Error("initializeWasm() must be awaited first!");
9826 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
9827 return decodeArray(nativeResponseValue);
9829 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
9830 export function GossipTimestampFilter_read(ser: Uint8Array): number {
9831 if(!isWasmInitialized) {
9832 throw new Error("initializeWasm() must be awaited first!");
9834 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
9835 return nativeResponseValue;
9837 // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
9838 export function GossipTimestampFilter_write(obj: number): Uint8Array {
9839 if(!isWasmInitialized) {
9840 throw new Error("initializeWasm() must be awaited first!");
9842 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
9843 return decodeArray(nativeResponseValue);
9845 // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_ptr);
9846 export function IgnoringMessageHandler_free(this_ptr: number): void {
9847 if(!isWasmInitialized) {
9848 throw new Error("initializeWasm() must be awaited first!");
9850 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_ptr);
9851 // debug statements here
9853 // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
9854 export function IgnoringMessageHandler_new(): number {
9855 if(!isWasmInitialized) {
9856 throw new Error("initializeWasm() must be awaited first!");
9858 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
9859 return nativeResponseValue;
9861 // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
9862 export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
9863 if(!isWasmInitialized) {
9864 throw new Error("initializeWasm() must be awaited first!");
9866 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
9867 return nativeResponseValue;
9869 // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
9870 export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
9871 if(!isWasmInitialized) {
9872 throw new Error("initializeWasm() must be awaited first!");
9874 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
9875 return nativeResponseValue;
9877 // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_ptr);
9878 export function ErroringMessageHandler_free(this_ptr: number): void {
9879 if(!isWasmInitialized) {
9880 throw new Error("initializeWasm() must be awaited first!");
9882 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_ptr);
9883 // debug statements here
9885 // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
9886 export function ErroringMessageHandler_new(): number {
9887 if(!isWasmInitialized) {
9888 throw new Error("initializeWasm() must be awaited first!");
9890 const nativeResponseValue = wasm.ErroringMessageHandler_new();
9891 return nativeResponseValue;
9893 // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
9894 export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
9895 if(!isWasmInitialized) {
9896 throw new Error("initializeWasm() must be awaited first!");
9898 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
9899 return nativeResponseValue;
9901 // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
9902 export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
9903 if(!isWasmInitialized) {
9904 throw new Error("initializeWasm() must be awaited first!");
9906 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
9907 return nativeResponseValue;
9909 // void MessageHandler_free(struct LDKMessageHandler this_ptr);
9910 export function MessageHandler_free(this_ptr: number): void {
9911 if(!isWasmInitialized) {
9912 throw new Error("initializeWasm() must be awaited first!");
9914 const nativeResponseValue = wasm.MessageHandler_free(this_ptr);
9915 // debug statements here
9917 // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
9918 export function MessageHandler_get_chan_handler(this_ptr: number): number {
9919 if(!isWasmInitialized) {
9920 throw new Error("initializeWasm() must be awaited first!");
9922 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
9923 return nativeResponseValue;
9925 // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
9926 export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
9927 if(!isWasmInitialized) {
9928 throw new Error("initializeWasm() must be awaited first!");
9930 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
9931 // debug statements here
9933 // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
9934 export function MessageHandler_get_route_handler(this_ptr: number): number {
9935 if(!isWasmInitialized) {
9936 throw new Error("initializeWasm() must be awaited first!");
9938 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
9939 return nativeResponseValue;
9941 // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
9942 export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
9943 if(!isWasmInitialized) {
9944 throw new Error("initializeWasm() must be awaited first!");
9946 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
9947 // debug statements here
9949 // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
9950 export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
9951 if(!isWasmInitialized) {
9952 throw new Error("initializeWasm() must be awaited first!");
9954 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
9955 return nativeResponseValue;
9957 // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
9958 export function SocketDescriptor_clone(orig: number): number {
9959 if(!isWasmInitialized) {
9960 throw new Error("initializeWasm() must be awaited first!");
9962 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
9963 return nativeResponseValue;
9965 // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
9966 export function SocketDescriptor_free(this_ptr: number): void {
9967 if(!isWasmInitialized) {
9968 throw new Error("initializeWasm() must be awaited first!");
9970 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
9971 // debug statements here
9973 // void PeerHandleError_free(struct LDKPeerHandleError this_ptr);
9974 export function PeerHandleError_free(this_ptr: number): void {
9975 if(!isWasmInitialized) {
9976 throw new Error("initializeWasm() must be awaited first!");
9978 const nativeResponseValue = wasm.PeerHandleError_free(this_ptr);
9979 // debug statements here
9981 // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
9982 export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
9983 if(!isWasmInitialized) {
9984 throw new Error("initializeWasm() must be awaited first!");
9986 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
9987 return nativeResponseValue;
9989 // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
9990 export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
9991 if(!isWasmInitialized) {
9992 throw new Error("initializeWasm() must be awaited first!");
9994 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
9995 // debug statements here
9997 // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
9998 export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
9999 if(!isWasmInitialized) {
10000 throw new Error("initializeWasm() must be awaited first!");
10002 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
10003 return nativeResponseValue;
10005 // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
10006 export function PeerHandleError_clone(orig: number): number {
10007 if(!isWasmInitialized) {
10008 throw new Error("initializeWasm() must be awaited first!");
10010 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
10011 return nativeResponseValue;
10013 // void PeerManager_free(struct LDKPeerManager this_ptr);
10014 export function PeerManager_free(this_ptr: number): void {
10015 if(!isWasmInitialized) {
10016 throw new Error("initializeWasm() must be awaited first!");
10018 const nativeResponseValue = wasm.PeerManager_free(this_ptr);
10019 // debug statements here
10021 // 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);
10022 export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
10023 if(!isWasmInitialized) {
10024 throw new Error("initializeWasm() must be awaited first!");
10026 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
10027 return nativeResponseValue;
10029 // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
10030 export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
10031 if(!isWasmInitialized) {
10032 throw new Error("initializeWasm() must be awaited first!");
10034 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
10035 return nativeResponseValue;
10037 // 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);
10038 export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
10039 if(!isWasmInitialized) {
10040 throw new Error("initializeWasm() must be awaited first!");
10042 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
10043 return nativeResponseValue;
10045 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
10046 export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
10047 if(!isWasmInitialized) {
10048 throw new Error("initializeWasm() must be awaited first!");
10050 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
10051 return nativeResponseValue;
10053 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10054 export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
10055 if(!isWasmInitialized) {
10056 throw new Error("initializeWasm() must be awaited first!");
10058 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
10059 return nativeResponseValue;
10061 // 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);
10062 export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
10063 if(!isWasmInitialized) {
10064 throw new Error("initializeWasm() must be awaited first!");
10066 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
10067 return nativeResponseValue;
10069 // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
10070 export function PeerManager_process_events(this_arg: number): void {
10071 if(!isWasmInitialized) {
10072 throw new Error("initializeWasm() must be awaited first!");
10074 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
10075 // debug statements here
10077 // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10078 export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
10079 if(!isWasmInitialized) {
10080 throw new Error("initializeWasm() must be awaited first!");
10082 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
10083 // debug statements here
10085 // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
10086 export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
10087 if(!isWasmInitialized) {
10088 throw new Error("initializeWasm() must be awaited first!");
10090 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
10091 // debug statements here
10093 // void PeerManager_timer_tick_occured(const struct LDKPeerManager *NONNULL_PTR this_arg);
10094 export function PeerManager_timer_tick_occured(this_arg: number): void {
10095 if(!isWasmInitialized) {
10096 throw new Error("initializeWasm() must be awaited first!");
10098 const nativeResponseValue = wasm.PeerManager_timer_tick_occured(this_arg);
10099 // debug statements here
10101 // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
10102 export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
10103 if(!isWasmInitialized) {
10104 throw new Error("initializeWasm() must be awaited first!");
10106 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
10107 return decodeArray(nativeResponseValue);
10109 // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
10110 export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
10111 if(!isWasmInitialized) {
10112 throw new Error("initializeWasm() must be awaited first!");
10114 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
10115 return nativeResponseValue;
10117 // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
10118 export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
10119 if(!isWasmInitialized) {
10120 throw new Error("initializeWasm() must be awaited first!");
10122 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
10123 return nativeResponseValue;
10125 // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
10126 export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
10127 if(!isWasmInitialized) {
10128 throw new Error("initializeWasm() must be awaited first!");
10130 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
10131 return nativeResponseValue;
10133 // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
10134 export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
10135 if(!isWasmInitialized) {
10136 throw new Error("initializeWasm() must be awaited first!");
10138 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
10139 return nativeResponseValue;
10141 // void TxCreationKeys_free(struct LDKTxCreationKeys this_ptr);
10142 export function TxCreationKeys_free(this_ptr: number): void {
10143 if(!isWasmInitialized) {
10144 throw new Error("initializeWasm() must be awaited first!");
10146 const nativeResponseValue = wasm.TxCreationKeys_free(this_ptr);
10147 // debug statements here
10149 // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10150 export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
10151 if(!isWasmInitialized) {
10152 throw new Error("initializeWasm() must be awaited first!");
10154 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
10155 return decodeArray(nativeResponseValue);
10157 // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10158 export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10159 if(!isWasmInitialized) {
10160 throw new Error("initializeWasm() must be awaited first!");
10162 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
10163 // debug statements here
10165 // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10166 export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
10167 if(!isWasmInitialized) {
10168 throw new Error("initializeWasm() must be awaited first!");
10170 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
10171 return decodeArray(nativeResponseValue);
10173 // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10174 export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
10175 if(!isWasmInitialized) {
10176 throw new Error("initializeWasm() must be awaited first!");
10178 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
10179 // debug statements here
10181 // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10182 export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
10183 if(!isWasmInitialized) {
10184 throw new Error("initializeWasm() must be awaited first!");
10186 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
10187 return decodeArray(nativeResponseValue);
10189 // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10190 export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
10191 if(!isWasmInitialized) {
10192 throw new Error("initializeWasm() must be awaited first!");
10194 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
10195 // debug statements here
10197 // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10198 export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
10199 if(!isWasmInitialized) {
10200 throw new Error("initializeWasm() must be awaited first!");
10202 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
10203 return decodeArray(nativeResponseValue);
10205 // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10206 export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
10207 if(!isWasmInitialized) {
10208 throw new Error("initializeWasm() must be awaited first!");
10210 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
10211 // debug statements here
10213 // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10214 export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
10215 if(!isWasmInitialized) {
10216 throw new Error("initializeWasm() must be awaited first!");
10218 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
10219 return decodeArray(nativeResponseValue);
10221 // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10222 export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
10223 if(!isWasmInitialized) {
10224 throw new Error("initializeWasm() must be awaited first!");
10226 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
10227 // debug statements here
10229 // 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);
10230 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 {
10231 if(!isWasmInitialized) {
10232 throw new Error("initializeWasm() must be awaited first!");
10234 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));
10235 return nativeResponseValue;
10237 // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
10238 export function TxCreationKeys_clone(orig: number): number {
10239 if(!isWasmInitialized) {
10240 throw new Error("initializeWasm() must be awaited first!");
10242 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
10243 return nativeResponseValue;
10245 // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
10246 export function TxCreationKeys_write(obj: number): Uint8Array {
10247 if(!isWasmInitialized) {
10248 throw new Error("initializeWasm() must be awaited first!");
10250 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
10251 return decodeArray(nativeResponseValue);
10253 // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
10254 export function TxCreationKeys_read(ser: Uint8Array): number {
10255 if(!isWasmInitialized) {
10256 throw new Error("initializeWasm() must be awaited first!");
10258 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
10259 return nativeResponseValue;
10261 // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_ptr);
10262 export function ChannelPublicKeys_free(this_ptr: number): void {
10263 if(!isWasmInitialized) {
10264 throw new Error("initializeWasm() must be awaited first!");
10266 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_ptr);
10267 // debug statements here
10269 // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10270 export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
10271 if(!isWasmInitialized) {
10272 throw new Error("initializeWasm() must be awaited first!");
10274 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
10275 return decodeArray(nativeResponseValue);
10277 // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10278 export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10279 if(!isWasmInitialized) {
10280 throw new Error("initializeWasm() must be awaited first!");
10282 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
10283 // debug statements here
10285 // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10286 export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
10287 if(!isWasmInitialized) {
10288 throw new Error("initializeWasm() must be awaited first!");
10290 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
10291 return decodeArray(nativeResponseValue);
10293 // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10294 export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10295 if(!isWasmInitialized) {
10296 throw new Error("initializeWasm() must be awaited first!");
10298 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
10299 // debug statements here
10301 // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10302 export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
10303 if(!isWasmInitialized) {
10304 throw new Error("initializeWasm() must be awaited first!");
10306 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
10307 return decodeArray(nativeResponseValue);
10309 // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10310 export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
10311 if(!isWasmInitialized) {
10312 throw new Error("initializeWasm() must be awaited first!");
10314 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
10315 // debug statements here
10317 // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10318 export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10319 if(!isWasmInitialized) {
10320 throw new Error("initializeWasm() must be awaited first!");
10322 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
10323 return decodeArray(nativeResponseValue);
10325 // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10326 export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10327 if(!isWasmInitialized) {
10328 throw new Error("initializeWasm() must be awaited first!");
10330 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10331 // debug statements here
10333 // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10334 export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
10335 if(!isWasmInitialized) {
10336 throw new Error("initializeWasm() must be awaited first!");
10338 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
10339 return decodeArray(nativeResponseValue);
10341 // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10342 export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10343 if(!isWasmInitialized) {
10344 throw new Error("initializeWasm() must be awaited first!");
10346 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
10347 // debug statements here
10349 // 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);
10350 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 {
10351 if(!isWasmInitialized) {
10352 throw new Error("initializeWasm() must be awaited first!");
10354 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));
10355 return nativeResponseValue;
10357 // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
10358 export function ChannelPublicKeys_clone(orig: number): number {
10359 if(!isWasmInitialized) {
10360 throw new Error("initializeWasm() must be awaited first!");
10362 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
10363 return nativeResponseValue;
10365 // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
10366 export function ChannelPublicKeys_write(obj: number): Uint8Array {
10367 if(!isWasmInitialized) {
10368 throw new Error("initializeWasm() must be awaited first!");
10370 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
10371 return decodeArray(nativeResponseValue);
10373 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
10374 export function ChannelPublicKeys_read(ser: Uint8Array): number {
10375 if(!isWasmInitialized) {
10376 throw new Error("initializeWasm() must be awaited first!");
10378 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
10379 return nativeResponseValue;
10381 // 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);
10382 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 {
10383 if(!isWasmInitialized) {
10384 throw new Error("initializeWasm() must be awaited first!");
10386 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));
10387 return nativeResponseValue;
10389 // 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);
10390 export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
10391 if(!isWasmInitialized) {
10392 throw new Error("initializeWasm() must be awaited first!");
10394 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
10395 return nativeResponseValue;
10397 // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
10398 export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
10399 if(!isWasmInitialized) {
10400 throw new Error("initializeWasm() must be awaited first!");
10402 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
10403 return decodeArray(nativeResponseValue);
10405 // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_ptr);
10406 export function HTLCOutputInCommitment_free(this_ptr: number): void {
10407 if(!isWasmInitialized) {
10408 throw new Error("initializeWasm() must be awaited first!");
10410 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_ptr);
10411 // debug statements here
10413 // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10414 export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
10415 if(!isWasmInitialized) {
10416 throw new Error("initializeWasm() must be awaited first!");
10418 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
10419 return nativeResponseValue;
10421 // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
10422 export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
10423 if(!isWasmInitialized) {
10424 throw new Error("initializeWasm() must be awaited first!");
10426 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
10427 // debug statements here
10429 // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10430 export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
10431 if(!isWasmInitialized) {
10432 throw new Error("initializeWasm() must be awaited first!");
10434 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
10435 return nativeResponseValue;
10437 // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
10438 export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
10439 if(!isWasmInitialized) {
10440 throw new Error("initializeWasm() must be awaited first!");
10442 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
10443 // debug statements here
10445 // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10446 export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
10447 if(!isWasmInitialized) {
10448 throw new Error("initializeWasm() must be awaited first!");
10450 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
10451 return nativeResponseValue;
10453 // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
10454 export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
10455 if(!isWasmInitialized) {
10456 throw new Error("initializeWasm() must be awaited first!");
10458 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
10459 // debug statements here
10461 // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
10462 export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
10463 if(!isWasmInitialized) {
10464 throw new Error("initializeWasm() must be awaited first!");
10466 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
10467 return decodeArray(nativeResponseValue);
10469 // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10470 export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
10471 if(!isWasmInitialized) {
10472 throw new Error("initializeWasm() must be awaited first!");
10474 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
10475 // debug statements here
10477 // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
10478 export function HTLCOutputInCommitment_clone(orig: number): number {
10479 if(!isWasmInitialized) {
10480 throw new Error("initializeWasm() must be awaited first!");
10482 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
10483 return nativeResponseValue;
10485 // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
10486 export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
10487 if(!isWasmInitialized) {
10488 throw new Error("initializeWasm() must be awaited first!");
10490 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
10491 return decodeArray(nativeResponseValue);
10493 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
10494 export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
10495 if(!isWasmInitialized) {
10496 throw new Error("initializeWasm() must be awaited first!");
10498 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
10499 return nativeResponseValue;
10501 // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
10502 export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
10503 if(!isWasmInitialized) {
10504 throw new Error("initializeWasm() must be awaited first!");
10506 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
10507 return decodeArray(nativeResponseValue);
10509 // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
10510 export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
10511 if(!isWasmInitialized) {
10512 throw new Error("initializeWasm() must be awaited first!");
10514 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
10515 return decodeArray(nativeResponseValue);
10517 // 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);
10518 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 {
10519 if(!isWasmInitialized) {
10520 throw new Error("initializeWasm() must be awaited first!");
10522 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(prev_hash), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
10523 return decodeArray(nativeResponseValue);
10525 // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_ptr);
10526 export function ChannelTransactionParameters_free(this_ptr: number): void {
10527 if(!isWasmInitialized) {
10528 throw new Error("initializeWasm() must be awaited first!");
10530 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_ptr);
10531 // debug statements here
10533 // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10534 export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
10535 if(!isWasmInitialized) {
10536 throw new Error("initializeWasm() must be awaited first!");
10538 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
10539 return nativeResponseValue;
10541 // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
10542 export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
10543 if(!isWasmInitialized) {
10544 throw new Error("initializeWasm() must be awaited first!");
10546 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
10547 // debug statements here
10549 // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10550 export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
10551 if(!isWasmInitialized) {
10552 throw new Error("initializeWasm() must be awaited first!");
10554 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
10555 return nativeResponseValue;
10557 // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10558 export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
10559 if(!isWasmInitialized) {
10560 throw new Error("initializeWasm() must be awaited first!");
10562 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
10563 // debug statements here
10565 // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10566 export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
10567 if(!isWasmInitialized) {
10568 throw new Error("initializeWasm() must be awaited first!");
10570 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
10571 return nativeResponseValue;
10573 // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
10574 export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
10575 if(!isWasmInitialized) {
10576 throw new Error("initializeWasm() must be awaited first!");
10578 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
10579 // debug statements here
10581 // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10582 export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
10583 if(!isWasmInitialized) {
10584 throw new Error("initializeWasm() must be awaited first!");
10586 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
10587 return nativeResponseValue;
10589 // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
10590 export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
10591 if(!isWasmInitialized) {
10592 throw new Error("initializeWasm() must be awaited first!");
10594 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
10595 // debug statements here
10597 // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10598 export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
10599 if(!isWasmInitialized) {
10600 throw new Error("initializeWasm() must be awaited first!");
10602 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
10603 return nativeResponseValue;
10605 // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
10606 export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
10607 if(!isWasmInitialized) {
10608 throw new Error("initializeWasm() must be awaited first!");
10610 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
10611 // debug statements here
10613 // 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);
10614 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 {
10615 if(!isWasmInitialized) {
10616 throw new Error("initializeWasm() must be awaited first!");
10618 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
10619 return nativeResponseValue;
10621 // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
10622 export function ChannelTransactionParameters_clone(orig: number): number {
10623 if(!isWasmInitialized) {
10624 throw new Error("initializeWasm() must be awaited first!");
10626 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
10627 return nativeResponseValue;
10629 // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_ptr);
10630 export function CounterpartyChannelTransactionParameters_free(this_ptr: number): void {
10631 if(!isWasmInitialized) {
10632 throw new Error("initializeWasm() must be awaited first!");
10634 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_ptr);
10635 // debug statements here
10637 // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
10638 export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
10639 if(!isWasmInitialized) {
10640 throw new Error("initializeWasm() must be awaited first!");
10642 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
10643 return nativeResponseValue;
10645 // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
10646 export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
10647 if(!isWasmInitialized) {
10648 throw new Error("initializeWasm() must be awaited first!");
10650 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
10651 // debug statements here
10653 // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
10654 export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
10655 if(!isWasmInitialized) {
10656 throw new Error("initializeWasm() must be awaited first!");
10658 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
10659 return nativeResponseValue;
10661 // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10662 export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
10663 if(!isWasmInitialized) {
10664 throw new Error("initializeWasm() must be awaited first!");
10666 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
10667 // debug statements here
10669 // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
10670 export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
10671 if(!isWasmInitialized) {
10672 throw new Error("initializeWasm() must be awaited first!");
10674 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
10675 return nativeResponseValue;
10677 // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
10678 export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
10679 if(!isWasmInitialized) {
10680 throw new Error("initializeWasm() must be awaited first!");
10682 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
10683 return nativeResponseValue;
10685 // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10686 export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
10687 if(!isWasmInitialized) {
10688 throw new Error("initializeWasm() must be awaited first!");
10690 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
10691 return nativeResponseValue;
10693 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10694 export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
10695 if(!isWasmInitialized) {
10696 throw new Error("initializeWasm() must be awaited first!");
10698 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
10699 return nativeResponseValue;
10701 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10702 export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
10703 if(!isWasmInitialized) {
10704 throw new Error("initializeWasm() must be awaited first!");
10706 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
10707 return nativeResponseValue;
10709 // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
10710 export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
10711 if(!isWasmInitialized) {
10712 throw new Error("initializeWasm() must be awaited first!");
10714 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
10715 return decodeArray(nativeResponseValue);
10717 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
10718 export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
10719 if(!isWasmInitialized) {
10720 throw new Error("initializeWasm() must be awaited first!");
10722 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
10723 return nativeResponseValue;
10725 // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
10726 export function ChannelTransactionParameters_write(obj: number): Uint8Array {
10727 if(!isWasmInitialized) {
10728 throw new Error("initializeWasm() must be awaited first!");
10730 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
10731 return decodeArray(nativeResponseValue);
10733 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
10734 export function ChannelTransactionParameters_read(ser: Uint8Array): number {
10735 if(!isWasmInitialized) {
10736 throw new Error("initializeWasm() must be awaited first!");
10738 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
10739 return nativeResponseValue;
10741 // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_ptr);
10742 export function DirectedChannelTransactionParameters_free(this_ptr: number): void {
10743 if(!isWasmInitialized) {
10744 throw new Error("initializeWasm() must be awaited first!");
10746 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_ptr);
10747 // debug statements here
10749 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10750 export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
10751 if(!isWasmInitialized) {
10752 throw new Error("initializeWasm() must be awaited first!");
10754 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
10755 return nativeResponseValue;
10757 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10758 export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
10759 if(!isWasmInitialized) {
10760 throw new Error("initializeWasm() must be awaited first!");
10762 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
10763 return nativeResponseValue;
10765 // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10766 export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
10767 if(!isWasmInitialized) {
10768 throw new Error("initializeWasm() must be awaited first!");
10770 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
10771 return nativeResponseValue;
10773 // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10774 export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
10775 if(!isWasmInitialized) {
10776 throw new Error("initializeWasm() must be awaited first!");
10778 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
10779 return nativeResponseValue;
10781 // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10782 export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
10783 if(!isWasmInitialized) {
10784 throw new Error("initializeWasm() must be awaited first!");
10786 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
10787 return nativeResponseValue;
10789 // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_ptr);
10790 export function HolderCommitmentTransaction_free(this_ptr: number): void {
10791 if(!isWasmInitialized) {
10792 throw new Error("initializeWasm() must be awaited first!");
10794 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_ptr);
10795 // debug statements here
10797 // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
10798 export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
10799 if(!isWasmInitialized) {
10800 throw new Error("initializeWasm() must be awaited first!");
10802 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
10803 return decodeArray(nativeResponseValue);
10805 // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
10806 export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
10807 if(!isWasmInitialized) {
10808 throw new Error("initializeWasm() must be awaited first!");
10810 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
10811 // debug statements here
10813 // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
10814 export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
10815 if(!isWasmInitialized) {
10816 throw new Error("initializeWasm() must be awaited first!");
10818 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
10819 // debug statements here
10821 // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
10822 export function HolderCommitmentTransaction_clone(orig: number): number {
10823 if(!isWasmInitialized) {
10824 throw new Error("initializeWasm() must be awaited first!");
10826 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
10827 return nativeResponseValue;
10829 // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
10830 export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
10831 if(!isWasmInitialized) {
10832 throw new Error("initializeWasm() must be awaited first!");
10834 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
10835 return decodeArray(nativeResponseValue);
10837 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
10838 export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
10839 if(!isWasmInitialized) {
10840 throw new Error("initializeWasm() must be awaited first!");
10842 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
10843 return nativeResponseValue;
10845 // 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);
10846 export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
10847 if(!isWasmInitialized) {
10848 throw new Error("initializeWasm() must be awaited first!");
10850 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
10851 return nativeResponseValue;
10853 // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_ptr);
10854 export function BuiltCommitmentTransaction_free(this_ptr: number): void {
10855 if(!isWasmInitialized) {
10856 throw new Error("initializeWasm() must be awaited first!");
10858 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_ptr);
10859 // debug statements here
10861 // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
10862 export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
10863 if(!isWasmInitialized) {
10864 throw new Error("initializeWasm() must be awaited first!");
10866 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
10867 return decodeArray(nativeResponseValue);
10869 // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
10870 export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
10871 if(!isWasmInitialized) {
10872 throw new Error("initializeWasm() must be awaited first!");
10874 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
10875 // debug statements here
10877 // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
10878 export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
10879 if(!isWasmInitialized) {
10880 throw new Error("initializeWasm() must be awaited first!");
10882 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
10883 return decodeArray(nativeResponseValue);
10885 // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10886 export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
10887 if(!isWasmInitialized) {
10888 throw new Error("initializeWasm() must be awaited first!");
10890 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
10891 // debug statements here
10893 // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
10894 export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
10895 if(!isWasmInitialized) {
10896 throw new Error("initializeWasm() must be awaited first!");
10898 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
10899 return nativeResponseValue;
10901 // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
10902 export function BuiltCommitmentTransaction_clone(orig: number): number {
10903 if(!isWasmInitialized) {
10904 throw new Error("initializeWasm() must be awaited first!");
10906 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
10907 return nativeResponseValue;
10909 // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
10910 export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
10911 if(!isWasmInitialized) {
10912 throw new Error("initializeWasm() must be awaited first!");
10914 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
10915 return decodeArray(nativeResponseValue);
10917 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
10918 export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
10919 if(!isWasmInitialized) {
10920 throw new Error("initializeWasm() must be awaited first!");
10922 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
10923 return nativeResponseValue;
10925 // 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);
10926 export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
10927 if(!isWasmInitialized) {
10928 throw new Error("initializeWasm() must be awaited first!");
10930 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
10931 return decodeArray(nativeResponseValue);
10933 // 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);
10934 export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
10935 if(!isWasmInitialized) {
10936 throw new Error("initializeWasm() must be awaited first!");
10938 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
10939 return decodeArray(nativeResponseValue);
10941 // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_ptr);
10942 export function CommitmentTransaction_free(this_ptr: number): void {
10943 if(!isWasmInitialized) {
10944 throw new Error("initializeWasm() must be awaited first!");
10946 const nativeResponseValue = wasm.CommitmentTransaction_free(this_ptr);
10947 // debug statements here
10949 // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
10950 export function CommitmentTransaction_clone(orig: number): number {
10951 if(!isWasmInitialized) {
10952 throw new Error("initializeWasm() must be awaited first!");
10954 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
10955 return nativeResponseValue;
10957 // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
10958 export function CommitmentTransaction_write(obj: number): Uint8Array {
10959 if(!isWasmInitialized) {
10960 throw new Error("initializeWasm() must be awaited first!");
10962 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
10963 return decodeArray(nativeResponseValue);
10965 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
10966 export function CommitmentTransaction_read(ser: Uint8Array): number {
10967 if(!isWasmInitialized) {
10968 throw new Error("initializeWasm() must be awaited first!");
10970 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
10971 return nativeResponseValue;
10973 // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
10974 export function CommitmentTransaction_commitment_number(this_arg: number): number {
10975 if(!isWasmInitialized) {
10976 throw new Error("initializeWasm() must be awaited first!");
10978 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
10979 return nativeResponseValue;
10981 // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
10982 export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
10983 if(!isWasmInitialized) {
10984 throw new Error("initializeWasm() must be awaited first!");
10986 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
10987 return nativeResponseValue;
10989 // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
10990 export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
10991 if(!isWasmInitialized) {
10992 throw new Error("initializeWasm() must be awaited first!");
10994 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
10995 return nativeResponseValue;
10997 // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
10998 export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
10999 if(!isWasmInitialized) {
11000 throw new Error("initializeWasm() must be awaited first!");
11002 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
11003 return nativeResponseValue;
11005 // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11006 export function CommitmentTransaction_trust(this_arg: number): number {
11007 if(!isWasmInitialized) {
11008 throw new Error("initializeWasm() must be awaited first!");
11010 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
11011 return nativeResponseValue;
11013 // 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);
11014 export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
11015 if(!isWasmInitialized) {
11016 throw new Error("initializeWasm() must be awaited first!");
11018 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
11019 return nativeResponseValue;
11021 // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_ptr);
11022 export function TrustedCommitmentTransaction_free(this_ptr: number): void {
11023 if(!isWasmInitialized) {
11024 throw new Error("initializeWasm() must be awaited first!");
11026 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_ptr);
11027 // debug statements here
11029 // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11030 export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
11031 if(!isWasmInitialized) {
11032 throw new Error("initializeWasm() must be awaited first!");
11034 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
11035 return decodeArray(nativeResponseValue);
11037 // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11038 export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
11039 if(!isWasmInitialized) {
11040 throw new Error("initializeWasm() must be awaited first!");
11042 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
11043 return nativeResponseValue;
11045 // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11046 export function TrustedCommitmentTransaction_keys(this_arg: number): number {
11047 if(!isWasmInitialized) {
11048 throw new Error("initializeWasm() must be awaited first!");
11050 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
11051 return nativeResponseValue;
11053 // 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);
11054 export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
11055 if(!isWasmInitialized) {
11056 throw new Error("initializeWasm() must be awaited first!");
11058 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
11059 return nativeResponseValue;
11061 // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
11062 export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
11063 if(!isWasmInitialized) {
11064 throw new Error("initializeWasm() must be awaited first!");
11066 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
11067 return nativeResponseValue;
11069 // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
11070 export function InitFeatures_clone(orig: number): number {
11071 if(!isWasmInitialized) {
11072 throw new Error("initializeWasm() must be awaited first!");
11074 const nativeResponseValue = wasm.InitFeatures_clone(orig);
11075 return nativeResponseValue;
11077 // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
11078 export function NodeFeatures_clone(orig: number): number {
11079 if(!isWasmInitialized) {
11080 throw new Error("initializeWasm() must be awaited first!");
11082 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
11083 return nativeResponseValue;
11085 // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
11086 export function ChannelFeatures_clone(orig: number): number {
11087 if(!isWasmInitialized) {
11088 throw new Error("initializeWasm() must be awaited first!");
11090 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
11091 return nativeResponseValue;
11093 // void InitFeatures_free(struct LDKInitFeatures this_ptr);
11094 export function InitFeatures_free(this_ptr: number): void {
11095 if(!isWasmInitialized) {
11096 throw new Error("initializeWasm() must be awaited first!");
11098 const nativeResponseValue = wasm.InitFeatures_free(this_ptr);
11099 // debug statements here
11101 // void NodeFeatures_free(struct LDKNodeFeatures this_ptr);
11102 export function NodeFeatures_free(this_ptr: number): void {
11103 if(!isWasmInitialized) {
11104 throw new Error("initializeWasm() must be awaited first!");
11106 const nativeResponseValue = wasm.NodeFeatures_free(this_ptr);
11107 // debug statements here
11109 // void ChannelFeatures_free(struct LDKChannelFeatures this_ptr);
11110 export function ChannelFeatures_free(this_ptr: number): void {
11111 if(!isWasmInitialized) {
11112 throw new Error("initializeWasm() must be awaited first!");
11114 const nativeResponseValue = wasm.ChannelFeatures_free(this_ptr);
11115 // debug statements here
11117 // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
11118 export function InitFeatures_empty(): number {
11119 if(!isWasmInitialized) {
11120 throw new Error("initializeWasm() must be awaited first!");
11122 const nativeResponseValue = wasm.InitFeatures_empty();
11123 return nativeResponseValue;
11125 // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
11126 export function InitFeatures_known(): number {
11127 if(!isWasmInitialized) {
11128 throw new Error("initializeWasm() must be awaited first!");
11130 const nativeResponseValue = wasm.InitFeatures_known();
11131 return nativeResponseValue;
11133 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
11134 export function NodeFeatures_empty(): number {
11135 if(!isWasmInitialized) {
11136 throw new Error("initializeWasm() must be awaited first!");
11138 const nativeResponseValue = wasm.NodeFeatures_empty();
11139 return nativeResponseValue;
11141 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
11142 export function NodeFeatures_known(): number {
11143 if(!isWasmInitialized) {
11144 throw new Error("initializeWasm() must be awaited first!");
11146 const nativeResponseValue = wasm.NodeFeatures_known();
11147 return nativeResponseValue;
11149 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
11150 export function ChannelFeatures_empty(): number {
11151 if(!isWasmInitialized) {
11152 throw new Error("initializeWasm() must be awaited first!");
11154 const nativeResponseValue = wasm.ChannelFeatures_empty();
11155 return nativeResponseValue;
11157 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
11158 export function ChannelFeatures_known(): number {
11159 if(!isWasmInitialized) {
11160 throw new Error("initializeWasm() must be awaited first!");
11162 const nativeResponseValue = wasm.ChannelFeatures_known();
11163 return nativeResponseValue;
11165 // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
11166 export function InitFeatures_write(obj: number): Uint8Array {
11167 if(!isWasmInitialized) {
11168 throw new Error("initializeWasm() must be awaited first!");
11170 const nativeResponseValue = wasm.InitFeatures_write(obj);
11171 return decodeArray(nativeResponseValue);
11173 // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
11174 export function NodeFeatures_write(obj: number): Uint8Array {
11175 if(!isWasmInitialized) {
11176 throw new Error("initializeWasm() must be awaited first!");
11178 const nativeResponseValue = wasm.NodeFeatures_write(obj);
11179 return decodeArray(nativeResponseValue);
11181 // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
11182 export function ChannelFeatures_write(obj: number): Uint8Array {
11183 if(!isWasmInitialized) {
11184 throw new Error("initializeWasm() must be awaited first!");
11186 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
11187 return decodeArray(nativeResponseValue);
11189 // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
11190 export function InitFeatures_read(ser: Uint8Array): number {
11191 if(!isWasmInitialized) {
11192 throw new Error("initializeWasm() must be awaited first!");
11194 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
11195 return nativeResponseValue;
11197 // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
11198 export function NodeFeatures_read(ser: Uint8Array): number {
11199 if(!isWasmInitialized) {
11200 throw new Error("initializeWasm() must be awaited first!");
11202 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
11203 return nativeResponseValue;
11205 // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
11206 export function ChannelFeatures_read(ser: Uint8Array): number {
11207 if(!isWasmInitialized) {
11208 throw new Error("initializeWasm() must be awaited first!");
11210 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
11211 return nativeResponseValue;
11213 // void RouteHop_free(struct LDKRouteHop this_ptr);
11214 export function RouteHop_free(this_ptr: number): void {
11215 if(!isWasmInitialized) {
11216 throw new Error("initializeWasm() must be awaited first!");
11218 const nativeResponseValue = wasm.RouteHop_free(this_ptr);
11219 // debug statements here
11221 // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11222 export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
11223 if(!isWasmInitialized) {
11224 throw new Error("initializeWasm() must be awaited first!");
11226 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
11227 return decodeArray(nativeResponseValue);
11229 // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11230 export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
11231 if(!isWasmInitialized) {
11232 throw new Error("initializeWasm() must be awaited first!");
11234 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
11235 // debug statements here
11237 // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11238 export function RouteHop_get_node_features(this_ptr: number): number {
11239 if(!isWasmInitialized) {
11240 throw new Error("initializeWasm() must be awaited first!");
11242 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
11243 return nativeResponseValue;
11245 // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11246 export function RouteHop_set_node_features(this_ptr: number, val: number): void {
11247 if(!isWasmInitialized) {
11248 throw new Error("initializeWasm() must be awaited first!");
11250 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
11251 // debug statements here
11253 // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11254 export function RouteHop_get_short_channel_id(this_ptr: number): number {
11255 if(!isWasmInitialized) {
11256 throw new Error("initializeWasm() must be awaited first!");
11258 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
11259 return nativeResponseValue;
11261 // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11262 export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
11263 if(!isWasmInitialized) {
11264 throw new Error("initializeWasm() must be awaited first!");
11266 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
11267 // debug statements here
11269 // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11270 export function RouteHop_get_channel_features(this_ptr: number): number {
11271 if(!isWasmInitialized) {
11272 throw new Error("initializeWasm() must be awaited first!");
11274 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
11275 return nativeResponseValue;
11277 // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11278 export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
11279 if(!isWasmInitialized) {
11280 throw new Error("initializeWasm() must be awaited first!");
11282 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
11283 // debug statements here
11285 // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11286 export function RouteHop_get_fee_msat(this_ptr: number): number {
11287 if(!isWasmInitialized) {
11288 throw new Error("initializeWasm() must be awaited first!");
11290 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
11291 return nativeResponseValue;
11293 // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11294 export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
11295 if(!isWasmInitialized) {
11296 throw new Error("initializeWasm() must be awaited first!");
11298 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
11299 // debug statements here
11301 // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11302 export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
11303 if(!isWasmInitialized) {
11304 throw new Error("initializeWasm() must be awaited first!");
11306 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
11307 return nativeResponseValue;
11309 // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
11310 export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11311 if(!isWasmInitialized) {
11312 throw new Error("initializeWasm() must be awaited first!");
11314 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
11315 // debug statements here
11317 // 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);
11318 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 {
11319 if(!isWasmInitialized) {
11320 throw new Error("initializeWasm() must be awaited first!");
11322 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);
11323 return nativeResponseValue;
11325 // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
11326 export function RouteHop_clone(orig: number): number {
11327 if(!isWasmInitialized) {
11328 throw new Error("initializeWasm() must be awaited first!");
11330 const nativeResponseValue = wasm.RouteHop_clone(orig);
11331 return nativeResponseValue;
11333 // void Route_free(struct LDKRoute this_ptr);
11334 export function Route_free(this_ptr: number): void {
11335 if(!isWasmInitialized) {
11336 throw new Error("initializeWasm() must be awaited first!");
11338 const nativeResponseValue = wasm.Route_free(this_ptr);
11339 // debug statements here
11341 // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
11342 export function Route_set_paths(this_ptr: number, val: number[][]): void {
11343 if(!isWasmInitialized) {
11344 throw new Error("initializeWasm() must be awaited first!");
11346 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
11347 // debug statements here
11349 // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
11350 export function Route_new(paths_arg: number[][]): number {
11351 if(!isWasmInitialized) {
11352 throw new Error("initializeWasm() must be awaited first!");
11354 const nativeResponseValue = wasm.Route_new(paths_arg);
11355 return nativeResponseValue;
11357 // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
11358 export function Route_clone(orig: number): number {
11359 if(!isWasmInitialized) {
11360 throw new Error("initializeWasm() must be awaited first!");
11362 const nativeResponseValue = wasm.Route_clone(orig);
11363 return nativeResponseValue;
11365 // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
11366 export function Route_write(obj: number): Uint8Array {
11367 if(!isWasmInitialized) {
11368 throw new Error("initializeWasm() must be awaited first!");
11370 const nativeResponseValue = wasm.Route_write(obj);
11371 return decodeArray(nativeResponseValue);
11373 // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
11374 export function Route_read(ser: Uint8Array): number {
11375 if(!isWasmInitialized) {
11376 throw new Error("initializeWasm() must be awaited first!");
11378 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
11379 return nativeResponseValue;
11381 // void RouteHint_free(struct LDKRouteHint this_ptr);
11382 export function RouteHint_free(this_ptr: number): void {
11383 if(!isWasmInitialized) {
11384 throw new Error("initializeWasm() must be awaited first!");
11386 const nativeResponseValue = wasm.RouteHint_free(this_ptr);
11387 // debug statements here
11389 // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11390 export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
11391 if(!isWasmInitialized) {
11392 throw new Error("initializeWasm() must be awaited first!");
11394 const nativeResponseValue = wasm.RouteHint_get_src_node_id(this_ptr);
11395 return decodeArray(nativeResponseValue);
11397 // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11398 export function RouteHint_set_src_node_id(this_ptr: number, val: Uint8Array): void {
11399 if(!isWasmInitialized) {
11400 throw new Error("initializeWasm() must be awaited first!");
11402 const nativeResponseValue = wasm.RouteHint_set_src_node_id(this_ptr, encodeArray(val));
11403 // debug statements here
11405 // uint64_t RouteHint_get_short_channel_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11406 export function RouteHint_get_short_channel_id(this_ptr: number): number {
11407 if(!isWasmInitialized) {
11408 throw new Error("initializeWasm() must be awaited first!");
11410 const nativeResponseValue = wasm.RouteHint_get_short_channel_id(this_ptr);
11411 return nativeResponseValue;
11413 // void RouteHint_set_short_channel_id(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
11414 export function RouteHint_set_short_channel_id(this_ptr: number, val: number): void {
11415 if(!isWasmInitialized) {
11416 throw new Error("initializeWasm() must be awaited first!");
11418 const nativeResponseValue = wasm.RouteHint_set_short_channel_id(this_ptr, val);
11419 // debug statements here
11421 // struct LDKRoutingFees RouteHint_get_fees(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11422 export function RouteHint_get_fees(this_ptr: number): number {
11423 if(!isWasmInitialized) {
11424 throw new Error("initializeWasm() must be awaited first!");
11426 const nativeResponseValue = wasm.RouteHint_get_fees(this_ptr);
11427 return nativeResponseValue;
11429 // void RouteHint_set_fees(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11430 export function RouteHint_set_fees(this_ptr: number, val: number): void {
11431 if(!isWasmInitialized) {
11432 throw new Error("initializeWasm() must be awaited first!");
11434 const nativeResponseValue = wasm.RouteHint_set_fees(this_ptr, val);
11435 // debug statements here
11437 // uint16_t RouteHint_get_cltv_expiry_delta(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11438 export function RouteHint_get_cltv_expiry_delta(this_ptr: number): number {
11439 if(!isWasmInitialized) {
11440 throw new Error("initializeWasm() must be awaited first!");
11442 const nativeResponseValue = wasm.RouteHint_get_cltv_expiry_delta(this_ptr);
11443 return nativeResponseValue;
11445 // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
11446 export function RouteHint_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11447 if(!isWasmInitialized) {
11448 throw new Error("initializeWasm() must be awaited first!");
11450 const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
11451 // debug statements here
11453 // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
11454 export function RouteHint_clone(orig: number): number {
11455 if(!isWasmInitialized) {
11456 throw new Error("initializeWasm() must be awaited first!");
11458 const nativeResponseValue = wasm.RouteHint_clone(orig);
11459 return nativeResponseValue;
11461 // 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);
11462 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 {
11463 if(!isWasmInitialized) {
11464 throw new Error("initializeWasm() must be awaited first!");
11466 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), first_hops, last_hops, final_value_msat, final_cltv, logger);
11467 return nativeResponseValue;
11469 // void NetworkGraph_free(struct LDKNetworkGraph this_ptr);
11470 export function NetworkGraph_free(this_ptr: number): void {
11471 if(!isWasmInitialized) {
11472 throw new Error("initializeWasm() must be awaited first!");
11474 const nativeResponseValue = wasm.NetworkGraph_free(this_ptr);
11475 // debug statements here
11477 // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
11478 export function NetworkGraph_clone(orig: number): number {
11479 if(!isWasmInitialized) {
11480 throw new Error("initializeWasm() must be awaited first!");
11482 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
11483 return nativeResponseValue;
11485 // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_ptr);
11486 export function LockedNetworkGraph_free(this_ptr: number): void {
11487 if(!isWasmInitialized) {
11488 throw new Error("initializeWasm() must be awaited first!");
11490 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_ptr);
11491 // debug statements here
11493 // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_ptr);
11494 export function NetGraphMsgHandler_free(this_ptr: number): void {
11495 if(!isWasmInitialized) {
11496 throw new Error("initializeWasm() must be awaited first!");
11498 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_ptr);
11499 // debug statements here
11501 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
11502 export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
11503 if(!isWasmInitialized) {
11504 throw new Error("initializeWasm() must be awaited first!");
11506 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
11507 return nativeResponseValue;
11509 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
11510 export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
11511 if(!isWasmInitialized) {
11512 throw new Error("initializeWasm() must be awaited first!");
11514 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
11515 return nativeResponseValue;
11517 // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
11518 export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
11519 if(!isWasmInitialized) {
11520 throw new Error("initializeWasm() must be awaited first!");
11522 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
11523 // debug statements here
11525 // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11526 export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
11527 if(!isWasmInitialized) {
11528 throw new Error("initializeWasm() must be awaited first!");
11530 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
11531 return nativeResponseValue;
11533 // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
11534 export function LockedNetworkGraph_graph(this_arg: number): number {
11535 if(!isWasmInitialized) {
11536 throw new Error("initializeWasm() must be awaited first!");
11538 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
11539 return nativeResponseValue;
11541 // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11542 export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
11543 if(!isWasmInitialized) {
11544 throw new Error("initializeWasm() must be awaited first!");
11546 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
11547 return nativeResponseValue;
11549 // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11550 export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
11551 if(!isWasmInitialized) {
11552 throw new Error("initializeWasm() must be awaited first!");
11554 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
11555 return nativeResponseValue;
11557 // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_ptr);
11558 export function DirectionalChannelInfo_free(this_ptr: number): void {
11559 if(!isWasmInitialized) {
11560 throw new Error("initializeWasm() must be awaited first!");
11562 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_ptr);
11563 // debug statements here
11565 // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11566 export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
11567 if(!isWasmInitialized) {
11568 throw new Error("initializeWasm() must be awaited first!");
11570 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
11571 return nativeResponseValue;
11573 // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
11574 export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
11575 if(!isWasmInitialized) {
11576 throw new Error("initializeWasm() must be awaited first!");
11578 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
11579 // debug statements here
11581 // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11582 export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
11583 if(!isWasmInitialized) {
11584 throw new Error("initializeWasm() must be awaited first!");
11586 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
11587 return nativeResponseValue;
11589 // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
11590 export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
11591 if(!isWasmInitialized) {
11592 throw new Error("initializeWasm() must be awaited first!");
11594 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
11595 // debug statements here
11597 // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11598 export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
11599 if(!isWasmInitialized) {
11600 throw new Error("initializeWasm() must be awaited first!");
11602 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
11603 return nativeResponseValue;
11605 // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
11606 export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11607 if(!isWasmInitialized) {
11608 throw new Error("initializeWasm() must be awaited first!");
11610 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
11611 // debug statements here
11613 // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11614 export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
11615 if(!isWasmInitialized) {
11616 throw new Error("initializeWasm() must be awaited first!");
11618 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
11619 return nativeResponseValue;
11621 // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
11622 export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
11623 if(!isWasmInitialized) {
11624 throw new Error("initializeWasm() must be awaited first!");
11626 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
11627 // debug statements here
11629 // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11630 export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
11631 if(!isWasmInitialized) {
11632 throw new Error("initializeWasm() must be awaited first!");
11634 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
11635 return nativeResponseValue;
11637 // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11638 export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
11639 if(!isWasmInitialized) {
11640 throw new Error("initializeWasm() must be awaited first!");
11642 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
11643 // debug statements here
11645 // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11646 export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
11647 if(!isWasmInitialized) {
11648 throw new Error("initializeWasm() must be awaited first!");
11650 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
11651 return nativeResponseValue;
11653 // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
11654 export function DirectionalChannelInfo_set_last_update_message(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_message(this_ptr, val);
11659 // debug statements here
11661 // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
11662 export function DirectionalChannelInfo_clone(orig: number): number {
11663 if(!isWasmInitialized) {
11664 throw new Error("initializeWasm() must be awaited first!");
11666 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
11667 return nativeResponseValue;
11669 // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
11670 export function DirectionalChannelInfo_write(obj: number): Uint8Array {
11671 if(!isWasmInitialized) {
11672 throw new Error("initializeWasm() must be awaited first!");
11674 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
11675 return decodeArray(nativeResponseValue);
11677 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
11678 export function DirectionalChannelInfo_read(ser: Uint8Array): number {
11679 if(!isWasmInitialized) {
11680 throw new Error("initializeWasm() must be awaited first!");
11682 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
11683 return nativeResponseValue;
11685 // void ChannelInfo_free(struct LDKChannelInfo this_ptr);
11686 export function ChannelInfo_free(this_ptr: number): void {
11687 if(!isWasmInitialized) {
11688 throw new Error("initializeWasm() must be awaited first!");
11690 const nativeResponseValue = wasm.ChannelInfo_free(this_ptr);
11691 // debug statements here
11693 // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11694 export function ChannelInfo_get_features(this_ptr: number): number {
11695 if(!isWasmInitialized) {
11696 throw new Error("initializeWasm() must be awaited first!");
11698 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
11699 return nativeResponseValue;
11701 // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11702 export function ChannelInfo_set_features(this_ptr: number, val: number): void {
11703 if(!isWasmInitialized) {
11704 throw new Error("initializeWasm() must be awaited first!");
11706 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
11707 // debug statements here
11709 // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11710 export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
11711 if(!isWasmInitialized) {
11712 throw new Error("initializeWasm() must be awaited first!");
11714 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
11715 return decodeArray(nativeResponseValue);
11717 // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11718 export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
11719 if(!isWasmInitialized) {
11720 throw new Error("initializeWasm() must be awaited first!");
11722 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
11723 // debug statements here
11725 // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11726 export function ChannelInfo_get_one_to_two(this_ptr: number): number {
11727 if(!isWasmInitialized) {
11728 throw new Error("initializeWasm() must be awaited first!");
11730 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
11731 return nativeResponseValue;
11733 // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
11734 export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
11735 if(!isWasmInitialized) {
11736 throw new Error("initializeWasm() must be awaited first!");
11738 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
11739 // debug statements here
11741 // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11742 export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
11743 if(!isWasmInitialized) {
11744 throw new Error("initializeWasm() must be awaited first!");
11746 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
11747 return decodeArray(nativeResponseValue);
11749 // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11750 export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
11751 if(!isWasmInitialized) {
11752 throw new Error("initializeWasm() must be awaited first!");
11754 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
11755 // debug statements here
11757 // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11758 export function ChannelInfo_get_two_to_one(this_ptr: number): number {
11759 if(!isWasmInitialized) {
11760 throw new Error("initializeWasm() must be awaited first!");
11762 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
11763 return nativeResponseValue;
11765 // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
11766 export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
11767 if(!isWasmInitialized) {
11768 throw new Error("initializeWasm() must be awaited first!");
11770 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
11771 // debug statements here
11773 // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11774 export function ChannelInfo_get_announcement_message(this_ptr: number): number {
11775 if(!isWasmInitialized) {
11776 throw new Error("initializeWasm() must be awaited first!");
11778 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
11779 return nativeResponseValue;
11781 // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
11782 export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
11783 if(!isWasmInitialized) {
11784 throw new Error("initializeWasm() must be awaited first!");
11786 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
11787 // debug statements here
11789 // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
11790 export function ChannelInfo_clone(orig: number): number {
11791 if(!isWasmInitialized) {
11792 throw new Error("initializeWasm() must be awaited first!");
11794 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
11795 return nativeResponseValue;
11797 // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
11798 export function ChannelInfo_write(obj: number): Uint8Array {
11799 if(!isWasmInitialized) {
11800 throw new Error("initializeWasm() must be awaited first!");
11802 const nativeResponseValue = wasm.ChannelInfo_write(obj);
11803 return decodeArray(nativeResponseValue);
11805 // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
11806 export function ChannelInfo_read(ser: Uint8Array): number {
11807 if(!isWasmInitialized) {
11808 throw new Error("initializeWasm() must be awaited first!");
11810 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
11811 return nativeResponseValue;
11813 // void RoutingFees_free(struct LDKRoutingFees this_ptr);
11814 export function RoutingFees_free(this_ptr: number): void {
11815 if(!isWasmInitialized) {
11816 throw new Error("initializeWasm() must be awaited first!");
11818 const nativeResponseValue = wasm.RoutingFees_free(this_ptr);
11819 // debug statements here
11821 // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
11822 export function RoutingFees_get_base_msat(this_ptr: number): number {
11823 if(!isWasmInitialized) {
11824 throw new Error("initializeWasm() must be awaited first!");
11826 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
11827 return nativeResponseValue;
11829 // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
11830 export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
11831 if(!isWasmInitialized) {
11832 throw new Error("initializeWasm() must be awaited first!");
11834 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
11835 // debug statements here
11837 // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
11838 export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
11839 if(!isWasmInitialized) {
11840 throw new Error("initializeWasm() must be awaited first!");
11842 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
11843 return nativeResponseValue;
11845 // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
11846 export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
11847 if(!isWasmInitialized) {
11848 throw new Error("initializeWasm() must be awaited first!");
11850 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
11851 // debug statements here
11853 // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
11854 export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
11855 if(!isWasmInitialized) {
11856 throw new Error("initializeWasm() must be awaited first!");
11858 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
11859 return nativeResponseValue;
11861 // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
11862 export function RoutingFees_clone(orig: number): number {
11863 if(!isWasmInitialized) {
11864 throw new Error("initializeWasm() must be awaited first!");
11866 const nativeResponseValue = wasm.RoutingFees_clone(orig);
11867 return nativeResponseValue;
11869 // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
11870 export function RoutingFees_read(ser: Uint8Array): number {
11871 if(!isWasmInitialized) {
11872 throw new Error("initializeWasm() must be awaited first!");
11874 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
11875 return nativeResponseValue;
11877 // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
11878 export function RoutingFees_write(obj: number): Uint8Array {
11879 if(!isWasmInitialized) {
11880 throw new Error("initializeWasm() must be awaited first!");
11882 const nativeResponseValue = wasm.RoutingFees_write(obj);
11883 return decodeArray(nativeResponseValue);
11885 // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_ptr);
11886 export function NodeAnnouncementInfo_free(this_ptr: number): void {
11887 if(!isWasmInitialized) {
11888 throw new Error("initializeWasm() must be awaited first!");
11890 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_ptr);
11891 // debug statements here
11893 // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
11894 export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
11895 if(!isWasmInitialized) {
11896 throw new Error("initializeWasm() must be awaited first!");
11898 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
11899 return nativeResponseValue;
11901 // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11902 export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
11903 if(!isWasmInitialized) {
11904 throw new Error("initializeWasm() must be awaited first!");
11906 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
11907 // debug statements here
11909 // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
11910 export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
11911 if(!isWasmInitialized) {
11912 throw new Error("initializeWasm() must be awaited first!");
11914 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
11915 return nativeResponseValue;
11917 // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
11918 export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
11919 if(!isWasmInitialized) {
11920 throw new Error("initializeWasm() must be awaited first!");
11922 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
11923 // debug statements here
11925 // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
11926 export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
11927 if(!isWasmInitialized) {
11928 throw new Error("initializeWasm() must be awaited first!");
11930 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
11931 return decodeArray(nativeResponseValue);
11933 // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
11934 export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
11935 if(!isWasmInitialized) {
11936 throw new Error("initializeWasm() must be awaited first!");
11938 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
11939 // debug statements here
11941 // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
11942 export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
11943 if(!isWasmInitialized) {
11944 throw new Error("initializeWasm() must be awaited first!");
11946 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
11947 return decodeArray(nativeResponseValue);
11949 // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11950 export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
11951 if(!isWasmInitialized) {
11952 throw new Error("initializeWasm() must be awaited first!");
11954 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
11955 // debug statements here
11957 // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
11958 export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
11959 if(!isWasmInitialized) {
11960 throw new Error("initializeWasm() must be awaited first!");
11962 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
11963 // debug statements here
11965 // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
11966 export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
11967 if(!isWasmInitialized) {
11968 throw new Error("initializeWasm() must be awaited first!");
11970 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
11971 return nativeResponseValue;
11973 // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
11974 export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
11975 if(!isWasmInitialized) {
11976 throw new Error("initializeWasm() must be awaited first!");
11978 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
11979 // debug statements here
11981 // 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);
11982 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 {
11983 if(!isWasmInitialized) {
11984 throw new Error("initializeWasm() must be awaited first!");
11986 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
11987 return nativeResponseValue;
11989 // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
11990 export function NodeAnnouncementInfo_clone(orig: number): number {
11991 if(!isWasmInitialized) {
11992 throw new Error("initializeWasm() must be awaited first!");
11994 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
11995 return nativeResponseValue;
11997 // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
11998 export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
11999 if(!isWasmInitialized) {
12000 throw new Error("initializeWasm() must be awaited first!");
12002 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
12003 return decodeArray(nativeResponseValue);
12005 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
12006 export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
12007 if(!isWasmInitialized) {
12008 throw new Error("initializeWasm() must be awaited first!");
12010 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
12011 return nativeResponseValue;
12013 // void NodeInfo_free(struct LDKNodeInfo this_ptr);
12014 export function NodeInfo_free(this_ptr: number): void {
12015 if(!isWasmInitialized) {
12016 throw new Error("initializeWasm() must be awaited first!");
12018 const nativeResponseValue = wasm.NodeInfo_free(this_ptr);
12019 // debug statements here
12021 // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12022 export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
12023 if(!isWasmInitialized) {
12024 throw new Error("initializeWasm() must be awaited first!");
12026 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
12027 // debug statements here
12029 // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12030 export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
12031 if(!isWasmInitialized) {
12032 throw new Error("initializeWasm() must be awaited first!");
12034 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
12035 return nativeResponseValue;
12037 // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12038 export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
12039 if(!isWasmInitialized) {
12040 throw new Error("initializeWasm() must be awaited first!");
12042 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
12043 // debug statements here
12045 // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12046 export function NodeInfo_get_announcement_info(this_ptr: number): number {
12047 if(!isWasmInitialized) {
12048 throw new Error("initializeWasm() must be awaited first!");
12050 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
12051 return nativeResponseValue;
12053 // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
12054 export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
12055 if(!isWasmInitialized) {
12056 throw new Error("initializeWasm() must be awaited first!");
12058 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
12059 // debug statements here
12061 // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
12062 export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
12063 if(!isWasmInitialized) {
12064 throw new Error("initializeWasm() must be awaited first!");
12066 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
12067 return nativeResponseValue;
12069 // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
12070 export function NodeInfo_clone(orig: number): number {
12071 if(!isWasmInitialized) {
12072 throw new Error("initializeWasm() must be awaited first!");
12074 const nativeResponseValue = wasm.NodeInfo_clone(orig);
12075 return nativeResponseValue;
12077 // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
12078 export function NodeInfo_write(obj: number): Uint8Array {
12079 if(!isWasmInitialized) {
12080 throw new Error("initializeWasm() must be awaited first!");
12082 const nativeResponseValue = wasm.NodeInfo_write(obj);
12083 return decodeArray(nativeResponseValue);
12085 // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
12086 export function NodeInfo_read(ser: Uint8Array): number {
12087 if(!isWasmInitialized) {
12088 throw new Error("initializeWasm() must be awaited first!");
12090 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
12091 return nativeResponseValue;
12093 // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
12094 export function NetworkGraph_write(obj: number): Uint8Array {
12095 if(!isWasmInitialized) {
12096 throw new Error("initializeWasm() must be awaited first!");
12098 const nativeResponseValue = wasm.NetworkGraph_write(obj);
12099 return decodeArray(nativeResponseValue);
12101 // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
12102 export function NetworkGraph_read(ser: Uint8Array): number {
12103 if(!isWasmInitialized) {
12104 throw new Error("initializeWasm() must be awaited first!");
12106 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
12107 return nativeResponseValue;
12109 // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
12110 export function NetworkGraph_new(genesis_hash: Uint8Array): number {
12111 if(!isWasmInitialized) {
12112 throw new Error("initializeWasm() must be awaited first!");
12114 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
12115 return nativeResponseValue;
12117 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
12118 export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
12119 if(!isWasmInitialized) {
12120 throw new Error("initializeWasm() must be awaited first!");
12122 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
12123 return nativeResponseValue;
12125 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
12126 export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
12127 if(!isWasmInitialized) {
12128 throw new Error("initializeWasm() must be awaited first!");
12130 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
12131 return nativeResponseValue;
12133 // 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);
12134 export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
12135 if(!isWasmInitialized) {
12136 throw new Error("initializeWasm() must be awaited first!");
12138 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
12139 return nativeResponseValue;
12141 // 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);
12142 export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
12143 if(!isWasmInitialized) {
12144 throw new Error("initializeWasm() must be awaited first!");
12146 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
12147 return nativeResponseValue;
12149 // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
12150 export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
12151 if(!isWasmInitialized) {
12152 throw new Error("initializeWasm() must be awaited first!");
12154 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
12155 // debug statements here
12157 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
12158 export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
12159 if(!isWasmInitialized) {
12160 throw new Error("initializeWasm() must be awaited first!");
12162 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
12163 return nativeResponseValue;
12165 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
12166 export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
12167 if(!isWasmInitialized) {
12168 throw new Error("initializeWasm() must be awaited first!");
12170 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
12171 return nativeResponseValue;
12174 export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
12175 if(isWasmInitialized && !allowDoubleInitialization) {
12178 const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
12179 wasm = wasmInstance.exports;
12180 isWasmInitialized = true;