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 native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
195 public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
196 public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
197 public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
198 public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
199 public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
200 public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
201 public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
202 public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
203 public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
204 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
205 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
206 public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
207 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
208 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
209 public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
210 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
211 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
212 public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
213 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
214 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
215 public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
216 public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
217 public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
218 public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
219 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
220 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
221 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
222 public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
223 public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
224 public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
225 public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
226 public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
227 public static class LDKErrorAction {
228 private LDKErrorAction() {}
229 export class DisconnectPeer extends LDKErrorAction {
231 DisconnectPeer(number msg) { this.msg = msg; }
233 export class IgnoreError extends LDKErrorAction {
236 export class SendErrorMessage extends LDKErrorAction {
238 SendErrorMessage(number msg) { this.msg = msg; }
240 static native void init();
242 static { LDKErrorAction.init(); }
243 public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
244 public static class LDKHTLCFailChannelUpdate {
245 private LDKHTLCFailChannelUpdate() {}
246 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
248 ChannelUpdateMessage(number msg) { this.msg = msg; }
250 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
251 public number short_channel_id;
252 public boolean is_permanent;
253 ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
255 export class NodeFailure extends LDKHTLCFailChannelUpdate {
256 public Uint8Array node_id;
257 public boolean is_permanent;
258 NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
260 static native void init();
262 static { LDKHTLCFailChannelUpdate.init(); }
263 public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
264 public static class LDKMessageSendEvent {
265 private LDKMessageSendEvent() {}
266 export class SendAcceptChannel extends LDKMessageSendEvent {
267 public Uint8Array node_id;
269 SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
271 export class SendOpenChannel extends LDKMessageSendEvent {
272 public Uint8Array node_id;
274 SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
276 export class SendFundingCreated extends LDKMessageSendEvent {
277 public Uint8Array node_id;
279 SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
281 export class SendFundingSigned extends LDKMessageSendEvent {
282 public Uint8Array node_id;
284 SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
286 export class SendFundingLocked extends LDKMessageSendEvent {
287 public Uint8Array node_id;
289 SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
291 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
292 public Uint8Array node_id;
294 SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
296 export class UpdateHTLCs extends LDKMessageSendEvent {
297 public Uint8Array node_id;
298 public number updates;
299 UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
301 export class SendRevokeAndACK extends LDKMessageSendEvent {
302 public Uint8Array node_id;
304 SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
306 export class SendClosingSigned extends LDKMessageSendEvent {
307 public Uint8Array node_id;
309 SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
311 export class SendShutdown extends LDKMessageSendEvent {
312 public Uint8Array node_id;
314 SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
316 export class SendChannelReestablish extends LDKMessageSendEvent {
317 public Uint8Array node_id;
319 SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
321 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
323 public number update_msg;
324 BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
326 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
328 BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
330 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
332 BroadcastChannelUpdate(number msg) { this.msg = msg; }
334 export class HandleError extends LDKMessageSendEvent {
335 public Uint8Array node_id;
336 public number action;
337 HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
339 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
340 public number update;
341 PaymentFailureNetworkUpdate(number update) { this.update = update; }
343 export class SendChannelRangeQuery extends LDKMessageSendEvent {
344 public Uint8Array node_id;
346 SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
348 export class SendShortIdsQuery extends LDKMessageSendEvent {
349 public Uint8Array node_id;
351 SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
353 static native void init();
355 static { LDKMessageSendEvent.init(); }
356 public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
357 public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
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 native long LDKCVec_MonitorEventZ_new(number[] elems);
414 public static native long LDKC2Tuple_u64u64Z_new(number a, number b);
415 public static native number LDKC2Tuple_u64u64Z_get_a(long ptr);
416 public static native number LDKC2Tuple_u64u64Z_get_b(long ptr);
417 public static class LDKSpendableOutputDescriptor {
418 private LDKSpendableOutputDescriptor() {}
419 export class StaticOutput extends LDKSpendableOutputDescriptor {
420 public number outpoint;
421 public number output;
422 StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
424 export class DynamicOutputP2WSH extends LDKSpendableOutputDescriptor {
425 public number outpoint;
426 public Uint8Array per_commitment_point;
427 public number to_self_delay;
428 public number output;
429 public number key_derivation_params;
430 public Uint8Array revocation_pubkey;
431 DynamicOutputP2WSH(number outpoint, Uint8Array per_commitment_point, number to_self_delay, number output, number key_derivation_params, Uint8Array revocation_pubkey) { this.outpoint = outpoint; this.per_commitment_point = per_commitment_point; this.to_self_delay = to_self_delay; this.output = output; this.key_derivation_params = key_derivation_params; this.revocation_pubkey = revocation_pubkey; }
433 export class StaticOutputCounterpartyPayment extends LDKSpendableOutputDescriptor {
434 public number outpoint;
435 public number output;
436 public number key_derivation_params;
437 StaticOutputCounterpartyPayment(number outpoint, number output, number key_derivation_params) { this.outpoint = outpoint; this.output = output; this.key_derivation_params = key_derivation_params; }
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 LDKChannelKeys {
524 get_per_commitment_point (idx: number): Uint8Array;
525 release_commitment_secret (idx: number): Uint8Array;
526 key_derivation_params (): number;
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 LDKChannelKeys_new(impl: LDKChannelKeys, pubkeys: number): number {
538 throw new Error('unimplemented'); // TODO: bind to WASM
541 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
544 // LDKPublicKey ChannelKeys_get_per_commitment_point LDKChannelKeys* this_arg, uint64_t idx
545 export function ChannelKeys_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.ChannelKeys_get_per_commitment_point(this_arg, idx);
550 return decodeArray(nativeResponseValue);
552 // LDKThirtyTwoBytes ChannelKeys_release_commitment_secret LDKChannelKeys* this_arg, uint64_t idx
553 export function ChannelKeys_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.ChannelKeys_release_commitment_secret(this_arg, idx);
558 return decodeArray(nativeResponseValue);
560 // LDKC2Tuple_u64u64Z ChannelKeys_key_derivation_params LDKChannelKeys* this_arg
561 export function ChannelKeys_key_derivation_params(this_arg: number): number {
562 if(!isWasmInitialized) {
563 throw new Error("initializeWasm() must be awaited first!");
565 const nativeResponseValue = wasm.ChannelKeys_key_derivation_params(this_arg);
566 return nativeResponseValue;
568 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ChannelKeys_sign_counterparty_commitment LDKChannelKeys* this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
569 export function ChannelKeys_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.ChannelKeys_sign_counterparty_commitment(this_arg, commitment_tx);
574 return nativeResponseValue;
576 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ChannelKeys_sign_holder_commitment_and_htlcs LDKChannelKeys* this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
577 export function ChannelKeys_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.ChannelKeys_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
582 return nativeResponseValue;
584 // LDKCResult_SignatureNoneZ ChannelKeys_sign_justice_transaction LDKChannelKeys* this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
585 export function ChannelKeys_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.ChannelKeys_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
590 return nativeResponseValue;
592 // LDKCResult_SignatureNoneZ ChannelKeys_sign_counterparty_htlc_transaction LDKChannelKeys* this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
593 export function ChannelKeys_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.ChannelKeys_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
598 return nativeResponseValue;
600 // LDKCResult_SignatureNoneZ ChannelKeys_sign_closing_transaction LDKChannelKeys* this_arg, struct LDKTransaction closing_tx
601 export function ChannelKeys_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.ChannelKeys_sign_closing_transaction(this_arg, encodeArray(closing_tx));
606 return nativeResponseValue;
608 // LDKCResult_SignatureNoneZ ChannelKeys_sign_channel_announcement LDKChannelKeys* this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
609 export function ChannelKeys_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.ChannelKeys_sign_channel_announcement(this_arg, msg);
614 return nativeResponseValue;
616 // void ChannelKeys_ready_channel LDKChannelKeys* this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
617 export function ChannelKeys_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.ChannelKeys_ready_channel(this_arg, channel_parameters);
622 // debug statements here
624 // LDKCVec_u8Z ChannelKeys_write LDKChannelKeys* this_arg
625 export function ChannelKeys_write(this_arg: number): Uint8Array {
626 if(!isWasmInitialized) {
627 throw new Error("initializeWasm() must be awaited first!");
629 const nativeResponseValue = wasm.ChannelKeys_write(this_arg);
630 return decodeArray(nativeResponseValue);
632 // LDKChannelPublicKeys ChannelKeys_get_pubkeys LDKChannelKeys* this_arg
633 export function ChannelKeys_get_pubkeys(this_arg: number): number {
634 if(!isWasmInitialized) {
635 throw new Error("initializeWasm() must be awaited first!");
637 const nativeResponseValue = wasm.ChannelKeys_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_ChannelDetailsZ_new(number[] elems);
679 public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
680 public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
681 public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
682 public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
686 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
688 export interface LDKWatch {
689 watch_channel (funding_txo: number, monitor: number): number;
690 update_channel (funding_txo: number, update: number): number;
691 release_pending_monitor_events (): number[];
694 export function LDKWatch_new(impl: LDKWatch): number {
695 throw new Error('unimplemented'); // TODO: bind to WASM
698 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
701 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch* this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
702 export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
703 if(!isWasmInitialized) {
704 throw new Error("initializeWasm() must be awaited first!");
706 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
707 return nativeResponseValue;
709 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch* this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
710 export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
711 if(!isWasmInitialized) {
712 throw new Error("initializeWasm() must be awaited first!");
714 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
715 return nativeResponseValue;
717 // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch* this_arg
718 export function Watch_release_pending_monitor_events(this_arg: number): number[] {
719 if(!isWasmInitialized) {
720 throw new Error("initializeWasm() must be awaited first!");
722 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
723 return nativeResponseValue;
728 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
730 export interface LDKBroadcasterInterface {
731 broadcast_transaction (tx: Uint8Array): void;
734 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
735 throw new Error('unimplemented'); // TODO: bind to WASM
738 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
741 // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface* this_arg, struct LDKTransaction tx
742 export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
743 if(!isWasmInitialized) {
744 throw new Error("initializeWasm() must be awaited first!");
746 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
747 // debug statements here
749 public static native boolean LDKCResult_ChannelKeysDecodeErrorZ_result_ok(long arg);
750 public static native number LDKCResult_ChannelKeysDecodeErrorZ_get_ok(long arg);
751 public static native number LDKCResult_ChannelKeysDecodeErrorZ_get_err(long arg);
755 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
757 export interface LDKKeysInterface {
758 get_node_secret (): Uint8Array;
759 get_destination_script (): Uint8Array;
760 get_shutdown_pubkey (): Uint8Array;
761 get_channel_keys (inbound: boolean, channel_value_satoshis: number): number;
762 get_secure_random_bytes (): Uint8Array;
763 read_chan_signer (reader: Uint8Array): number;
766 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
767 throw new Error('unimplemented'); // TODO: bind to WASM
770 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
773 // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface* this_arg
774 export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
775 if(!isWasmInitialized) {
776 throw new Error("initializeWasm() must be awaited first!");
778 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
779 return decodeArray(nativeResponseValue);
781 // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface* this_arg
782 export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
783 if(!isWasmInitialized) {
784 throw new Error("initializeWasm() must be awaited first!");
786 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
787 return decodeArray(nativeResponseValue);
789 // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface* this_arg
790 export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
791 if(!isWasmInitialized) {
792 throw new Error("initializeWasm() must be awaited first!");
794 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
795 return decodeArray(nativeResponseValue);
797 // LDKChannelKeys KeysInterface_get_channel_keys LDKKeysInterface* this_arg, bool inbound, uint64_t channel_value_satoshis
798 export function KeysInterface_get_channel_keys(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
799 if(!isWasmInitialized) {
800 throw new Error("initializeWasm() must be awaited first!");
802 const nativeResponseValue = wasm.KeysInterface_get_channel_keys(this_arg, inbound, channel_value_satoshis);
803 return nativeResponseValue;
805 // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface* this_arg
806 export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
807 if(!isWasmInitialized) {
808 throw new Error("initializeWasm() must be awaited first!");
810 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
811 return decodeArray(nativeResponseValue);
813 // LDKCResult_ChannelKeysDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
814 export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
815 if(!isWasmInitialized) {
816 throw new Error("initializeWasm() must be awaited first!");
818 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
819 return nativeResponseValue;
824 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
826 export interface LDKFeeEstimator {
827 get_est_sat_per_1000_weight (confirmation_target: LDKConfirmationTarget): number;
830 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
831 throw new Error('unimplemented'); // TODO: bind to WASM
834 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
837 // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator* this_arg, enum LDKConfirmationTarget confirmation_target
838 export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: LDKConfirmationTarget): number {
839 if(!isWasmInitialized) {
840 throw new Error("initializeWasm() must be awaited first!");
842 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
843 return nativeResponseValue;
848 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
850 export interface LDKLogger {
851 log (record: String): void;
854 export function LDKLogger_new(impl: LDKLogger): number {
855 throw new Error('unimplemented'); // TODO: bind to WASM
858 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
861 public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
862 public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
863 public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
864 public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
865 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
866 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
867 public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
868 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
869 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
870 public static native boolean LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(long arg);
871 public static native number LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(long arg);
872 public static native number LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(long arg);
873 public static native long LDKCVec_RouteHopZ_new(number[] elems);
874 public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
875 public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
876 public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
877 public static native long LDKCVec_RouteHintZ_new(number[] elems);
878 public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
879 public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
880 public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
881 public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
882 public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
883 public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
884 public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
885 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
886 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
887 public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
888 public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
889 public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
890 public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
891 public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
892 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
893 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
894 public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
895 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
896 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
897 public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
898 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
899 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
900 public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
901 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
902 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
903 public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
904 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
905 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
906 public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
907 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
908 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
909 public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
910 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
911 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
912 public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
913 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
914 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
915 public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
916 public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
917 public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
918 public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
919 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
920 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
921 public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
922 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
923 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
924 public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
925 public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
926 public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
927 public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
928 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
929 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
930 public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
931 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
932 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
933 public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
934 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
935 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
936 public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
937 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
938 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
939 public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
940 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
941 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
942 public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
943 public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
944 public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
945 public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
946 public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
947 public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
948 public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
949 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
950 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
951 public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
952 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
953 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
954 public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
955 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
956 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
957 public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
958 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
959 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
960 public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
961 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
962 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
963 public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
964 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
965 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
966 public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
967 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
968 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
969 public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
970 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
971 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
972 public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
973 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
974 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
975 public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
976 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
977 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
978 public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
979 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
980 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
981 public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
982 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
983 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
987 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
989 export interface LDKMessageSendEventsProvider {
990 get_and_clear_pending_msg_events (): number[];
993 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
994 throw new Error('unimplemented'); // TODO: bind to WASM
997 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1000 // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider* this_arg
1001 export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1002 if(!isWasmInitialized) {
1003 throw new Error("initializeWasm() must be awaited first!");
1005 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1006 return nativeResponseValue;
1011 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1013 export interface LDKEventsProvider {
1014 get_and_clear_pending_events (): number[];
1017 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1018 throw new Error('unimplemented'); // TODO: bind to WASM
1021 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1024 // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider* this_arg
1025 export function EventsProvider_get_and_clear_pending_events(this_arg: number): number[] {
1026 if(!isWasmInitialized) {
1027 throw new Error("initializeWasm() must be awaited first!");
1029 const nativeResponseValue = wasm.EventsProvider_get_and_clear_pending_events(this_arg);
1030 return nativeResponseValue;
1035 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1037 export interface LDKAccess {
1038 get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1041 export function LDKAccess_new(impl: LDKAccess): number {
1042 throw new Error('unimplemented'); // TODO: bind to WASM
1045 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1048 // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess* this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1049 export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1050 if(!isWasmInitialized) {
1051 throw new Error("initializeWasm() must be awaited first!");
1053 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1054 return nativeResponseValue;
1059 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1061 export interface LDKFilter {
1062 register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1063 register_output (outpoint: number, script_pubkey: Uint8Array): void;
1066 export function LDKFilter_new(impl: LDKFilter): number {
1067 throw new Error('unimplemented'); // TODO: bind to WASM
1070 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1073 // void Filter_register_tx LDKFilter* this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1074 export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1075 if(!isWasmInitialized) {
1076 throw new Error("initializeWasm() must be awaited first!");
1078 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1079 // debug statements here
1081 // void Filter_register_output LDKFilter* this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
1082 export function Filter_register_output(this_arg: number, outpoint: number, script_pubkey: Uint8Array): void {
1083 if(!isWasmInitialized) {
1084 throw new Error("initializeWasm() must be awaited first!");
1086 const nativeResponseValue = wasm.Filter_register_output(this_arg, outpoint, encodeArray(script_pubkey));
1087 // debug statements here
1092 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1094 export interface LDKPersist {
1095 persist_new_channel (id: number, data: number): number;
1096 update_persisted_channel (id: number, update: number, data: number): number;
1099 export function LDKPersist_new(impl: LDKPersist): number {
1100 throw new Error('unimplemented'); // TODO: bind to WASM
1103 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1106 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist* this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1107 export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1108 if(!isWasmInitialized) {
1109 throw new Error("initializeWasm() must be awaited first!");
1111 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1112 return nativeResponseValue;
1114 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist* this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
1115 export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1116 if(!isWasmInitialized) {
1117 throw new Error("initializeWasm() must be awaited first!");
1119 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1120 return nativeResponseValue;
1125 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1127 export interface LDKChannelMessageHandler {
1128 handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1129 handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1130 handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1131 handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1132 handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1133 handle_shutdown (their_node_id: Uint8Array, msg: number): void;
1134 handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1135 handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1136 handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1137 handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1138 handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1139 handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1140 handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1141 handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1142 handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1143 peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1144 peer_connected (their_node_id: Uint8Array, msg: number): void;
1145 handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1146 handle_error (their_node_id: Uint8Array, msg: number): void;
1149 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1150 throw new Error('unimplemented'); // TODO: bind to WASM
1153 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1156 // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg
1157 export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1158 if(!isWasmInitialized) {
1159 throw new Error("initializeWasm() must be awaited first!");
1161 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1162 // debug statements here
1164 // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg
1165 export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1166 if(!isWasmInitialized) {
1167 throw new Error("initializeWasm() must be awaited first!");
1169 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1170 // debug statements here
1172 // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1173 export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1174 if(!isWasmInitialized) {
1175 throw new Error("initializeWasm() must be awaited first!");
1177 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1178 // debug statements here
1180 // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1181 export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1182 if(!isWasmInitialized) {
1183 throw new Error("initializeWasm() must be awaited first!");
1185 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1186 // debug statements here
1188 // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1189 export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1190 if(!isWasmInitialized) {
1191 throw new Error("initializeWasm() must be awaited first!");
1193 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1194 // debug statements here
1196 // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKShutdown *NONNULL_PTR msg
1197 export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1198 if(!isWasmInitialized) {
1199 throw new Error("initializeWasm() must be awaited first!");
1201 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), msg);
1202 // debug statements here
1204 // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1205 export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1206 if(!isWasmInitialized) {
1207 throw new Error("initializeWasm() must be awaited first!");
1209 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1210 // debug statements here
1212 // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1213 export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1214 if(!isWasmInitialized) {
1215 throw new Error("initializeWasm() must be awaited first!");
1217 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1218 // debug statements here
1220 // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1221 export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1222 if(!isWasmInitialized) {
1223 throw new Error("initializeWasm() must be awaited first!");
1225 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1226 // debug statements here
1228 // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1229 export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1230 if(!isWasmInitialized) {
1231 throw new Error("initializeWasm() must be awaited first!");
1233 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1234 // debug statements here
1236 // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1237 export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1238 if(!isWasmInitialized) {
1239 throw new Error("initializeWasm() must be awaited first!");
1241 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1242 // debug statements here
1244 // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1245 export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1246 if(!isWasmInitialized) {
1247 throw new Error("initializeWasm() must be awaited first!");
1249 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1250 // debug statements here
1252 // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1253 export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1254 if(!isWasmInitialized) {
1255 throw new Error("initializeWasm() must be awaited first!");
1257 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1258 // debug statements here
1260 // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1261 export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1262 if(!isWasmInitialized) {
1263 throw new Error("initializeWasm() must be awaited first!");
1265 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1266 // debug statements here
1268 // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1269 export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1270 if(!isWasmInitialized) {
1271 throw new Error("initializeWasm() must be awaited first!");
1273 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1274 // debug statements here
1276 // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1277 export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1278 if(!isWasmInitialized) {
1279 throw new Error("initializeWasm() must be awaited first!");
1281 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1282 // debug statements here
1284 // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1285 export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1286 if(!isWasmInitialized) {
1287 throw new Error("initializeWasm() must be awaited first!");
1289 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1290 // debug statements here
1292 // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1293 export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1294 if(!isWasmInitialized) {
1295 throw new Error("initializeWasm() must be awaited first!");
1297 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1298 // debug statements here
1300 // void ChannelMessageHandler_handle_error LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1301 export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1302 if(!isWasmInitialized) {
1303 throw new Error("initializeWasm() must be awaited first!");
1305 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1306 // debug statements here
1311 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1313 export interface LDKRoutingMessageHandler {
1314 handle_node_announcement (msg: number): number;
1315 handle_channel_announcement (msg: number): number;
1316 handle_channel_update (msg: number): number;
1317 handle_htlc_fail_channel_update (update: number): void;
1318 get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1319 get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1320 sync_routing_table (their_node_id: Uint8Array, init: number): void;
1321 handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1322 handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1323 handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1324 handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1327 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1328 throw new Error('unimplemented'); // TODO: bind to WASM
1331 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1334 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler* this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1335 export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1336 if(!isWasmInitialized) {
1337 throw new Error("initializeWasm() must be awaited first!");
1339 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1340 return nativeResponseValue;
1342 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler* this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1343 export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1344 if(!isWasmInitialized) {
1345 throw new Error("initializeWasm() must be awaited first!");
1347 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1348 return nativeResponseValue;
1350 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler* this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1351 export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1352 if(!isWasmInitialized) {
1353 throw new Error("initializeWasm() must be awaited first!");
1355 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1356 return nativeResponseValue;
1358 // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler* this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1359 export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1360 if(!isWasmInitialized) {
1361 throw new Error("initializeWasm() must be awaited first!");
1363 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1364 // debug statements here
1366 // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler* this_arg, uint64_t starting_point, uint8_t batch_amount
1367 export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1368 if(!isWasmInitialized) {
1369 throw new Error("initializeWasm() must be awaited first!");
1371 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1372 return nativeResponseValue;
1374 // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler* this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1375 export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1376 if(!isWasmInitialized) {
1377 throw new Error("initializeWasm() must be awaited first!");
1379 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1380 return nativeResponseValue;
1382 // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1383 export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1384 if(!isWasmInitialized) {
1385 throw new Error("initializeWasm() must be awaited first!");
1387 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1388 // debug statements here
1390 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1391 export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1392 if(!isWasmInitialized) {
1393 throw new Error("initializeWasm() must be awaited first!");
1395 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1396 return nativeResponseValue;
1398 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1399 export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1400 if(!isWasmInitialized) {
1401 throw new Error("initializeWasm() must be awaited first!");
1403 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1404 return nativeResponseValue;
1406 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1407 export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1408 if(!isWasmInitialized) {
1409 throw new Error("initializeWasm() must be awaited first!");
1411 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1412 return nativeResponseValue;
1414 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1415 export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1416 if(!isWasmInitialized) {
1417 throw new Error("initializeWasm() must be awaited first!");
1419 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1420 return nativeResponseValue;
1425 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1427 export interface LDKSocketDescriptor {
1428 send_data (data: Uint8Array, resume_read: boolean): number;
1429 disconnect_socket (): void;
1430 eq (other_arg: number): boolean;
1434 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1435 throw new Error('unimplemented'); // TODO: bind to WASM
1438 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1441 // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor* this_arg, struct LDKu8slice data, bool resume_read
1442 export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1443 if(!isWasmInitialized) {
1444 throw new Error("initializeWasm() must be awaited first!");
1446 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1447 return nativeResponseValue;
1449 // void SocketDescriptor_disconnect_socket LDKSocketDescriptor* this_arg
1450 export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1451 if(!isWasmInitialized) {
1452 throw new Error("initializeWasm() must be awaited first!");
1454 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1455 // debug statements here
1457 // uint64_t SocketDescriptor_hash LDKSocketDescriptor* this_arg
1458 export function SocketDescriptor_hash(this_arg: number): number {
1459 if(!isWasmInitialized) {
1460 throw new Error("initializeWasm() must be awaited first!");
1462 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1463 return nativeResponseValue;
1465 // void Transaction_free(struct LDKTransaction _res);
1466 export function Transaction_free(_res: Uint8Array): void {
1467 if(!isWasmInitialized) {
1468 throw new Error("initializeWasm() must be awaited first!");
1470 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1471 // debug statements here
1473 // void TxOut_free(struct LDKTxOut _res);
1474 export function TxOut_free(_res: number): void {
1475 if(!isWasmInitialized) {
1476 throw new Error("initializeWasm() must be awaited first!");
1478 const nativeResponseValue = wasm.TxOut_free(_res);
1479 // debug statements here
1481 // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1482 export function TxOut_clone(orig: number): number {
1483 if(!isWasmInitialized) {
1484 throw new Error("initializeWasm() must be awaited first!");
1486 const nativeResponseValue = wasm.TxOut_clone(orig);
1487 return nativeResponseValue;
1489 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1490 export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1491 if(!isWasmInitialized) {
1492 throw new Error("initializeWasm() must be awaited first!");
1494 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1495 return nativeResponseValue;
1497 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1498 export function CResult_SecretKeyErrorZ_err(e: LDKSecp256k1Error): number {
1499 if(!isWasmInitialized) {
1500 throw new Error("initializeWasm() must be awaited first!");
1502 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1503 return nativeResponseValue;
1505 // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1506 export function CResult_SecretKeyErrorZ_free(_res: number): void {
1507 if(!isWasmInitialized) {
1508 throw new Error("initializeWasm() must be awaited first!");
1510 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1511 // debug statements here
1513 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1514 export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1515 if(!isWasmInitialized) {
1516 throw new Error("initializeWasm() must be awaited first!");
1518 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1519 return nativeResponseValue;
1521 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1522 export function CResult_PublicKeyErrorZ_err(e: LDKSecp256k1Error): number {
1523 if(!isWasmInitialized) {
1524 throw new Error("initializeWasm() must be awaited first!");
1526 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1527 return nativeResponseValue;
1529 // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1530 export function CResult_PublicKeyErrorZ_free(_res: number): void {
1531 if(!isWasmInitialized) {
1532 throw new Error("initializeWasm() must be awaited first!");
1534 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1535 // debug statements here
1537 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1538 export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1539 if(!isWasmInitialized) {
1540 throw new Error("initializeWasm() must be awaited first!");
1542 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1543 return nativeResponseValue;
1545 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1546 export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1547 if(!isWasmInitialized) {
1548 throw new Error("initializeWasm() must be awaited first!");
1550 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1551 return nativeResponseValue;
1553 // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1554 export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1555 if(!isWasmInitialized) {
1556 throw new Error("initializeWasm() must be awaited first!");
1558 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1559 // debug statements here
1561 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1562 export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
1563 if(!isWasmInitialized) {
1564 throw new Error("initializeWasm() must be awaited first!");
1566 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
1567 return nativeResponseValue;
1569 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1570 export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
1571 if(!isWasmInitialized) {
1572 throw new Error("initializeWasm() must be awaited first!");
1574 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
1575 return nativeResponseValue;
1577 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1578 export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
1579 if(!isWasmInitialized) {
1580 throw new Error("initializeWasm() must be awaited first!");
1582 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
1583 return nativeResponseValue;
1585 // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1586 export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
1587 if(!isWasmInitialized) {
1588 throw new Error("initializeWasm() must be awaited first!");
1590 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
1591 // debug statements here
1593 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1594 export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
1595 if(!isWasmInitialized) {
1596 throw new Error("initializeWasm() must be awaited first!");
1598 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
1599 return nativeResponseValue;
1601 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1602 export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
1603 if(!isWasmInitialized) {
1604 throw new Error("initializeWasm() must be awaited first!");
1606 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
1607 return nativeResponseValue;
1609 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
1610 export function CResult_TxCreationKeysErrorZ_err(e: LDKSecp256k1Error): number {
1611 if(!isWasmInitialized) {
1612 throw new Error("initializeWasm() must be awaited first!");
1614 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
1615 return nativeResponseValue;
1617 // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
1618 export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
1619 if(!isWasmInitialized) {
1620 throw new Error("initializeWasm() must be awaited first!");
1622 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
1623 // debug statements here
1625 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
1626 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
1627 if(!isWasmInitialized) {
1628 throw new Error("initializeWasm() must be awaited first!");
1630 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
1631 return nativeResponseValue;
1633 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
1634 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
1635 if(!isWasmInitialized) {
1636 throw new Error("initializeWasm() must be awaited first!");
1638 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
1639 return nativeResponseValue;
1641 // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
1642 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
1643 if(!isWasmInitialized) {
1644 throw new Error("initializeWasm() must be awaited first!");
1646 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
1647 // debug statements here
1649 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
1650 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
1651 if(!isWasmInitialized) {
1652 throw new Error("initializeWasm() must be awaited first!");
1654 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
1655 return nativeResponseValue;
1657 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
1658 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1659 if(!isWasmInitialized) {
1660 throw new Error("initializeWasm() must be awaited first!");
1662 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
1663 return nativeResponseValue;
1665 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1666 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1667 if(!isWasmInitialized) {
1668 throw new Error("initializeWasm() must be awaited first!");
1670 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
1671 return nativeResponseValue;
1673 // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
1674 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1675 if(!isWasmInitialized) {
1676 throw new Error("initializeWasm() must be awaited first!");
1678 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
1679 // debug statements here
1681 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1682 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1683 if(!isWasmInitialized) {
1684 throw new Error("initializeWasm() must be awaited first!");
1686 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
1687 return nativeResponseValue;
1689 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
1690 export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1691 if(!isWasmInitialized) {
1692 throw new Error("initializeWasm() must be awaited first!");
1694 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
1695 return nativeResponseValue;
1697 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1698 export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1699 if(!isWasmInitialized) {
1700 throw new Error("initializeWasm() must be awaited first!");
1702 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
1703 return nativeResponseValue;
1705 // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
1706 export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1707 if(!isWasmInitialized) {
1708 throw new Error("initializeWasm() must be awaited first!");
1710 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
1711 // debug statements here
1713 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1714 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1715 if(!isWasmInitialized) {
1716 throw new Error("initializeWasm() must be awaited first!");
1718 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
1719 return nativeResponseValue;
1721 // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1722 export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
1723 if(!isWasmInitialized) {
1724 throw new Error("initializeWasm() must be awaited first!");
1726 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
1727 // debug statements here
1729 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
1730 export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1731 if(!isWasmInitialized) {
1732 throw new Error("initializeWasm() must be awaited first!");
1734 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
1735 return nativeResponseValue;
1737 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1738 export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
1739 if(!isWasmInitialized) {
1740 throw new Error("initializeWasm() must be awaited first!");
1742 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
1743 return nativeResponseValue;
1745 // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
1746 export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1747 if(!isWasmInitialized) {
1748 throw new Error("initializeWasm() must be awaited first!");
1750 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
1751 // debug statements here
1753 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1754 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1755 if(!isWasmInitialized) {
1756 throw new Error("initializeWasm() must be awaited first!");
1758 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
1759 return nativeResponseValue;
1761 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
1762 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1763 if(!isWasmInitialized) {
1764 throw new Error("initializeWasm() must be awaited first!");
1766 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
1767 return nativeResponseValue;
1769 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1770 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
1771 if(!isWasmInitialized) {
1772 throw new Error("initializeWasm() must be awaited first!");
1774 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
1775 return nativeResponseValue;
1777 // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
1778 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1779 if(!isWasmInitialized) {
1780 throw new Error("initializeWasm() must be awaited first!");
1782 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
1783 // debug statements here
1785 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1786 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1787 if(!isWasmInitialized) {
1788 throw new Error("initializeWasm() must be awaited first!");
1790 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
1791 return nativeResponseValue;
1793 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
1794 export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
1795 if(!isWasmInitialized) {
1796 throw new Error("initializeWasm() must be awaited first!");
1798 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
1799 return nativeResponseValue;
1801 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1802 export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
1803 if(!isWasmInitialized) {
1804 throw new Error("initializeWasm() must be awaited first!");
1806 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
1807 return nativeResponseValue;
1809 // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
1810 export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
1811 if(!isWasmInitialized) {
1812 throw new Error("initializeWasm() must be awaited first!");
1814 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
1815 // debug statements here
1817 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1818 export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1819 if(!isWasmInitialized) {
1820 throw new Error("initializeWasm() must be awaited first!");
1822 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
1823 return nativeResponseValue;
1825 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
1826 export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
1827 if(!isWasmInitialized) {
1828 throw new Error("initializeWasm() must be awaited first!");
1830 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
1831 return nativeResponseValue;
1833 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
1834 export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
1835 if(!isWasmInitialized) {
1836 throw new Error("initializeWasm() must be awaited first!");
1838 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
1839 return nativeResponseValue;
1841 // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
1842 export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
1843 if(!isWasmInitialized) {
1844 throw new Error("initializeWasm() must be awaited first!");
1846 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
1847 // debug statements here
1849 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
1850 export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
1851 if(!isWasmInitialized) {
1852 throw new Error("initializeWasm() must be awaited first!");
1854 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
1855 return nativeResponseValue;
1857 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
1858 export function CResult_CVec_SignatureZNoneZ_err(): number {
1859 if(!isWasmInitialized) {
1860 throw new Error("initializeWasm() must be awaited first!");
1862 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
1863 return nativeResponseValue;
1865 // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
1866 export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
1867 if(!isWasmInitialized) {
1868 throw new Error("initializeWasm() must be awaited first!");
1870 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
1871 // debug statements here
1873 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
1874 export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
1875 if(!isWasmInitialized) {
1876 throw new Error("initializeWasm() must be awaited first!");
1878 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
1879 return nativeResponseValue;
1881 // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
1882 export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
1883 if(!isWasmInitialized) {
1884 throw new Error("initializeWasm() must be awaited first!");
1886 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
1887 // debug statements here
1889 // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
1890 export function CVec_u8Z_free(_res: Uint8Array): void {
1891 if(!isWasmInitialized) {
1892 throw new Error("initializeWasm() must be awaited first!");
1894 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
1895 // debug statements here
1897 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
1898 export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
1899 if(!isWasmInitialized) {
1900 throw new Error("initializeWasm() must be awaited first!");
1902 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
1903 return nativeResponseValue;
1905 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
1906 export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
1907 if(!isWasmInitialized) {
1908 throw new Error("initializeWasm() must be awaited first!");
1910 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
1911 return nativeResponseValue;
1913 // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
1914 export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
1915 if(!isWasmInitialized) {
1916 throw new Error("initializeWasm() must be awaited first!");
1918 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
1919 // debug statements here
1921 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
1922 export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
1923 if(!isWasmInitialized) {
1924 throw new Error("initializeWasm() must be awaited first!");
1926 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
1927 return nativeResponseValue;
1929 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
1930 export function CResult_NonePeerHandleErrorZ_ok(): number {
1931 if(!isWasmInitialized) {
1932 throw new Error("initializeWasm() must be awaited first!");
1934 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
1935 return nativeResponseValue;
1937 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
1938 export function CResult_NonePeerHandleErrorZ_err(e: number): number {
1939 if(!isWasmInitialized) {
1940 throw new Error("initializeWasm() must be awaited first!");
1942 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
1943 return nativeResponseValue;
1945 // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
1946 export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
1947 if(!isWasmInitialized) {
1948 throw new Error("initializeWasm() must be awaited first!");
1950 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
1951 // debug statements here
1953 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
1954 export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
1955 if(!isWasmInitialized) {
1956 throw new Error("initializeWasm() must be awaited first!");
1958 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
1959 return nativeResponseValue;
1961 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
1962 export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
1963 if(!isWasmInitialized) {
1964 throw new Error("initializeWasm() must be awaited first!");
1966 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
1967 return nativeResponseValue;
1969 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
1970 export function CResult_boolPeerHandleErrorZ_err(e: number): number {
1971 if(!isWasmInitialized) {
1972 throw new Error("initializeWasm() must be awaited first!");
1974 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
1975 return nativeResponseValue;
1977 // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
1978 export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
1979 if(!isWasmInitialized) {
1980 throw new Error("initializeWasm() must be awaited first!");
1982 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
1983 // debug statements here
1985 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
1986 export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
1987 if(!isWasmInitialized) {
1988 throw new Error("initializeWasm() must be awaited first!");
1990 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
1991 return nativeResponseValue;
1993 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
1994 export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
1995 if(!isWasmInitialized) {
1996 throw new Error("initializeWasm() must be awaited first!");
1998 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
1999 return nativeResponseValue;
2001 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2002 export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
2003 if(!isWasmInitialized) {
2004 throw new Error("initializeWasm() must be awaited first!");
2006 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
2007 return nativeResponseValue;
2009 // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2010 export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
2011 if(!isWasmInitialized) {
2012 throw new Error("initializeWasm() must be awaited first!");
2014 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
2015 // debug statements here
2017 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2018 export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
2019 if(!isWasmInitialized) {
2020 throw new Error("initializeWasm() must be awaited first!");
2022 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
2023 return nativeResponseValue;
2025 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2026 export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
2027 if(!isWasmInitialized) {
2028 throw new Error("initializeWasm() must be awaited first!");
2030 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
2031 return nativeResponseValue;
2033 // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2034 export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
2035 if(!isWasmInitialized) {
2036 throw new Error("initializeWasm() must be awaited first!");
2038 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
2039 // debug statements here
2041 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2042 export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
2043 if(!isWasmInitialized) {
2044 throw new Error("initializeWasm() must be awaited first!");
2046 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
2047 return nativeResponseValue;
2049 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2050 export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
2051 if(!isWasmInitialized) {
2052 throw new Error("initializeWasm() must be awaited first!");
2054 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
2055 return nativeResponseValue;
2057 // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2058 export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
2059 if(!isWasmInitialized) {
2060 throw new Error("initializeWasm() must be awaited first!");
2062 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
2063 // debug statements here
2065 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
2066 export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
2067 if(!isWasmInitialized) {
2068 throw new Error("initializeWasm() must be awaited first!");
2070 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
2071 return nativeResponseValue;
2073 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
2074 export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
2075 if(!isWasmInitialized) {
2076 throw new Error("initializeWasm() must be awaited first!");
2078 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
2079 return nativeResponseValue;
2081 // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
2082 export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
2083 if(!isWasmInitialized) {
2084 throw new Error("initializeWasm() must be awaited first!");
2086 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
2087 // debug statements here
2089 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
2090 export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
2091 if(!isWasmInitialized) {
2092 throw new Error("initializeWasm() must be awaited first!");
2094 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
2095 return nativeResponseValue;
2097 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
2098 export function CResult_boolLightningErrorZ_ok(o: boolean): number {
2099 if(!isWasmInitialized) {
2100 throw new Error("initializeWasm() must be awaited first!");
2102 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
2103 return nativeResponseValue;
2105 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
2106 export function CResult_boolLightningErrorZ_err(e: number): number {
2107 if(!isWasmInitialized) {
2108 throw new Error("initializeWasm() must be awaited first!");
2110 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
2111 return nativeResponseValue;
2113 // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
2114 export function CResult_boolLightningErrorZ_free(_res: number): void {
2115 if(!isWasmInitialized) {
2116 throw new Error("initializeWasm() must be awaited first!");
2118 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
2119 // debug statements here
2121 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
2122 export function CResult_boolLightningErrorZ_clone(orig: number): number {
2123 if(!isWasmInitialized) {
2124 throw new Error("initializeWasm() must be awaited first!");
2126 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
2127 return nativeResponseValue;
2129 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
2130 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
2131 if(!isWasmInitialized) {
2132 throw new Error("initializeWasm() must be awaited first!");
2134 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
2135 return nativeResponseValue;
2137 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
2138 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
2139 if(!isWasmInitialized) {
2140 throw new Error("initializeWasm() must be awaited first!");
2142 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
2143 return nativeResponseValue;
2145 // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
2146 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
2147 if(!isWasmInitialized) {
2148 throw new Error("initializeWasm() must be awaited first!");
2150 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
2151 // debug statements here
2153 // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2154 export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
2155 if(!isWasmInitialized) {
2156 throw new Error("initializeWasm() must be awaited first!");
2158 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
2159 // debug statements here
2161 // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2162 export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
2163 if(!isWasmInitialized) {
2164 throw new Error("initializeWasm() must be awaited first!");
2166 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
2167 // debug statements here
2169 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2170 export function CResult_NoneLightningErrorZ_ok(): number {
2171 if(!isWasmInitialized) {
2172 throw new Error("initializeWasm() must be awaited first!");
2174 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
2175 return nativeResponseValue;
2177 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2178 export function CResult_NoneLightningErrorZ_err(e: number): number {
2179 if(!isWasmInitialized) {
2180 throw new Error("initializeWasm() must be awaited first!");
2182 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
2183 return nativeResponseValue;
2185 // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2186 export function CResult_NoneLightningErrorZ_free(_res: number): void {
2187 if(!isWasmInitialized) {
2188 throw new Error("initializeWasm() must be awaited first!");
2190 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
2191 // debug statements here
2193 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
2194 export function CResult_NoneLightningErrorZ_clone(orig: number): number {
2195 if(!isWasmInitialized) {
2196 throw new Error("initializeWasm() must be awaited first!");
2198 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
2199 return nativeResponseValue;
2201 // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
2202 export function CVec_MessageSendEventZ_free(_res: number[]): void {
2203 if(!isWasmInitialized) {
2204 throw new Error("initializeWasm() must be awaited first!");
2206 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
2207 // debug statements here
2209 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
2210 export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
2211 if(!isWasmInitialized) {
2212 throw new Error("initializeWasm() must be awaited first!");
2214 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
2215 return nativeResponseValue;
2217 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2218 export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
2219 if(!isWasmInitialized) {
2220 throw new Error("initializeWasm() must be awaited first!");
2222 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
2223 return nativeResponseValue;
2225 // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
2226 export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
2227 if(!isWasmInitialized) {
2228 throw new Error("initializeWasm() must be awaited first!");
2230 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
2231 // debug statements here
2233 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2234 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
2235 if(!isWasmInitialized) {
2236 throw new Error("initializeWasm() must be awaited first!");
2238 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
2239 return nativeResponseValue;
2241 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
2242 export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
2243 if(!isWasmInitialized) {
2244 throw new Error("initializeWasm() must be awaited first!");
2246 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
2247 return nativeResponseValue;
2249 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2250 export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
2251 if(!isWasmInitialized) {
2252 throw new Error("initializeWasm() must be awaited first!");
2254 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
2255 return nativeResponseValue;
2257 // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
2258 export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
2259 if(!isWasmInitialized) {
2260 throw new Error("initializeWasm() must be awaited first!");
2262 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
2263 // debug statements here
2265 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2266 export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
2267 if(!isWasmInitialized) {
2268 throw new Error("initializeWasm() must be awaited first!");
2270 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
2271 return nativeResponseValue;
2273 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2274 export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
2275 if(!isWasmInitialized) {
2276 throw new Error("initializeWasm() must be awaited first!");
2278 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
2279 return nativeResponseValue;
2281 // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2282 export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
2283 if(!isWasmInitialized) {
2284 throw new Error("initializeWasm() must be awaited first!");
2286 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
2287 // debug statements here
2289 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
2290 export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
2291 if(!isWasmInitialized) {
2292 throw new Error("initializeWasm() must be awaited first!");
2294 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
2295 return nativeResponseValue;
2297 // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
2298 export function CVec_NetAddressZ_free(_res: number[]): void {
2299 if(!isWasmInitialized) {
2300 throw new Error("initializeWasm() must be awaited first!");
2302 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
2303 // debug statements here
2305 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2306 export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
2307 if(!isWasmInitialized) {
2308 throw new Error("initializeWasm() must be awaited first!");
2310 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
2311 return nativeResponseValue;
2313 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2314 export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
2315 if(!isWasmInitialized) {
2316 throw new Error("initializeWasm() must be awaited first!");
2318 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
2319 return nativeResponseValue;
2321 // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
2322 export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
2323 if(!isWasmInitialized) {
2324 throw new Error("initializeWasm() must be awaited first!");
2326 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
2327 // debug statements here
2329 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
2330 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
2331 if(!isWasmInitialized) {
2332 throw new Error("initializeWasm() must be awaited first!");
2334 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
2335 return nativeResponseValue;
2337 // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
2338 export function CVec_u64Z_free(_res: number[]): void {
2339 if(!isWasmInitialized) {
2340 throw new Error("initializeWasm() must be awaited first!");
2342 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
2343 // debug statements here
2345 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
2346 export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
2347 if(!isWasmInitialized) {
2348 throw new Error("initializeWasm() must be awaited first!");
2350 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
2351 return nativeResponseValue;
2353 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
2354 export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
2355 if(!isWasmInitialized) {
2356 throw new Error("initializeWasm() must be awaited first!");
2358 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
2359 return nativeResponseValue;
2361 // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
2362 export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
2363 if(!isWasmInitialized) {
2364 throw new Error("initializeWasm() must be awaited first!");
2366 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
2367 // debug statements here
2369 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
2370 export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
2371 if(!isWasmInitialized) {
2372 throw new Error("initializeWasm() must be awaited first!");
2374 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
2375 return nativeResponseValue;
2377 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
2378 export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
2379 if(!isWasmInitialized) {
2380 throw new Error("initializeWasm() must be awaited first!");
2382 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
2383 return nativeResponseValue;
2385 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
2386 export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
2387 if(!isWasmInitialized) {
2388 throw new Error("initializeWasm() must be awaited first!");
2390 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
2391 return nativeResponseValue;
2393 // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
2394 export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
2395 if(!isWasmInitialized) {
2396 throw new Error("initializeWasm() must be awaited first!");
2398 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
2399 // debug statements here
2401 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2402 export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2403 if(!isWasmInitialized) {
2404 throw new Error("initializeWasm() must be awaited first!");
2406 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2407 return nativeResponseValue;
2409 // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2410 export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2411 if(!isWasmInitialized) {
2412 throw new Error("initializeWasm() must be awaited first!");
2414 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2415 // debug statements here
2417 // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2418 export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2419 if(!isWasmInitialized) {
2420 throw new Error("initializeWasm() must be awaited first!");
2422 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2423 // debug statements here
2425 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2426 export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2427 if(!isWasmInitialized) {
2428 throw new Error("initializeWasm() must be awaited first!");
2430 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2431 return nativeResponseValue;
2433 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2434 export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
2435 if(!isWasmInitialized) {
2436 throw new Error("initializeWasm() must be awaited first!");
2438 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2439 return nativeResponseValue;
2441 // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2442 export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2443 if(!isWasmInitialized) {
2444 throw new Error("initializeWasm() must be awaited first!");
2446 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2447 // debug statements here
2449 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2450 export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2451 if(!isWasmInitialized) {
2452 throw new Error("initializeWasm() must be awaited first!");
2454 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2455 return nativeResponseValue;
2457 // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2458 export function CVec_MonitorEventZ_free(_res: number[]): void {
2459 if(!isWasmInitialized) {
2460 throw new Error("initializeWasm() must be awaited first!");
2462 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2463 // debug statements here
2465 // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
2466 export function CVec_EventZ_free(_res: number[]): void {
2467 if(!isWasmInitialized) {
2468 throw new Error("initializeWasm() must be awaited first!");
2470 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
2471 // debug statements here
2473 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
2474 export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
2475 if(!isWasmInitialized) {
2476 throw new Error("initializeWasm() must be awaited first!");
2478 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
2479 return nativeResponseValue;
2481 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
2482 export function CResult_OutPointDecodeErrorZ_err(e: number): number {
2483 if(!isWasmInitialized) {
2484 throw new Error("initializeWasm() must be awaited first!");
2486 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
2487 return nativeResponseValue;
2489 // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
2490 export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
2491 if(!isWasmInitialized) {
2492 throw new Error("initializeWasm() must be awaited first!");
2494 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
2495 // debug statements here
2497 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
2498 export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
2499 if(!isWasmInitialized) {
2500 throw new Error("initializeWasm() must be awaited first!");
2502 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
2503 return nativeResponseValue;
2505 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
2506 export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
2507 if(!isWasmInitialized) {
2508 throw new Error("initializeWasm() must be awaited first!");
2510 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
2511 return nativeResponseValue;
2513 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2514 export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
2515 if(!isWasmInitialized) {
2516 throw new Error("initializeWasm() must be awaited first!");
2518 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
2519 return nativeResponseValue;
2521 // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
2522 export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
2523 if(!isWasmInitialized) {
2524 throw new Error("initializeWasm() must be awaited first!");
2526 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
2527 // debug statements here
2529 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
2530 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
2531 if(!isWasmInitialized) {
2532 throw new Error("initializeWasm() must be awaited first!");
2534 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
2535 return nativeResponseValue;
2537 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
2538 export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
2539 if(!isWasmInitialized) {
2540 throw new Error("initializeWasm() must be awaited first!");
2542 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
2543 return nativeResponseValue;
2545 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2546 export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
2547 if(!isWasmInitialized) {
2548 throw new Error("initializeWasm() must be awaited first!");
2550 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
2551 return nativeResponseValue;
2553 // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
2554 export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
2555 if(!isWasmInitialized) {
2556 throw new Error("initializeWasm() must be awaited first!");
2558 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
2559 // debug statements here
2561 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
2562 export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
2563 if(!isWasmInitialized) {
2564 throw new Error("initializeWasm() must be awaited first!");
2566 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
2567 return nativeResponseValue;
2569 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
2570 export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
2571 if(!isWasmInitialized) {
2572 throw new Error("initializeWasm() must be awaited first!");
2574 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
2575 return nativeResponseValue;
2577 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
2578 export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
2579 if(!isWasmInitialized) {
2580 throw new Error("initializeWasm() must be awaited first!");
2582 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
2583 return nativeResponseValue;
2585 // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
2586 export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
2587 if(!isWasmInitialized) {
2588 throw new Error("initializeWasm() must be awaited first!");
2590 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
2591 // debug statements here
2593 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
2594 export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
2595 if(!isWasmInitialized) {
2596 throw new Error("initializeWasm() must be awaited first!");
2598 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
2599 return nativeResponseValue;
2601 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
2602 export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
2603 if(!isWasmInitialized) {
2604 throw new Error("initializeWasm() must be awaited first!");
2606 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
2607 return nativeResponseValue;
2609 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
2610 export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
2611 if(!isWasmInitialized) {
2612 throw new Error("initializeWasm() must be awaited first!");
2614 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
2615 return nativeResponseValue;
2617 // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
2618 export function C2Tuple_OutPointScriptZ_free(_res: number): void {
2619 if(!isWasmInitialized) {
2620 throw new Error("initializeWasm() must be awaited first!");
2622 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
2623 // debug statements here
2625 // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
2626 export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
2627 if(!isWasmInitialized) {
2628 throw new Error("initializeWasm() must be awaited first!");
2630 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
2631 // debug statements here
2633 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
2634 export function C2Tuple_u32TxOutZ_clone(orig: number): number {
2635 if(!isWasmInitialized) {
2636 throw new Error("initializeWasm() must be awaited first!");
2638 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
2639 return nativeResponseValue;
2641 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
2642 export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
2643 if(!isWasmInitialized) {
2644 throw new Error("initializeWasm() must be awaited first!");
2646 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
2647 return nativeResponseValue;
2649 // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
2650 export function C2Tuple_u32TxOutZ_free(_res: number): void {
2651 if(!isWasmInitialized) {
2652 throw new Error("initializeWasm() must be awaited first!");
2654 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
2655 // debug statements here
2657 // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
2658 export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
2659 if(!isWasmInitialized) {
2660 throw new Error("initializeWasm() must be awaited first!");
2662 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
2663 // debug statements here
2665 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
2666 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
2667 if(!isWasmInitialized) {
2668 throw new Error("initializeWasm() must be awaited first!");
2670 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
2671 return nativeResponseValue;
2673 // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
2674 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
2675 if(!isWasmInitialized) {
2676 throw new Error("initializeWasm() must be awaited first!");
2678 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
2679 // debug statements here
2681 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
2682 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
2683 if(!isWasmInitialized) {
2684 throw new Error("initializeWasm() must be awaited first!");
2686 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
2687 // debug statements here
2689 // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
2690 export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
2691 if(!isWasmInitialized) {
2692 throw new Error("initializeWasm() must be awaited first!");
2694 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
2695 return nativeResponseValue;
2697 // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
2698 export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
2699 if(!isWasmInitialized) {
2700 throw new Error("initializeWasm() must be awaited first!");
2702 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
2703 // debug statements here
2705 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
2706 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
2707 if(!isWasmInitialized) {
2708 throw new Error("initializeWasm() must be awaited first!");
2710 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
2711 return nativeResponseValue;
2713 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
2714 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
2715 if(!isWasmInitialized) {
2716 throw new Error("initializeWasm() must be awaited first!");
2718 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
2719 return nativeResponseValue;
2721 // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
2722 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
2723 if(!isWasmInitialized) {
2724 throw new Error("initializeWasm() must be awaited first!");
2726 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
2727 // debug statements here
2729 // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2730 export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2731 if(!isWasmInitialized) {
2732 throw new Error("initializeWasm() must be awaited first!");
2734 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2735 // debug statements here
2737 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2738 export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2739 if(!isWasmInitialized) {
2740 throw new Error("initializeWasm() must be awaited first!");
2742 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2743 return nativeResponseValue;
2745 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2746 export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
2747 if(!isWasmInitialized) {
2748 throw new Error("initializeWasm() must be awaited first!");
2750 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2751 return nativeResponseValue;
2753 // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2754 export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2755 if(!isWasmInitialized) {
2756 throw new Error("initializeWasm() must be awaited first!");
2758 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2759 // debug statements here
2761 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2762 export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2763 if(!isWasmInitialized) {
2764 throw new Error("initializeWasm() must be awaited first!");
2766 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2767 return nativeResponseValue;
2769 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
2770 export function CResult_NoneAPIErrorZ_ok(): number {
2771 if(!isWasmInitialized) {
2772 throw new Error("initializeWasm() must be awaited first!");
2774 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
2775 return nativeResponseValue;
2777 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
2778 export function CResult_NoneAPIErrorZ_err(e: number): number {
2779 if(!isWasmInitialized) {
2780 throw new Error("initializeWasm() must be awaited first!");
2782 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
2783 return nativeResponseValue;
2785 // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
2786 export function CResult_NoneAPIErrorZ_free(_res: number): void {
2787 if(!isWasmInitialized) {
2788 throw new Error("initializeWasm() must be awaited first!");
2790 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
2791 // debug statements here
2793 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
2794 export function CResult_NoneAPIErrorZ_clone(orig: number): number {
2795 if(!isWasmInitialized) {
2796 throw new Error("initializeWasm() must be awaited first!");
2798 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
2799 return nativeResponseValue;
2801 // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2802 export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2803 if(!isWasmInitialized) {
2804 throw new Error("initializeWasm() must be awaited first!");
2806 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2807 // debug statements here
2809 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
2810 export function CResult_NonePaymentSendFailureZ_ok(): number {
2811 if(!isWasmInitialized) {
2812 throw new Error("initializeWasm() must be awaited first!");
2814 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
2815 return nativeResponseValue;
2817 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
2818 export function CResult_NonePaymentSendFailureZ_err(e: number): number {
2819 if(!isWasmInitialized) {
2820 throw new Error("initializeWasm() must be awaited first!");
2822 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
2823 return nativeResponseValue;
2825 // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
2826 export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
2827 if(!isWasmInitialized) {
2828 throw new Error("initializeWasm() must be awaited first!");
2830 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
2831 // debug statements here
2833 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
2834 export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
2835 if(!isWasmInitialized) {
2836 throw new Error("initializeWasm() must be awaited first!");
2838 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
2839 return nativeResponseValue;
2841 // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
2842 export function CVec_ChannelMonitorZ_free(_res: number[]): void {
2843 if(!isWasmInitialized) {
2844 throw new Error("initializeWasm() must be awaited first!");
2846 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
2847 // debug statements here
2849 // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
2850 export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
2851 if(!isWasmInitialized) {
2852 throw new Error("initializeWasm() must be awaited first!");
2854 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
2855 return nativeResponseValue;
2857 // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
2858 export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
2859 if(!isWasmInitialized) {
2860 throw new Error("initializeWasm() must be awaited first!");
2862 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
2863 // debug statements here
2865 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
2866 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
2867 if(!isWasmInitialized) {
2868 throw new Error("initializeWasm() must be awaited first!");
2870 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
2871 return nativeResponseValue;
2873 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
2874 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
2875 if(!isWasmInitialized) {
2876 throw new Error("initializeWasm() must be awaited first!");
2878 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
2879 return nativeResponseValue;
2881 // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
2882 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
2883 if(!isWasmInitialized) {
2884 throw new Error("initializeWasm() must be awaited first!");
2886 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
2887 // debug statements here
2889 // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_clone(const struct LDKC2Tuple_u64u64Z *NONNULL_PTR orig);
2890 export function C2Tuple_u64u64Z_clone(orig: number): number {
2891 if(!isWasmInitialized) {
2892 throw new Error("initializeWasm() must be awaited first!");
2894 const nativeResponseValue = wasm.C2Tuple_u64u64Z_clone(orig);
2895 return nativeResponseValue;
2897 // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
2898 export function C2Tuple_u64u64Z_new(a: number, b: number): number {
2899 if(!isWasmInitialized) {
2900 throw new Error("initializeWasm() must be awaited first!");
2902 const nativeResponseValue = wasm.C2Tuple_u64u64Z_new(a, b);
2903 return nativeResponseValue;
2905 // void C2Tuple_u64u64Z_free(struct LDKC2Tuple_u64u64Z _res);
2906 export function C2Tuple_u64u64Z_free(_res: number): void {
2907 if(!isWasmInitialized) {
2908 throw new Error("initializeWasm() must be awaited first!");
2910 const nativeResponseValue = wasm.C2Tuple_u64u64Z_free(_res);
2911 // debug statements here
2913 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
2914 export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
2915 if(!isWasmInitialized) {
2916 throw new Error("initializeWasm() must be awaited first!");
2918 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
2919 return nativeResponseValue;
2921 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2922 export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
2923 if(!isWasmInitialized) {
2924 throw new Error("initializeWasm() must be awaited first!");
2926 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
2927 return nativeResponseValue;
2929 // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
2930 export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
2931 if(!isWasmInitialized) {
2932 throw new Error("initializeWasm() must be awaited first!");
2934 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
2935 // debug statements here
2937 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2938 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2939 if(!isWasmInitialized) {
2940 throw new Error("initializeWasm() must be awaited first!");
2942 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
2943 return nativeResponseValue;
2945 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
2946 export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
2947 if(!isWasmInitialized) {
2948 throw new Error("initializeWasm() must be awaited first!");
2950 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
2951 return nativeResponseValue;
2953 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
2954 export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
2955 if(!isWasmInitialized) {
2956 throw new Error("initializeWasm() must be awaited first!");
2958 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
2959 return nativeResponseValue;
2961 // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
2962 export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
2963 if(!isWasmInitialized) {
2964 throw new Error("initializeWasm() must be awaited first!");
2966 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
2967 // debug statements here
2969 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
2970 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
2971 if(!isWasmInitialized) {
2972 throw new Error("initializeWasm() must be awaited first!");
2974 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
2975 return nativeResponseValue;
2977 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
2978 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
2979 if(!isWasmInitialized) {
2980 throw new Error("initializeWasm() must be awaited first!");
2982 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
2983 return nativeResponseValue;
2985 // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
2986 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
2987 if(!isWasmInitialized) {
2988 throw new Error("initializeWasm() must be awaited first!");
2990 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
2991 // debug statements here
2993 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
2994 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
2995 if(!isWasmInitialized) {
2996 throw new Error("initializeWasm() must be awaited first!");
2998 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
2999 return nativeResponseValue;
3001 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3002 export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3003 if(!isWasmInitialized) {
3004 throw new Error("initializeWasm() must be awaited first!");
3006 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3007 return nativeResponseValue;
3009 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3010 export function CResult_SignatureNoneZ_err(): number {
3011 if(!isWasmInitialized) {
3012 throw new Error("initializeWasm() must be awaited first!");
3014 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3015 return nativeResponseValue;
3017 // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3018 export function CResult_SignatureNoneZ_free(_res: number): void {
3019 if(!isWasmInitialized) {
3020 throw new Error("initializeWasm() must be awaited first!");
3022 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3023 // debug statements here
3025 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3026 export function CResult_SignatureNoneZ_clone(orig: number): number {
3027 if(!isWasmInitialized) {
3028 throw new Error("initializeWasm() must be awaited first!");
3030 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3031 return nativeResponseValue;
3033 // struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_ok(struct LDKChannelKeys o);
3034 export function CResult_ChannelKeysDecodeErrorZ_ok(o: number): number {
3035 if(!isWasmInitialized) {
3036 throw new Error("initializeWasm() must be awaited first!");
3038 const nativeResponseValue = wasm.CResult_ChannelKeysDecodeErrorZ_ok(o);
3039 return nativeResponseValue;
3041 // struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
3042 export function CResult_ChannelKeysDecodeErrorZ_err(e: number): number {
3043 if(!isWasmInitialized) {
3044 throw new Error("initializeWasm() must be awaited first!");
3046 const nativeResponseValue = wasm.CResult_ChannelKeysDecodeErrorZ_err(e);
3047 return nativeResponseValue;
3049 // void CResult_ChannelKeysDecodeErrorZ_free(struct LDKCResult_ChannelKeysDecodeErrorZ _res);
3050 export function CResult_ChannelKeysDecodeErrorZ_free(_res: number): void {
3051 if(!isWasmInitialized) {
3052 throw new Error("initializeWasm() must be awaited first!");
3054 const nativeResponseValue = wasm.CResult_ChannelKeysDecodeErrorZ_free(_res);
3055 // debug statements here
3057 // struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelKeysDecodeErrorZ *NONNULL_PTR orig);
3058 export function CResult_ChannelKeysDecodeErrorZ_clone(orig: number): number {
3059 if(!isWasmInitialized) {
3060 throw new Error("initializeWasm() must be awaited first!");
3062 const nativeResponseValue = wasm.CResult_ChannelKeysDecodeErrorZ_clone(orig);
3063 return nativeResponseValue;
3065 // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_ok(struct LDKInMemoryChannelKeys o);
3066 export function CResult_InMemoryChannelKeysDecodeErrorZ_ok(o: number): number {
3067 if(!isWasmInitialized) {
3068 throw new Error("initializeWasm() must be awaited first!");
3070 const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_ok(o);
3071 return nativeResponseValue;
3073 // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
3074 export function CResult_InMemoryChannelKeysDecodeErrorZ_err(e: number): number {
3075 if(!isWasmInitialized) {
3076 throw new Error("initializeWasm() must be awaited first!");
3078 const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_err(e);
3079 return nativeResponseValue;
3081 // void CResult_InMemoryChannelKeysDecodeErrorZ_free(struct LDKCResult_InMemoryChannelKeysDecodeErrorZ _res);
3082 export function CResult_InMemoryChannelKeysDecodeErrorZ_free(_res: number): void {
3083 if(!isWasmInitialized) {
3084 throw new Error("initializeWasm() must be awaited first!");
3086 const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_free(_res);
3087 // debug statements here
3089 // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_clone(const struct LDKCResult_InMemoryChannelKeysDecodeErrorZ *NONNULL_PTR orig);
3090 export function CResult_InMemoryChannelKeysDecodeErrorZ_clone(orig: number): number {
3091 if(!isWasmInitialized) {
3092 throw new Error("initializeWasm() must be awaited first!");
3094 const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_clone(orig);
3095 return nativeResponseValue;
3097 // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
3098 export function CVec_RouteHopZ_free(_res: number[]): void {
3099 if(!isWasmInitialized) {
3100 throw new Error("initializeWasm() must be awaited first!");
3102 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
3103 // debug statements here
3105 // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
3106 export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
3107 if(!isWasmInitialized) {
3108 throw new Error("initializeWasm() must be awaited first!");
3110 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
3111 // debug statements here
3113 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
3114 export function CResult_RouteDecodeErrorZ_ok(o: number): number {
3115 if(!isWasmInitialized) {
3116 throw new Error("initializeWasm() must be awaited first!");
3118 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
3119 return nativeResponseValue;
3121 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
3122 export function CResult_RouteDecodeErrorZ_err(e: number): number {
3123 if(!isWasmInitialized) {
3124 throw new Error("initializeWasm() must be awaited first!");
3126 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
3127 return nativeResponseValue;
3129 // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3130 export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3131 if(!isWasmInitialized) {
3132 throw new Error("initializeWasm() must be awaited first!");
3134 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3135 // debug statements here
3137 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3138 export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3139 if(!isWasmInitialized) {
3140 throw new Error("initializeWasm() must be awaited first!");
3142 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3143 return nativeResponseValue;
3145 // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3146 export function CVec_RouteHintZ_free(_res: number[]): void {
3147 if(!isWasmInitialized) {
3148 throw new Error("initializeWasm() must be awaited first!");
3150 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3151 // debug statements here
3153 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3154 export function CResult_RouteLightningErrorZ_ok(o: number): number {
3155 if(!isWasmInitialized) {
3156 throw new Error("initializeWasm() must be awaited first!");
3158 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3159 return nativeResponseValue;
3161 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3162 export function CResult_RouteLightningErrorZ_err(e: number): number {
3163 if(!isWasmInitialized) {
3164 throw new Error("initializeWasm() must be awaited first!");
3166 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3167 return nativeResponseValue;
3169 // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3170 export function CResult_RouteLightningErrorZ_free(_res: number): void {
3171 if(!isWasmInitialized) {
3172 throw new Error("initializeWasm() must be awaited first!");
3174 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3175 // debug statements here
3177 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3178 export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3179 if(!isWasmInitialized) {
3180 throw new Error("initializeWasm() must be awaited first!");
3182 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3183 return nativeResponseValue;
3185 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
3186 export function CResult_NetAddressu8Z_ok(o: number): number {
3187 if(!isWasmInitialized) {
3188 throw new Error("initializeWasm() must be awaited first!");
3190 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
3191 return nativeResponseValue;
3193 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
3194 export function CResult_NetAddressu8Z_err(e: number): number {
3195 if(!isWasmInitialized) {
3196 throw new Error("initializeWasm() must be awaited first!");
3198 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
3199 return nativeResponseValue;
3201 // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
3202 export function CResult_NetAddressu8Z_free(_res: number): void {
3203 if(!isWasmInitialized) {
3204 throw new Error("initializeWasm() must be awaited first!");
3206 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
3207 // debug statements here
3209 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
3210 export function CResult_NetAddressu8Z_clone(orig: number): number {
3211 if(!isWasmInitialized) {
3212 throw new Error("initializeWasm() must be awaited first!");
3214 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
3215 return nativeResponseValue;
3217 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
3218 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
3219 if(!isWasmInitialized) {
3220 throw new Error("initializeWasm() must be awaited first!");
3222 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
3223 return nativeResponseValue;
3225 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
3226 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
3227 if(!isWasmInitialized) {
3228 throw new Error("initializeWasm() must be awaited first!");
3230 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
3231 return nativeResponseValue;
3233 // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
3234 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
3235 if(!isWasmInitialized) {
3236 throw new Error("initializeWasm() must be awaited first!");
3238 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
3239 // debug statements here
3241 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
3242 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
3243 if(!isWasmInitialized) {
3244 throw new Error("initializeWasm() must be awaited first!");
3246 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
3247 return nativeResponseValue;
3249 // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
3250 export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
3251 if(!isWasmInitialized) {
3252 throw new Error("initializeWasm() must be awaited first!");
3254 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
3255 // debug statements here
3257 // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
3258 export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
3259 if(!isWasmInitialized) {
3260 throw new Error("initializeWasm() must be awaited first!");
3262 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
3263 // debug statements here
3265 // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
3266 export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
3267 if(!isWasmInitialized) {
3268 throw new Error("initializeWasm() must be awaited first!");
3270 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
3271 // debug statements here
3273 // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
3274 export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
3275 if(!isWasmInitialized) {
3276 throw new Error("initializeWasm() must be awaited first!");
3278 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
3279 // debug statements here
3281 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
3282 export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
3283 if(!isWasmInitialized) {
3284 throw new Error("initializeWasm() must be awaited first!");
3286 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
3287 return nativeResponseValue;
3289 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
3290 export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
3291 if(!isWasmInitialized) {
3292 throw new Error("initializeWasm() must be awaited first!");
3294 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
3295 return nativeResponseValue;
3297 // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
3298 export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
3299 if(!isWasmInitialized) {
3300 throw new Error("initializeWasm() must be awaited first!");
3302 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
3303 // debug statements here
3305 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
3306 export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
3307 if(!isWasmInitialized) {
3308 throw new Error("initializeWasm() must be awaited first!");
3310 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
3311 return nativeResponseValue;
3313 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
3314 export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
3315 if(!isWasmInitialized) {
3316 throw new Error("initializeWasm() must be awaited first!");
3318 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
3319 return nativeResponseValue;
3321 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
3322 export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
3323 if(!isWasmInitialized) {
3324 throw new Error("initializeWasm() must be awaited first!");
3326 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
3327 return nativeResponseValue;
3329 // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
3330 export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
3331 if(!isWasmInitialized) {
3332 throw new Error("initializeWasm() must be awaited first!");
3334 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
3335 // debug statements here
3337 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
3338 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
3339 if(!isWasmInitialized) {
3340 throw new Error("initializeWasm() must be awaited first!");
3342 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
3343 return nativeResponseValue;
3345 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
3346 export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
3347 if(!isWasmInitialized) {
3348 throw new Error("initializeWasm() must be awaited first!");
3350 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
3351 return nativeResponseValue;
3353 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
3354 export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
3355 if(!isWasmInitialized) {
3356 throw new Error("initializeWasm() must be awaited first!");
3358 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
3359 return nativeResponseValue;
3361 // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
3362 export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
3363 if(!isWasmInitialized) {
3364 throw new Error("initializeWasm() must be awaited first!");
3366 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
3367 // debug statements here
3369 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
3370 export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
3371 if(!isWasmInitialized) {
3372 throw new Error("initializeWasm() must be awaited first!");
3374 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
3375 return nativeResponseValue;
3377 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
3378 export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
3379 if(!isWasmInitialized) {
3380 throw new Error("initializeWasm() must be awaited first!");
3382 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
3383 return nativeResponseValue;
3385 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3386 export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
3387 if(!isWasmInitialized) {
3388 throw new Error("initializeWasm() must be awaited first!");
3390 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
3391 return nativeResponseValue;
3393 // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
3394 export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
3395 if(!isWasmInitialized) {
3396 throw new Error("initializeWasm() must be awaited first!");
3398 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
3399 // debug statements here
3401 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
3402 export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
3403 if(!isWasmInitialized) {
3404 throw new Error("initializeWasm() must be awaited first!");
3406 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
3407 return nativeResponseValue;
3409 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
3410 export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
3411 if(!isWasmInitialized) {
3412 throw new Error("initializeWasm() must be awaited first!");
3414 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
3415 return nativeResponseValue;
3417 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
3418 export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
3419 if(!isWasmInitialized) {
3420 throw new Error("initializeWasm() must be awaited first!");
3422 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
3423 return nativeResponseValue;
3425 // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
3426 export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
3427 if(!isWasmInitialized) {
3428 throw new Error("initializeWasm() must be awaited first!");
3430 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
3431 // debug statements here
3433 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
3434 export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
3435 if(!isWasmInitialized) {
3436 throw new Error("initializeWasm() must be awaited first!");
3438 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
3439 return nativeResponseValue;
3441 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
3442 export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
3443 if(!isWasmInitialized) {
3444 throw new Error("initializeWasm() must be awaited first!");
3446 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
3447 return nativeResponseValue;
3449 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
3450 export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
3451 if(!isWasmInitialized) {
3452 throw new Error("initializeWasm() must be awaited first!");
3454 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
3455 return nativeResponseValue;
3457 // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
3458 export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
3459 if(!isWasmInitialized) {
3460 throw new Error("initializeWasm() must be awaited first!");
3462 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
3463 // debug statements here
3465 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
3466 export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
3467 if(!isWasmInitialized) {
3468 throw new Error("initializeWasm() must be awaited first!");
3470 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
3471 return nativeResponseValue;
3473 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
3474 export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
3475 if(!isWasmInitialized) {
3476 throw new Error("initializeWasm() must be awaited first!");
3478 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
3479 return nativeResponseValue;
3481 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3482 export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
3483 if(!isWasmInitialized) {
3484 throw new Error("initializeWasm() must be awaited first!");
3486 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
3487 return nativeResponseValue;
3489 // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
3490 export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
3491 if(!isWasmInitialized) {
3492 throw new Error("initializeWasm() must be awaited first!");
3494 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
3495 // debug statements here
3497 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
3498 export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
3499 if(!isWasmInitialized) {
3500 throw new Error("initializeWasm() must be awaited first!");
3502 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
3503 return nativeResponseValue;
3505 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
3506 export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
3507 if(!isWasmInitialized) {
3508 throw new Error("initializeWasm() must be awaited first!");
3510 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
3511 return nativeResponseValue;
3513 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
3514 export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
3515 if(!isWasmInitialized) {
3516 throw new Error("initializeWasm() must be awaited first!");
3518 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
3519 return nativeResponseValue;
3521 // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
3522 export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
3523 if(!isWasmInitialized) {
3524 throw new Error("initializeWasm() must be awaited first!");
3526 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
3527 // debug statements here
3529 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
3530 export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
3531 if(!isWasmInitialized) {
3532 throw new Error("initializeWasm() must be awaited first!");
3534 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
3535 return nativeResponseValue;
3537 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
3538 export function CResult_InitDecodeErrorZ_ok(o: number): number {
3539 if(!isWasmInitialized) {
3540 throw new Error("initializeWasm() must be awaited first!");
3542 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
3543 return nativeResponseValue;
3545 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
3546 export function CResult_InitDecodeErrorZ_err(e: number): number {
3547 if(!isWasmInitialized) {
3548 throw new Error("initializeWasm() must be awaited first!");
3550 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
3551 return nativeResponseValue;
3553 // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
3554 export function CResult_InitDecodeErrorZ_free(_res: number): void {
3555 if(!isWasmInitialized) {
3556 throw new Error("initializeWasm() must be awaited first!");
3558 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
3559 // debug statements here
3561 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
3562 export function CResult_InitDecodeErrorZ_clone(orig: number): number {
3563 if(!isWasmInitialized) {
3564 throw new Error("initializeWasm() must be awaited first!");
3566 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
3567 return nativeResponseValue;
3569 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
3570 export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
3571 if(!isWasmInitialized) {
3572 throw new Error("initializeWasm() must be awaited first!");
3574 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
3575 return nativeResponseValue;
3577 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
3578 export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
3579 if(!isWasmInitialized) {
3580 throw new Error("initializeWasm() must be awaited first!");
3582 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
3583 return nativeResponseValue;
3585 // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
3586 export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
3587 if(!isWasmInitialized) {
3588 throw new Error("initializeWasm() must be awaited first!");
3590 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
3591 // debug statements here
3593 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
3594 export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
3595 if(!isWasmInitialized) {
3596 throw new Error("initializeWasm() must be awaited first!");
3598 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
3599 return nativeResponseValue;
3601 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
3602 export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
3603 if(!isWasmInitialized) {
3604 throw new Error("initializeWasm() must be awaited first!");
3606 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
3607 return nativeResponseValue;
3609 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
3610 export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
3611 if(!isWasmInitialized) {
3612 throw new Error("initializeWasm() must be awaited first!");
3614 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
3615 return nativeResponseValue;
3617 // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
3618 export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
3619 if(!isWasmInitialized) {
3620 throw new Error("initializeWasm() must be awaited first!");
3622 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
3623 // debug statements here
3625 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
3626 export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
3627 if(!isWasmInitialized) {
3628 throw new Error("initializeWasm() must be awaited first!");
3630 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
3631 return nativeResponseValue;
3633 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
3634 export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
3635 if(!isWasmInitialized) {
3636 throw new Error("initializeWasm() must be awaited first!");
3638 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
3639 return nativeResponseValue;
3641 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
3642 export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
3643 if(!isWasmInitialized) {
3644 throw new Error("initializeWasm() must be awaited first!");
3646 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
3647 return nativeResponseValue;
3649 // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
3650 export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
3651 if(!isWasmInitialized) {
3652 throw new Error("initializeWasm() must be awaited first!");
3654 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
3655 // debug statements here
3657 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
3658 export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
3659 if(!isWasmInitialized) {
3660 throw new Error("initializeWasm() must be awaited first!");
3662 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
3663 return nativeResponseValue;
3665 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
3666 export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
3667 if(!isWasmInitialized) {
3668 throw new Error("initializeWasm() must be awaited first!");
3670 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
3671 return nativeResponseValue;
3673 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3674 export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
3675 if(!isWasmInitialized) {
3676 throw new Error("initializeWasm() must be awaited first!");
3678 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
3679 return nativeResponseValue;
3681 // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
3682 export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
3683 if(!isWasmInitialized) {
3684 throw new Error("initializeWasm() must be awaited first!");
3686 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
3687 // debug statements here
3689 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
3690 export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
3691 if(!isWasmInitialized) {
3692 throw new Error("initializeWasm() must be awaited first!");
3694 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
3695 return nativeResponseValue;
3697 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
3698 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
3699 if(!isWasmInitialized) {
3700 throw new Error("initializeWasm() must be awaited first!");
3702 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
3703 return nativeResponseValue;
3705 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3706 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
3707 if(!isWasmInitialized) {
3708 throw new Error("initializeWasm() must be awaited first!");
3710 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
3711 return nativeResponseValue;
3713 // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
3714 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
3715 if(!isWasmInitialized) {
3716 throw new Error("initializeWasm() must be awaited first!");
3718 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
3719 // debug statements here
3721 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
3722 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
3723 if(!isWasmInitialized) {
3724 throw new Error("initializeWasm() must be awaited first!");
3726 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
3727 return nativeResponseValue;
3729 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
3730 export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
3731 if(!isWasmInitialized) {
3732 throw new Error("initializeWasm() must be awaited first!");
3734 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
3735 return nativeResponseValue;
3737 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
3738 export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
3739 if(!isWasmInitialized) {
3740 throw new Error("initializeWasm() must be awaited first!");
3742 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
3743 return nativeResponseValue;
3745 // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
3746 export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
3747 if(!isWasmInitialized) {
3748 throw new Error("initializeWasm() must be awaited first!");
3750 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
3751 // debug statements here
3753 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
3754 export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
3755 if(!isWasmInitialized) {
3756 throw new Error("initializeWasm() must be awaited first!");
3758 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
3759 return nativeResponseValue;
3761 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
3762 export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
3763 if(!isWasmInitialized) {
3764 throw new Error("initializeWasm() must be awaited first!");
3766 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
3767 return nativeResponseValue;
3769 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3770 export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
3771 if(!isWasmInitialized) {
3772 throw new Error("initializeWasm() must be awaited first!");
3774 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
3775 return nativeResponseValue;
3777 // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
3778 export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
3779 if(!isWasmInitialized) {
3780 throw new Error("initializeWasm() must be awaited first!");
3782 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
3783 // debug statements here
3785 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
3786 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
3787 if(!isWasmInitialized) {
3788 throw new Error("initializeWasm() must be awaited first!");
3790 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
3791 return nativeResponseValue;
3793 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
3794 export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
3795 if(!isWasmInitialized) {
3796 throw new Error("initializeWasm() must be awaited first!");
3798 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
3799 return nativeResponseValue;
3801 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3802 export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
3803 if(!isWasmInitialized) {
3804 throw new Error("initializeWasm() must be awaited first!");
3806 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
3807 return nativeResponseValue;
3809 // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
3810 export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
3811 if(!isWasmInitialized) {
3812 throw new Error("initializeWasm() must be awaited first!");
3814 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
3815 // debug statements here
3817 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
3818 export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
3819 if(!isWasmInitialized) {
3820 throw new Error("initializeWasm() must be awaited first!");
3822 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
3823 return nativeResponseValue;
3825 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
3826 export function CResult_PingDecodeErrorZ_ok(o: number): number {
3827 if(!isWasmInitialized) {
3828 throw new Error("initializeWasm() must be awaited first!");
3830 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
3831 return nativeResponseValue;
3833 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
3834 export function CResult_PingDecodeErrorZ_err(e: number): number {
3835 if(!isWasmInitialized) {
3836 throw new Error("initializeWasm() must be awaited first!");
3838 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
3839 return nativeResponseValue;
3841 // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
3842 export function CResult_PingDecodeErrorZ_free(_res: number): void {
3843 if(!isWasmInitialized) {
3844 throw new Error("initializeWasm() must be awaited first!");
3846 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
3847 // debug statements here
3849 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
3850 export function CResult_PingDecodeErrorZ_clone(orig: number): number {
3851 if(!isWasmInitialized) {
3852 throw new Error("initializeWasm() must be awaited first!");
3854 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
3855 return nativeResponseValue;
3857 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
3858 export function CResult_PongDecodeErrorZ_ok(o: number): number {
3859 if(!isWasmInitialized) {
3860 throw new Error("initializeWasm() must be awaited first!");
3862 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
3863 return nativeResponseValue;
3865 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
3866 export function CResult_PongDecodeErrorZ_err(e: number): number {
3867 if(!isWasmInitialized) {
3868 throw new Error("initializeWasm() must be awaited first!");
3870 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
3871 return nativeResponseValue;
3873 // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
3874 export function CResult_PongDecodeErrorZ_free(_res: number): void {
3875 if(!isWasmInitialized) {
3876 throw new Error("initializeWasm() must be awaited first!");
3878 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
3879 // debug statements here
3881 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
3882 export function CResult_PongDecodeErrorZ_clone(orig: number): number {
3883 if(!isWasmInitialized) {
3884 throw new Error("initializeWasm() must be awaited first!");
3886 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
3887 return nativeResponseValue;
3889 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
3890 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
3891 if(!isWasmInitialized) {
3892 throw new Error("initializeWasm() must be awaited first!");
3894 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
3895 return nativeResponseValue;
3897 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
3898 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
3899 if(!isWasmInitialized) {
3900 throw new Error("initializeWasm() must be awaited first!");
3902 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
3903 return nativeResponseValue;
3905 // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
3906 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
3907 if(!isWasmInitialized) {
3908 throw new Error("initializeWasm() must be awaited first!");
3910 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
3911 // debug statements here
3913 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
3914 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
3915 if(!isWasmInitialized) {
3916 throw new Error("initializeWasm() must be awaited first!");
3918 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
3919 return nativeResponseValue;
3921 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
3922 export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
3923 if(!isWasmInitialized) {
3924 throw new Error("initializeWasm() must be awaited first!");
3926 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
3927 return nativeResponseValue;
3929 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
3930 export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
3931 if(!isWasmInitialized) {
3932 throw new Error("initializeWasm() must be awaited first!");
3934 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
3935 return nativeResponseValue;
3937 // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
3938 export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
3939 if(!isWasmInitialized) {
3940 throw new Error("initializeWasm() must be awaited first!");
3942 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
3943 // debug statements here
3945 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
3946 export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
3947 if(!isWasmInitialized) {
3948 throw new Error("initializeWasm() must be awaited first!");
3950 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
3951 return nativeResponseValue;
3953 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
3954 export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
3955 if(!isWasmInitialized) {
3956 throw new Error("initializeWasm() must be awaited first!");
3958 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
3959 return nativeResponseValue;
3961 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3962 export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
3963 if(!isWasmInitialized) {
3964 throw new Error("initializeWasm() must be awaited first!");
3966 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
3967 return nativeResponseValue;
3969 // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
3970 export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
3971 if(!isWasmInitialized) {
3972 throw new Error("initializeWasm() must be awaited first!");
3974 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
3975 // debug statements here
3977 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
3978 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
3979 if(!isWasmInitialized) {
3980 throw new Error("initializeWasm() must be awaited first!");
3982 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
3983 return nativeResponseValue;
3985 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
3986 export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
3987 if(!isWasmInitialized) {
3988 throw new Error("initializeWasm() must be awaited first!");
3990 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
3991 return nativeResponseValue;
3993 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3994 export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
3995 if(!isWasmInitialized) {
3996 throw new Error("initializeWasm() must be awaited first!");
3998 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
3999 return nativeResponseValue;
4001 // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
4002 export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
4003 if(!isWasmInitialized) {
4004 throw new Error("initializeWasm() must be awaited first!");
4006 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
4007 // debug statements here
4009 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4010 export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
4011 if(!isWasmInitialized) {
4012 throw new Error("initializeWasm() must be awaited first!");
4014 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
4015 return nativeResponseValue;
4017 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
4018 export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
4019 if(!isWasmInitialized) {
4020 throw new Error("initializeWasm() must be awaited first!");
4022 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
4023 return nativeResponseValue;
4025 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
4026 export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
4027 if(!isWasmInitialized) {
4028 throw new Error("initializeWasm() must be awaited first!");
4030 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
4031 return nativeResponseValue;
4033 // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
4034 export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
4035 if(!isWasmInitialized) {
4036 throw new Error("initializeWasm() must be awaited first!");
4038 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
4039 // debug statements here
4041 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
4042 export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
4043 if(!isWasmInitialized) {
4044 throw new Error("initializeWasm() must be awaited first!");
4046 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
4047 return nativeResponseValue;
4049 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
4050 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
4051 if(!isWasmInitialized) {
4052 throw new Error("initializeWasm() must be awaited first!");
4054 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
4055 return nativeResponseValue;
4057 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4058 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
4059 if(!isWasmInitialized) {
4060 throw new Error("initializeWasm() must be awaited first!");
4062 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
4063 return nativeResponseValue;
4065 // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
4066 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
4067 if(!isWasmInitialized) {
4068 throw new Error("initializeWasm() must be awaited first!");
4070 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
4071 // debug statements here
4073 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4074 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4075 if(!isWasmInitialized) {
4076 throw new Error("initializeWasm() must be awaited first!");
4078 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
4079 return nativeResponseValue;
4081 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
4082 export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
4083 if(!isWasmInitialized) {
4084 throw new Error("initializeWasm() must be awaited first!");
4086 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
4087 return nativeResponseValue;
4089 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4090 export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
4091 if(!isWasmInitialized) {
4092 throw new Error("initializeWasm() must be awaited first!");
4094 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
4095 return nativeResponseValue;
4097 // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
4098 export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
4099 if(!isWasmInitialized) {
4100 throw new Error("initializeWasm() must be awaited first!");
4102 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
4103 // debug statements here
4105 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4106 export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4107 if(!isWasmInitialized) {
4108 throw new Error("initializeWasm() must be awaited first!");
4110 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
4111 return nativeResponseValue;
4113 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
4114 export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
4115 if(!isWasmInitialized) {
4116 throw new Error("initializeWasm() must be awaited first!");
4118 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
4119 return nativeResponseValue;
4121 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
4122 export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
4123 if(!isWasmInitialized) {
4124 throw new Error("initializeWasm() must be awaited first!");
4126 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
4127 return nativeResponseValue;
4129 // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
4130 export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
4131 if(!isWasmInitialized) {
4132 throw new Error("initializeWasm() must be awaited first!");
4134 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
4135 // debug statements here
4137 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
4138 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
4139 if(!isWasmInitialized) {
4140 throw new Error("initializeWasm() must be awaited first!");
4142 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
4143 return nativeResponseValue;
4145 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
4146 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
4147 if(!isWasmInitialized) {
4148 throw new Error("initializeWasm() must be awaited first!");
4150 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
4151 return nativeResponseValue;
4153 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
4154 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
4155 if(!isWasmInitialized) {
4156 throw new Error("initializeWasm() must be awaited first!");
4158 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
4159 return nativeResponseValue;
4161 // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
4162 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
4163 if(!isWasmInitialized) {
4164 throw new Error("initializeWasm() must be awaited first!");
4166 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
4167 // debug statements here
4169 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
4170 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
4171 if(!isWasmInitialized) {
4172 throw new Error("initializeWasm() must be awaited first!");
4174 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
4175 return nativeResponseValue;
4177 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
4178 export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
4179 if(!isWasmInitialized) {
4180 throw new Error("initializeWasm() must be awaited first!");
4182 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
4183 return nativeResponseValue;
4185 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4186 export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
4187 if(!isWasmInitialized) {
4188 throw new Error("initializeWasm() must be awaited first!");
4190 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
4191 return nativeResponseValue;
4193 // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
4194 export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
4195 if(!isWasmInitialized) {
4196 throw new Error("initializeWasm() must be awaited first!");
4198 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
4199 // debug statements here
4201 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4202 export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
4203 if(!isWasmInitialized) {
4204 throw new Error("initializeWasm() must be awaited first!");
4206 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
4207 return nativeResponseValue;
4209 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
4210 export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
4211 if(!isWasmInitialized) {
4212 throw new Error("initializeWasm() must be awaited first!");
4214 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
4215 return nativeResponseValue;
4217 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4218 export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
4219 if(!isWasmInitialized) {
4220 throw new Error("initializeWasm() must be awaited first!");
4222 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
4223 return nativeResponseValue;
4225 // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
4226 export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
4227 if(!isWasmInitialized) {
4228 throw new Error("initializeWasm() must be awaited first!");
4230 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
4231 // debug statements here
4233 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4234 export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
4235 if(!isWasmInitialized) {
4236 throw new Error("initializeWasm() must be awaited first!");
4238 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
4239 return nativeResponseValue;
4241 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
4242 export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
4243 if(!isWasmInitialized) {
4244 throw new Error("initializeWasm() must be awaited first!");
4246 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
4247 return nativeResponseValue;
4249 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
4250 export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
4251 if(!isWasmInitialized) {
4252 throw new Error("initializeWasm() must be awaited first!");
4254 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
4255 return nativeResponseValue;
4257 // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
4258 export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
4259 if(!isWasmInitialized) {
4260 throw new Error("initializeWasm() must be awaited first!");
4262 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
4263 // debug statements here
4265 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
4266 export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
4267 if(!isWasmInitialized) {
4268 throw new Error("initializeWasm() must be awaited first!");
4270 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
4271 return nativeResponseValue;
4273 // void Event_free(struct LDKEvent this_ptr);
4274 export function Event_free(this_ptr: number): void {
4275 if(!isWasmInitialized) {
4276 throw new Error("initializeWasm() must be awaited first!");
4278 const nativeResponseValue = wasm.Event_free(this_ptr);
4279 // debug statements here
4281 // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
4282 export function Event_clone(orig: number): number {
4283 if(!isWasmInitialized) {
4284 throw new Error("initializeWasm() must be awaited first!");
4286 const nativeResponseValue = wasm.Event_clone(orig);
4287 return nativeResponseValue;
4289 // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
4290 export function Event_write(obj: number): Uint8Array {
4291 if(!isWasmInitialized) {
4292 throw new Error("initializeWasm() must be awaited first!");
4294 const nativeResponseValue = wasm.Event_write(obj);
4295 return decodeArray(nativeResponseValue);
4297 // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
4298 export function MessageSendEvent_free(this_ptr: number): void {
4299 if(!isWasmInitialized) {
4300 throw new Error("initializeWasm() must be awaited first!");
4302 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
4303 // debug statements here
4305 // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
4306 export function MessageSendEvent_clone(orig: number): number {
4307 if(!isWasmInitialized) {
4308 throw new Error("initializeWasm() must be awaited first!");
4310 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
4311 return nativeResponseValue;
4313 // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
4314 export function MessageSendEventsProvider_free(this_ptr: number): void {
4315 if(!isWasmInitialized) {
4316 throw new Error("initializeWasm() must be awaited first!");
4318 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
4319 // debug statements here
4321 // void EventsProvider_free(struct LDKEventsProvider this_ptr);
4322 export function EventsProvider_free(this_ptr: number): void {
4323 if(!isWasmInitialized) {
4324 throw new Error("initializeWasm() must be awaited first!");
4326 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
4327 // debug statements here
4329 // void APIError_free(struct LDKAPIError this_ptr);
4330 export function APIError_free(this_ptr: number): void {
4331 if(!isWasmInitialized) {
4332 throw new Error("initializeWasm() must be awaited first!");
4334 const nativeResponseValue = wasm.APIError_free(this_ptr);
4335 // debug statements here
4337 // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
4338 export function APIError_clone(orig: number): number {
4339 if(!isWasmInitialized) {
4340 throw new Error("initializeWasm() must be awaited first!");
4342 const nativeResponseValue = wasm.APIError_clone(orig);
4343 return nativeResponseValue;
4345 // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
4346 export function Level_clone(orig: number): LDKLevel {
4347 if(!isWasmInitialized) {
4348 throw new Error("initializeWasm() must be awaited first!");
4350 const nativeResponseValue = wasm.Level_clone(orig);
4351 return nativeResponseValue;
4353 // MUST_USE_RES enum LDKLevel Level_max(void);
4354 export function Level_max(): LDKLevel {
4355 if(!isWasmInitialized) {
4356 throw new Error("initializeWasm() must be awaited first!");
4358 const nativeResponseValue = wasm.Level_max();
4359 return nativeResponseValue;
4361 // void Logger_free(struct LDKLogger this_ptr);
4362 export function Logger_free(this_ptr: number): void {
4363 if(!isWasmInitialized) {
4364 throw new Error("initializeWasm() must be awaited first!");
4366 const nativeResponseValue = wasm.Logger_free(this_ptr);
4367 // debug statements here
4369 // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_ptr);
4370 export function ChannelHandshakeConfig_free(this_ptr: number): void {
4371 if(!isWasmInitialized) {
4372 throw new Error("initializeWasm() must be awaited first!");
4374 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_ptr);
4375 // debug statements here
4377 // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4378 export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
4379 if(!isWasmInitialized) {
4380 throw new Error("initializeWasm() must be awaited first!");
4382 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
4383 return nativeResponseValue;
4385 // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
4386 export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
4387 if(!isWasmInitialized) {
4388 throw new Error("initializeWasm() must be awaited first!");
4390 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
4391 // debug statements here
4393 // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4394 export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
4395 if(!isWasmInitialized) {
4396 throw new Error("initializeWasm() must be awaited first!");
4398 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
4399 return nativeResponseValue;
4401 // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
4402 export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
4403 if(!isWasmInitialized) {
4404 throw new Error("initializeWasm() must be awaited first!");
4406 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
4407 // debug statements here
4409 // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4410 export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
4411 if(!isWasmInitialized) {
4412 throw new Error("initializeWasm() must be awaited first!");
4414 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
4415 return nativeResponseValue;
4417 // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
4418 export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
4419 if(!isWasmInitialized) {
4420 throw new Error("initializeWasm() must be awaited first!");
4422 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
4423 // debug statements here
4425 // 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);
4426 export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
4427 if(!isWasmInitialized) {
4428 throw new Error("initializeWasm() must be awaited first!");
4430 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
4431 return nativeResponseValue;
4433 // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
4434 export function ChannelHandshakeConfig_clone(orig: number): number {
4435 if(!isWasmInitialized) {
4436 throw new Error("initializeWasm() must be awaited first!");
4438 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
4439 return nativeResponseValue;
4441 // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
4442 export function ChannelHandshakeConfig_default(): number {
4443 if(!isWasmInitialized) {
4444 throw new Error("initializeWasm() must be awaited first!");
4446 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
4447 return nativeResponseValue;
4449 // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_ptr);
4450 export function ChannelHandshakeLimits_free(this_ptr: number): void {
4451 if(!isWasmInitialized) {
4452 throw new Error("initializeWasm() must be awaited first!");
4454 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_ptr);
4455 // debug statements here
4457 // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4458 export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
4459 if(!isWasmInitialized) {
4460 throw new Error("initializeWasm() must be awaited first!");
4462 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
4463 return nativeResponseValue;
4465 // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4466 export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
4467 if(!isWasmInitialized) {
4468 throw new Error("initializeWasm() must be awaited first!");
4470 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
4471 // debug statements here
4473 // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4474 export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
4475 if(!isWasmInitialized) {
4476 throw new Error("initializeWasm() must be awaited first!");
4478 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
4479 return nativeResponseValue;
4481 // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4482 export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
4483 if(!isWasmInitialized) {
4484 throw new Error("initializeWasm() must be awaited first!");
4486 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
4487 // debug statements here
4489 // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4490 export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
4491 if(!isWasmInitialized) {
4492 throw new Error("initializeWasm() must be awaited first!");
4494 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
4495 return nativeResponseValue;
4497 // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4498 export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
4499 if(!isWasmInitialized) {
4500 throw new Error("initializeWasm() must be awaited first!");
4502 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
4503 // debug statements here
4505 // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4506 export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
4507 if(!isWasmInitialized) {
4508 throw new Error("initializeWasm() must be awaited first!");
4510 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
4511 return nativeResponseValue;
4513 // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4514 export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
4515 if(!isWasmInitialized) {
4516 throw new Error("initializeWasm() must be awaited first!");
4518 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
4519 // debug statements here
4521 // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4522 export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
4523 if(!isWasmInitialized) {
4524 throw new Error("initializeWasm() must be awaited first!");
4526 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
4527 return nativeResponseValue;
4529 // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4530 export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
4531 if(!isWasmInitialized) {
4532 throw new Error("initializeWasm() must be awaited first!");
4534 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
4535 // debug statements here
4537 // uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4538 export function ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr: number): number {
4539 if(!isWasmInitialized) {
4540 throw new Error("initializeWasm() must be awaited first!");
4542 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr);
4543 return nativeResponseValue;
4545 // void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4546 export function ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr: number, val: number): void {
4547 if(!isWasmInitialized) {
4548 throw new Error("initializeWasm() must be awaited first!");
4550 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr, val);
4551 // debug statements here
4553 // uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4554 export function ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr: number): number {
4555 if(!isWasmInitialized) {
4556 throw new Error("initializeWasm() must be awaited first!");
4558 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr);
4559 return nativeResponseValue;
4561 // void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4562 export function ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr: number, val: number): void {
4563 if(!isWasmInitialized) {
4564 throw new Error("initializeWasm() must be awaited first!");
4566 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr, val);
4567 // debug statements here
4569 // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4570 export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
4571 if(!isWasmInitialized) {
4572 throw new Error("initializeWasm() must be awaited first!");
4574 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
4575 return nativeResponseValue;
4577 // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
4578 export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
4579 if(!isWasmInitialized) {
4580 throw new Error("initializeWasm() must be awaited first!");
4582 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
4583 // debug statements here
4585 // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4586 export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
4587 if(!isWasmInitialized) {
4588 throw new Error("initializeWasm() must be awaited first!");
4590 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
4591 return nativeResponseValue;
4593 // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
4594 export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
4595 if(!isWasmInitialized) {
4596 throw new Error("initializeWasm() must be awaited first!");
4598 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
4599 // debug statements here
4601 // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4602 export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
4603 if(!isWasmInitialized) {
4604 throw new Error("initializeWasm() must be awaited first!");
4606 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
4607 return nativeResponseValue;
4609 // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4610 export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
4611 if(!isWasmInitialized) {
4612 throw new Error("initializeWasm() must be awaited first!");
4614 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
4615 // debug statements here
4617 // 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);
4618 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 {
4619 if(!isWasmInitialized) {
4620 throw new Error("initializeWasm() must be awaited first!");
4622 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);
4623 return nativeResponseValue;
4625 // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
4626 export function ChannelHandshakeLimits_clone(orig: number): number {
4627 if(!isWasmInitialized) {
4628 throw new Error("initializeWasm() must be awaited first!");
4630 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
4631 return nativeResponseValue;
4633 // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
4634 export function ChannelHandshakeLimits_default(): number {
4635 if(!isWasmInitialized) {
4636 throw new Error("initializeWasm() must be awaited first!");
4638 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
4639 return nativeResponseValue;
4641 // void ChannelConfig_free(struct LDKChannelConfig this_ptr);
4642 export function ChannelConfig_free(this_ptr: number): void {
4643 if(!isWasmInitialized) {
4644 throw new Error("initializeWasm() must be awaited first!");
4646 const nativeResponseValue = wasm.ChannelConfig_free(this_ptr);
4647 // debug statements here
4649 // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4650 export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
4651 if(!isWasmInitialized) {
4652 throw new Error("initializeWasm() must be awaited first!");
4654 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
4655 return nativeResponseValue;
4657 // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
4658 export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
4659 if(!isWasmInitialized) {
4660 throw new Error("initializeWasm() must be awaited first!");
4662 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
4663 // debug statements here
4665 // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4666 export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
4667 if(!isWasmInitialized) {
4668 throw new Error("initializeWasm() must be awaited first!");
4670 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
4671 return nativeResponseValue;
4673 // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
4674 export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
4675 if(!isWasmInitialized) {
4676 throw new Error("initializeWasm() must be awaited first!");
4678 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
4679 // debug statements here
4681 // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
4682 export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
4683 if(!isWasmInitialized) {
4684 throw new Error("initializeWasm() must be awaited first!");
4686 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
4687 return nativeResponseValue;
4689 // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
4690 export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
4691 if(!isWasmInitialized) {
4692 throw new Error("initializeWasm() must be awaited first!");
4694 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
4695 // debug statements here
4697 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
4698 export function ChannelConfig_new(fee_proportional_millionths_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
4699 if(!isWasmInitialized) {
4700 throw new Error("initializeWasm() must be awaited first!");
4702 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
4703 return nativeResponseValue;
4705 // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
4706 export function ChannelConfig_clone(orig: number): number {
4707 if(!isWasmInitialized) {
4708 throw new Error("initializeWasm() must be awaited first!");
4710 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
4711 return nativeResponseValue;
4713 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
4714 export function ChannelConfig_default(): number {
4715 if(!isWasmInitialized) {
4716 throw new Error("initializeWasm() must be awaited first!");
4718 const nativeResponseValue = wasm.ChannelConfig_default();
4719 return nativeResponseValue;
4721 // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
4722 export function ChannelConfig_write(obj: number): Uint8Array {
4723 if(!isWasmInitialized) {
4724 throw new Error("initializeWasm() must be awaited first!");
4726 const nativeResponseValue = wasm.ChannelConfig_write(obj);
4727 return decodeArray(nativeResponseValue);
4729 // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
4730 export function ChannelConfig_read(ser: Uint8Array): number {
4731 if(!isWasmInitialized) {
4732 throw new Error("initializeWasm() must be awaited first!");
4734 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
4735 return nativeResponseValue;
4737 // void UserConfig_free(struct LDKUserConfig this_ptr);
4738 export function UserConfig_free(this_ptr: number): void {
4739 if(!isWasmInitialized) {
4740 throw new Error("initializeWasm() must be awaited first!");
4742 const nativeResponseValue = wasm.UserConfig_free(this_ptr);
4743 // debug statements here
4745 // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4746 export function UserConfig_get_own_channel_config(this_ptr: number): number {
4747 if(!isWasmInitialized) {
4748 throw new Error("initializeWasm() must be awaited first!");
4750 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
4751 return nativeResponseValue;
4753 // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
4754 export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
4755 if(!isWasmInitialized) {
4756 throw new Error("initializeWasm() must be awaited first!");
4758 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
4759 // debug statements here
4761 // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4762 export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
4763 if(!isWasmInitialized) {
4764 throw new Error("initializeWasm() must be awaited first!");
4766 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
4767 return nativeResponseValue;
4769 // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
4770 export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
4771 if(!isWasmInitialized) {
4772 throw new Error("initializeWasm() must be awaited first!");
4774 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
4775 // debug statements here
4777 // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
4778 export function UserConfig_get_channel_options(this_ptr: number): number {
4779 if(!isWasmInitialized) {
4780 throw new Error("initializeWasm() must be awaited first!");
4782 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
4783 return nativeResponseValue;
4785 // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
4786 export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
4787 if(!isWasmInitialized) {
4788 throw new Error("initializeWasm() must be awaited first!");
4790 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
4791 // debug statements here
4793 // 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);
4794 export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
4795 if(!isWasmInitialized) {
4796 throw new Error("initializeWasm() must be awaited first!");
4798 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
4799 return nativeResponseValue;
4801 // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
4802 export function UserConfig_clone(orig: number): number {
4803 if(!isWasmInitialized) {
4804 throw new Error("initializeWasm() must be awaited first!");
4806 const nativeResponseValue = wasm.UserConfig_clone(orig);
4807 return nativeResponseValue;
4809 // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
4810 export function UserConfig_default(): number {
4811 if(!isWasmInitialized) {
4812 throw new Error("initializeWasm() must be awaited first!");
4814 const nativeResponseValue = wasm.UserConfig_default();
4815 return nativeResponseValue;
4817 // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
4818 export function AccessError_clone(orig: number): LDKAccessError {
4819 if(!isWasmInitialized) {
4820 throw new Error("initializeWasm() must be awaited first!");
4822 const nativeResponseValue = wasm.AccessError_clone(orig);
4823 return nativeResponseValue;
4825 // void Access_free(struct LDKAccess this_ptr);
4826 export function Access_free(this_ptr: number): void {
4827 if(!isWasmInitialized) {
4828 throw new Error("initializeWasm() must be awaited first!");
4830 const nativeResponseValue = wasm.Access_free(this_ptr);
4831 // debug statements here
4833 // void Watch_free(struct LDKWatch this_ptr);
4834 export function Watch_free(this_ptr: number): void {
4835 if(!isWasmInitialized) {
4836 throw new Error("initializeWasm() must be awaited first!");
4838 const nativeResponseValue = wasm.Watch_free(this_ptr);
4839 // debug statements here
4841 // void Filter_free(struct LDKFilter this_ptr);
4842 export function Filter_free(this_ptr: number): void {
4843 if(!isWasmInitialized) {
4844 throw new Error("initializeWasm() must be awaited first!");
4846 const nativeResponseValue = wasm.Filter_free(this_ptr);
4847 // debug statements here
4849 // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
4850 export function BroadcasterInterface_free(this_ptr: number): void {
4851 if(!isWasmInitialized) {
4852 throw new Error("initializeWasm() must be awaited first!");
4854 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
4855 // debug statements here
4857 // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
4858 export function ConfirmationTarget_clone(orig: number): LDKConfirmationTarget {
4859 if(!isWasmInitialized) {
4860 throw new Error("initializeWasm() must be awaited first!");
4862 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
4863 return nativeResponseValue;
4865 // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
4866 export function FeeEstimator_free(this_ptr: number): void {
4867 if(!isWasmInitialized) {
4868 throw new Error("initializeWasm() must be awaited first!");
4870 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
4871 // debug statements here
4873 // void ChainMonitor_free(struct LDKChainMonitor this_ptr);
4874 export function ChainMonitor_free(this_ptr: number): void {
4875 if(!isWasmInitialized) {
4876 throw new Error("initializeWasm() must be awaited first!");
4878 const nativeResponseValue = wasm.ChainMonitor_free(this_ptr);
4879 // debug statements here
4881 // void ChainMonitor_block_connected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
4882 export function ChainMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
4883 if(!isWasmInitialized) {
4884 throw new Error("initializeWasm() must be awaited first!");
4886 const nativeResponseValue = wasm.ChainMonitor_block_connected(this_arg, encodeArray(header), txdata, height);
4887 // debug statements here
4889 // void ChainMonitor_block_disconnected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t disconnected_height);
4890 export function ChainMonitor_block_disconnected(this_arg: number, header: Uint8Array, disconnected_height: number): void {
4891 if(!isWasmInitialized) {
4892 throw new Error("initializeWasm() must be awaited first!");
4894 const nativeResponseValue = wasm.ChainMonitor_block_disconnected(this_arg, encodeArray(header), disconnected_height);
4895 // debug statements here
4897 // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
4898 export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
4899 if(!isWasmInitialized) {
4900 throw new Error("initializeWasm() must be awaited first!");
4902 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
4903 return nativeResponseValue;
4905 // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
4906 export function ChainMonitor_as_Watch(this_arg: number): number {
4907 if(!isWasmInitialized) {
4908 throw new Error("initializeWasm() must be awaited first!");
4910 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
4911 return nativeResponseValue;
4913 // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
4914 export function ChainMonitor_as_EventsProvider(this_arg: number): number {
4915 if(!isWasmInitialized) {
4916 throw new Error("initializeWasm() must be awaited first!");
4918 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
4919 return nativeResponseValue;
4921 // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_ptr);
4922 export function ChannelMonitorUpdate_free(this_ptr: number): void {
4923 if(!isWasmInitialized) {
4924 throw new Error("initializeWasm() must be awaited first!");
4926 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_ptr);
4927 // debug statements here
4929 // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
4930 export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
4931 if(!isWasmInitialized) {
4932 throw new Error("initializeWasm() must be awaited first!");
4934 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
4935 return nativeResponseValue;
4937 // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
4938 export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
4939 if(!isWasmInitialized) {
4940 throw new Error("initializeWasm() must be awaited first!");
4942 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
4943 // debug statements here
4945 // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
4946 export function ChannelMonitorUpdate_clone(orig: number): number {
4947 if(!isWasmInitialized) {
4948 throw new Error("initializeWasm() must be awaited first!");
4950 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
4951 return nativeResponseValue;
4953 // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
4954 export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
4955 if(!isWasmInitialized) {
4956 throw new Error("initializeWasm() must be awaited first!");
4958 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
4959 return decodeArray(nativeResponseValue);
4961 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
4962 export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
4963 if(!isWasmInitialized) {
4964 throw new Error("initializeWasm() must be awaited first!");
4966 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
4967 return nativeResponseValue;
4969 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
4970 export function ChannelMonitorUpdateErr_clone(orig: number): LDKChannelMonitorUpdateErr {
4971 if(!isWasmInitialized) {
4972 throw new Error("initializeWasm() must be awaited first!");
4974 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
4975 return nativeResponseValue;
4977 // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_ptr);
4978 export function MonitorUpdateError_free(this_ptr: number): void {
4979 if(!isWasmInitialized) {
4980 throw new Error("initializeWasm() must be awaited first!");
4982 const nativeResponseValue = wasm.MonitorUpdateError_free(this_ptr);
4983 // debug statements here
4985 // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
4986 export function MonitorUpdateError_clone(orig: number): number {
4987 if(!isWasmInitialized) {
4988 throw new Error("initializeWasm() must be awaited first!");
4990 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
4991 return nativeResponseValue;
4993 // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
4994 export function MonitorEvent_free(this_ptr: number): void {
4995 if(!isWasmInitialized) {
4996 throw new Error("initializeWasm() must be awaited first!");
4998 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
4999 // debug statements here
5001 // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
5002 export function MonitorEvent_clone(orig: number): number {
5003 if(!isWasmInitialized) {
5004 throw new Error("initializeWasm() must be awaited first!");
5006 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
5007 return nativeResponseValue;
5009 // void HTLCUpdate_free(struct LDKHTLCUpdate this_ptr);
5010 export function HTLCUpdate_free(this_ptr: number): void {
5011 if(!isWasmInitialized) {
5012 throw new Error("initializeWasm() must be awaited first!");
5014 const nativeResponseValue = wasm.HTLCUpdate_free(this_ptr);
5015 // debug statements here
5017 // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
5018 export function HTLCUpdate_clone(orig: number): number {
5019 if(!isWasmInitialized) {
5020 throw new Error("initializeWasm() must be awaited first!");
5022 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
5023 return nativeResponseValue;
5025 // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
5026 export function HTLCUpdate_write(obj: number): Uint8Array {
5027 if(!isWasmInitialized) {
5028 throw new Error("initializeWasm() must be awaited first!");
5030 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
5031 return decodeArray(nativeResponseValue);
5033 // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
5034 export function HTLCUpdate_read(ser: Uint8Array): number {
5035 if(!isWasmInitialized) {
5036 throw new Error("initializeWasm() must be awaited first!");
5038 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
5039 return nativeResponseValue;
5041 // void ChannelMonitor_free(struct LDKChannelMonitor this_ptr);
5042 export function ChannelMonitor_free(this_ptr: number): void {
5043 if(!isWasmInitialized) {
5044 throw new Error("initializeWasm() must be awaited first!");
5046 const nativeResponseValue = wasm.ChannelMonitor_free(this_ptr);
5047 // debug statements here
5049 // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
5050 export function ChannelMonitor_clone(orig: number): number {
5051 if(!isWasmInitialized) {
5052 throw new Error("initializeWasm() must be awaited first!");
5054 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
5055 return nativeResponseValue;
5057 // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
5058 export function ChannelMonitor_write(obj: number): Uint8Array {
5059 if(!isWasmInitialized) {
5060 throw new Error("initializeWasm() must be awaited first!");
5062 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
5063 return decodeArray(nativeResponseValue);
5065 // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
5066 export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
5067 if(!isWasmInitialized) {
5068 throw new Error("initializeWasm() must be awaited first!");
5070 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
5071 return nativeResponseValue;
5073 // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5074 export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
5075 if(!isWasmInitialized) {
5076 throw new Error("initializeWasm() must be awaited first!");
5078 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
5079 return nativeResponseValue;
5081 // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5082 export function ChannelMonitor_get_funding_txo(this_arg: number): number {
5083 if(!isWasmInitialized) {
5084 throw new Error("initializeWasm() must be awaited first!");
5086 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
5087 return nativeResponseValue;
5089 // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(struct LDKChannelMonitor *NONNULL_PTR this_arg);
5090 export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
5091 if(!isWasmInitialized) {
5092 throw new Error("initializeWasm() must be awaited first!");
5094 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
5095 return nativeResponseValue;
5097 // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(struct LDKChannelMonitor *NONNULL_PTR this_arg);
5098 export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
5099 if(!isWasmInitialized) {
5100 throw new Error("initializeWasm() must be awaited first!");
5102 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
5103 return nativeResponseValue;
5105 // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
5106 export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
5107 if(!isWasmInitialized) {
5108 throw new Error("initializeWasm() must be awaited first!");
5110 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
5111 return nativeResponseValue;
5113 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
5114 export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5115 if(!isWasmInitialized) {
5116 throw new Error("initializeWasm() must be awaited first!");
5118 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
5119 return nativeResponseValue;
5121 // void ChannelMonitor_block_disconnected(struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
5122 export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
5123 if(!isWasmInitialized) {
5124 throw new Error("initializeWasm() must be awaited first!");
5126 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
5127 // debug statements here
5129 // void Persist_free(struct LDKPersist this_ptr);
5130 export function Persist_free(this_ptr: number): void {
5131 if(!isWasmInitialized) {
5132 throw new Error("initializeWasm() must be awaited first!");
5134 const nativeResponseValue = wasm.Persist_free(this_ptr);
5135 // debug statements here
5137 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
5138 export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
5139 if(!isWasmInitialized) {
5140 throw new Error("initializeWasm() must be awaited first!");
5142 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
5143 return nativeResponseValue;
5145 // void OutPoint_free(struct LDKOutPoint this_ptr);
5146 export function OutPoint_free(this_ptr: number): void {
5147 if(!isWasmInitialized) {
5148 throw new Error("initializeWasm() must be awaited first!");
5150 const nativeResponseValue = wasm.OutPoint_free(this_ptr);
5151 // debug statements here
5153 // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
5154 export function OutPoint_get_txid(this_ptr: number): Uint8Array {
5155 if(!isWasmInitialized) {
5156 throw new Error("initializeWasm() must be awaited first!");
5158 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
5159 return decodeArray(nativeResponseValue);
5161 // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5162 export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
5163 if(!isWasmInitialized) {
5164 throw new Error("initializeWasm() must be awaited first!");
5166 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
5167 // debug statements here
5169 // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
5170 export function OutPoint_get_index(this_ptr: number): number {
5171 if(!isWasmInitialized) {
5172 throw new Error("initializeWasm() must be awaited first!");
5174 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
5175 return nativeResponseValue;
5177 // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
5178 export function OutPoint_set_index(this_ptr: number, val: number): void {
5179 if(!isWasmInitialized) {
5180 throw new Error("initializeWasm() must be awaited first!");
5182 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
5183 // debug statements here
5185 // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
5186 export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
5187 if(!isWasmInitialized) {
5188 throw new Error("initializeWasm() must be awaited first!");
5190 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
5191 return nativeResponseValue;
5193 // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
5194 export function OutPoint_clone(orig: number): number {
5195 if(!isWasmInitialized) {
5196 throw new Error("initializeWasm() must be awaited first!");
5198 const nativeResponseValue = wasm.OutPoint_clone(orig);
5199 return nativeResponseValue;
5201 // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
5202 export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
5203 if(!isWasmInitialized) {
5204 throw new Error("initializeWasm() must be awaited first!");
5206 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
5207 return decodeArray(nativeResponseValue);
5209 // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
5210 export function OutPoint_write(obj: number): Uint8Array {
5211 if(!isWasmInitialized) {
5212 throw new Error("initializeWasm() must be awaited first!");
5214 const nativeResponseValue = wasm.OutPoint_write(obj);
5215 return decodeArray(nativeResponseValue);
5217 // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
5218 export function OutPoint_read(ser: Uint8Array): number {
5219 if(!isWasmInitialized) {
5220 throw new Error("initializeWasm() must be awaited first!");
5222 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
5223 return nativeResponseValue;
5225 // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
5226 export function SpendableOutputDescriptor_free(this_ptr: number): void {
5227 if(!isWasmInitialized) {
5228 throw new Error("initializeWasm() must be awaited first!");
5230 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
5231 // debug statements here
5233 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
5234 export function SpendableOutputDescriptor_clone(orig: number): number {
5235 if(!isWasmInitialized) {
5236 throw new Error("initializeWasm() must be awaited first!");
5238 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
5239 return nativeResponseValue;
5241 // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
5242 export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
5243 if(!isWasmInitialized) {
5244 throw new Error("initializeWasm() must be awaited first!");
5246 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
5247 return decodeArray(nativeResponseValue);
5249 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
5250 export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
5251 if(!isWasmInitialized) {
5252 throw new Error("initializeWasm() must be awaited first!");
5254 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
5255 return nativeResponseValue;
5257 // struct LDKChannelKeys ChannelKeys_clone(const struct LDKChannelKeys *NONNULL_PTR orig);
5258 export function ChannelKeys_clone(orig: number): number {
5259 if(!isWasmInitialized) {
5260 throw new Error("initializeWasm() must be awaited first!");
5262 const nativeResponseValue = wasm.ChannelKeys_clone(orig);
5263 return nativeResponseValue;
5265 // void ChannelKeys_free(struct LDKChannelKeys this_ptr);
5266 export function ChannelKeys_free(this_ptr: number): void {
5267 if(!isWasmInitialized) {
5268 throw new Error("initializeWasm() must be awaited first!");
5270 const nativeResponseValue = wasm.ChannelKeys_free(this_ptr);
5271 // debug statements here
5273 // void KeysInterface_free(struct LDKKeysInterface this_ptr);
5274 export function KeysInterface_free(this_ptr: number): void {
5275 if(!isWasmInitialized) {
5276 throw new Error("initializeWasm() must be awaited first!");
5278 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
5279 // debug statements here
5281 // void InMemoryChannelKeys_free(struct LDKInMemoryChannelKeys this_ptr);
5282 export function InMemoryChannelKeys_free(this_ptr: number): void {
5283 if(!isWasmInitialized) {
5284 throw new Error("initializeWasm() must be awaited first!");
5286 const nativeResponseValue = wasm.InMemoryChannelKeys_free(this_ptr);
5287 // debug statements here
5289 // const uint8_t (*InMemoryChannelKeys_get_funding_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
5290 export function InMemoryChannelKeys_get_funding_key(this_ptr: number): Uint8Array {
5291 if(!isWasmInitialized) {
5292 throw new Error("initializeWasm() must be awaited first!");
5294 const nativeResponseValue = wasm.InMemoryChannelKeys_get_funding_key(this_ptr);
5295 return decodeArray(nativeResponseValue);
5297 // void InMemoryChannelKeys_set_funding_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5298 export function InMemoryChannelKeys_set_funding_key(this_ptr: number, val: Uint8Array): void {
5299 if(!isWasmInitialized) {
5300 throw new Error("initializeWasm() must be awaited first!");
5302 const nativeResponseValue = wasm.InMemoryChannelKeys_set_funding_key(this_ptr, encodeArray(val));
5303 // debug statements here
5305 // const uint8_t (*InMemoryChannelKeys_get_revocation_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
5306 export function InMemoryChannelKeys_get_revocation_base_key(this_ptr: number): Uint8Array {
5307 if(!isWasmInitialized) {
5308 throw new Error("initializeWasm() must be awaited first!");
5310 const nativeResponseValue = wasm.InMemoryChannelKeys_get_revocation_base_key(this_ptr);
5311 return decodeArray(nativeResponseValue);
5313 // void InMemoryChannelKeys_set_revocation_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5314 export function InMemoryChannelKeys_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
5315 if(!isWasmInitialized) {
5316 throw new Error("initializeWasm() must be awaited first!");
5318 const nativeResponseValue = wasm.InMemoryChannelKeys_set_revocation_base_key(this_ptr, encodeArray(val));
5319 // debug statements here
5321 // const uint8_t (*InMemoryChannelKeys_get_payment_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
5322 export function InMemoryChannelKeys_get_payment_key(this_ptr: number): Uint8Array {
5323 if(!isWasmInitialized) {
5324 throw new Error("initializeWasm() must be awaited first!");
5326 const nativeResponseValue = wasm.InMemoryChannelKeys_get_payment_key(this_ptr);
5327 return decodeArray(nativeResponseValue);
5329 // void InMemoryChannelKeys_set_payment_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5330 export function InMemoryChannelKeys_set_payment_key(this_ptr: number, val: Uint8Array): void {
5331 if(!isWasmInitialized) {
5332 throw new Error("initializeWasm() must be awaited first!");
5334 const nativeResponseValue = wasm.InMemoryChannelKeys_set_payment_key(this_ptr, encodeArray(val));
5335 // debug statements here
5337 // const uint8_t (*InMemoryChannelKeys_get_delayed_payment_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
5338 export function InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
5339 if(!isWasmInitialized) {
5340 throw new Error("initializeWasm() must be awaited first!");
5342 const nativeResponseValue = wasm.InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr);
5343 return decodeArray(nativeResponseValue);
5345 // void InMemoryChannelKeys_set_delayed_payment_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5346 export function InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
5347 if(!isWasmInitialized) {
5348 throw new Error("initializeWasm() must be awaited first!");
5350 const nativeResponseValue = wasm.InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr, encodeArray(val));
5351 // debug statements here
5353 // const uint8_t (*InMemoryChannelKeys_get_htlc_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
5354 export function InMemoryChannelKeys_get_htlc_base_key(this_ptr: number): Uint8Array {
5355 if(!isWasmInitialized) {
5356 throw new Error("initializeWasm() must be awaited first!");
5358 const nativeResponseValue = wasm.InMemoryChannelKeys_get_htlc_base_key(this_ptr);
5359 return decodeArray(nativeResponseValue);
5361 // void InMemoryChannelKeys_set_htlc_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5362 export function InMemoryChannelKeys_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
5363 if(!isWasmInitialized) {
5364 throw new Error("initializeWasm() must be awaited first!");
5366 const nativeResponseValue = wasm.InMemoryChannelKeys_set_htlc_base_key(this_ptr, encodeArray(val));
5367 // debug statements here
5369 // const uint8_t (*InMemoryChannelKeys_get_commitment_seed(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
5370 export function InMemoryChannelKeys_get_commitment_seed(this_ptr: number): Uint8Array {
5371 if(!isWasmInitialized) {
5372 throw new Error("initializeWasm() must be awaited first!");
5374 const nativeResponseValue = wasm.InMemoryChannelKeys_get_commitment_seed(this_ptr);
5375 return decodeArray(nativeResponseValue);
5377 // void InMemoryChannelKeys_set_commitment_seed(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5378 export function InMemoryChannelKeys_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
5379 if(!isWasmInitialized) {
5380 throw new Error("initializeWasm() must be awaited first!");
5382 const nativeResponseValue = wasm.InMemoryChannelKeys_set_commitment_seed(this_ptr, encodeArray(val));
5383 // debug statements here
5385 // struct LDKInMemoryChannelKeys InMemoryChannelKeys_clone(const struct LDKInMemoryChannelKeys *NONNULL_PTR orig);
5386 export function InMemoryChannelKeys_clone(orig: number): number {
5387 if(!isWasmInitialized) {
5388 throw new Error("initializeWasm() must be awaited first!");
5390 const nativeResponseValue = wasm.InMemoryChannelKeys_clone(orig);
5391 return nativeResponseValue;
5393 // MUST_USE_RES struct LDKInMemoryChannelKeys InMemoryChannelKeys_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKC2Tuple_u64u64Z key_derivation_params);
5394 export function InMemoryChannelKeys_new(funding_key: Uint8Array, revocation_base_key: Uint8Array, payment_key: Uint8Array, delayed_payment_base_key: Uint8Array, htlc_base_key: Uint8Array, commitment_seed: Uint8Array, channel_value_satoshis: number, key_derivation_params: number): number {
5395 if(!isWasmInitialized) {
5396 throw new Error("initializeWasm() must be awaited first!");
5398 const nativeResponseValue = wasm.InMemoryChannelKeys_new(encodeArray(funding_key), encodeArray(revocation_base_key), encodeArray(payment_key), encodeArray(delayed_payment_base_key), encodeArray(htlc_base_key), encodeArray(commitment_seed), channel_value_satoshis, key_derivation_params);
5399 return nativeResponseValue;
5401 // MUST_USE_RES struct LDKChannelPublicKeys InMemoryChannelKeys_counterparty_pubkeys(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
5402 export function InMemoryChannelKeys_counterparty_pubkeys(this_arg: number): number {
5403 if(!isWasmInitialized) {
5404 throw new Error("initializeWasm() must be awaited first!");
5406 const nativeResponseValue = wasm.InMemoryChannelKeys_counterparty_pubkeys(this_arg);
5407 return nativeResponseValue;
5409 // MUST_USE_RES uint16_t InMemoryChannelKeys_counterparty_selected_contest_delay(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
5410 export function InMemoryChannelKeys_counterparty_selected_contest_delay(this_arg: number): number {
5411 if(!isWasmInitialized) {
5412 throw new Error("initializeWasm() must be awaited first!");
5414 const nativeResponseValue = wasm.InMemoryChannelKeys_counterparty_selected_contest_delay(this_arg);
5415 return nativeResponseValue;
5417 // MUST_USE_RES uint16_t InMemoryChannelKeys_holder_selected_contest_delay(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
5418 export function InMemoryChannelKeys_holder_selected_contest_delay(this_arg: number): number {
5419 if(!isWasmInitialized) {
5420 throw new Error("initializeWasm() must be awaited first!");
5422 const nativeResponseValue = wasm.InMemoryChannelKeys_holder_selected_contest_delay(this_arg);
5423 return nativeResponseValue;
5425 // MUST_USE_RES bool InMemoryChannelKeys_is_outbound(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
5426 export function InMemoryChannelKeys_is_outbound(this_arg: number): boolean {
5427 if(!isWasmInitialized) {
5428 throw new Error("initializeWasm() must be awaited first!");
5430 const nativeResponseValue = wasm.InMemoryChannelKeys_is_outbound(this_arg);
5431 return nativeResponseValue;
5433 // MUST_USE_RES struct LDKOutPoint InMemoryChannelKeys_funding_outpoint(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
5434 export function InMemoryChannelKeys_funding_outpoint(this_arg: number): number {
5435 if(!isWasmInitialized) {
5436 throw new Error("initializeWasm() must be awaited first!");
5438 const nativeResponseValue = wasm.InMemoryChannelKeys_funding_outpoint(this_arg);
5439 return nativeResponseValue;
5441 // MUST_USE_RES struct LDKChannelTransactionParameters InMemoryChannelKeys_get_channel_parameters(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
5442 export function InMemoryChannelKeys_get_channel_parameters(this_arg: number): number {
5443 if(!isWasmInitialized) {
5444 throw new Error("initializeWasm() must be awaited first!");
5446 const nativeResponseValue = wasm.InMemoryChannelKeys_get_channel_parameters(this_arg);
5447 return nativeResponseValue;
5449 // struct LDKChannelKeys InMemoryChannelKeys_as_ChannelKeys(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
5450 export function InMemoryChannelKeys_as_ChannelKeys(this_arg: number): number {
5451 if(!isWasmInitialized) {
5452 throw new Error("initializeWasm() must be awaited first!");
5454 const nativeResponseValue = wasm.InMemoryChannelKeys_as_ChannelKeys(this_arg);
5455 return nativeResponseValue;
5457 // struct LDKCVec_u8Z InMemoryChannelKeys_write(const struct LDKInMemoryChannelKeys *NONNULL_PTR obj);
5458 export function InMemoryChannelKeys_write(obj: number): Uint8Array {
5459 if(!isWasmInitialized) {
5460 throw new Error("initializeWasm() must be awaited first!");
5462 const nativeResponseValue = wasm.InMemoryChannelKeys_write(obj);
5463 return decodeArray(nativeResponseValue);
5465 // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ InMemoryChannelKeys_read(struct LDKu8slice ser);
5466 export function InMemoryChannelKeys_read(ser: Uint8Array): number {
5467 if(!isWasmInitialized) {
5468 throw new Error("initializeWasm() must be awaited first!");
5470 const nativeResponseValue = wasm.InMemoryChannelKeys_read(encodeArray(ser));
5471 return nativeResponseValue;
5473 // void KeysManager_free(struct LDKKeysManager this_ptr);
5474 export function KeysManager_free(this_ptr: number): void {
5475 if(!isWasmInitialized) {
5476 throw new Error("initializeWasm() must be awaited first!");
5478 const nativeResponseValue = wasm.KeysManager_free(this_ptr);
5479 // debug statements here
5481 // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], enum LDKNetwork network, uint64_t starting_time_secs, uint32_t starting_time_nanos);
5482 export function KeysManager_new(seed: Uint8Array, network: LDKNetwork, starting_time_secs: number, starting_time_nanos: number): number {
5483 if(!isWasmInitialized) {
5484 throw new Error("initializeWasm() must be awaited first!");
5486 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), network, starting_time_secs, starting_time_nanos);
5487 return nativeResponseValue;
5489 // MUST_USE_RES struct LDKInMemoryChannelKeys KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, uint64_t params_1, uint64_t params_2);
5490 export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params_1: number, params_2: number): number {
5491 if(!isWasmInitialized) {
5492 throw new Error("initializeWasm() must be awaited first!");
5494 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, params_1, params_2);
5495 return nativeResponseValue;
5497 // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
5498 export function KeysManager_as_KeysInterface(this_arg: number): number {
5499 if(!isWasmInitialized) {
5500 throw new Error("initializeWasm() must be awaited first!");
5502 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
5503 return nativeResponseValue;
5505 // void ChannelManager_free(struct LDKChannelManager this_ptr);
5506 export function ChannelManager_free(this_ptr: number): void {
5507 if(!isWasmInitialized) {
5508 throw new Error("initializeWasm() must be awaited first!");
5510 const nativeResponseValue = wasm.ChannelManager_free(this_ptr);
5511 // debug statements here
5513 // void ChannelDetails_free(struct LDKChannelDetails this_ptr);
5514 export function ChannelDetails_free(this_ptr: number): void {
5515 if(!isWasmInitialized) {
5516 throw new Error("initializeWasm() must be awaited first!");
5518 const nativeResponseValue = wasm.ChannelDetails_free(this_ptr);
5519 // debug statements here
5521 // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
5522 export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
5523 if(!isWasmInitialized) {
5524 throw new Error("initializeWasm() must be awaited first!");
5526 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
5527 return decodeArray(nativeResponseValue);
5529 // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5530 export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
5531 if(!isWasmInitialized) {
5532 throw new Error("initializeWasm() must be awaited first!");
5534 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
5535 // debug statements here
5537 // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
5538 export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
5539 if(!isWasmInitialized) {
5540 throw new Error("initializeWasm() must be awaited first!");
5542 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
5543 return decodeArray(nativeResponseValue);
5545 // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5546 export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
5547 if(!isWasmInitialized) {
5548 throw new Error("initializeWasm() must be awaited first!");
5550 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
5551 // debug statements here
5553 // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
5554 export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
5555 if(!isWasmInitialized) {
5556 throw new Error("initializeWasm() must be awaited first!");
5558 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
5559 return nativeResponseValue;
5561 // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
5562 export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
5563 if(!isWasmInitialized) {
5564 throw new Error("initializeWasm() must be awaited first!");
5566 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
5567 // debug statements here
5569 // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
5570 export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
5571 if(!isWasmInitialized) {
5572 throw new Error("initializeWasm() must be awaited first!");
5574 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
5575 return nativeResponseValue;
5577 // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
5578 export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
5579 if(!isWasmInitialized) {
5580 throw new Error("initializeWasm() must be awaited first!");
5582 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
5583 // debug statements here
5585 // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
5586 export function ChannelDetails_get_user_id(this_ptr: number): number {
5587 if(!isWasmInitialized) {
5588 throw new Error("initializeWasm() must be awaited first!");
5590 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
5591 return nativeResponseValue;
5593 // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
5594 export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
5595 if(!isWasmInitialized) {
5596 throw new Error("initializeWasm() must be awaited first!");
5598 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
5599 // debug statements here
5601 // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
5602 export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
5603 if(!isWasmInitialized) {
5604 throw new Error("initializeWasm() must be awaited first!");
5606 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
5607 return nativeResponseValue;
5609 // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
5610 export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
5611 if(!isWasmInitialized) {
5612 throw new Error("initializeWasm() must be awaited first!");
5614 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
5615 // debug statements here
5617 // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
5618 export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
5619 if(!isWasmInitialized) {
5620 throw new Error("initializeWasm() must be awaited first!");
5622 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
5623 return nativeResponseValue;
5625 // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
5626 export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
5627 if(!isWasmInitialized) {
5628 throw new Error("initializeWasm() must be awaited first!");
5630 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
5631 // debug statements here
5633 // bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
5634 export function ChannelDetails_get_is_live(this_ptr: number): boolean {
5635 if(!isWasmInitialized) {
5636 throw new Error("initializeWasm() must be awaited first!");
5638 const nativeResponseValue = wasm.ChannelDetails_get_is_live(this_ptr);
5639 return nativeResponseValue;
5641 // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
5642 export function ChannelDetails_set_is_live(this_ptr: number, val: boolean): void {
5643 if(!isWasmInitialized) {
5644 throw new Error("initializeWasm() must be awaited first!");
5646 const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
5647 // debug statements here
5649 // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
5650 export function ChannelDetails_clone(orig: number): number {
5651 if(!isWasmInitialized) {
5652 throw new Error("initializeWasm() must be awaited first!");
5654 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
5655 return nativeResponseValue;
5657 // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
5658 export function PaymentSendFailure_free(this_ptr: number): void {
5659 if(!isWasmInitialized) {
5660 throw new Error("initializeWasm() must be awaited first!");
5662 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
5663 // debug statements here
5665 // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
5666 export function PaymentSendFailure_clone(orig: number): number {
5667 if(!isWasmInitialized) {
5668 throw new Error("initializeWasm() must be awaited first!");
5670 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
5671 return nativeResponseValue;
5673 // MUST_USE_RES struct LDKChannelManager ChannelManager_new(enum LDKNetwork network, struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, uintptr_t current_blockchain_height);
5674 export function ChannelManager_new(network: LDKNetwork, fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, current_blockchain_height: number): number {
5675 if(!isWasmInitialized) {
5676 throw new Error("initializeWasm() must be awaited first!");
5678 const nativeResponseValue = wasm.ChannelManager_new(network, fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, current_blockchain_height);
5679 return nativeResponseValue;
5681 // 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);
5682 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 {
5683 if(!isWasmInitialized) {
5684 throw new Error("initializeWasm() must be awaited first!");
5686 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
5687 return nativeResponseValue;
5689 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
5690 export function ChannelManager_list_channels(this_arg: number): number[] {
5691 if(!isWasmInitialized) {
5692 throw new Error("initializeWasm() must be awaited first!");
5694 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
5695 return nativeResponseValue;
5697 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
5698 export function ChannelManager_list_usable_channels(this_arg: number): number[] {
5699 if(!isWasmInitialized) {
5700 throw new Error("initializeWasm() must be awaited first!");
5702 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
5703 return nativeResponseValue;
5705 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
5706 export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
5707 if(!isWasmInitialized) {
5708 throw new Error("initializeWasm() must be awaited first!");
5710 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
5711 return nativeResponseValue;
5713 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
5714 export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
5715 if(!isWasmInitialized) {
5716 throw new Error("initializeWasm() must be awaited first!");
5718 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
5719 return nativeResponseValue;
5721 // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
5722 export function ChannelManager_force_close_all_channels(this_arg: number): void {
5723 if(!isWasmInitialized) {
5724 throw new Error("initializeWasm() must be awaited first!");
5726 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
5727 // debug statements here
5729 // 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);
5730 export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
5731 if(!isWasmInitialized) {
5732 throw new Error("initializeWasm() must be awaited first!");
5734 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
5735 return nativeResponseValue;
5737 // void ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKOutPoint funding_txo);
5738 export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_txo: number): void {
5739 if(!isWasmInitialized) {
5740 throw new Error("initializeWasm() must be awaited first!");
5742 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), funding_txo);
5743 // debug statements here
5745 // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
5746 export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
5747 if(!isWasmInitialized) {
5748 throw new Error("initializeWasm() must be awaited first!");
5750 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
5751 // debug statements here
5753 // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
5754 export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
5755 if(!isWasmInitialized) {
5756 throw new Error("initializeWasm() must be awaited first!");
5758 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
5759 // debug statements here
5761 // void ChannelManager_timer_chan_freshness_every_min(const struct LDKChannelManager *NONNULL_PTR this_arg);
5762 export function ChannelManager_timer_chan_freshness_every_min(this_arg: number): void {
5763 if(!isWasmInitialized) {
5764 throw new Error("initializeWasm() must be awaited first!");
5766 const nativeResponseValue = wasm.ChannelManager_timer_chan_freshness_every_min(this_arg);
5767 // debug statements here
5769 // 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);
5770 export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): boolean {
5771 if(!isWasmInitialized) {
5772 throw new Error("initializeWasm() must be awaited first!");
5774 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash), encodeArray(payment_secret));
5775 return nativeResponseValue;
5777 // 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);
5778 export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array, payment_secret: Uint8Array, expected_amount: number): boolean {
5779 if(!isWasmInitialized) {
5780 throw new Error("initializeWasm() must be awaited first!");
5782 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage), encodeArray(payment_secret), expected_amount);
5783 return nativeResponseValue;
5785 // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
5786 export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
5787 if(!isWasmInitialized) {
5788 throw new Error("initializeWasm() must be awaited first!");
5790 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
5791 return decodeArray(nativeResponseValue);
5793 // 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);
5794 export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
5795 if(!isWasmInitialized) {
5796 throw new Error("initializeWasm() must be awaited first!");
5798 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
5799 // debug statements here
5801 // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
5802 export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
5803 if(!isWasmInitialized) {
5804 throw new Error("initializeWasm() must be awaited first!");
5806 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
5807 return nativeResponseValue;
5809 // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
5810 export function ChannelManager_as_EventsProvider(this_arg: number): number {
5811 if(!isWasmInitialized) {
5812 throw new Error("initializeWasm() must be awaited first!");
5814 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
5815 return nativeResponseValue;
5817 // void ChannelManager_block_connected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
5818 export function ChannelManager_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
5819 if(!isWasmInitialized) {
5820 throw new Error("initializeWasm() must be awaited first!");
5822 const nativeResponseValue = wasm.ChannelManager_block_connected(this_arg, encodeArray(header), txdata, height);
5823 // debug statements here
5825 // void ChannelManager_block_disconnected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80]);
5826 export function ChannelManager_block_disconnected(this_arg: number, header: Uint8Array): void {
5827 if(!isWasmInitialized) {
5828 throw new Error("initializeWasm() must be awaited first!");
5830 const nativeResponseValue = wasm.ChannelManager_block_disconnected(this_arg, encodeArray(header));
5831 // debug statements here
5833 // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
5834 export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
5835 if(!isWasmInitialized) {
5836 throw new Error("initializeWasm() must be awaited first!");
5838 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
5839 return nativeResponseValue;
5841 // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
5842 export function ChannelManager_write(obj: number): Uint8Array {
5843 if(!isWasmInitialized) {
5844 throw new Error("initializeWasm() must be awaited first!");
5846 const nativeResponseValue = wasm.ChannelManager_write(obj);
5847 return decodeArray(nativeResponseValue);
5849 // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_ptr);
5850 export function ChannelManagerReadArgs_free(this_ptr: number): void {
5851 if(!isWasmInitialized) {
5852 throw new Error("initializeWasm() must be awaited first!");
5854 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_ptr);
5855 // debug statements here
5857 // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
5858 export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
5859 if(!isWasmInitialized) {
5860 throw new Error("initializeWasm() must be awaited first!");
5862 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
5863 return nativeResponseValue;
5865 // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
5866 export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
5867 if(!isWasmInitialized) {
5868 throw new Error("initializeWasm() must be awaited first!");
5870 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
5871 // debug statements here
5873 // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
5874 export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
5875 if(!isWasmInitialized) {
5876 throw new Error("initializeWasm() must be awaited first!");
5878 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
5879 return nativeResponseValue;
5881 // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
5882 export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
5883 if(!isWasmInitialized) {
5884 throw new Error("initializeWasm() must be awaited first!");
5886 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
5887 // debug statements here
5889 // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
5890 export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
5891 if(!isWasmInitialized) {
5892 throw new Error("initializeWasm() must be awaited first!");
5894 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
5895 return nativeResponseValue;
5897 // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
5898 export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
5899 if(!isWasmInitialized) {
5900 throw new Error("initializeWasm() must be awaited first!");
5902 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
5903 // debug statements here
5905 // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
5906 export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
5907 if(!isWasmInitialized) {
5908 throw new Error("initializeWasm() must be awaited first!");
5910 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
5911 return nativeResponseValue;
5913 // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
5914 export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
5915 if(!isWasmInitialized) {
5916 throw new Error("initializeWasm() must be awaited first!");
5918 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
5919 // debug statements here
5921 // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
5922 export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
5923 if(!isWasmInitialized) {
5924 throw new Error("initializeWasm() must be awaited first!");
5926 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
5927 return nativeResponseValue;
5929 // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
5930 export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
5931 if(!isWasmInitialized) {
5932 throw new Error("initializeWasm() must be awaited first!");
5934 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
5935 // debug statements here
5937 // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
5938 export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
5939 if(!isWasmInitialized) {
5940 throw new Error("initializeWasm() must be awaited first!");
5942 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
5943 return nativeResponseValue;
5945 // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
5946 export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
5947 if(!isWasmInitialized) {
5948 throw new Error("initializeWasm() must be awaited first!");
5950 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
5951 // debug statements here
5953 // 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);
5954 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 {
5955 if(!isWasmInitialized) {
5956 throw new Error("initializeWasm() must be awaited first!");
5958 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
5959 return nativeResponseValue;
5961 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
5962 export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
5963 if(!isWasmInitialized) {
5964 throw new Error("initializeWasm() must be awaited first!");
5966 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
5967 return nativeResponseValue;
5969 // void DecodeError_free(struct LDKDecodeError this_ptr);
5970 export function DecodeError_free(this_ptr: number): void {
5971 if(!isWasmInitialized) {
5972 throw new Error("initializeWasm() must be awaited first!");
5974 const nativeResponseValue = wasm.DecodeError_free(this_ptr);
5975 // debug statements here
5977 // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
5978 export function DecodeError_clone(orig: number): number {
5979 if(!isWasmInitialized) {
5980 throw new Error("initializeWasm() must be awaited first!");
5982 const nativeResponseValue = wasm.DecodeError_clone(orig);
5983 return nativeResponseValue;
5985 // void Init_free(struct LDKInit this_ptr);
5986 export function Init_free(this_ptr: number): void {
5987 if(!isWasmInitialized) {
5988 throw new Error("initializeWasm() must be awaited first!");
5990 const nativeResponseValue = wasm.Init_free(this_ptr);
5991 // debug statements here
5993 // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
5994 export function Init_clone(orig: number): number {
5995 if(!isWasmInitialized) {
5996 throw new Error("initializeWasm() must be awaited first!");
5998 const nativeResponseValue = wasm.Init_clone(orig);
5999 return nativeResponseValue;
6001 // void ErrorMessage_free(struct LDKErrorMessage this_ptr);
6002 export function ErrorMessage_free(this_ptr: number): void {
6003 if(!isWasmInitialized) {
6004 throw new Error("initializeWasm() must be awaited first!");
6006 const nativeResponseValue = wasm.ErrorMessage_free(this_ptr);
6007 // debug statements here
6009 // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
6010 export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
6011 if(!isWasmInitialized) {
6012 throw new Error("initializeWasm() must be awaited first!");
6014 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
6015 return decodeArray(nativeResponseValue);
6017 // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6018 export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
6019 if(!isWasmInitialized) {
6020 throw new Error("initializeWasm() must be awaited first!");
6022 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
6023 // debug statements here
6025 // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
6026 export function ErrorMessage_get_data(this_ptr: number): String {
6027 if(!isWasmInitialized) {
6028 throw new Error("initializeWasm() must be awaited first!");
6030 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
6031 return nativeResponseValue;
6033 // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
6034 export function ErrorMessage_set_data(this_ptr: number, val: Uint8Array): void {
6035 if(!isWasmInitialized) {
6036 throw new Error("initializeWasm() must be awaited first!");
6038 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, encodeArray(val));
6039 // debug statements here
6041 // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
6042 export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: Uint8Array): number {
6043 if(!isWasmInitialized) {
6044 throw new Error("initializeWasm() must be awaited first!");
6046 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
6047 return nativeResponseValue;
6049 // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
6050 export function ErrorMessage_clone(orig: number): number {
6051 if(!isWasmInitialized) {
6052 throw new Error("initializeWasm() must be awaited first!");
6054 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
6055 return nativeResponseValue;
6057 // void Ping_free(struct LDKPing this_ptr);
6058 export function Ping_free(this_ptr: number): void {
6059 if(!isWasmInitialized) {
6060 throw new Error("initializeWasm() must be awaited first!");
6062 const nativeResponseValue = wasm.Ping_free(this_ptr);
6063 // debug statements here
6065 // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
6066 export function Ping_get_ponglen(this_ptr: number): number {
6067 if(!isWasmInitialized) {
6068 throw new Error("initializeWasm() must be awaited first!");
6070 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
6071 return nativeResponseValue;
6073 // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6074 export function Ping_set_ponglen(this_ptr: number, val: number): void {
6075 if(!isWasmInitialized) {
6076 throw new Error("initializeWasm() must be awaited first!");
6078 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
6079 // debug statements here
6081 // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
6082 export function Ping_get_byteslen(this_ptr: number): number {
6083 if(!isWasmInitialized) {
6084 throw new Error("initializeWasm() must be awaited first!");
6086 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
6087 return nativeResponseValue;
6089 // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6090 export function Ping_set_byteslen(this_ptr: number, val: number): void {
6091 if(!isWasmInitialized) {
6092 throw new Error("initializeWasm() must be awaited first!");
6094 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
6095 // debug statements here
6097 // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
6098 export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
6099 if(!isWasmInitialized) {
6100 throw new Error("initializeWasm() must be awaited first!");
6102 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
6103 return nativeResponseValue;
6105 // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
6106 export function Ping_clone(orig: number): number {
6107 if(!isWasmInitialized) {
6108 throw new Error("initializeWasm() must be awaited first!");
6110 const nativeResponseValue = wasm.Ping_clone(orig);
6111 return nativeResponseValue;
6113 // void Pong_free(struct LDKPong this_ptr);
6114 export function Pong_free(this_ptr: number): void {
6115 if(!isWasmInitialized) {
6116 throw new Error("initializeWasm() must be awaited first!");
6118 const nativeResponseValue = wasm.Pong_free(this_ptr);
6119 // debug statements here
6121 // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
6122 export function Pong_get_byteslen(this_ptr: number): number {
6123 if(!isWasmInitialized) {
6124 throw new Error("initializeWasm() must be awaited first!");
6126 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
6127 return nativeResponseValue;
6129 // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
6130 export function Pong_set_byteslen(this_ptr: number, val: number): void {
6131 if(!isWasmInitialized) {
6132 throw new Error("initializeWasm() must be awaited first!");
6134 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
6135 // debug statements here
6137 // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
6138 export function Pong_new(byteslen_arg: number): number {
6139 if(!isWasmInitialized) {
6140 throw new Error("initializeWasm() must be awaited first!");
6142 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
6143 return nativeResponseValue;
6145 // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
6146 export function Pong_clone(orig: number): number {
6147 if(!isWasmInitialized) {
6148 throw new Error("initializeWasm() must be awaited first!");
6150 const nativeResponseValue = wasm.Pong_clone(orig);
6151 return nativeResponseValue;
6153 // void OpenChannel_free(struct LDKOpenChannel this_ptr);
6154 export function OpenChannel_free(this_ptr: number): void {
6155 if(!isWasmInitialized) {
6156 throw new Error("initializeWasm() must be awaited first!");
6158 const nativeResponseValue = wasm.OpenChannel_free(this_ptr);
6159 // debug statements here
6161 // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
6162 export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
6163 if(!isWasmInitialized) {
6164 throw new Error("initializeWasm() must be awaited first!");
6166 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
6167 return decodeArray(nativeResponseValue);
6169 // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6170 export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6171 if(!isWasmInitialized) {
6172 throw new Error("initializeWasm() must be awaited first!");
6174 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
6175 // debug statements here
6177 // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
6178 export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
6179 if(!isWasmInitialized) {
6180 throw new Error("initializeWasm() must be awaited first!");
6182 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
6183 return decodeArray(nativeResponseValue);
6185 // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6186 export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
6187 if(!isWasmInitialized) {
6188 throw new Error("initializeWasm() must be awaited first!");
6190 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
6191 // debug statements here
6193 // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6194 export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
6195 if(!isWasmInitialized) {
6196 throw new Error("initializeWasm() must be awaited first!");
6198 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
6199 return nativeResponseValue;
6201 // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6202 export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
6203 if(!isWasmInitialized) {
6204 throw new Error("initializeWasm() must be awaited first!");
6206 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
6207 // debug statements here
6209 // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6210 export function OpenChannel_get_push_msat(this_ptr: number): number {
6211 if(!isWasmInitialized) {
6212 throw new Error("initializeWasm() must be awaited first!");
6214 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
6215 return nativeResponseValue;
6217 // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6218 export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
6219 if(!isWasmInitialized) {
6220 throw new Error("initializeWasm() must be awaited first!");
6222 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
6223 // debug statements here
6225 // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6226 export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
6227 if(!isWasmInitialized) {
6228 throw new Error("initializeWasm() must be awaited first!");
6230 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
6231 return nativeResponseValue;
6233 // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6234 export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
6235 if(!isWasmInitialized) {
6236 throw new Error("initializeWasm() must be awaited first!");
6238 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
6239 // debug statements here
6241 // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6242 export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
6243 if(!isWasmInitialized) {
6244 throw new Error("initializeWasm() must be awaited first!");
6246 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
6247 return nativeResponseValue;
6249 // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6250 export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
6251 if(!isWasmInitialized) {
6252 throw new Error("initializeWasm() must be awaited first!");
6254 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
6255 // debug statements here
6257 // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6258 export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
6259 if(!isWasmInitialized) {
6260 throw new Error("initializeWasm() must be awaited first!");
6262 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
6263 return nativeResponseValue;
6265 // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6266 export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
6267 if(!isWasmInitialized) {
6268 throw new Error("initializeWasm() must be awaited first!");
6270 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
6271 // debug statements here
6273 // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6274 export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
6275 if(!isWasmInitialized) {
6276 throw new Error("initializeWasm() must be awaited first!");
6278 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
6279 return nativeResponseValue;
6281 // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
6282 export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
6283 if(!isWasmInitialized) {
6284 throw new Error("initializeWasm() must be awaited first!");
6286 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
6287 // debug statements here
6289 // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6290 export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
6291 if(!isWasmInitialized) {
6292 throw new Error("initializeWasm() must be awaited first!");
6294 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
6295 return nativeResponseValue;
6297 // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
6298 export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
6299 if(!isWasmInitialized) {
6300 throw new Error("initializeWasm() must be awaited first!");
6302 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
6303 // debug statements here
6305 // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6306 export function OpenChannel_get_to_self_delay(this_ptr: number): number {
6307 if(!isWasmInitialized) {
6308 throw new Error("initializeWasm() must be awaited first!");
6310 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
6311 return nativeResponseValue;
6313 // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
6314 export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
6315 if(!isWasmInitialized) {
6316 throw new Error("initializeWasm() must be awaited first!");
6318 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
6319 // debug statements here
6321 // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6322 export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
6323 if(!isWasmInitialized) {
6324 throw new Error("initializeWasm() must be awaited first!");
6326 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
6327 return nativeResponseValue;
6329 // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
6330 export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
6331 if(!isWasmInitialized) {
6332 throw new Error("initializeWasm() must be awaited first!");
6334 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
6335 // debug statements here
6337 // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6338 export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
6339 if(!isWasmInitialized) {
6340 throw new Error("initializeWasm() must be awaited first!");
6342 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
6343 return decodeArray(nativeResponseValue);
6345 // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6346 export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
6347 if(!isWasmInitialized) {
6348 throw new Error("initializeWasm() must be awaited first!");
6350 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
6351 // debug statements here
6353 // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6354 export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
6355 if(!isWasmInitialized) {
6356 throw new Error("initializeWasm() must be awaited first!");
6358 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
6359 return decodeArray(nativeResponseValue);
6361 // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6362 export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
6363 if(!isWasmInitialized) {
6364 throw new Error("initializeWasm() must be awaited first!");
6366 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
6367 // debug statements here
6369 // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6370 export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
6371 if(!isWasmInitialized) {
6372 throw new Error("initializeWasm() must be awaited first!");
6374 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
6375 return decodeArray(nativeResponseValue);
6377 // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6378 export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
6379 if(!isWasmInitialized) {
6380 throw new Error("initializeWasm() must be awaited first!");
6382 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
6383 // debug statements here
6385 // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6386 export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
6387 if(!isWasmInitialized) {
6388 throw new Error("initializeWasm() must be awaited first!");
6390 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
6391 return decodeArray(nativeResponseValue);
6393 // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6394 export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
6395 if(!isWasmInitialized) {
6396 throw new Error("initializeWasm() must be awaited first!");
6398 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
6399 // debug statements here
6401 // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6402 export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
6403 if(!isWasmInitialized) {
6404 throw new Error("initializeWasm() must be awaited first!");
6406 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
6407 return decodeArray(nativeResponseValue);
6409 // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6410 export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
6411 if(!isWasmInitialized) {
6412 throw new Error("initializeWasm() must be awaited first!");
6414 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
6415 // debug statements here
6417 // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6418 export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
6419 if(!isWasmInitialized) {
6420 throw new Error("initializeWasm() must be awaited first!");
6422 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
6423 return decodeArray(nativeResponseValue);
6425 // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6426 export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
6427 if(!isWasmInitialized) {
6428 throw new Error("initializeWasm() must be awaited first!");
6430 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
6431 // debug statements here
6433 // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
6434 export function OpenChannel_get_channel_flags(this_ptr: number): number {
6435 if(!isWasmInitialized) {
6436 throw new Error("initializeWasm() must be awaited first!");
6438 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
6439 return nativeResponseValue;
6441 // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
6442 export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
6443 if(!isWasmInitialized) {
6444 throw new Error("initializeWasm() must be awaited first!");
6446 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
6447 // debug statements here
6449 // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
6450 export function OpenChannel_clone(orig: number): number {
6451 if(!isWasmInitialized) {
6452 throw new Error("initializeWasm() must be awaited first!");
6454 const nativeResponseValue = wasm.OpenChannel_clone(orig);
6455 return nativeResponseValue;
6457 // void AcceptChannel_free(struct LDKAcceptChannel this_ptr);
6458 export function AcceptChannel_free(this_ptr: number): void {
6459 if(!isWasmInitialized) {
6460 throw new Error("initializeWasm() must be awaited first!");
6462 const nativeResponseValue = wasm.AcceptChannel_free(this_ptr);
6463 // debug statements here
6465 // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
6466 export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
6467 if(!isWasmInitialized) {
6468 throw new Error("initializeWasm() must be awaited first!");
6470 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
6471 return decodeArray(nativeResponseValue);
6473 // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6474 export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
6475 if(!isWasmInitialized) {
6476 throw new Error("initializeWasm() must be awaited first!");
6478 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
6479 // debug statements here
6481 // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6482 export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
6483 if(!isWasmInitialized) {
6484 throw new Error("initializeWasm() must be awaited first!");
6486 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
6487 return nativeResponseValue;
6489 // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
6490 export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
6491 if(!isWasmInitialized) {
6492 throw new Error("initializeWasm() must be awaited first!");
6494 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
6495 // debug statements here
6497 // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6498 export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
6499 if(!isWasmInitialized) {
6500 throw new Error("initializeWasm() must be awaited first!");
6502 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
6503 return nativeResponseValue;
6505 // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
6506 export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
6507 if(!isWasmInitialized) {
6508 throw new Error("initializeWasm() must be awaited first!");
6510 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
6511 // debug statements here
6513 // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6514 export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
6515 if(!isWasmInitialized) {
6516 throw new Error("initializeWasm() must be awaited first!");
6518 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
6519 return nativeResponseValue;
6521 // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
6522 export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
6523 if(!isWasmInitialized) {
6524 throw new Error("initializeWasm() must be awaited first!");
6526 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
6527 // debug statements here
6529 // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6530 export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
6531 if(!isWasmInitialized) {
6532 throw new Error("initializeWasm() must be awaited first!");
6534 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
6535 return nativeResponseValue;
6537 // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
6538 export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
6539 if(!isWasmInitialized) {
6540 throw new Error("initializeWasm() must be awaited first!");
6542 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
6543 // debug statements here
6545 // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6546 export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
6547 if(!isWasmInitialized) {
6548 throw new Error("initializeWasm() must be awaited first!");
6550 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
6551 return nativeResponseValue;
6553 // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
6554 export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
6555 if(!isWasmInitialized) {
6556 throw new Error("initializeWasm() must be awaited first!");
6558 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
6559 // debug statements here
6561 // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6562 export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
6563 if(!isWasmInitialized) {
6564 throw new Error("initializeWasm() must be awaited first!");
6566 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
6567 return nativeResponseValue;
6569 // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
6570 export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
6571 if(!isWasmInitialized) {
6572 throw new Error("initializeWasm() must be awaited first!");
6574 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
6575 // debug statements here
6577 // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6578 export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
6579 if(!isWasmInitialized) {
6580 throw new Error("initializeWasm() must be awaited first!");
6582 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
6583 return nativeResponseValue;
6585 // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
6586 export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
6587 if(!isWasmInitialized) {
6588 throw new Error("initializeWasm() must be awaited first!");
6590 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
6591 // debug statements here
6593 // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6594 export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
6595 if(!isWasmInitialized) {
6596 throw new Error("initializeWasm() must be awaited first!");
6598 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
6599 return decodeArray(nativeResponseValue);
6601 // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6602 export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
6603 if(!isWasmInitialized) {
6604 throw new Error("initializeWasm() must be awaited first!");
6606 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
6607 // debug statements here
6609 // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6610 export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
6611 if(!isWasmInitialized) {
6612 throw new Error("initializeWasm() must be awaited first!");
6614 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
6615 return decodeArray(nativeResponseValue);
6617 // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6618 export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
6619 if(!isWasmInitialized) {
6620 throw new Error("initializeWasm() must be awaited first!");
6622 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
6623 // debug statements here
6625 // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6626 export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
6627 if(!isWasmInitialized) {
6628 throw new Error("initializeWasm() must be awaited first!");
6630 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
6631 return decodeArray(nativeResponseValue);
6633 // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6634 export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
6635 if(!isWasmInitialized) {
6636 throw new Error("initializeWasm() must be awaited first!");
6638 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
6639 // debug statements here
6641 // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6642 export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
6643 if(!isWasmInitialized) {
6644 throw new Error("initializeWasm() must be awaited first!");
6646 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
6647 return decodeArray(nativeResponseValue);
6649 // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6650 export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
6651 if(!isWasmInitialized) {
6652 throw new Error("initializeWasm() must be awaited first!");
6654 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
6655 // debug statements here
6657 // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6658 export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
6659 if(!isWasmInitialized) {
6660 throw new Error("initializeWasm() must be awaited first!");
6662 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
6663 return decodeArray(nativeResponseValue);
6665 // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6666 export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
6667 if(!isWasmInitialized) {
6668 throw new Error("initializeWasm() must be awaited first!");
6670 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
6671 // debug statements here
6673 // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
6674 export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
6675 if(!isWasmInitialized) {
6676 throw new Error("initializeWasm() must be awaited first!");
6678 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
6679 return decodeArray(nativeResponseValue);
6681 // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6682 export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
6683 if(!isWasmInitialized) {
6684 throw new Error("initializeWasm() must be awaited first!");
6686 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
6687 // debug statements here
6689 // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
6690 export function AcceptChannel_clone(orig: number): number {
6691 if(!isWasmInitialized) {
6692 throw new Error("initializeWasm() must be awaited first!");
6694 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
6695 return nativeResponseValue;
6697 // void FundingCreated_free(struct LDKFundingCreated this_ptr);
6698 export function FundingCreated_free(this_ptr: number): void {
6699 if(!isWasmInitialized) {
6700 throw new Error("initializeWasm() must be awaited first!");
6702 const nativeResponseValue = wasm.FundingCreated_free(this_ptr);
6703 // debug statements here
6705 // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
6706 export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
6707 if(!isWasmInitialized) {
6708 throw new Error("initializeWasm() must be awaited first!");
6710 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
6711 return decodeArray(nativeResponseValue);
6713 // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6714 export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
6715 if(!isWasmInitialized) {
6716 throw new Error("initializeWasm() must be awaited first!");
6718 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
6719 // debug statements here
6721 // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
6722 export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
6723 if(!isWasmInitialized) {
6724 throw new Error("initializeWasm() must be awaited first!");
6726 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
6727 return decodeArray(nativeResponseValue);
6729 // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6730 export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
6731 if(!isWasmInitialized) {
6732 throw new Error("initializeWasm() must be awaited first!");
6734 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
6735 // debug statements here
6737 // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
6738 export function FundingCreated_get_funding_output_index(this_ptr: number): number {
6739 if(!isWasmInitialized) {
6740 throw new Error("initializeWasm() must be awaited first!");
6742 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
6743 return nativeResponseValue;
6745 // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
6746 export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
6747 if(!isWasmInitialized) {
6748 throw new Error("initializeWasm() must be awaited first!");
6750 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
6751 // debug statements here
6753 // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
6754 export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
6755 if(!isWasmInitialized) {
6756 throw new Error("initializeWasm() must be awaited first!");
6758 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
6759 return decodeArray(nativeResponseValue);
6761 // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
6762 export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
6763 if(!isWasmInitialized) {
6764 throw new Error("initializeWasm() must be awaited first!");
6766 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
6767 // debug statements here
6769 // 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);
6770 export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
6771 if(!isWasmInitialized) {
6772 throw new Error("initializeWasm() must be awaited first!");
6774 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
6775 return nativeResponseValue;
6777 // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
6778 export function FundingCreated_clone(orig: number): number {
6779 if(!isWasmInitialized) {
6780 throw new Error("initializeWasm() must be awaited first!");
6782 const nativeResponseValue = wasm.FundingCreated_clone(orig);
6783 return nativeResponseValue;
6785 // void FundingSigned_free(struct LDKFundingSigned this_ptr);
6786 export function FundingSigned_free(this_ptr: number): void {
6787 if(!isWasmInitialized) {
6788 throw new Error("initializeWasm() must be awaited first!");
6790 const nativeResponseValue = wasm.FundingSigned_free(this_ptr);
6791 // debug statements here
6793 // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
6794 export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
6795 if(!isWasmInitialized) {
6796 throw new Error("initializeWasm() must be awaited first!");
6798 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
6799 return decodeArray(nativeResponseValue);
6801 // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6802 export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
6803 if(!isWasmInitialized) {
6804 throw new Error("initializeWasm() must be awaited first!");
6806 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
6807 // debug statements here
6809 // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
6810 export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
6811 if(!isWasmInitialized) {
6812 throw new Error("initializeWasm() must be awaited first!");
6814 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
6815 return decodeArray(nativeResponseValue);
6817 // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
6818 export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
6819 if(!isWasmInitialized) {
6820 throw new Error("initializeWasm() must be awaited first!");
6822 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
6823 // debug statements here
6825 // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
6826 export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
6827 if(!isWasmInitialized) {
6828 throw new Error("initializeWasm() must be awaited first!");
6830 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
6831 return nativeResponseValue;
6833 // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
6834 export function FundingSigned_clone(orig: number): number {
6835 if(!isWasmInitialized) {
6836 throw new Error("initializeWasm() must be awaited first!");
6838 const nativeResponseValue = wasm.FundingSigned_clone(orig);
6839 return nativeResponseValue;
6841 // void FundingLocked_free(struct LDKFundingLocked this_ptr);
6842 export function FundingLocked_free(this_ptr: number): void {
6843 if(!isWasmInitialized) {
6844 throw new Error("initializeWasm() must be awaited first!");
6846 const nativeResponseValue = wasm.FundingLocked_free(this_ptr);
6847 // debug statements here
6849 // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
6850 export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
6851 if(!isWasmInitialized) {
6852 throw new Error("initializeWasm() must be awaited first!");
6854 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
6855 return decodeArray(nativeResponseValue);
6857 // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6858 export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
6859 if(!isWasmInitialized) {
6860 throw new Error("initializeWasm() must be awaited first!");
6862 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
6863 // debug statements here
6865 // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
6866 export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
6867 if(!isWasmInitialized) {
6868 throw new Error("initializeWasm() must be awaited first!");
6870 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
6871 return decodeArray(nativeResponseValue);
6873 // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6874 export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
6875 if(!isWasmInitialized) {
6876 throw new Error("initializeWasm() must be awaited first!");
6878 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
6879 // debug statements here
6881 // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
6882 export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
6883 if(!isWasmInitialized) {
6884 throw new Error("initializeWasm() must be awaited first!");
6886 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
6887 return nativeResponseValue;
6889 // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
6890 export function FundingLocked_clone(orig: number): number {
6891 if(!isWasmInitialized) {
6892 throw new Error("initializeWasm() must be awaited first!");
6894 const nativeResponseValue = wasm.FundingLocked_clone(orig);
6895 return nativeResponseValue;
6897 // void Shutdown_free(struct LDKShutdown this_ptr);
6898 export function Shutdown_free(this_ptr: number): void {
6899 if(!isWasmInitialized) {
6900 throw new Error("initializeWasm() must be awaited first!");
6902 const nativeResponseValue = wasm.Shutdown_free(this_ptr);
6903 // debug statements here
6905 // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
6906 export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
6907 if(!isWasmInitialized) {
6908 throw new Error("initializeWasm() must be awaited first!");
6910 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
6911 return decodeArray(nativeResponseValue);
6913 // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6914 export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
6915 if(!isWasmInitialized) {
6916 throw new Error("initializeWasm() must be awaited first!");
6918 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
6919 // debug statements here
6921 // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
6922 export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
6923 if(!isWasmInitialized) {
6924 throw new Error("initializeWasm() must be awaited first!");
6926 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
6927 return decodeArray(nativeResponseValue);
6929 // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
6930 export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
6931 if(!isWasmInitialized) {
6932 throw new Error("initializeWasm() must be awaited first!");
6934 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
6935 // debug statements here
6937 // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
6938 export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
6939 if(!isWasmInitialized) {
6940 throw new Error("initializeWasm() must be awaited first!");
6942 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
6943 return nativeResponseValue;
6945 // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
6946 export function Shutdown_clone(orig: number): number {
6947 if(!isWasmInitialized) {
6948 throw new Error("initializeWasm() must be awaited first!");
6950 const nativeResponseValue = wasm.Shutdown_clone(orig);
6951 return nativeResponseValue;
6953 // void ClosingSigned_free(struct LDKClosingSigned this_ptr);
6954 export function ClosingSigned_free(this_ptr: number): void {
6955 if(!isWasmInitialized) {
6956 throw new Error("initializeWasm() must be awaited first!");
6958 const nativeResponseValue = wasm.ClosingSigned_free(this_ptr);
6959 // debug statements here
6961 // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
6962 export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
6963 if(!isWasmInitialized) {
6964 throw new Error("initializeWasm() must be awaited first!");
6966 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
6967 return decodeArray(nativeResponseValue);
6969 // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6970 export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
6971 if(!isWasmInitialized) {
6972 throw new Error("initializeWasm() must be awaited first!");
6974 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
6975 // debug statements here
6977 // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
6978 export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
6979 if(!isWasmInitialized) {
6980 throw new Error("initializeWasm() must be awaited first!");
6982 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
6983 return nativeResponseValue;
6985 // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
6986 export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
6987 if(!isWasmInitialized) {
6988 throw new Error("initializeWasm() must be awaited first!");
6990 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
6991 // debug statements here
6993 // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
6994 export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
6995 if(!isWasmInitialized) {
6996 throw new Error("initializeWasm() must be awaited first!");
6998 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
6999 return decodeArray(nativeResponseValue);
7001 // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7002 export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7003 if(!isWasmInitialized) {
7004 throw new Error("initializeWasm() must be awaited first!");
7006 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
7007 // debug statements here
7009 // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
7010 export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
7011 if(!isWasmInitialized) {
7012 throw new Error("initializeWasm() must be awaited first!");
7014 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
7015 return nativeResponseValue;
7017 // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
7018 export function ClosingSigned_clone(orig: number): number {
7019 if(!isWasmInitialized) {
7020 throw new Error("initializeWasm() must be awaited first!");
7022 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
7023 return nativeResponseValue;
7025 // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_ptr);
7026 export function UpdateAddHTLC_free(this_ptr: number): void {
7027 if(!isWasmInitialized) {
7028 throw new Error("initializeWasm() must be awaited first!");
7030 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_ptr);
7031 // debug statements here
7033 // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7034 export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
7035 if(!isWasmInitialized) {
7036 throw new Error("initializeWasm() must be awaited first!");
7038 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
7039 return decodeArray(nativeResponseValue);
7041 // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7042 export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7043 if(!isWasmInitialized) {
7044 throw new Error("initializeWasm() must be awaited first!");
7046 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
7047 // debug statements here
7049 // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7050 export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
7051 if(!isWasmInitialized) {
7052 throw new Error("initializeWasm() must be awaited first!");
7054 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
7055 return nativeResponseValue;
7057 // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7058 export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
7059 if(!isWasmInitialized) {
7060 throw new Error("initializeWasm() must be awaited first!");
7062 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
7063 // debug statements here
7065 // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7066 export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
7067 if(!isWasmInitialized) {
7068 throw new Error("initializeWasm() must be awaited first!");
7070 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
7071 return nativeResponseValue;
7073 // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7074 export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
7075 if(!isWasmInitialized) {
7076 throw new Error("initializeWasm() must be awaited first!");
7078 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
7079 // debug statements here
7081 // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7082 export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
7083 if(!isWasmInitialized) {
7084 throw new Error("initializeWasm() must be awaited first!");
7086 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
7087 return decodeArray(nativeResponseValue);
7089 // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7090 export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
7091 if(!isWasmInitialized) {
7092 throw new Error("initializeWasm() must be awaited first!");
7094 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
7095 // debug statements here
7097 // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7098 export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
7099 if(!isWasmInitialized) {
7100 throw new Error("initializeWasm() must be awaited first!");
7102 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
7103 return nativeResponseValue;
7105 // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
7106 export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
7107 if(!isWasmInitialized) {
7108 throw new Error("initializeWasm() must be awaited first!");
7110 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
7111 // debug statements here
7113 // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
7114 export function UpdateAddHTLC_clone(orig: number): number {
7115 if(!isWasmInitialized) {
7116 throw new Error("initializeWasm() must be awaited first!");
7118 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
7119 return nativeResponseValue;
7121 // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_ptr);
7122 export function UpdateFulfillHTLC_free(this_ptr: number): void {
7123 if(!isWasmInitialized) {
7124 throw new Error("initializeWasm() must be awaited first!");
7126 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_ptr);
7127 // debug statements here
7129 // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7130 export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
7131 if(!isWasmInitialized) {
7132 throw new Error("initializeWasm() must be awaited first!");
7134 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
7135 return decodeArray(nativeResponseValue);
7137 // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7138 export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7139 if(!isWasmInitialized) {
7140 throw new Error("initializeWasm() must be awaited first!");
7142 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
7143 // debug statements here
7145 // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
7146 export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
7147 if(!isWasmInitialized) {
7148 throw new Error("initializeWasm() must be awaited first!");
7150 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
7151 return nativeResponseValue;
7153 // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
7154 export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
7155 if(!isWasmInitialized) {
7156 throw new Error("initializeWasm() must be awaited first!");
7158 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
7159 // debug statements here
7161 // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7162 export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
7163 if(!isWasmInitialized) {
7164 throw new Error("initializeWasm() must be awaited first!");
7166 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
7167 return decodeArray(nativeResponseValue);
7169 // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7170 export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
7171 if(!isWasmInitialized) {
7172 throw new Error("initializeWasm() must be awaited first!");
7174 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
7175 // debug statements here
7177 // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
7178 export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
7179 if(!isWasmInitialized) {
7180 throw new Error("initializeWasm() must be awaited first!");
7182 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
7183 return nativeResponseValue;
7185 // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
7186 export function UpdateFulfillHTLC_clone(orig: number): number {
7187 if(!isWasmInitialized) {
7188 throw new Error("initializeWasm() must be awaited first!");
7190 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
7191 return nativeResponseValue;
7193 // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_ptr);
7194 export function UpdateFailHTLC_free(this_ptr: number): void {
7195 if(!isWasmInitialized) {
7196 throw new Error("initializeWasm() must be awaited first!");
7198 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_ptr);
7199 // debug statements here
7201 // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
7202 export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
7203 if(!isWasmInitialized) {
7204 throw new Error("initializeWasm() must be awaited first!");
7206 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
7207 return decodeArray(nativeResponseValue);
7209 // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7210 export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7211 if(!isWasmInitialized) {
7212 throw new Error("initializeWasm() must be awaited first!");
7214 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
7215 // debug statements here
7217 // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
7218 export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
7219 if(!isWasmInitialized) {
7220 throw new Error("initializeWasm() must be awaited first!");
7222 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
7223 return nativeResponseValue;
7225 // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
7226 export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
7227 if(!isWasmInitialized) {
7228 throw new Error("initializeWasm() must be awaited first!");
7230 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
7231 // debug statements here
7233 // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
7234 export function UpdateFailHTLC_clone(orig: number): number {
7235 if(!isWasmInitialized) {
7236 throw new Error("initializeWasm() must be awaited first!");
7238 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
7239 return nativeResponseValue;
7241 // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_ptr);
7242 export function UpdateFailMalformedHTLC_free(this_ptr: number): void {
7243 if(!isWasmInitialized) {
7244 throw new Error("initializeWasm() must be awaited first!");
7246 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_ptr);
7247 // debug statements here
7249 // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
7250 export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
7251 if(!isWasmInitialized) {
7252 throw new Error("initializeWasm() must be awaited first!");
7254 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
7255 return decodeArray(nativeResponseValue);
7257 // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7258 export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7259 if(!isWasmInitialized) {
7260 throw new Error("initializeWasm() must be awaited first!");
7262 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
7263 // debug statements here
7265 // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
7266 export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
7267 if(!isWasmInitialized) {
7268 throw new Error("initializeWasm() must be awaited first!");
7270 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
7271 return nativeResponseValue;
7273 // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
7274 export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
7275 if(!isWasmInitialized) {
7276 throw new Error("initializeWasm() must be awaited first!");
7278 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
7279 // debug statements here
7281 // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
7282 export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
7283 if(!isWasmInitialized) {
7284 throw new Error("initializeWasm() must be awaited first!");
7286 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
7287 return nativeResponseValue;
7289 // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
7290 export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
7291 if(!isWasmInitialized) {
7292 throw new Error("initializeWasm() must be awaited first!");
7294 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
7295 // debug statements here
7297 // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
7298 export function UpdateFailMalformedHTLC_clone(orig: number): number {
7299 if(!isWasmInitialized) {
7300 throw new Error("initializeWasm() must be awaited first!");
7302 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
7303 return nativeResponseValue;
7305 // void CommitmentSigned_free(struct LDKCommitmentSigned this_ptr);
7306 export function CommitmentSigned_free(this_ptr: number): void {
7307 if(!isWasmInitialized) {
7308 throw new Error("initializeWasm() must be awaited first!");
7310 const nativeResponseValue = wasm.CommitmentSigned_free(this_ptr);
7311 // debug statements here
7313 // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
7314 export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
7315 if(!isWasmInitialized) {
7316 throw new Error("initializeWasm() must be awaited first!");
7318 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
7319 return decodeArray(nativeResponseValue);
7321 // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7322 export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7323 if(!isWasmInitialized) {
7324 throw new Error("initializeWasm() must be awaited first!");
7326 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
7327 // debug statements here
7329 // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
7330 export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
7331 if(!isWasmInitialized) {
7332 throw new Error("initializeWasm() must be awaited first!");
7334 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
7335 return decodeArray(nativeResponseValue);
7337 // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7338 export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7339 if(!isWasmInitialized) {
7340 throw new Error("initializeWasm() must be awaited first!");
7342 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
7343 // debug statements here
7345 // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
7346 export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
7347 if(!isWasmInitialized) {
7348 throw new Error("initializeWasm() must be awaited first!");
7350 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
7351 // debug statements here
7353 // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
7354 export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
7355 if(!isWasmInitialized) {
7356 throw new Error("initializeWasm() must be awaited first!");
7358 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
7359 return nativeResponseValue;
7361 // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
7362 export function CommitmentSigned_clone(orig: number): number {
7363 if(!isWasmInitialized) {
7364 throw new Error("initializeWasm() must be awaited first!");
7366 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
7367 return nativeResponseValue;
7369 // void RevokeAndACK_free(struct LDKRevokeAndACK this_ptr);
7370 export function RevokeAndACK_free(this_ptr: number): void {
7371 if(!isWasmInitialized) {
7372 throw new Error("initializeWasm() must be awaited first!");
7374 const nativeResponseValue = wasm.RevokeAndACK_free(this_ptr);
7375 // debug statements here
7377 // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
7378 export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
7379 if(!isWasmInitialized) {
7380 throw new Error("initializeWasm() must be awaited first!");
7382 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
7383 return decodeArray(nativeResponseValue);
7385 // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7386 export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
7387 if(!isWasmInitialized) {
7388 throw new Error("initializeWasm() must be awaited first!");
7390 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
7391 // debug statements here
7393 // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
7394 export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
7395 if(!isWasmInitialized) {
7396 throw new Error("initializeWasm() must be awaited first!");
7398 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
7399 return decodeArray(nativeResponseValue);
7401 // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7402 export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
7403 if(!isWasmInitialized) {
7404 throw new Error("initializeWasm() must be awaited first!");
7406 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
7407 // debug statements here
7409 // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
7410 export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
7411 if(!isWasmInitialized) {
7412 throw new Error("initializeWasm() must be awaited first!");
7414 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
7415 return decodeArray(nativeResponseValue);
7417 // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7418 export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7419 if(!isWasmInitialized) {
7420 throw new Error("initializeWasm() must be awaited first!");
7422 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
7423 // debug statements here
7425 // 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);
7426 export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
7427 if(!isWasmInitialized) {
7428 throw new Error("initializeWasm() must be awaited first!");
7430 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
7431 return nativeResponseValue;
7433 // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
7434 export function RevokeAndACK_clone(orig: number): number {
7435 if(!isWasmInitialized) {
7436 throw new Error("initializeWasm() must be awaited first!");
7438 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
7439 return nativeResponseValue;
7441 // void UpdateFee_free(struct LDKUpdateFee this_ptr);
7442 export function UpdateFee_free(this_ptr: number): void {
7443 if(!isWasmInitialized) {
7444 throw new Error("initializeWasm() must be awaited first!");
7446 const nativeResponseValue = wasm.UpdateFee_free(this_ptr);
7447 // debug statements here
7449 // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
7450 export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
7451 if(!isWasmInitialized) {
7452 throw new Error("initializeWasm() must be awaited first!");
7454 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
7455 return decodeArray(nativeResponseValue);
7457 // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7458 export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
7459 if(!isWasmInitialized) {
7460 throw new Error("initializeWasm() must be awaited first!");
7462 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
7463 // debug statements here
7465 // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
7466 export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
7467 if(!isWasmInitialized) {
7468 throw new Error("initializeWasm() must be awaited first!");
7470 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
7471 return nativeResponseValue;
7473 // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
7474 export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
7475 if(!isWasmInitialized) {
7476 throw new Error("initializeWasm() must be awaited first!");
7478 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
7479 // debug statements here
7481 // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
7482 export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
7483 if(!isWasmInitialized) {
7484 throw new Error("initializeWasm() must be awaited first!");
7486 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
7487 return nativeResponseValue;
7489 // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
7490 export function UpdateFee_clone(orig: number): number {
7491 if(!isWasmInitialized) {
7492 throw new Error("initializeWasm() must be awaited first!");
7494 const nativeResponseValue = wasm.UpdateFee_clone(orig);
7495 return nativeResponseValue;
7497 // void DataLossProtect_free(struct LDKDataLossProtect this_ptr);
7498 export function DataLossProtect_free(this_ptr: number): void {
7499 if(!isWasmInitialized) {
7500 throw new Error("initializeWasm() must be awaited first!");
7502 const nativeResponseValue = wasm.DataLossProtect_free(this_ptr);
7503 // debug statements here
7505 // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
7506 export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
7507 if(!isWasmInitialized) {
7508 throw new Error("initializeWasm() must be awaited first!");
7510 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
7511 return decodeArray(nativeResponseValue);
7513 // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7514 export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
7515 if(!isWasmInitialized) {
7516 throw new Error("initializeWasm() must be awaited first!");
7518 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
7519 // debug statements here
7521 // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
7522 export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
7523 if(!isWasmInitialized) {
7524 throw new Error("initializeWasm() must be awaited first!");
7526 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
7527 return decodeArray(nativeResponseValue);
7529 // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7530 export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7531 if(!isWasmInitialized) {
7532 throw new Error("initializeWasm() must be awaited first!");
7534 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
7535 // debug statements here
7537 // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
7538 export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
7539 if(!isWasmInitialized) {
7540 throw new Error("initializeWasm() must be awaited first!");
7542 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
7543 return nativeResponseValue;
7545 // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
7546 export function DataLossProtect_clone(orig: number): number {
7547 if(!isWasmInitialized) {
7548 throw new Error("initializeWasm() must be awaited first!");
7550 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
7551 return nativeResponseValue;
7553 // void ChannelReestablish_free(struct LDKChannelReestablish this_ptr);
7554 export function ChannelReestablish_free(this_ptr: number): void {
7555 if(!isWasmInitialized) {
7556 throw new Error("initializeWasm() must be awaited first!");
7558 const nativeResponseValue = wasm.ChannelReestablish_free(this_ptr);
7559 // debug statements here
7561 // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
7562 export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
7563 if(!isWasmInitialized) {
7564 throw new Error("initializeWasm() must be awaited first!");
7566 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
7567 return decodeArray(nativeResponseValue);
7569 // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7570 export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
7571 if(!isWasmInitialized) {
7572 throw new Error("initializeWasm() must be awaited first!");
7574 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
7575 // debug statements here
7577 // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
7578 export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
7579 if(!isWasmInitialized) {
7580 throw new Error("initializeWasm() must be awaited first!");
7582 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
7583 return nativeResponseValue;
7585 // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
7586 export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
7587 if(!isWasmInitialized) {
7588 throw new Error("initializeWasm() must be awaited first!");
7590 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
7591 // debug statements here
7593 // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
7594 export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
7595 if(!isWasmInitialized) {
7596 throw new Error("initializeWasm() must be awaited first!");
7598 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
7599 return nativeResponseValue;
7601 // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
7602 export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
7603 if(!isWasmInitialized) {
7604 throw new Error("initializeWasm() must be awaited first!");
7606 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
7607 // debug statements here
7609 // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
7610 export function ChannelReestablish_clone(orig: number): number {
7611 if(!isWasmInitialized) {
7612 throw new Error("initializeWasm() must be awaited first!");
7614 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
7615 return nativeResponseValue;
7617 // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_ptr);
7618 export function AnnouncementSignatures_free(this_ptr: number): void {
7619 if(!isWasmInitialized) {
7620 throw new Error("initializeWasm() must be awaited first!");
7622 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_ptr);
7623 // debug statements here
7625 // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
7626 export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
7627 if(!isWasmInitialized) {
7628 throw new Error("initializeWasm() must be awaited first!");
7630 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
7631 return decodeArray(nativeResponseValue);
7633 // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7634 export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
7635 if(!isWasmInitialized) {
7636 throw new Error("initializeWasm() must be awaited first!");
7638 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
7639 // debug statements here
7641 // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
7642 export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
7643 if(!isWasmInitialized) {
7644 throw new Error("initializeWasm() must be awaited first!");
7646 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
7647 return nativeResponseValue;
7649 // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
7650 export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
7651 if(!isWasmInitialized) {
7652 throw new Error("initializeWasm() must be awaited first!");
7654 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
7655 // debug statements here
7657 // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
7658 export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
7659 if(!isWasmInitialized) {
7660 throw new Error("initializeWasm() must be awaited first!");
7662 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
7663 return decodeArray(nativeResponseValue);
7665 // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
7666 export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
7667 if(!isWasmInitialized) {
7668 throw new Error("initializeWasm() must be awaited first!");
7670 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
7671 // debug statements here
7673 // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
7674 export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
7675 if(!isWasmInitialized) {
7676 throw new Error("initializeWasm() must be awaited first!");
7678 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
7679 return decodeArray(nativeResponseValue);
7681 // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
7682 export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
7683 if(!isWasmInitialized) {
7684 throw new Error("initializeWasm() must be awaited first!");
7686 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
7687 // debug statements here
7689 // 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);
7690 export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
7691 if(!isWasmInitialized) {
7692 throw new Error("initializeWasm() must be awaited first!");
7694 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
7695 return nativeResponseValue;
7697 // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
7698 export function AnnouncementSignatures_clone(orig: number): number {
7699 if(!isWasmInitialized) {
7700 throw new Error("initializeWasm() must be awaited first!");
7702 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
7703 return nativeResponseValue;
7705 // void NetAddress_free(struct LDKNetAddress this_ptr);
7706 export function NetAddress_free(this_ptr: number): void {
7707 if(!isWasmInitialized) {
7708 throw new Error("initializeWasm() must be awaited first!");
7710 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
7711 // debug statements here
7713 // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
7714 export function NetAddress_clone(orig: number): number {
7715 if(!isWasmInitialized) {
7716 throw new Error("initializeWasm() must be awaited first!");
7718 const nativeResponseValue = wasm.NetAddress_clone(orig);
7719 return nativeResponseValue;
7721 // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
7722 export function NetAddress_write(obj: number): Uint8Array {
7723 if(!isWasmInitialized) {
7724 throw new Error("initializeWasm() must be awaited first!");
7726 const nativeResponseValue = wasm.NetAddress_write(obj);
7727 return decodeArray(nativeResponseValue);
7729 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
7730 export function Result_read(ser: Uint8Array): number {
7731 if(!isWasmInitialized) {
7732 throw new Error("initializeWasm() must be awaited first!");
7734 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
7735 return nativeResponseValue;
7737 // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_ptr);
7738 export function UnsignedNodeAnnouncement_free(this_ptr: number): void {
7739 if(!isWasmInitialized) {
7740 throw new Error("initializeWasm() must be awaited first!");
7742 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_ptr);
7743 // debug statements here
7745 // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
7746 export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
7747 if(!isWasmInitialized) {
7748 throw new Error("initializeWasm() must be awaited first!");
7750 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
7751 return nativeResponseValue;
7753 // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
7754 export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
7755 if(!isWasmInitialized) {
7756 throw new Error("initializeWasm() must be awaited first!");
7758 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
7759 // debug statements here
7761 // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
7762 export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
7763 if(!isWasmInitialized) {
7764 throw new Error("initializeWasm() must be awaited first!");
7766 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
7767 return nativeResponseValue;
7769 // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
7770 export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
7771 if(!isWasmInitialized) {
7772 throw new Error("initializeWasm() must be awaited first!");
7774 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
7775 // debug statements here
7777 // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
7778 export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
7779 if(!isWasmInitialized) {
7780 throw new Error("initializeWasm() must be awaited first!");
7782 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
7783 return decodeArray(nativeResponseValue);
7785 // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7786 export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
7787 if(!isWasmInitialized) {
7788 throw new Error("initializeWasm() must be awaited first!");
7790 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
7791 // debug statements here
7793 // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
7794 export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
7795 if(!isWasmInitialized) {
7796 throw new Error("initializeWasm() must be awaited first!");
7798 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
7799 return decodeArray(nativeResponseValue);
7801 // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
7802 export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
7803 if(!isWasmInitialized) {
7804 throw new Error("initializeWasm() must be awaited first!");
7806 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
7807 // debug statements here
7809 // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
7810 export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
7811 if(!isWasmInitialized) {
7812 throw new Error("initializeWasm() must be awaited first!");
7814 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
7815 return decodeArray(nativeResponseValue);
7817 // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7818 export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
7819 if(!isWasmInitialized) {
7820 throw new Error("initializeWasm() must be awaited first!");
7822 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
7823 // debug statements here
7825 // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
7826 export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
7827 if(!isWasmInitialized) {
7828 throw new Error("initializeWasm() must be awaited first!");
7830 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
7831 // debug statements here
7833 // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
7834 export function UnsignedNodeAnnouncement_clone(orig: number): number {
7835 if(!isWasmInitialized) {
7836 throw new Error("initializeWasm() must be awaited first!");
7838 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
7839 return nativeResponseValue;
7841 // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_ptr);
7842 export function NodeAnnouncement_free(this_ptr: number): void {
7843 if(!isWasmInitialized) {
7844 throw new Error("initializeWasm() must be awaited first!");
7846 const nativeResponseValue = wasm.NodeAnnouncement_free(this_ptr);
7847 // debug statements here
7849 // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
7850 export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
7851 if(!isWasmInitialized) {
7852 throw new Error("initializeWasm() must be awaited first!");
7854 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
7855 return decodeArray(nativeResponseValue);
7857 // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
7858 export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
7859 if(!isWasmInitialized) {
7860 throw new Error("initializeWasm() must be awaited first!");
7862 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
7863 // debug statements here
7865 // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
7866 export function NodeAnnouncement_get_contents(this_ptr: number): number {
7867 if(!isWasmInitialized) {
7868 throw new Error("initializeWasm() must be awaited first!");
7870 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
7871 return nativeResponseValue;
7873 // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
7874 export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
7875 if(!isWasmInitialized) {
7876 throw new Error("initializeWasm() must be awaited first!");
7878 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
7879 // debug statements here
7881 // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
7882 export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
7883 if(!isWasmInitialized) {
7884 throw new Error("initializeWasm() must be awaited first!");
7886 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
7887 return nativeResponseValue;
7889 // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
7890 export function NodeAnnouncement_clone(orig: number): number {
7891 if(!isWasmInitialized) {
7892 throw new Error("initializeWasm() must be awaited first!");
7894 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
7895 return nativeResponseValue;
7897 // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_ptr);
7898 export function UnsignedChannelAnnouncement_free(this_ptr: number): void {
7899 if(!isWasmInitialized) {
7900 throw new Error("initializeWasm() must be awaited first!");
7902 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_ptr);
7903 // debug statements here
7905 // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
7906 export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
7907 if(!isWasmInitialized) {
7908 throw new Error("initializeWasm() must be awaited first!");
7910 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
7911 return nativeResponseValue;
7913 // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
7914 export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
7915 if(!isWasmInitialized) {
7916 throw new Error("initializeWasm() must be awaited first!");
7918 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
7919 // debug statements here
7921 // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
7922 export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
7923 if(!isWasmInitialized) {
7924 throw new Error("initializeWasm() must be awaited first!");
7926 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
7927 return decodeArray(nativeResponseValue);
7929 // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7930 export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
7931 if(!isWasmInitialized) {
7932 throw new Error("initializeWasm() must be awaited first!");
7934 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
7935 // debug statements here
7937 // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
7938 export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
7939 if(!isWasmInitialized) {
7940 throw new Error("initializeWasm() must be awaited first!");
7942 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
7943 return nativeResponseValue;
7945 // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
7946 export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
7947 if(!isWasmInitialized) {
7948 throw new Error("initializeWasm() must be awaited first!");
7950 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
7951 // debug statements here
7953 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
7954 export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
7955 if(!isWasmInitialized) {
7956 throw new Error("initializeWasm() must be awaited first!");
7958 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
7959 return decodeArray(nativeResponseValue);
7961 // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7962 export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
7963 if(!isWasmInitialized) {
7964 throw new Error("initializeWasm() must be awaited first!");
7966 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
7967 // debug statements here
7969 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
7970 export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
7971 if(!isWasmInitialized) {
7972 throw new Error("initializeWasm() must be awaited first!");
7974 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
7975 return decodeArray(nativeResponseValue);
7977 // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7978 export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
7979 if(!isWasmInitialized) {
7980 throw new Error("initializeWasm() must be awaited first!");
7982 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
7983 // debug statements here
7985 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
7986 export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
7987 if(!isWasmInitialized) {
7988 throw new Error("initializeWasm() must be awaited first!");
7990 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
7991 return decodeArray(nativeResponseValue);
7993 // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7994 export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
7995 if(!isWasmInitialized) {
7996 throw new Error("initializeWasm() must be awaited first!");
7998 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
7999 // debug statements here
8001 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8002 export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
8003 if(!isWasmInitialized) {
8004 throw new Error("initializeWasm() must be awaited first!");
8006 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
8007 return decodeArray(nativeResponseValue);
8009 // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8010 export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
8011 if(!isWasmInitialized) {
8012 throw new Error("initializeWasm() must be awaited first!");
8014 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
8015 // debug statements here
8017 // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
8018 export function UnsignedChannelAnnouncement_clone(orig: number): number {
8019 if(!isWasmInitialized) {
8020 throw new Error("initializeWasm() must be awaited first!");
8022 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
8023 return nativeResponseValue;
8025 // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_ptr);
8026 export function ChannelAnnouncement_free(this_ptr: number): void {
8027 if(!isWasmInitialized) {
8028 throw new Error("initializeWasm() must be awaited first!");
8030 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_ptr);
8031 // debug statements here
8033 // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8034 export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
8035 if(!isWasmInitialized) {
8036 throw new Error("initializeWasm() must be awaited first!");
8038 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
8039 return decodeArray(nativeResponseValue);
8041 // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8042 export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
8043 if(!isWasmInitialized) {
8044 throw new Error("initializeWasm() must be awaited first!");
8046 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
8047 // debug statements here
8049 // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8050 export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
8051 if(!isWasmInitialized) {
8052 throw new Error("initializeWasm() must be awaited first!");
8054 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
8055 return decodeArray(nativeResponseValue);
8057 // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8058 export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
8059 if(!isWasmInitialized) {
8060 throw new Error("initializeWasm() must be awaited first!");
8062 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
8063 // debug statements here
8065 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8066 export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
8067 if(!isWasmInitialized) {
8068 throw new Error("initializeWasm() must be awaited first!");
8070 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
8071 return decodeArray(nativeResponseValue);
8073 // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8074 export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
8075 if(!isWasmInitialized) {
8076 throw new Error("initializeWasm() must be awaited first!");
8078 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
8079 // debug statements here
8081 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8082 export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
8083 if(!isWasmInitialized) {
8084 throw new Error("initializeWasm() must be awaited first!");
8086 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
8087 return decodeArray(nativeResponseValue);
8089 // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8090 export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
8091 if(!isWasmInitialized) {
8092 throw new Error("initializeWasm() must be awaited first!");
8094 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
8095 // debug statements here
8097 // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8098 export function ChannelAnnouncement_get_contents(this_ptr: number): number {
8099 if(!isWasmInitialized) {
8100 throw new Error("initializeWasm() must be awaited first!");
8102 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
8103 return nativeResponseValue;
8105 // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
8106 export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
8107 if(!isWasmInitialized) {
8108 throw new Error("initializeWasm() must be awaited first!");
8110 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
8111 // debug statements here
8113 // 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);
8114 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 {
8115 if(!isWasmInitialized) {
8116 throw new Error("initializeWasm() must be awaited first!");
8118 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);
8119 return nativeResponseValue;
8121 // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
8122 export function ChannelAnnouncement_clone(orig: number): number {
8123 if(!isWasmInitialized) {
8124 throw new Error("initializeWasm() must be awaited first!");
8126 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
8127 return nativeResponseValue;
8129 // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_ptr);
8130 export function UnsignedChannelUpdate_free(this_ptr: number): void {
8131 if(!isWasmInitialized) {
8132 throw new Error("initializeWasm() must be awaited first!");
8134 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_ptr);
8135 // debug statements here
8137 // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
8138 export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
8139 if(!isWasmInitialized) {
8140 throw new Error("initializeWasm() must be awaited first!");
8142 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
8143 return decodeArray(nativeResponseValue);
8145 // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8146 export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8147 if(!isWasmInitialized) {
8148 throw new Error("initializeWasm() must be awaited first!");
8150 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
8151 // debug statements here
8153 // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8154 export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
8155 if(!isWasmInitialized) {
8156 throw new Error("initializeWasm() must be awaited first!");
8158 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
8159 return nativeResponseValue;
8161 // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
8162 export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
8163 if(!isWasmInitialized) {
8164 throw new Error("initializeWasm() must be awaited first!");
8166 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
8167 // debug statements here
8169 // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8170 export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
8171 if(!isWasmInitialized) {
8172 throw new Error("initializeWasm() must be awaited first!");
8174 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
8175 return nativeResponseValue;
8177 // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8178 export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
8179 if(!isWasmInitialized) {
8180 throw new Error("initializeWasm() must be awaited first!");
8182 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
8183 // debug statements here
8185 // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8186 export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
8187 if(!isWasmInitialized) {
8188 throw new Error("initializeWasm() must be awaited first!");
8190 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
8191 return nativeResponseValue;
8193 // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
8194 export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
8195 if(!isWasmInitialized) {
8196 throw new Error("initializeWasm() must be awaited first!");
8198 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
8199 // debug statements here
8201 // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8202 export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
8203 if(!isWasmInitialized) {
8204 throw new Error("initializeWasm() must be awaited first!");
8206 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
8207 return nativeResponseValue;
8209 // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
8210 export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
8211 if(!isWasmInitialized) {
8212 throw new Error("initializeWasm() must be awaited first!");
8214 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
8215 // debug statements here
8217 // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8218 export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
8219 if(!isWasmInitialized) {
8220 throw new Error("initializeWasm() must be awaited first!");
8222 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
8223 return nativeResponseValue;
8225 // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
8226 export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
8227 if(!isWasmInitialized) {
8228 throw new Error("initializeWasm() must be awaited first!");
8230 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
8231 // debug statements here
8233 // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8234 export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
8235 if(!isWasmInitialized) {
8236 throw new Error("initializeWasm() must be awaited first!");
8238 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
8239 return nativeResponseValue;
8241 // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8242 export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
8243 if(!isWasmInitialized) {
8244 throw new Error("initializeWasm() must be awaited first!");
8246 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
8247 // debug statements here
8249 // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8250 export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
8251 if(!isWasmInitialized) {
8252 throw new Error("initializeWasm() must be awaited first!");
8254 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
8255 return nativeResponseValue;
8257 // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
8258 export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
8259 if(!isWasmInitialized) {
8260 throw new Error("initializeWasm() must be awaited first!");
8262 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
8263 // debug statements here
8265 // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
8266 export function UnsignedChannelUpdate_clone(orig: number): number {
8267 if(!isWasmInitialized) {
8268 throw new Error("initializeWasm() must be awaited first!");
8270 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
8271 return nativeResponseValue;
8273 // void ChannelUpdate_free(struct LDKChannelUpdate this_ptr);
8274 export function ChannelUpdate_free(this_ptr: number): void {
8275 if(!isWasmInitialized) {
8276 throw new Error("initializeWasm() must be awaited first!");
8278 const nativeResponseValue = wasm.ChannelUpdate_free(this_ptr);
8279 // debug statements here
8281 // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
8282 export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
8283 if(!isWasmInitialized) {
8284 throw new Error("initializeWasm() must be awaited first!");
8286 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
8287 return decodeArray(nativeResponseValue);
8289 // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
8290 export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
8291 if(!isWasmInitialized) {
8292 throw new Error("initializeWasm() must be awaited first!");
8294 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
8295 // debug statements here
8297 // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
8298 export function ChannelUpdate_get_contents(this_ptr: number): number {
8299 if(!isWasmInitialized) {
8300 throw new Error("initializeWasm() must be awaited first!");
8302 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
8303 return nativeResponseValue;
8305 // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
8306 export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
8307 if(!isWasmInitialized) {
8308 throw new Error("initializeWasm() must be awaited first!");
8310 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
8311 // debug statements here
8313 // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
8314 export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
8315 if(!isWasmInitialized) {
8316 throw new Error("initializeWasm() must be awaited first!");
8318 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
8319 return nativeResponseValue;
8321 // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
8322 export function ChannelUpdate_clone(orig: number): number {
8323 if(!isWasmInitialized) {
8324 throw new Error("initializeWasm() must be awaited first!");
8326 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
8327 return nativeResponseValue;
8329 // void QueryChannelRange_free(struct LDKQueryChannelRange this_ptr);
8330 export function QueryChannelRange_free(this_ptr: number): void {
8331 if(!isWasmInitialized) {
8332 throw new Error("initializeWasm() must be awaited first!");
8334 const nativeResponseValue = wasm.QueryChannelRange_free(this_ptr);
8335 // debug statements here
8337 // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
8338 export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
8339 if(!isWasmInitialized) {
8340 throw new Error("initializeWasm() must be awaited first!");
8342 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
8343 return decodeArray(nativeResponseValue);
8345 // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8346 export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8347 if(!isWasmInitialized) {
8348 throw new Error("initializeWasm() must be awaited first!");
8350 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
8351 // debug statements here
8353 // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
8354 export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
8355 if(!isWasmInitialized) {
8356 throw new Error("initializeWasm() must be awaited first!");
8358 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
8359 return nativeResponseValue;
8361 // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8362 export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
8363 if(!isWasmInitialized) {
8364 throw new Error("initializeWasm() must be awaited first!");
8366 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
8367 // debug statements here
8369 // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
8370 export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
8371 if(!isWasmInitialized) {
8372 throw new Error("initializeWasm() must be awaited first!");
8374 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
8375 return nativeResponseValue;
8377 // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8378 export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
8379 if(!isWasmInitialized) {
8380 throw new Error("initializeWasm() must be awaited first!");
8382 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
8383 // debug statements here
8385 // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
8386 export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
8387 if(!isWasmInitialized) {
8388 throw new Error("initializeWasm() must be awaited first!");
8390 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
8391 return nativeResponseValue;
8393 // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
8394 export function QueryChannelRange_clone(orig: number): number {
8395 if(!isWasmInitialized) {
8396 throw new Error("initializeWasm() must be awaited first!");
8398 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
8399 return nativeResponseValue;
8401 // void ReplyChannelRange_free(struct LDKReplyChannelRange this_ptr);
8402 export function ReplyChannelRange_free(this_ptr: number): void {
8403 if(!isWasmInitialized) {
8404 throw new Error("initializeWasm() must be awaited first!");
8406 const nativeResponseValue = wasm.ReplyChannelRange_free(this_ptr);
8407 // debug statements here
8409 // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
8410 export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
8411 if(!isWasmInitialized) {
8412 throw new Error("initializeWasm() must be awaited first!");
8414 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
8415 return decodeArray(nativeResponseValue);
8417 // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8418 export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8419 if(!isWasmInitialized) {
8420 throw new Error("initializeWasm() must be awaited first!");
8422 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
8423 // debug statements here
8425 // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
8426 export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
8427 if(!isWasmInitialized) {
8428 throw new Error("initializeWasm() must be awaited first!");
8430 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
8431 return nativeResponseValue;
8433 // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8434 export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
8435 if(!isWasmInitialized) {
8436 throw new Error("initializeWasm() must be awaited first!");
8438 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
8439 // debug statements here
8441 // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
8442 export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
8443 if(!isWasmInitialized) {
8444 throw new Error("initializeWasm() must be awaited first!");
8446 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
8447 return nativeResponseValue;
8449 // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
8450 export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
8451 if(!isWasmInitialized) {
8452 throw new Error("initializeWasm() must be awaited first!");
8454 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
8455 // debug statements here
8457 // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
8458 export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
8459 if(!isWasmInitialized) {
8460 throw new Error("initializeWasm() must be awaited first!");
8462 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
8463 return nativeResponseValue;
8465 // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
8466 export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
8467 if(!isWasmInitialized) {
8468 throw new Error("initializeWasm() must be awaited first!");
8470 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
8471 // debug statements here
8473 // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
8474 export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
8475 if(!isWasmInitialized) {
8476 throw new Error("initializeWasm() must be awaited first!");
8478 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
8479 // debug statements here
8481 // 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);
8482 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 {
8483 if(!isWasmInitialized) {
8484 throw new Error("initializeWasm() must be awaited first!");
8486 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
8487 return nativeResponseValue;
8489 // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
8490 export function ReplyChannelRange_clone(orig: number): number {
8491 if(!isWasmInitialized) {
8492 throw new Error("initializeWasm() must be awaited first!");
8494 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
8495 return nativeResponseValue;
8497 // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_ptr);
8498 export function QueryShortChannelIds_free(this_ptr: number): void {
8499 if(!isWasmInitialized) {
8500 throw new Error("initializeWasm() must be awaited first!");
8502 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_ptr);
8503 // debug statements here
8505 // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
8506 export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
8507 if(!isWasmInitialized) {
8508 throw new Error("initializeWasm() must be awaited first!");
8510 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
8511 return decodeArray(nativeResponseValue);
8513 // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8514 export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8515 if(!isWasmInitialized) {
8516 throw new Error("initializeWasm() must be awaited first!");
8518 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
8519 // debug statements here
8521 // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
8522 export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
8523 if(!isWasmInitialized) {
8524 throw new Error("initializeWasm() must be awaited first!");
8526 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
8527 // debug statements here
8529 // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
8530 export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
8531 if(!isWasmInitialized) {
8532 throw new Error("initializeWasm() must be awaited first!");
8534 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
8535 return nativeResponseValue;
8537 // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
8538 export function QueryShortChannelIds_clone(orig: number): number {
8539 if(!isWasmInitialized) {
8540 throw new Error("initializeWasm() must be awaited first!");
8542 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
8543 return nativeResponseValue;
8545 // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_ptr);
8546 export function ReplyShortChannelIdsEnd_free(this_ptr: number): void {
8547 if(!isWasmInitialized) {
8548 throw new Error("initializeWasm() must be awaited first!");
8550 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_ptr);
8551 // debug statements here
8553 // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
8554 export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
8555 if(!isWasmInitialized) {
8556 throw new Error("initializeWasm() must be awaited first!");
8558 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
8559 return decodeArray(nativeResponseValue);
8561 // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8562 export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8563 if(!isWasmInitialized) {
8564 throw new Error("initializeWasm() must be awaited first!");
8566 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
8567 // debug statements here
8569 // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
8570 export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
8571 if(!isWasmInitialized) {
8572 throw new Error("initializeWasm() must be awaited first!");
8574 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
8575 return nativeResponseValue;
8577 // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
8578 export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
8579 if(!isWasmInitialized) {
8580 throw new Error("initializeWasm() must be awaited first!");
8582 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
8583 // debug statements here
8585 // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
8586 export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
8587 if(!isWasmInitialized) {
8588 throw new Error("initializeWasm() must be awaited first!");
8590 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
8591 return nativeResponseValue;
8593 // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
8594 export function ReplyShortChannelIdsEnd_clone(orig: number): number {
8595 if(!isWasmInitialized) {
8596 throw new Error("initializeWasm() must be awaited first!");
8598 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
8599 return nativeResponseValue;
8601 // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_ptr);
8602 export function GossipTimestampFilter_free(this_ptr: number): void {
8603 if(!isWasmInitialized) {
8604 throw new Error("initializeWasm() must be awaited first!");
8606 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_ptr);
8607 // debug statements here
8609 // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
8610 export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
8611 if(!isWasmInitialized) {
8612 throw new Error("initializeWasm() must be awaited first!");
8614 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
8615 return decodeArray(nativeResponseValue);
8617 // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8618 export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8619 if(!isWasmInitialized) {
8620 throw new Error("initializeWasm() must be awaited first!");
8622 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
8623 // debug statements here
8625 // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
8626 export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
8627 if(!isWasmInitialized) {
8628 throw new Error("initializeWasm() must be awaited first!");
8630 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
8631 return nativeResponseValue;
8633 // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
8634 export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
8635 if(!isWasmInitialized) {
8636 throw new Error("initializeWasm() must be awaited first!");
8638 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
8639 // debug statements here
8641 // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
8642 export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
8643 if(!isWasmInitialized) {
8644 throw new Error("initializeWasm() must be awaited first!");
8646 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
8647 return nativeResponseValue;
8649 // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
8650 export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
8651 if(!isWasmInitialized) {
8652 throw new Error("initializeWasm() must be awaited first!");
8654 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
8655 // debug statements here
8657 // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
8658 export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
8659 if(!isWasmInitialized) {
8660 throw new Error("initializeWasm() must be awaited first!");
8662 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
8663 return nativeResponseValue;
8665 // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
8666 export function GossipTimestampFilter_clone(orig: number): number {
8667 if(!isWasmInitialized) {
8668 throw new Error("initializeWasm() must be awaited first!");
8670 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
8671 return nativeResponseValue;
8673 // void ErrorAction_free(struct LDKErrorAction this_ptr);
8674 export function ErrorAction_free(this_ptr: number): void {
8675 if(!isWasmInitialized) {
8676 throw new Error("initializeWasm() must be awaited first!");
8678 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
8679 // debug statements here
8681 // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
8682 export function ErrorAction_clone(orig: number): number {
8683 if(!isWasmInitialized) {
8684 throw new Error("initializeWasm() must be awaited first!");
8686 const nativeResponseValue = wasm.ErrorAction_clone(orig);
8687 return nativeResponseValue;
8689 // void LightningError_free(struct LDKLightningError this_ptr);
8690 export function LightningError_free(this_ptr: number): void {
8691 if(!isWasmInitialized) {
8692 throw new Error("initializeWasm() must be awaited first!");
8694 const nativeResponseValue = wasm.LightningError_free(this_ptr);
8695 // debug statements here
8697 // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
8698 export function LightningError_get_err(this_ptr: number): String {
8699 if(!isWasmInitialized) {
8700 throw new Error("initializeWasm() must be awaited first!");
8702 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
8703 return nativeResponseValue;
8705 // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
8706 export function LightningError_set_err(this_ptr: number, val: Uint8Array): void {
8707 if(!isWasmInitialized) {
8708 throw new Error("initializeWasm() must be awaited first!");
8710 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, encodeArray(val));
8711 // debug statements here
8713 // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
8714 export function LightningError_get_action(this_ptr: number): number {
8715 if(!isWasmInitialized) {
8716 throw new Error("initializeWasm() must be awaited first!");
8718 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
8719 return nativeResponseValue;
8721 // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
8722 export function LightningError_set_action(this_ptr: number, val: number): void {
8723 if(!isWasmInitialized) {
8724 throw new Error("initializeWasm() must be awaited first!");
8726 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
8727 // debug statements here
8729 // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
8730 export function LightningError_new(err_arg: Uint8Array, action_arg: number): number {
8731 if(!isWasmInitialized) {
8732 throw new Error("initializeWasm() must be awaited first!");
8734 const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
8735 return nativeResponseValue;
8737 // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
8738 export function LightningError_clone(orig: number): number {
8739 if(!isWasmInitialized) {
8740 throw new Error("initializeWasm() must be awaited first!");
8742 const nativeResponseValue = wasm.LightningError_clone(orig);
8743 return nativeResponseValue;
8745 // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_ptr);
8746 export function CommitmentUpdate_free(this_ptr: number): void {
8747 if(!isWasmInitialized) {
8748 throw new Error("initializeWasm() must be awaited first!");
8750 const nativeResponseValue = wasm.CommitmentUpdate_free(this_ptr);
8751 // debug statements here
8753 // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
8754 export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
8755 if(!isWasmInitialized) {
8756 throw new Error("initializeWasm() must be awaited first!");
8758 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
8759 // debug statements here
8761 // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
8762 export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
8763 if(!isWasmInitialized) {
8764 throw new Error("initializeWasm() must be awaited first!");
8766 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
8767 // debug statements here
8769 // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
8770 export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
8771 if(!isWasmInitialized) {
8772 throw new Error("initializeWasm() must be awaited first!");
8774 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
8775 // debug statements here
8777 // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
8778 export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
8779 if(!isWasmInitialized) {
8780 throw new Error("initializeWasm() must be awaited first!");
8782 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
8783 // debug statements here
8785 // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
8786 export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
8787 if(!isWasmInitialized) {
8788 throw new Error("initializeWasm() must be awaited first!");
8790 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
8791 return nativeResponseValue;
8793 // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
8794 export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
8795 if(!isWasmInitialized) {
8796 throw new Error("initializeWasm() must be awaited first!");
8798 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
8799 // debug statements here
8801 // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
8802 export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
8803 if(!isWasmInitialized) {
8804 throw new Error("initializeWasm() must be awaited first!");
8806 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
8807 return nativeResponseValue;
8809 // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
8810 export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
8811 if(!isWasmInitialized) {
8812 throw new Error("initializeWasm() must be awaited first!");
8814 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
8815 // debug statements here
8817 // 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);
8818 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 {
8819 if(!isWasmInitialized) {
8820 throw new Error("initializeWasm() must be awaited first!");
8822 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);
8823 return nativeResponseValue;
8825 // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
8826 export function CommitmentUpdate_clone(orig: number): number {
8827 if(!isWasmInitialized) {
8828 throw new Error("initializeWasm() must be awaited first!");
8830 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
8831 return nativeResponseValue;
8833 // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
8834 export function HTLCFailChannelUpdate_free(this_ptr: number): void {
8835 if(!isWasmInitialized) {
8836 throw new Error("initializeWasm() must be awaited first!");
8838 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
8839 // debug statements here
8841 // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
8842 export function HTLCFailChannelUpdate_clone(orig: number): number {
8843 if(!isWasmInitialized) {
8844 throw new Error("initializeWasm() must be awaited first!");
8846 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
8847 return nativeResponseValue;
8849 // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
8850 export function ChannelMessageHandler_free(this_ptr: number): void {
8851 if(!isWasmInitialized) {
8852 throw new Error("initializeWasm() must be awaited first!");
8854 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
8855 // debug statements here
8857 // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
8858 export function RoutingMessageHandler_free(this_ptr: number): void {
8859 if(!isWasmInitialized) {
8860 throw new Error("initializeWasm() must be awaited first!");
8862 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
8863 // debug statements here
8865 // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
8866 export function AcceptChannel_write(obj: number): Uint8Array {
8867 if(!isWasmInitialized) {
8868 throw new Error("initializeWasm() must be awaited first!");
8870 const nativeResponseValue = wasm.AcceptChannel_write(obj);
8871 return decodeArray(nativeResponseValue);
8873 // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
8874 export function AcceptChannel_read(ser: Uint8Array): number {
8875 if(!isWasmInitialized) {
8876 throw new Error("initializeWasm() must be awaited first!");
8878 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
8879 return nativeResponseValue;
8881 // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
8882 export function AnnouncementSignatures_write(obj: number): Uint8Array {
8883 if(!isWasmInitialized) {
8884 throw new Error("initializeWasm() must be awaited first!");
8886 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
8887 return decodeArray(nativeResponseValue);
8889 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
8890 export function AnnouncementSignatures_read(ser: Uint8Array): number {
8891 if(!isWasmInitialized) {
8892 throw new Error("initializeWasm() must be awaited first!");
8894 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
8895 return nativeResponseValue;
8897 // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
8898 export function ChannelReestablish_write(obj: number): Uint8Array {
8899 if(!isWasmInitialized) {
8900 throw new Error("initializeWasm() must be awaited first!");
8902 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
8903 return decodeArray(nativeResponseValue);
8905 // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
8906 export function ChannelReestablish_read(ser: Uint8Array): number {
8907 if(!isWasmInitialized) {
8908 throw new Error("initializeWasm() must be awaited first!");
8910 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
8911 return nativeResponseValue;
8913 // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
8914 export function ClosingSigned_write(obj: number): Uint8Array {
8915 if(!isWasmInitialized) {
8916 throw new Error("initializeWasm() must be awaited first!");
8918 const nativeResponseValue = wasm.ClosingSigned_write(obj);
8919 return decodeArray(nativeResponseValue);
8921 // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
8922 export function ClosingSigned_read(ser: Uint8Array): number {
8923 if(!isWasmInitialized) {
8924 throw new Error("initializeWasm() must be awaited first!");
8926 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
8927 return nativeResponseValue;
8929 // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
8930 export function CommitmentSigned_write(obj: number): Uint8Array {
8931 if(!isWasmInitialized) {
8932 throw new Error("initializeWasm() must be awaited first!");
8934 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
8935 return decodeArray(nativeResponseValue);
8937 // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
8938 export function CommitmentSigned_read(ser: Uint8Array): number {
8939 if(!isWasmInitialized) {
8940 throw new Error("initializeWasm() must be awaited first!");
8942 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
8943 return nativeResponseValue;
8945 // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
8946 export function FundingCreated_write(obj: number): Uint8Array {
8947 if(!isWasmInitialized) {
8948 throw new Error("initializeWasm() must be awaited first!");
8950 const nativeResponseValue = wasm.FundingCreated_write(obj);
8951 return decodeArray(nativeResponseValue);
8953 // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
8954 export function FundingCreated_read(ser: Uint8Array): number {
8955 if(!isWasmInitialized) {
8956 throw new Error("initializeWasm() must be awaited first!");
8958 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
8959 return nativeResponseValue;
8961 // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
8962 export function FundingSigned_write(obj: number): Uint8Array {
8963 if(!isWasmInitialized) {
8964 throw new Error("initializeWasm() must be awaited first!");
8966 const nativeResponseValue = wasm.FundingSigned_write(obj);
8967 return decodeArray(nativeResponseValue);
8969 // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
8970 export function FundingSigned_read(ser: Uint8Array): number {
8971 if(!isWasmInitialized) {
8972 throw new Error("initializeWasm() must be awaited first!");
8974 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
8975 return nativeResponseValue;
8977 // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
8978 export function FundingLocked_write(obj: number): Uint8Array {
8979 if(!isWasmInitialized) {
8980 throw new Error("initializeWasm() must be awaited first!");
8982 const nativeResponseValue = wasm.FundingLocked_write(obj);
8983 return decodeArray(nativeResponseValue);
8985 // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
8986 export function FundingLocked_read(ser: Uint8Array): number {
8987 if(!isWasmInitialized) {
8988 throw new Error("initializeWasm() must be awaited first!");
8990 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
8991 return nativeResponseValue;
8993 // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
8994 export function Init_write(obj: number): Uint8Array {
8995 if(!isWasmInitialized) {
8996 throw new Error("initializeWasm() must be awaited first!");
8998 const nativeResponseValue = wasm.Init_write(obj);
8999 return decodeArray(nativeResponseValue);
9001 // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
9002 export function Init_read(ser: Uint8Array): number {
9003 if(!isWasmInitialized) {
9004 throw new Error("initializeWasm() must be awaited first!");
9006 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
9007 return nativeResponseValue;
9009 // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
9010 export function OpenChannel_write(obj: number): Uint8Array {
9011 if(!isWasmInitialized) {
9012 throw new Error("initializeWasm() must be awaited first!");
9014 const nativeResponseValue = wasm.OpenChannel_write(obj);
9015 return decodeArray(nativeResponseValue);
9017 // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
9018 export function OpenChannel_read(ser: Uint8Array): number {
9019 if(!isWasmInitialized) {
9020 throw new Error("initializeWasm() must be awaited first!");
9022 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
9023 return nativeResponseValue;
9025 // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
9026 export function RevokeAndACK_write(obj: number): Uint8Array {
9027 if(!isWasmInitialized) {
9028 throw new Error("initializeWasm() must be awaited first!");
9030 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
9031 return decodeArray(nativeResponseValue);
9033 // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
9034 export function RevokeAndACK_read(ser: Uint8Array): number {
9035 if(!isWasmInitialized) {
9036 throw new Error("initializeWasm() must be awaited first!");
9038 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
9039 return nativeResponseValue;
9041 // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
9042 export function Shutdown_write(obj: number): Uint8Array {
9043 if(!isWasmInitialized) {
9044 throw new Error("initializeWasm() must be awaited first!");
9046 const nativeResponseValue = wasm.Shutdown_write(obj);
9047 return decodeArray(nativeResponseValue);
9049 // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
9050 export function Shutdown_read(ser: Uint8Array): number {
9051 if(!isWasmInitialized) {
9052 throw new Error("initializeWasm() must be awaited first!");
9054 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
9055 return nativeResponseValue;
9057 // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
9058 export function UpdateFailHTLC_write(obj: number): Uint8Array {
9059 if(!isWasmInitialized) {
9060 throw new Error("initializeWasm() must be awaited first!");
9062 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
9063 return decodeArray(nativeResponseValue);
9065 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
9066 export function UpdateFailHTLC_read(ser: Uint8Array): number {
9067 if(!isWasmInitialized) {
9068 throw new Error("initializeWasm() must be awaited first!");
9070 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
9071 return nativeResponseValue;
9073 // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
9074 export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
9075 if(!isWasmInitialized) {
9076 throw new Error("initializeWasm() must be awaited first!");
9078 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
9079 return decodeArray(nativeResponseValue);
9081 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
9082 export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
9083 if(!isWasmInitialized) {
9084 throw new Error("initializeWasm() must be awaited first!");
9086 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
9087 return nativeResponseValue;
9089 // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
9090 export function UpdateFee_write(obj: number): Uint8Array {
9091 if(!isWasmInitialized) {
9092 throw new Error("initializeWasm() must be awaited first!");
9094 const nativeResponseValue = wasm.UpdateFee_write(obj);
9095 return decodeArray(nativeResponseValue);
9097 // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
9098 export function UpdateFee_read(ser: Uint8Array): number {
9099 if(!isWasmInitialized) {
9100 throw new Error("initializeWasm() must be awaited first!");
9102 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
9103 return nativeResponseValue;
9105 // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
9106 export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
9107 if(!isWasmInitialized) {
9108 throw new Error("initializeWasm() must be awaited first!");
9110 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
9111 return decodeArray(nativeResponseValue);
9113 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
9114 export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
9115 if(!isWasmInitialized) {
9116 throw new Error("initializeWasm() must be awaited first!");
9118 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
9119 return nativeResponseValue;
9121 // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
9122 export function UpdateAddHTLC_write(obj: number): Uint8Array {
9123 if(!isWasmInitialized) {
9124 throw new Error("initializeWasm() must be awaited first!");
9126 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
9127 return decodeArray(nativeResponseValue);
9129 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
9130 export function UpdateAddHTLC_read(ser: Uint8Array): number {
9131 if(!isWasmInitialized) {
9132 throw new Error("initializeWasm() must be awaited first!");
9134 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
9135 return nativeResponseValue;
9137 // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
9138 export function Ping_write(obj: number): Uint8Array {
9139 if(!isWasmInitialized) {
9140 throw new Error("initializeWasm() must be awaited first!");
9142 const nativeResponseValue = wasm.Ping_write(obj);
9143 return decodeArray(nativeResponseValue);
9145 // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
9146 export function Ping_read(ser: Uint8Array): number {
9147 if(!isWasmInitialized) {
9148 throw new Error("initializeWasm() must be awaited first!");
9150 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
9151 return nativeResponseValue;
9153 // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
9154 export function Pong_write(obj: number): Uint8Array {
9155 if(!isWasmInitialized) {
9156 throw new Error("initializeWasm() must be awaited first!");
9158 const nativeResponseValue = wasm.Pong_write(obj);
9159 return decodeArray(nativeResponseValue);
9161 // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
9162 export function Pong_read(ser: Uint8Array): number {
9163 if(!isWasmInitialized) {
9164 throw new Error("initializeWasm() must be awaited first!");
9166 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
9167 return nativeResponseValue;
9169 // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
9170 export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
9171 if(!isWasmInitialized) {
9172 throw new Error("initializeWasm() must be awaited first!");
9174 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
9175 return decodeArray(nativeResponseValue);
9177 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
9178 export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
9179 if(!isWasmInitialized) {
9180 throw new Error("initializeWasm() must be awaited first!");
9182 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
9183 return nativeResponseValue;
9185 // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
9186 export function ChannelAnnouncement_write(obj: number): Uint8Array {
9187 if(!isWasmInitialized) {
9188 throw new Error("initializeWasm() must be awaited first!");
9190 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
9191 return decodeArray(nativeResponseValue);
9193 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
9194 export function ChannelAnnouncement_read(ser: Uint8Array): number {
9195 if(!isWasmInitialized) {
9196 throw new Error("initializeWasm() must be awaited first!");
9198 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
9199 return nativeResponseValue;
9201 // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
9202 export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
9203 if(!isWasmInitialized) {
9204 throw new Error("initializeWasm() must be awaited first!");
9206 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
9207 return decodeArray(nativeResponseValue);
9209 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
9210 export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
9211 if(!isWasmInitialized) {
9212 throw new Error("initializeWasm() must be awaited first!");
9214 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
9215 return nativeResponseValue;
9217 // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
9218 export function ChannelUpdate_write(obj: number): Uint8Array {
9219 if(!isWasmInitialized) {
9220 throw new Error("initializeWasm() must be awaited first!");
9222 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
9223 return decodeArray(nativeResponseValue);
9225 // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
9226 export function ChannelUpdate_read(ser: Uint8Array): number {
9227 if(!isWasmInitialized) {
9228 throw new Error("initializeWasm() must be awaited first!");
9230 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
9231 return nativeResponseValue;
9233 // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
9234 export function ErrorMessage_write(obj: number): Uint8Array {
9235 if(!isWasmInitialized) {
9236 throw new Error("initializeWasm() must be awaited first!");
9238 const nativeResponseValue = wasm.ErrorMessage_write(obj);
9239 return decodeArray(nativeResponseValue);
9241 // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
9242 export function ErrorMessage_read(ser: Uint8Array): number {
9243 if(!isWasmInitialized) {
9244 throw new Error("initializeWasm() must be awaited first!");
9246 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
9247 return nativeResponseValue;
9249 // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
9250 export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
9251 if(!isWasmInitialized) {
9252 throw new Error("initializeWasm() must be awaited first!");
9254 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
9255 return decodeArray(nativeResponseValue);
9257 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
9258 export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
9259 if(!isWasmInitialized) {
9260 throw new Error("initializeWasm() must be awaited first!");
9262 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
9263 return nativeResponseValue;
9265 // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
9266 export function NodeAnnouncement_write(obj: number): Uint8Array {
9267 if(!isWasmInitialized) {
9268 throw new Error("initializeWasm() must be awaited first!");
9270 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
9271 return decodeArray(nativeResponseValue);
9273 // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
9274 export function NodeAnnouncement_read(ser: Uint8Array): number {
9275 if(!isWasmInitialized) {
9276 throw new Error("initializeWasm() must be awaited first!");
9278 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
9279 return nativeResponseValue;
9281 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
9282 export function QueryShortChannelIds_read(ser: Uint8Array): number {
9283 if(!isWasmInitialized) {
9284 throw new Error("initializeWasm() must be awaited first!");
9286 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
9287 return nativeResponseValue;
9289 // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
9290 export function QueryShortChannelIds_write(obj: number): Uint8Array {
9291 if(!isWasmInitialized) {
9292 throw new Error("initializeWasm() must be awaited first!");
9294 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
9295 return decodeArray(nativeResponseValue);
9297 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
9298 export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
9299 if(!isWasmInitialized) {
9300 throw new Error("initializeWasm() must be awaited first!");
9302 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
9303 return nativeResponseValue;
9305 // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
9306 export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
9307 if(!isWasmInitialized) {
9308 throw new Error("initializeWasm() must be awaited first!");
9310 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
9311 return decodeArray(nativeResponseValue);
9313 // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
9314 export function QueryChannelRange_read(ser: Uint8Array): number {
9315 if(!isWasmInitialized) {
9316 throw new Error("initializeWasm() must be awaited first!");
9318 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
9319 return nativeResponseValue;
9321 // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
9322 export function QueryChannelRange_write(obj: number): Uint8Array {
9323 if(!isWasmInitialized) {
9324 throw new Error("initializeWasm() must be awaited first!");
9326 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
9327 return decodeArray(nativeResponseValue);
9329 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
9330 export function ReplyChannelRange_read(ser: Uint8Array): number {
9331 if(!isWasmInitialized) {
9332 throw new Error("initializeWasm() must be awaited first!");
9334 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
9335 return nativeResponseValue;
9337 // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
9338 export function ReplyChannelRange_write(obj: number): Uint8Array {
9339 if(!isWasmInitialized) {
9340 throw new Error("initializeWasm() must be awaited first!");
9342 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
9343 return decodeArray(nativeResponseValue);
9345 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
9346 export function GossipTimestampFilter_read(ser: Uint8Array): number {
9347 if(!isWasmInitialized) {
9348 throw new Error("initializeWasm() must be awaited first!");
9350 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
9351 return nativeResponseValue;
9353 // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
9354 export function GossipTimestampFilter_write(obj: number): Uint8Array {
9355 if(!isWasmInitialized) {
9356 throw new Error("initializeWasm() must be awaited first!");
9358 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
9359 return decodeArray(nativeResponseValue);
9361 // void MessageHandler_free(struct LDKMessageHandler this_ptr);
9362 export function MessageHandler_free(this_ptr: number): void {
9363 if(!isWasmInitialized) {
9364 throw new Error("initializeWasm() must be awaited first!");
9366 const nativeResponseValue = wasm.MessageHandler_free(this_ptr);
9367 // debug statements here
9369 // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
9370 export function MessageHandler_get_chan_handler(this_ptr: number): number {
9371 if(!isWasmInitialized) {
9372 throw new Error("initializeWasm() must be awaited first!");
9374 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
9375 return nativeResponseValue;
9377 // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
9378 export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
9379 if(!isWasmInitialized) {
9380 throw new Error("initializeWasm() must be awaited first!");
9382 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
9383 // debug statements here
9385 // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
9386 export function MessageHandler_get_route_handler(this_ptr: number): number {
9387 if(!isWasmInitialized) {
9388 throw new Error("initializeWasm() must be awaited first!");
9390 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
9391 return nativeResponseValue;
9393 // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
9394 export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
9395 if(!isWasmInitialized) {
9396 throw new Error("initializeWasm() must be awaited first!");
9398 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
9399 // debug statements here
9401 // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
9402 export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
9403 if(!isWasmInitialized) {
9404 throw new Error("initializeWasm() must be awaited first!");
9406 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
9407 return nativeResponseValue;
9409 // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
9410 export function SocketDescriptor_clone(orig: number): number {
9411 if(!isWasmInitialized) {
9412 throw new Error("initializeWasm() must be awaited first!");
9414 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
9415 return nativeResponseValue;
9417 // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
9418 export function SocketDescriptor_free(this_ptr: number): void {
9419 if(!isWasmInitialized) {
9420 throw new Error("initializeWasm() must be awaited first!");
9422 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
9423 // debug statements here
9425 // void PeerHandleError_free(struct LDKPeerHandleError this_ptr);
9426 export function PeerHandleError_free(this_ptr: number): void {
9427 if(!isWasmInitialized) {
9428 throw new Error("initializeWasm() must be awaited first!");
9430 const nativeResponseValue = wasm.PeerHandleError_free(this_ptr);
9431 // debug statements here
9433 // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
9434 export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
9435 if(!isWasmInitialized) {
9436 throw new Error("initializeWasm() must be awaited first!");
9438 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
9439 return nativeResponseValue;
9441 // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
9442 export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
9443 if(!isWasmInitialized) {
9444 throw new Error("initializeWasm() must be awaited first!");
9446 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
9447 // debug statements here
9449 // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
9450 export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
9451 if(!isWasmInitialized) {
9452 throw new Error("initializeWasm() must be awaited first!");
9454 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
9455 return nativeResponseValue;
9457 // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
9458 export function PeerHandleError_clone(orig: number): number {
9459 if(!isWasmInitialized) {
9460 throw new Error("initializeWasm() must be awaited first!");
9462 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
9463 return nativeResponseValue;
9465 // void PeerManager_free(struct LDKPeerManager this_ptr);
9466 export function PeerManager_free(this_ptr: number): void {
9467 if(!isWasmInitialized) {
9468 throw new Error("initializeWasm() must be awaited first!");
9470 const nativeResponseValue = wasm.PeerManager_free(this_ptr);
9471 // debug statements here
9473 // 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);
9474 export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
9475 if(!isWasmInitialized) {
9476 throw new Error("initializeWasm() must be awaited first!");
9478 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
9479 return nativeResponseValue;
9481 // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
9482 export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
9483 if(!isWasmInitialized) {
9484 throw new Error("initializeWasm() must be awaited first!");
9486 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
9487 return nativeResponseValue;
9489 // 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);
9490 export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
9491 if(!isWasmInitialized) {
9492 throw new Error("initializeWasm() must be awaited first!");
9494 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
9495 return nativeResponseValue;
9497 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
9498 export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
9499 if(!isWasmInitialized) {
9500 throw new Error("initializeWasm() must be awaited first!");
9502 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
9503 return nativeResponseValue;
9505 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
9506 export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
9507 if(!isWasmInitialized) {
9508 throw new Error("initializeWasm() must be awaited first!");
9510 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
9511 return nativeResponseValue;
9513 // 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);
9514 export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
9515 if(!isWasmInitialized) {
9516 throw new Error("initializeWasm() must be awaited first!");
9518 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
9519 return nativeResponseValue;
9521 // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
9522 export function PeerManager_process_events(this_arg: number): void {
9523 if(!isWasmInitialized) {
9524 throw new Error("initializeWasm() must be awaited first!");
9526 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
9527 // debug statements here
9529 // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
9530 export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
9531 if(!isWasmInitialized) {
9532 throw new Error("initializeWasm() must be awaited first!");
9534 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
9535 // debug statements here
9537 // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
9538 export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
9539 if(!isWasmInitialized) {
9540 throw new Error("initializeWasm() must be awaited first!");
9542 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
9543 // debug statements here
9545 // void PeerManager_timer_tick_occured(const struct LDKPeerManager *NONNULL_PTR this_arg);
9546 export function PeerManager_timer_tick_occured(this_arg: number): void {
9547 if(!isWasmInitialized) {
9548 throw new Error("initializeWasm() must be awaited first!");
9550 const nativeResponseValue = wasm.PeerManager_timer_tick_occured(this_arg);
9551 // debug statements here
9553 // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
9554 export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
9555 if(!isWasmInitialized) {
9556 throw new Error("initializeWasm() must be awaited first!");
9558 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
9559 return decodeArray(nativeResponseValue);
9561 // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
9562 export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
9563 if(!isWasmInitialized) {
9564 throw new Error("initializeWasm() must be awaited first!");
9566 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
9567 return nativeResponseValue;
9569 // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
9570 export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
9571 if(!isWasmInitialized) {
9572 throw new Error("initializeWasm() must be awaited first!");
9574 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
9575 return nativeResponseValue;
9577 // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
9578 export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
9579 if(!isWasmInitialized) {
9580 throw new Error("initializeWasm() must be awaited first!");
9582 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
9583 return nativeResponseValue;
9585 // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
9586 export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
9587 if(!isWasmInitialized) {
9588 throw new Error("initializeWasm() must be awaited first!");
9590 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
9591 return nativeResponseValue;
9593 // void TxCreationKeys_free(struct LDKTxCreationKeys this_ptr);
9594 export function TxCreationKeys_free(this_ptr: number): void {
9595 if(!isWasmInitialized) {
9596 throw new Error("initializeWasm() must be awaited first!");
9598 const nativeResponseValue = wasm.TxCreationKeys_free(this_ptr);
9599 // debug statements here
9601 // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
9602 export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
9603 if(!isWasmInitialized) {
9604 throw new Error("initializeWasm() must be awaited first!");
9606 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
9607 return decodeArray(nativeResponseValue);
9609 // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9610 export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9611 if(!isWasmInitialized) {
9612 throw new Error("initializeWasm() must be awaited first!");
9614 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
9615 // debug statements here
9617 // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
9618 export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
9619 if(!isWasmInitialized) {
9620 throw new Error("initializeWasm() must be awaited first!");
9622 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
9623 return decodeArray(nativeResponseValue);
9625 // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9626 export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
9627 if(!isWasmInitialized) {
9628 throw new Error("initializeWasm() must be awaited first!");
9630 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
9631 // debug statements here
9633 // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
9634 export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
9635 if(!isWasmInitialized) {
9636 throw new Error("initializeWasm() must be awaited first!");
9638 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
9639 return decodeArray(nativeResponseValue);
9641 // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9642 export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
9643 if(!isWasmInitialized) {
9644 throw new Error("initializeWasm() must be awaited first!");
9646 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
9647 // debug statements here
9649 // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
9650 export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
9651 if(!isWasmInitialized) {
9652 throw new Error("initializeWasm() must be awaited first!");
9654 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
9655 return decodeArray(nativeResponseValue);
9657 // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9658 export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
9659 if(!isWasmInitialized) {
9660 throw new Error("initializeWasm() must be awaited first!");
9662 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
9663 // debug statements here
9665 // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
9666 export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
9667 if(!isWasmInitialized) {
9668 throw new Error("initializeWasm() must be awaited first!");
9670 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
9671 return decodeArray(nativeResponseValue);
9673 // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9674 export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
9675 if(!isWasmInitialized) {
9676 throw new Error("initializeWasm() must be awaited first!");
9678 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
9679 // debug statements here
9681 // 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);
9682 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 {
9683 if(!isWasmInitialized) {
9684 throw new Error("initializeWasm() must be awaited first!");
9686 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));
9687 return nativeResponseValue;
9689 // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
9690 export function TxCreationKeys_clone(orig: number): number {
9691 if(!isWasmInitialized) {
9692 throw new Error("initializeWasm() must be awaited first!");
9694 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
9695 return nativeResponseValue;
9697 // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
9698 export function TxCreationKeys_write(obj: number): Uint8Array {
9699 if(!isWasmInitialized) {
9700 throw new Error("initializeWasm() must be awaited first!");
9702 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
9703 return decodeArray(nativeResponseValue);
9705 // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
9706 export function TxCreationKeys_read(ser: Uint8Array): number {
9707 if(!isWasmInitialized) {
9708 throw new Error("initializeWasm() must be awaited first!");
9710 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
9711 return nativeResponseValue;
9713 // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_ptr);
9714 export function ChannelPublicKeys_free(this_ptr: number): void {
9715 if(!isWasmInitialized) {
9716 throw new Error("initializeWasm() must be awaited first!");
9718 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_ptr);
9719 // debug statements here
9721 // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
9722 export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
9723 if(!isWasmInitialized) {
9724 throw new Error("initializeWasm() must be awaited first!");
9726 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
9727 return decodeArray(nativeResponseValue);
9729 // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9730 export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
9731 if(!isWasmInitialized) {
9732 throw new Error("initializeWasm() must be awaited first!");
9734 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
9735 // debug statements here
9737 // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
9738 export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
9739 if(!isWasmInitialized) {
9740 throw new Error("initializeWasm() must be awaited first!");
9742 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
9743 return decodeArray(nativeResponseValue);
9745 // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9746 export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
9747 if(!isWasmInitialized) {
9748 throw new Error("initializeWasm() must be awaited first!");
9750 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
9751 // debug statements here
9753 // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
9754 export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
9755 if(!isWasmInitialized) {
9756 throw new Error("initializeWasm() must be awaited first!");
9758 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
9759 return decodeArray(nativeResponseValue);
9761 // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9762 export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
9763 if(!isWasmInitialized) {
9764 throw new Error("initializeWasm() must be awaited first!");
9766 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
9767 // debug statements here
9769 // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
9770 export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
9771 if(!isWasmInitialized) {
9772 throw new Error("initializeWasm() must be awaited first!");
9774 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
9775 return decodeArray(nativeResponseValue);
9777 // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9778 export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
9779 if(!isWasmInitialized) {
9780 throw new Error("initializeWasm() must be awaited first!");
9782 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
9783 // debug statements here
9785 // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
9786 export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
9787 if(!isWasmInitialized) {
9788 throw new Error("initializeWasm() must be awaited first!");
9790 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
9791 return decodeArray(nativeResponseValue);
9793 // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9794 export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
9795 if(!isWasmInitialized) {
9796 throw new Error("initializeWasm() must be awaited first!");
9798 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
9799 // debug statements here
9801 // 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);
9802 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 {
9803 if(!isWasmInitialized) {
9804 throw new Error("initializeWasm() must be awaited first!");
9806 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));
9807 return nativeResponseValue;
9809 // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
9810 export function ChannelPublicKeys_clone(orig: number): number {
9811 if(!isWasmInitialized) {
9812 throw new Error("initializeWasm() must be awaited first!");
9814 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
9815 return nativeResponseValue;
9817 // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
9818 export function ChannelPublicKeys_write(obj: number): Uint8Array {
9819 if(!isWasmInitialized) {
9820 throw new Error("initializeWasm() must be awaited first!");
9822 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
9823 return decodeArray(nativeResponseValue);
9825 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
9826 export function ChannelPublicKeys_read(ser: Uint8Array): number {
9827 if(!isWasmInitialized) {
9828 throw new Error("initializeWasm() must be awaited first!");
9830 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
9831 return nativeResponseValue;
9833 // 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);
9834 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 {
9835 if(!isWasmInitialized) {
9836 throw new Error("initializeWasm() must be awaited first!");
9838 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));
9839 return nativeResponseValue;
9841 // 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);
9842 export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
9843 if(!isWasmInitialized) {
9844 throw new Error("initializeWasm() must be awaited first!");
9846 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
9847 return nativeResponseValue;
9849 // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
9850 export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
9851 if(!isWasmInitialized) {
9852 throw new Error("initializeWasm() must be awaited first!");
9854 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
9855 return decodeArray(nativeResponseValue);
9857 // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_ptr);
9858 export function HTLCOutputInCommitment_free(this_ptr: number): void {
9859 if(!isWasmInitialized) {
9860 throw new Error("initializeWasm() must be awaited first!");
9862 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_ptr);
9863 // debug statements here
9865 // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
9866 export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
9867 if(!isWasmInitialized) {
9868 throw new Error("initializeWasm() must be awaited first!");
9870 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
9871 return nativeResponseValue;
9873 // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
9874 export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
9875 if(!isWasmInitialized) {
9876 throw new Error("initializeWasm() must be awaited first!");
9878 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
9879 // debug statements here
9881 // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
9882 export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
9883 if(!isWasmInitialized) {
9884 throw new Error("initializeWasm() must be awaited first!");
9886 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
9887 return nativeResponseValue;
9889 // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
9890 export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
9891 if(!isWasmInitialized) {
9892 throw new Error("initializeWasm() must be awaited first!");
9894 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
9895 // debug statements here
9897 // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
9898 export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
9899 if(!isWasmInitialized) {
9900 throw new Error("initializeWasm() must be awaited first!");
9902 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
9903 return nativeResponseValue;
9905 // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
9906 export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
9907 if(!isWasmInitialized) {
9908 throw new Error("initializeWasm() must be awaited first!");
9910 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
9911 // debug statements here
9913 // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
9914 export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
9915 if(!isWasmInitialized) {
9916 throw new Error("initializeWasm() must be awaited first!");
9918 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
9919 return decodeArray(nativeResponseValue);
9921 // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9922 export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
9923 if(!isWasmInitialized) {
9924 throw new Error("initializeWasm() must be awaited first!");
9926 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
9927 // debug statements here
9929 // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
9930 export function HTLCOutputInCommitment_clone(orig: number): number {
9931 if(!isWasmInitialized) {
9932 throw new Error("initializeWasm() must be awaited first!");
9934 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
9935 return nativeResponseValue;
9937 // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
9938 export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
9939 if(!isWasmInitialized) {
9940 throw new Error("initializeWasm() must be awaited first!");
9942 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
9943 return decodeArray(nativeResponseValue);
9945 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
9946 export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
9947 if(!isWasmInitialized) {
9948 throw new Error("initializeWasm() must be awaited first!");
9950 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
9951 return nativeResponseValue;
9953 // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
9954 export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
9955 if(!isWasmInitialized) {
9956 throw new Error("initializeWasm() must be awaited first!");
9958 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
9959 return decodeArray(nativeResponseValue);
9961 // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
9962 export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
9963 if(!isWasmInitialized) {
9964 throw new Error("initializeWasm() must be awaited first!");
9966 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
9967 return decodeArray(nativeResponseValue);
9969 // 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);
9970 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 {
9971 if(!isWasmInitialized) {
9972 throw new Error("initializeWasm() must be awaited first!");
9974 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(prev_hash), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
9975 return decodeArray(nativeResponseValue);
9977 // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_ptr);
9978 export function ChannelTransactionParameters_free(this_ptr: number): void {
9979 if(!isWasmInitialized) {
9980 throw new Error("initializeWasm() must be awaited first!");
9982 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_ptr);
9983 // debug statements here
9985 // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
9986 export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
9987 if(!isWasmInitialized) {
9988 throw new Error("initializeWasm() must be awaited first!");
9990 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
9991 return nativeResponseValue;
9993 // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
9994 export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
9995 if(!isWasmInitialized) {
9996 throw new Error("initializeWasm() must be awaited first!");
9998 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
9999 // debug statements here
10001 // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10002 export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
10003 if(!isWasmInitialized) {
10004 throw new Error("initializeWasm() must be awaited first!");
10006 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
10007 return nativeResponseValue;
10009 // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10010 export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
10011 if(!isWasmInitialized) {
10012 throw new Error("initializeWasm() must be awaited first!");
10014 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
10015 // debug statements here
10017 // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10018 export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
10019 if(!isWasmInitialized) {
10020 throw new Error("initializeWasm() must be awaited first!");
10022 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
10023 return nativeResponseValue;
10025 // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
10026 export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
10027 if(!isWasmInitialized) {
10028 throw new Error("initializeWasm() must be awaited first!");
10030 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
10031 // debug statements here
10033 // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10034 export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
10035 if(!isWasmInitialized) {
10036 throw new Error("initializeWasm() must be awaited first!");
10038 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
10039 return nativeResponseValue;
10041 // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
10042 export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
10043 if(!isWasmInitialized) {
10044 throw new Error("initializeWasm() must be awaited first!");
10046 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
10047 // debug statements here
10049 // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10050 export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
10051 if(!isWasmInitialized) {
10052 throw new Error("initializeWasm() must be awaited first!");
10054 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
10055 return nativeResponseValue;
10057 // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
10058 export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
10059 if(!isWasmInitialized) {
10060 throw new Error("initializeWasm() must be awaited first!");
10062 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
10063 // debug statements here
10065 // 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);
10066 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 {
10067 if(!isWasmInitialized) {
10068 throw new Error("initializeWasm() must be awaited first!");
10070 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
10071 return nativeResponseValue;
10073 // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
10074 export function ChannelTransactionParameters_clone(orig: number): number {
10075 if(!isWasmInitialized) {
10076 throw new Error("initializeWasm() must be awaited first!");
10078 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
10079 return nativeResponseValue;
10081 // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_ptr);
10082 export function CounterpartyChannelTransactionParameters_free(this_ptr: number): void {
10083 if(!isWasmInitialized) {
10084 throw new Error("initializeWasm() must be awaited first!");
10086 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_ptr);
10087 // debug statements here
10089 // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
10090 export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
10091 if(!isWasmInitialized) {
10092 throw new Error("initializeWasm() must be awaited first!");
10094 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
10095 return nativeResponseValue;
10097 // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
10098 export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
10099 if(!isWasmInitialized) {
10100 throw new Error("initializeWasm() must be awaited first!");
10102 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
10103 // debug statements here
10105 // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
10106 export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
10107 if(!isWasmInitialized) {
10108 throw new Error("initializeWasm() must be awaited first!");
10110 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
10111 return nativeResponseValue;
10113 // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10114 export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
10115 if(!isWasmInitialized) {
10116 throw new Error("initializeWasm() must be awaited first!");
10118 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
10119 // debug statements here
10121 // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
10122 export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
10123 if(!isWasmInitialized) {
10124 throw new Error("initializeWasm() must be awaited first!");
10126 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
10127 return nativeResponseValue;
10129 // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
10130 export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
10131 if(!isWasmInitialized) {
10132 throw new Error("initializeWasm() must be awaited first!");
10134 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
10135 return nativeResponseValue;
10137 // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10138 export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
10139 if(!isWasmInitialized) {
10140 throw new Error("initializeWasm() must be awaited first!");
10142 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
10143 return nativeResponseValue;
10145 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10146 export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
10147 if(!isWasmInitialized) {
10148 throw new Error("initializeWasm() must be awaited first!");
10150 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
10151 return nativeResponseValue;
10153 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
10154 export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
10155 if(!isWasmInitialized) {
10156 throw new Error("initializeWasm() must be awaited first!");
10158 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
10159 return nativeResponseValue;
10161 // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
10162 export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
10163 if(!isWasmInitialized) {
10164 throw new Error("initializeWasm() must be awaited first!");
10166 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
10167 return decodeArray(nativeResponseValue);
10169 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
10170 export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
10171 if(!isWasmInitialized) {
10172 throw new Error("initializeWasm() must be awaited first!");
10174 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
10175 return nativeResponseValue;
10177 // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
10178 export function ChannelTransactionParameters_write(obj: number): Uint8Array {
10179 if(!isWasmInitialized) {
10180 throw new Error("initializeWasm() must be awaited first!");
10182 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
10183 return decodeArray(nativeResponseValue);
10185 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
10186 export function ChannelTransactionParameters_read(ser: Uint8Array): number {
10187 if(!isWasmInitialized) {
10188 throw new Error("initializeWasm() must be awaited first!");
10190 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
10191 return nativeResponseValue;
10193 // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_ptr);
10194 export function DirectedChannelTransactionParameters_free(this_ptr: number): void {
10195 if(!isWasmInitialized) {
10196 throw new Error("initializeWasm() must be awaited first!");
10198 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_ptr);
10199 // debug statements here
10201 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10202 export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
10203 if(!isWasmInitialized) {
10204 throw new Error("initializeWasm() must be awaited first!");
10206 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
10207 return nativeResponseValue;
10209 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10210 export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
10211 if(!isWasmInitialized) {
10212 throw new Error("initializeWasm() must be awaited first!");
10214 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
10215 return nativeResponseValue;
10217 // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10218 export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
10219 if(!isWasmInitialized) {
10220 throw new Error("initializeWasm() must be awaited first!");
10222 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
10223 return nativeResponseValue;
10225 // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10226 export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
10227 if(!isWasmInitialized) {
10228 throw new Error("initializeWasm() must be awaited first!");
10230 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
10231 return nativeResponseValue;
10233 // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
10234 export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
10235 if(!isWasmInitialized) {
10236 throw new Error("initializeWasm() must be awaited first!");
10238 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
10239 return nativeResponseValue;
10241 // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_ptr);
10242 export function HolderCommitmentTransaction_free(this_ptr: number): void {
10243 if(!isWasmInitialized) {
10244 throw new Error("initializeWasm() must be awaited first!");
10246 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_ptr);
10247 // debug statements here
10249 // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
10250 export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
10251 if(!isWasmInitialized) {
10252 throw new Error("initializeWasm() must be awaited first!");
10254 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
10255 return decodeArray(nativeResponseValue);
10257 // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
10258 export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
10259 if(!isWasmInitialized) {
10260 throw new Error("initializeWasm() must be awaited first!");
10262 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
10263 // debug statements here
10265 // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
10266 export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
10267 if(!isWasmInitialized) {
10268 throw new Error("initializeWasm() must be awaited first!");
10270 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
10271 // debug statements here
10273 // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
10274 export function HolderCommitmentTransaction_clone(orig: number): number {
10275 if(!isWasmInitialized) {
10276 throw new Error("initializeWasm() must be awaited first!");
10278 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
10279 return nativeResponseValue;
10281 // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
10282 export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
10283 if(!isWasmInitialized) {
10284 throw new Error("initializeWasm() must be awaited first!");
10286 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
10287 return decodeArray(nativeResponseValue);
10289 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
10290 export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
10291 if(!isWasmInitialized) {
10292 throw new Error("initializeWasm() must be awaited first!");
10294 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
10295 return nativeResponseValue;
10297 // 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);
10298 export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
10299 if(!isWasmInitialized) {
10300 throw new Error("initializeWasm() must be awaited first!");
10302 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
10303 return nativeResponseValue;
10305 // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_ptr);
10306 export function BuiltCommitmentTransaction_free(this_ptr: number): void {
10307 if(!isWasmInitialized) {
10308 throw new Error("initializeWasm() must be awaited first!");
10310 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_ptr);
10311 // debug statements here
10313 // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
10314 export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
10315 if(!isWasmInitialized) {
10316 throw new Error("initializeWasm() must be awaited first!");
10318 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
10319 return decodeArray(nativeResponseValue);
10321 // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
10322 export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
10323 if(!isWasmInitialized) {
10324 throw new Error("initializeWasm() must be awaited first!");
10326 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
10327 // debug statements here
10329 // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
10330 export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
10331 if(!isWasmInitialized) {
10332 throw new Error("initializeWasm() must be awaited first!");
10334 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
10335 return decodeArray(nativeResponseValue);
10337 // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10338 export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
10339 if(!isWasmInitialized) {
10340 throw new Error("initializeWasm() must be awaited first!");
10342 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
10343 // debug statements here
10345 // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
10346 export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
10347 if(!isWasmInitialized) {
10348 throw new Error("initializeWasm() must be awaited first!");
10350 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
10351 return nativeResponseValue;
10353 // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
10354 export function BuiltCommitmentTransaction_clone(orig: number): number {
10355 if(!isWasmInitialized) {
10356 throw new Error("initializeWasm() must be awaited first!");
10358 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
10359 return nativeResponseValue;
10361 // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
10362 export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
10363 if(!isWasmInitialized) {
10364 throw new Error("initializeWasm() must be awaited first!");
10366 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
10367 return decodeArray(nativeResponseValue);
10369 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
10370 export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
10371 if(!isWasmInitialized) {
10372 throw new Error("initializeWasm() must be awaited first!");
10374 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
10375 return nativeResponseValue;
10377 // 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);
10378 export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
10379 if(!isWasmInitialized) {
10380 throw new Error("initializeWasm() must be awaited first!");
10382 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
10383 return decodeArray(nativeResponseValue);
10385 // 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);
10386 export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
10387 if(!isWasmInitialized) {
10388 throw new Error("initializeWasm() must be awaited first!");
10390 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
10391 return decodeArray(nativeResponseValue);
10393 // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_ptr);
10394 export function CommitmentTransaction_free(this_ptr: number): void {
10395 if(!isWasmInitialized) {
10396 throw new Error("initializeWasm() must be awaited first!");
10398 const nativeResponseValue = wasm.CommitmentTransaction_free(this_ptr);
10399 // debug statements here
10401 // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
10402 export function CommitmentTransaction_clone(orig: number): number {
10403 if(!isWasmInitialized) {
10404 throw new Error("initializeWasm() must be awaited first!");
10406 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
10407 return nativeResponseValue;
10409 // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
10410 export function CommitmentTransaction_write(obj: number): Uint8Array {
10411 if(!isWasmInitialized) {
10412 throw new Error("initializeWasm() must be awaited first!");
10414 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
10415 return decodeArray(nativeResponseValue);
10417 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
10418 export function CommitmentTransaction_read(ser: Uint8Array): number {
10419 if(!isWasmInitialized) {
10420 throw new Error("initializeWasm() must be awaited first!");
10422 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
10423 return nativeResponseValue;
10425 // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
10426 export function CommitmentTransaction_commitment_number(this_arg: number): number {
10427 if(!isWasmInitialized) {
10428 throw new Error("initializeWasm() must be awaited first!");
10430 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
10431 return nativeResponseValue;
10433 // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
10434 export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
10435 if(!isWasmInitialized) {
10436 throw new Error("initializeWasm() must be awaited first!");
10438 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
10439 return nativeResponseValue;
10441 // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
10442 export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
10443 if(!isWasmInitialized) {
10444 throw new Error("initializeWasm() must be awaited first!");
10446 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
10447 return nativeResponseValue;
10449 // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
10450 export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
10451 if(!isWasmInitialized) {
10452 throw new Error("initializeWasm() must be awaited first!");
10454 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
10455 return nativeResponseValue;
10457 // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
10458 export function CommitmentTransaction_trust(this_arg: number): number {
10459 if(!isWasmInitialized) {
10460 throw new Error("initializeWasm() must be awaited first!");
10462 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
10463 return nativeResponseValue;
10465 // 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);
10466 export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
10467 if(!isWasmInitialized) {
10468 throw new Error("initializeWasm() must be awaited first!");
10470 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
10471 return nativeResponseValue;
10473 // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_ptr);
10474 export function TrustedCommitmentTransaction_free(this_ptr: number): void {
10475 if(!isWasmInitialized) {
10476 throw new Error("initializeWasm() must be awaited first!");
10478 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_ptr);
10479 // debug statements here
10481 // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
10482 export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
10483 if(!isWasmInitialized) {
10484 throw new Error("initializeWasm() must be awaited first!");
10486 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
10487 return decodeArray(nativeResponseValue);
10489 // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
10490 export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
10491 if(!isWasmInitialized) {
10492 throw new Error("initializeWasm() must be awaited first!");
10494 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
10495 return nativeResponseValue;
10497 // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
10498 export function TrustedCommitmentTransaction_keys(this_arg: number): number {
10499 if(!isWasmInitialized) {
10500 throw new Error("initializeWasm() must be awaited first!");
10502 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
10503 return nativeResponseValue;
10505 // 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);
10506 export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
10507 if(!isWasmInitialized) {
10508 throw new Error("initializeWasm() must be awaited first!");
10510 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
10511 return nativeResponseValue;
10513 // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
10514 export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
10515 if(!isWasmInitialized) {
10516 throw new Error("initializeWasm() must be awaited first!");
10518 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
10519 return nativeResponseValue;
10521 // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
10522 export function InitFeatures_clone(orig: number): number {
10523 if(!isWasmInitialized) {
10524 throw new Error("initializeWasm() must be awaited first!");
10526 const nativeResponseValue = wasm.InitFeatures_clone(orig);
10527 return nativeResponseValue;
10529 // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
10530 export function NodeFeatures_clone(orig: number): number {
10531 if(!isWasmInitialized) {
10532 throw new Error("initializeWasm() must be awaited first!");
10534 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
10535 return nativeResponseValue;
10537 // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
10538 export function ChannelFeatures_clone(orig: number): number {
10539 if(!isWasmInitialized) {
10540 throw new Error("initializeWasm() must be awaited first!");
10542 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
10543 return nativeResponseValue;
10545 // void InitFeatures_free(struct LDKInitFeatures this_ptr);
10546 export function InitFeatures_free(this_ptr: number): void {
10547 if(!isWasmInitialized) {
10548 throw new Error("initializeWasm() must be awaited first!");
10550 const nativeResponseValue = wasm.InitFeatures_free(this_ptr);
10551 // debug statements here
10553 // void NodeFeatures_free(struct LDKNodeFeatures this_ptr);
10554 export function NodeFeatures_free(this_ptr: number): void {
10555 if(!isWasmInitialized) {
10556 throw new Error("initializeWasm() must be awaited first!");
10558 const nativeResponseValue = wasm.NodeFeatures_free(this_ptr);
10559 // debug statements here
10561 // void ChannelFeatures_free(struct LDKChannelFeatures this_ptr);
10562 export function ChannelFeatures_free(this_ptr: number): void {
10563 if(!isWasmInitialized) {
10564 throw new Error("initializeWasm() must be awaited first!");
10566 const nativeResponseValue = wasm.ChannelFeatures_free(this_ptr);
10567 // debug statements here
10569 // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
10570 export function InitFeatures_empty(): number {
10571 if(!isWasmInitialized) {
10572 throw new Error("initializeWasm() must be awaited first!");
10574 const nativeResponseValue = wasm.InitFeatures_empty();
10575 return nativeResponseValue;
10577 // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
10578 export function InitFeatures_known(): number {
10579 if(!isWasmInitialized) {
10580 throw new Error("initializeWasm() must be awaited first!");
10582 const nativeResponseValue = wasm.InitFeatures_known();
10583 return nativeResponseValue;
10585 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
10586 export function NodeFeatures_empty(): number {
10587 if(!isWasmInitialized) {
10588 throw new Error("initializeWasm() must be awaited first!");
10590 const nativeResponseValue = wasm.NodeFeatures_empty();
10591 return nativeResponseValue;
10593 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
10594 export function NodeFeatures_known(): number {
10595 if(!isWasmInitialized) {
10596 throw new Error("initializeWasm() must be awaited first!");
10598 const nativeResponseValue = wasm.NodeFeatures_known();
10599 return nativeResponseValue;
10601 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
10602 export function ChannelFeatures_empty(): number {
10603 if(!isWasmInitialized) {
10604 throw new Error("initializeWasm() must be awaited first!");
10606 const nativeResponseValue = wasm.ChannelFeatures_empty();
10607 return nativeResponseValue;
10609 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
10610 export function ChannelFeatures_known(): number {
10611 if(!isWasmInitialized) {
10612 throw new Error("initializeWasm() must be awaited first!");
10614 const nativeResponseValue = wasm.ChannelFeatures_known();
10615 return nativeResponseValue;
10617 // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
10618 export function InitFeatures_write(obj: number): Uint8Array {
10619 if(!isWasmInitialized) {
10620 throw new Error("initializeWasm() must be awaited first!");
10622 const nativeResponseValue = wasm.InitFeatures_write(obj);
10623 return decodeArray(nativeResponseValue);
10625 // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
10626 export function NodeFeatures_write(obj: number): Uint8Array {
10627 if(!isWasmInitialized) {
10628 throw new Error("initializeWasm() must be awaited first!");
10630 const nativeResponseValue = wasm.NodeFeatures_write(obj);
10631 return decodeArray(nativeResponseValue);
10633 // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
10634 export function ChannelFeatures_write(obj: number): Uint8Array {
10635 if(!isWasmInitialized) {
10636 throw new Error("initializeWasm() must be awaited first!");
10638 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
10639 return decodeArray(nativeResponseValue);
10641 // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
10642 export function InitFeatures_read(ser: Uint8Array): number {
10643 if(!isWasmInitialized) {
10644 throw new Error("initializeWasm() must be awaited first!");
10646 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
10647 return nativeResponseValue;
10649 // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
10650 export function NodeFeatures_read(ser: Uint8Array): number {
10651 if(!isWasmInitialized) {
10652 throw new Error("initializeWasm() must be awaited first!");
10654 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
10655 return nativeResponseValue;
10657 // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
10658 export function ChannelFeatures_read(ser: Uint8Array): number {
10659 if(!isWasmInitialized) {
10660 throw new Error("initializeWasm() must be awaited first!");
10662 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
10663 return nativeResponseValue;
10665 // void RouteHop_free(struct LDKRouteHop this_ptr);
10666 export function RouteHop_free(this_ptr: number): void {
10667 if(!isWasmInitialized) {
10668 throw new Error("initializeWasm() must be awaited first!");
10670 const nativeResponseValue = wasm.RouteHop_free(this_ptr);
10671 // debug statements here
10673 // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
10674 export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
10675 if(!isWasmInitialized) {
10676 throw new Error("initializeWasm() must be awaited first!");
10678 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
10679 return decodeArray(nativeResponseValue);
10681 // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10682 export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
10683 if(!isWasmInitialized) {
10684 throw new Error("initializeWasm() must be awaited first!");
10686 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
10687 // debug statements here
10689 // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
10690 export function RouteHop_get_node_features(this_ptr: number): number {
10691 if(!isWasmInitialized) {
10692 throw new Error("initializeWasm() must be awaited first!");
10694 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
10695 return nativeResponseValue;
10697 // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
10698 export function RouteHop_set_node_features(this_ptr: number, val: number): void {
10699 if(!isWasmInitialized) {
10700 throw new Error("initializeWasm() must be awaited first!");
10702 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
10703 // debug statements here
10705 // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
10706 export function RouteHop_get_short_channel_id(this_ptr: number): number {
10707 if(!isWasmInitialized) {
10708 throw new Error("initializeWasm() must be awaited first!");
10710 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
10711 return nativeResponseValue;
10713 // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
10714 export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
10715 if(!isWasmInitialized) {
10716 throw new Error("initializeWasm() must be awaited first!");
10718 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
10719 // debug statements here
10721 // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
10722 export function RouteHop_get_channel_features(this_ptr: number): number {
10723 if(!isWasmInitialized) {
10724 throw new Error("initializeWasm() must be awaited first!");
10726 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
10727 return nativeResponseValue;
10729 // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
10730 export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
10731 if(!isWasmInitialized) {
10732 throw new Error("initializeWasm() must be awaited first!");
10734 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
10735 // debug statements here
10737 // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
10738 export function RouteHop_get_fee_msat(this_ptr: number): number {
10739 if(!isWasmInitialized) {
10740 throw new Error("initializeWasm() must be awaited first!");
10742 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
10743 return nativeResponseValue;
10745 // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
10746 export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
10747 if(!isWasmInitialized) {
10748 throw new Error("initializeWasm() must be awaited first!");
10750 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
10751 // debug statements here
10753 // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
10754 export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
10755 if(!isWasmInitialized) {
10756 throw new Error("initializeWasm() must be awaited first!");
10758 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
10759 return nativeResponseValue;
10761 // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
10762 export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
10763 if(!isWasmInitialized) {
10764 throw new Error("initializeWasm() must be awaited first!");
10766 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
10767 // debug statements here
10769 // 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);
10770 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 {
10771 if(!isWasmInitialized) {
10772 throw new Error("initializeWasm() must be awaited first!");
10774 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);
10775 return nativeResponseValue;
10777 // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
10778 export function RouteHop_clone(orig: number): number {
10779 if(!isWasmInitialized) {
10780 throw new Error("initializeWasm() must be awaited first!");
10782 const nativeResponseValue = wasm.RouteHop_clone(orig);
10783 return nativeResponseValue;
10785 // void Route_free(struct LDKRoute this_ptr);
10786 export function Route_free(this_ptr: number): void {
10787 if(!isWasmInitialized) {
10788 throw new Error("initializeWasm() must be awaited first!");
10790 const nativeResponseValue = wasm.Route_free(this_ptr);
10791 // debug statements here
10793 // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
10794 export function Route_set_paths(this_ptr: number, val: number[][]): void {
10795 if(!isWasmInitialized) {
10796 throw new Error("initializeWasm() must be awaited first!");
10798 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
10799 // debug statements here
10801 // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
10802 export function Route_new(paths_arg: number[][]): number {
10803 if(!isWasmInitialized) {
10804 throw new Error("initializeWasm() must be awaited first!");
10806 const nativeResponseValue = wasm.Route_new(paths_arg);
10807 return nativeResponseValue;
10809 // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
10810 export function Route_clone(orig: number): number {
10811 if(!isWasmInitialized) {
10812 throw new Error("initializeWasm() must be awaited first!");
10814 const nativeResponseValue = wasm.Route_clone(orig);
10815 return nativeResponseValue;
10817 // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
10818 export function Route_write(obj: number): Uint8Array {
10819 if(!isWasmInitialized) {
10820 throw new Error("initializeWasm() must be awaited first!");
10822 const nativeResponseValue = wasm.Route_write(obj);
10823 return decodeArray(nativeResponseValue);
10825 // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
10826 export function Route_read(ser: Uint8Array): number {
10827 if(!isWasmInitialized) {
10828 throw new Error("initializeWasm() must be awaited first!");
10830 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
10831 return nativeResponseValue;
10833 // void RouteHint_free(struct LDKRouteHint this_ptr);
10834 export function RouteHint_free(this_ptr: number): void {
10835 if(!isWasmInitialized) {
10836 throw new Error("initializeWasm() must be awaited first!");
10838 const nativeResponseValue = wasm.RouteHint_free(this_ptr);
10839 // debug statements here
10841 // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
10842 export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
10843 if(!isWasmInitialized) {
10844 throw new Error("initializeWasm() must be awaited first!");
10846 const nativeResponseValue = wasm.RouteHint_get_src_node_id(this_ptr);
10847 return decodeArray(nativeResponseValue);
10849 // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10850 export function RouteHint_set_src_node_id(this_ptr: number, val: Uint8Array): void {
10851 if(!isWasmInitialized) {
10852 throw new Error("initializeWasm() must be awaited first!");
10854 const nativeResponseValue = wasm.RouteHint_set_src_node_id(this_ptr, encodeArray(val));
10855 // debug statements here
10857 // uint64_t RouteHint_get_short_channel_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
10858 export function RouteHint_get_short_channel_id(this_ptr: number): number {
10859 if(!isWasmInitialized) {
10860 throw new Error("initializeWasm() must be awaited first!");
10862 const nativeResponseValue = wasm.RouteHint_get_short_channel_id(this_ptr);
10863 return nativeResponseValue;
10865 // void RouteHint_set_short_channel_id(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
10866 export function RouteHint_set_short_channel_id(this_ptr: number, val: number): void {
10867 if(!isWasmInitialized) {
10868 throw new Error("initializeWasm() must be awaited first!");
10870 const nativeResponseValue = wasm.RouteHint_set_short_channel_id(this_ptr, val);
10871 // debug statements here
10873 // struct LDKRoutingFees RouteHint_get_fees(const struct LDKRouteHint *NONNULL_PTR this_ptr);
10874 export function RouteHint_get_fees(this_ptr: number): number {
10875 if(!isWasmInitialized) {
10876 throw new Error("initializeWasm() must be awaited first!");
10878 const nativeResponseValue = wasm.RouteHint_get_fees(this_ptr);
10879 return nativeResponseValue;
10881 // void RouteHint_set_fees(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
10882 export function RouteHint_set_fees(this_ptr: number, val: number): void {
10883 if(!isWasmInitialized) {
10884 throw new Error("initializeWasm() must be awaited first!");
10886 const nativeResponseValue = wasm.RouteHint_set_fees(this_ptr, val);
10887 // debug statements here
10889 // uint16_t RouteHint_get_cltv_expiry_delta(const struct LDKRouteHint *NONNULL_PTR this_ptr);
10890 export function RouteHint_get_cltv_expiry_delta(this_ptr: number): number {
10891 if(!isWasmInitialized) {
10892 throw new Error("initializeWasm() must be awaited first!");
10894 const nativeResponseValue = wasm.RouteHint_get_cltv_expiry_delta(this_ptr);
10895 return nativeResponseValue;
10897 // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
10898 export function RouteHint_set_cltv_expiry_delta(this_ptr: number, val: number): void {
10899 if(!isWasmInitialized) {
10900 throw new Error("initializeWasm() must be awaited first!");
10902 const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
10903 // debug statements here
10905 // uint64_t RouteHint_get_htlc_minimum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
10906 export function RouteHint_get_htlc_minimum_msat(this_ptr: number): number {
10907 if(!isWasmInitialized) {
10908 throw new Error("initializeWasm() must be awaited first!");
10910 const nativeResponseValue = wasm.RouteHint_get_htlc_minimum_msat(this_ptr);
10911 return nativeResponseValue;
10913 // void RouteHint_set_htlc_minimum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
10914 export function RouteHint_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10915 if(!isWasmInitialized) {
10916 throw new Error("initializeWasm() must be awaited first!");
10918 const nativeResponseValue = wasm.RouteHint_set_htlc_minimum_msat(this_ptr, val);
10919 // debug statements here
10921 // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg);
10922 export function RouteHint_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number): number {
10923 if(!isWasmInitialized) {
10924 throw new Error("initializeWasm() must be awaited first!");
10926 const nativeResponseValue = wasm.RouteHint_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
10927 return nativeResponseValue;
10929 // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
10930 export function RouteHint_clone(orig: number): number {
10931 if(!isWasmInitialized) {
10932 throw new Error("initializeWasm() must be awaited first!");
10934 const nativeResponseValue = wasm.RouteHint_clone(orig);
10935 return nativeResponseValue;
10937 // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey target, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
10938 export function get_route(our_node_id: Uint8Array, network: number, target: Uint8Array, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
10939 if(!isWasmInitialized) {
10940 throw new Error("initializeWasm() must be awaited first!");
10942 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(target), first_hops, last_hops, final_value_msat, final_cltv, logger);
10943 return nativeResponseValue;
10945 // void NetworkGraph_free(struct LDKNetworkGraph this_ptr);
10946 export function NetworkGraph_free(this_ptr: number): void {
10947 if(!isWasmInitialized) {
10948 throw new Error("initializeWasm() must be awaited first!");
10950 const nativeResponseValue = wasm.NetworkGraph_free(this_ptr);
10951 // debug statements here
10953 // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_ptr);
10954 export function LockedNetworkGraph_free(this_ptr: number): void {
10955 if(!isWasmInitialized) {
10956 throw new Error("initializeWasm() must be awaited first!");
10958 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_ptr);
10959 // debug statements here
10961 // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_ptr);
10962 export function NetGraphMsgHandler_free(this_ptr: number): void {
10963 if(!isWasmInitialized) {
10964 throw new Error("initializeWasm() must be awaited first!");
10966 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_ptr);
10967 // debug statements here
10969 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
10970 export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
10971 if(!isWasmInitialized) {
10972 throw new Error("initializeWasm() must be awaited first!");
10974 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
10975 return nativeResponseValue;
10977 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
10978 export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
10979 if(!isWasmInitialized) {
10980 throw new Error("initializeWasm() must be awaited first!");
10982 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
10983 return nativeResponseValue;
10985 // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
10986 export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
10987 if(!isWasmInitialized) {
10988 throw new Error("initializeWasm() must be awaited first!");
10990 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
10991 return nativeResponseValue;
10993 // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
10994 export function LockedNetworkGraph_graph(this_arg: number): number {
10995 if(!isWasmInitialized) {
10996 throw new Error("initializeWasm() must be awaited first!");
10998 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
10999 return nativeResponseValue;
11001 // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11002 export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
11003 if(!isWasmInitialized) {
11004 throw new Error("initializeWasm() must be awaited first!");
11006 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
11007 return nativeResponseValue;
11009 // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
11010 export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
11011 if(!isWasmInitialized) {
11012 throw new Error("initializeWasm() must be awaited first!");
11014 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
11015 return nativeResponseValue;
11017 // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_ptr);
11018 export function DirectionalChannelInfo_free(this_ptr: number): void {
11019 if(!isWasmInitialized) {
11020 throw new Error("initializeWasm() must be awaited first!");
11022 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_ptr);
11023 // debug statements here
11025 // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11026 export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
11027 if(!isWasmInitialized) {
11028 throw new Error("initializeWasm() must be awaited first!");
11030 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
11031 return nativeResponseValue;
11033 // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
11034 export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
11035 if(!isWasmInitialized) {
11036 throw new Error("initializeWasm() must be awaited first!");
11038 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
11039 // debug statements here
11041 // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11042 export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
11043 if(!isWasmInitialized) {
11044 throw new Error("initializeWasm() must be awaited first!");
11046 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
11047 return nativeResponseValue;
11049 // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
11050 export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
11051 if(!isWasmInitialized) {
11052 throw new Error("initializeWasm() must be awaited first!");
11054 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
11055 // debug statements here
11057 // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11058 export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
11059 if(!isWasmInitialized) {
11060 throw new Error("initializeWasm() must be awaited first!");
11062 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
11063 return nativeResponseValue;
11065 // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
11066 export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11067 if(!isWasmInitialized) {
11068 throw new Error("initializeWasm() must be awaited first!");
11070 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
11071 // debug statements here
11073 // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11074 export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
11075 if(!isWasmInitialized) {
11076 throw new Error("initializeWasm() must be awaited first!");
11078 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
11079 return nativeResponseValue;
11081 // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
11082 export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
11083 if(!isWasmInitialized) {
11084 throw new Error("initializeWasm() must be awaited first!");
11086 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
11087 // debug statements here
11089 // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11090 export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
11091 if(!isWasmInitialized) {
11092 throw new Error("initializeWasm() must be awaited first!");
11094 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
11095 return nativeResponseValue;
11097 // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11098 export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
11099 if(!isWasmInitialized) {
11100 throw new Error("initializeWasm() must be awaited first!");
11102 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
11103 // debug statements here
11105 // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
11106 export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
11107 if(!isWasmInitialized) {
11108 throw new Error("initializeWasm() must be awaited first!");
11110 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
11111 return nativeResponseValue;
11113 // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
11114 export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
11115 if(!isWasmInitialized) {
11116 throw new Error("initializeWasm() must be awaited first!");
11118 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
11119 // debug statements here
11121 // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
11122 export function DirectionalChannelInfo_clone(orig: number): number {
11123 if(!isWasmInitialized) {
11124 throw new Error("initializeWasm() must be awaited first!");
11126 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
11127 return nativeResponseValue;
11129 // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
11130 export function DirectionalChannelInfo_write(obj: number): Uint8Array {
11131 if(!isWasmInitialized) {
11132 throw new Error("initializeWasm() must be awaited first!");
11134 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
11135 return decodeArray(nativeResponseValue);
11137 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
11138 export function DirectionalChannelInfo_read(ser: Uint8Array): number {
11139 if(!isWasmInitialized) {
11140 throw new Error("initializeWasm() must be awaited first!");
11142 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
11143 return nativeResponseValue;
11145 // void ChannelInfo_free(struct LDKChannelInfo this_ptr);
11146 export function ChannelInfo_free(this_ptr: number): void {
11147 if(!isWasmInitialized) {
11148 throw new Error("initializeWasm() must be awaited first!");
11150 const nativeResponseValue = wasm.ChannelInfo_free(this_ptr);
11151 // debug statements here
11153 // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11154 export function ChannelInfo_get_features(this_ptr: number): number {
11155 if(!isWasmInitialized) {
11156 throw new Error("initializeWasm() must be awaited first!");
11158 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
11159 return nativeResponseValue;
11161 // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11162 export function ChannelInfo_set_features(this_ptr: number, val: number): void {
11163 if(!isWasmInitialized) {
11164 throw new Error("initializeWasm() must be awaited first!");
11166 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
11167 // debug statements here
11169 // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11170 export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
11171 if(!isWasmInitialized) {
11172 throw new Error("initializeWasm() must be awaited first!");
11174 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
11175 return decodeArray(nativeResponseValue);
11177 // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11178 export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
11179 if(!isWasmInitialized) {
11180 throw new Error("initializeWasm() must be awaited first!");
11182 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
11183 // debug statements here
11185 // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11186 export function ChannelInfo_get_one_to_two(this_ptr: number): number {
11187 if(!isWasmInitialized) {
11188 throw new Error("initializeWasm() must be awaited first!");
11190 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
11191 return nativeResponseValue;
11193 // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
11194 export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
11195 if(!isWasmInitialized) {
11196 throw new Error("initializeWasm() must be awaited first!");
11198 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
11199 // debug statements here
11201 // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11202 export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
11203 if(!isWasmInitialized) {
11204 throw new Error("initializeWasm() must be awaited first!");
11206 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
11207 return decodeArray(nativeResponseValue);
11209 // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11210 export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
11211 if(!isWasmInitialized) {
11212 throw new Error("initializeWasm() must be awaited first!");
11214 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
11215 // debug statements here
11217 // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11218 export function ChannelInfo_get_two_to_one(this_ptr: number): number {
11219 if(!isWasmInitialized) {
11220 throw new Error("initializeWasm() must be awaited first!");
11222 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
11223 return nativeResponseValue;
11225 // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
11226 export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
11227 if(!isWasmInitialized) {
11228 throw new Error("initializeWasm() must be awaited first!");
11230 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
11231 // debug statements here
11233 // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
11234 export function ChannelInfo_get_announcement_message(this_ptr: number): number {
11235 if(!isWasmInitialized) {
11236 throw new Error("initializeWasm() must be awaited first!");
11238 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
11239 return nativeResponseValue;
11241 // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
11242 export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
11243 if(!isWasmInitialized) {
11244 throw new Error("initializeWasm() must be awaited first!");
11246 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
11247 // debug statements here
11249 // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
11250 export function ChannelInfo_write(obj: number): Uint8Array {
11251 if(!isWasmInitialized) {
11252 throw new Error("initializeWasm() must be awaited first!");
11254 const nativeResponseValue = wasm.ChannelInfo_write(obj);
11255 return decodeArray(nativeResponseValue);
11257 // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
11258 export function ChannelInfo_read(ser: Uint8Array): number {
11259 if(!isWasmInitialized) {
11260 throw new Error("initializeWasm() must be awaited first!");
11262 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
11263 return nativeResponseValue;
11265 // void RoutingFees_free(struct LDKRoutingFees this_ptr);
11266 export function RoutingFees_free(this_ptr: number): void {
11267 if(!isWasmInitialized) {
11268 throw new Error("initializeWasm() must be awaited first!");
11270 const nativeResponseValue = wasm.RoutingFees_free(this_ptr);
11271 // debug statements here
11273 // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
11274 export function RoutingFees_get_base_msat(this_ptr: number): number {
11275 if(!isWasmInitialized) {
11276 throw new Error("initializeWasm() must be awaited first!");
11278 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
11279 return nativeResponseValue;
11281 // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
11282 export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
11283 if(!isWasmInitialized) {
11284 throw new Error("initializeWasm() must be awaited first!");
11286 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
11287 // debug statements here
11289 // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
11290 export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
11291 if(!isWasmInitialized) {
11292 throw new Error("initializeWasm() must be awaited first!");
11294 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
11295 return nativeResponseValue;
11297 // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
11298 export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
11299 if(!isWasmInitialized) {
11300 throw new Error("initializeWasm() must be awaited first!");
11302 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
11303 // debug statements here
11305 // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
11306 export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
11307 if(!isWasmInitialized) {
11308 throw new Error("initializeWasm() must be awaited first!");
11310 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
11311 return nativeResponseValue;
11313 // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
11314 export function RoutingFees_clone(orig: number): number {
11315 if(!isWasmInitialized) {
11316 throw new Error("initializeWasm() must be awaited first!");
11318 const nativeResponseValue = wasm.RoutingFees_clone(orig);
11319 return nativeResponseValue;
11321 // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
11322 export function RoutingFees_read(ser: Uint8Array): number {
11323 if(!isWasmInitialized) {
11324 throw new Error("initializeWasm() must be awaited first!");
11326 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
11327 return nativeResponseValue;
11329 // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
11330 export function RoutingFees_write(obj: number): Uint8Array {
11331 if(!isWasmInitialized) {
11332 throw new Error("initializeWasm() must be awaited first!");
11334 const nativeResponseValue = wasm.RoutingFees_write(obj);
11335 return decodeArray(nativeResponseValue);
11337 // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_ptr);
11338 export function NodeAnnouncementInfo_free(this_ptr: number): void {
11339 if(!isWasmInitialized) {
11340 throw new Error("initializeWasm() must be awaited first!");
11342 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_ptr);
11343 // debug statements here
11345 // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
11346 export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
11347 if(!isWasmInitialized) {
11348 throw new Error("initializeWasm() must be awaited first!");
11350 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
11351 return nativeResponseValue;
11353 // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11354 export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
11355 if(!isWasmInitialized) {
11356 throw new Error("initializeWasm() must be awaited first!");
11358 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
11359 // debug statements here
11361 // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
11362 export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
11363 if(!isWasmInitialized) {
11364 throw new Error("initializeWasm() must be awaited first!");
11366 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
11367 return nativeResponseValue;
11369 // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
11370 export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
11371 if(!isWasmInitialized) {
11372 throw new Error("initializeWasm() must be awaited first!");
11374 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
11375 // debug statements here
11377 // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
11378 export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
11379 if(!isWasmInitialized) {
11380 throw new Error("initializeWasm() must be awaited first!");
11382 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
11383 return decodeArray(nativeResponseValue);
11385 // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
11386 export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
11387 if(!isWasmInitialized) {
11388 throw new Error("initializeWasm() must be awaited first!");
11390 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
11391 // debug statements here
11393 // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
11394 export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
11395 if(!isWasmInitialized) {
11396 throw new Error("initializeWasm() must be awaited first!");
11398 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
11399 return decodeArray(nativeResponseValue);
11401 // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11402 export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
11403 if(!isWasmInitialized) {
11404 throw new Error("initializeWasm() must be awaited first!");
11406 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
11407 // debug statements here
11409 // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
11410 export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
11411 if(!isWasmInitialized) {
11412 throw new Error("initializeWasm() must be awaited first!");
11414 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
11415 // debug statements here
11417 // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
11418 export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
11419 if(!isWasmInitialized) {
11420 throw new Error("initializeWasm() must be awaited first!");
11422 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
11423 return nativeResponseValue;
11425 // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
11426 export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
11427 if(!isWasmInitialized) {
11428 throw new Error("initializeWasm() must be awaited first!");
11430 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
11431 // debug statements here
11433 // 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);
11434 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 {
11435 if(!isWasmInitialized) {
11436 throw new Error("initializeWasm() must be awaited first!");
11438 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
11439 return nativeResponseValue;
11441 // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
11442 export function NodeAnnouncementInfo_clone(orig: number): number {
11443 if(!isWasmInitialized) {
11444 throw new Error("initializeWasm() must be awaited first!");
11446 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
11447 return nativeResponseValue;
11449 // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
11450 export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
11451 if(!isWasmInitialized) {
11452 throw new Error("initializeWasm() must be awaited first!");
11454 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
11455 return decodeArray(nativeResponseValue);
11457 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
11458 export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
11459 if(!isWasmInitialized) {
11460 throw new Error("initializeWasm() must be awaited first!");
11462 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
11463 return nativeResponseValue;
11465 // void NodeInfo_free(struct LDKNodeInfo this_ptr);
11466 export function NodeInfo_free(this_ptr: number): void {
11467 if(!isWasmInitialized) {
11468 throw new Error("initializeWasm() must be awaited first!");
11470 const nativeResponseValue = wasm.NodeInfo_free(this_ptr);
11471 // debug statements here
11473 // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
11474 export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
11475 if(!isWasmInitialized) {
11476 throw new Error("initializeWasm() must be awaited first!");
11478 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
11479 // debug statements here
11481 // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
11482 export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
11483 if(!isWasmInitialized) {
11484 throw new Error("initializeWasm() must be awaited first!");
11486 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
11487 return nativeResponseValue;
11489 // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11490 export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
11491 if(!isWasmInitialized) {
11492 throw new Error("initializeWasm() must be awaited first!");
11494 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
11495 // debug statements here
11497 // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
11498 export function NodeInfo_get_announcement_info(this_ptr: number): number {
11499 if(!isWasmInitialized) {
11500 throw new Error("initializeWasm() must be awaited first!");
11502 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
11503 return nativeResponseValue;
11505 // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
11506 export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
11507 if(!isWasmInitialized) {
11508 throw new Error("initializeWasm() must be awaited first!");
11510 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
11511 // debug statements here
11513 // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
11514 export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
11515 if(!isWasmInitialized) {
11516 throw new Error("initializeWasm() must be awaited first!");
11518 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
11519 return nativeResponseValue;
11521 // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
11522 export function NodeInfo_clone(orig: number): number {
11523 if(!isWasmInitialized) {
11524 throw new Error("initializeWasm() must be awaited first!");
11526 const nativeResponseValue = wasm.NodeInfo_clone(orig);
11527 return nativeResponseValue;
11529 // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
11530 export function NodeInfo_write(obj: number): Uint8Array {
11531 if(!isWasmInitialized) {
11532 throw new Error("initializeWasm() must be awaited first!");
11534 const nativeResponseValue = wasm.NodeInfo_write(obj);
11535 return decodeArray(nativeResponseValue);
11537 // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
11538 export function NodeInfo_read(ser: Uint8Array): number {
11539 if(!isWasmInitialized) {
11540 throw new Error("initializeWasm() must be awaited first!");
11542 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
11543 return nativeResponseValue;
11545 // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
11546 export function NetworkGraph_write(obj: number): Uint8Array {
11547 if(!isWasmInitialized) {
11548 throw new Error("initializeWasm() must be awaited first!");
11550 const nativeResponseValue = wasm.NetworkGraph_write(obj);
11551 return decodeArray(nativeResponseValue);
11553 // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
11554 export function NetworkGraph_read(ser: Uint8Array): number {
11555 if(!isWasmInitialized) {
11556 throw new Error("initializeWasm() must be awaited first!");
11558 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
11559 return nativeResponseValue;
11561 // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
11562 export function NetworkGraph_new(genesis_hash: Uint8Array): number {
11563 if(!isWasmInitialized) {
11564 throw new Error("initializeWasm() must be awaited first!");
11566 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
11567 return nativeResponseValue;
11569 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
11570 export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
11571 if(!isWasmInitialized) {
11572 throw new Error("initializeWasm() must be awaited first!");
11574 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
11575 return nativeResponseValue;
11577 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
11578 export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
11579 if(!isWasmInitialized) {
11580 throw new Error("initializeWasm() must be awaited first!");
11582 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
11583 return nativeResponseValue;
11585 // 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);
11586 export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
11587 if(!isWasmInitialized) {
11588 throw new Error("initializeWasm() must be awaited first!");
11590 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
11591 return nativeResponseValue;
11593 // 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);
11594 export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
11595 if(!isWasmInitialized) {
11596 throw new Error("initializeWasm() must be awaited first!");
11598 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
11599 return nativeResponseValue;
11601 // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
11602 export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
11603 if(!isWasmInitialized) {
11604 throw new Error("initializeWasm() must be awaited first!");
11606 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
11607 // debug statements here
11609 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
11610 export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
11611 if(!isWasmInitialized) {
11612 throw new Error("initializeWasm() must be awaited first!");
11614 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
11615 return nativeResponseValue;
11617 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
11618 export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
11619 if(!isWasmInitialized) {
11620 throw new Error("initializeWasm() must be awaited first!");
11622 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
11623 return nativeResponseValue;
11626 export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
11627 if(isWasmInitialized && !allowDoubleInitialization) {
11630 const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
11631 wasm = wasmInstance.exports;
11632 isWasmInitialized = true;