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_ChannelConfigDecodeErrorZ_result_ok(long arg);
156 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
157 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
158 public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
159 public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
160 public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
161 public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
162 public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
163 public static native LDKSecp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
164 public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
165 public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
166 public static native LDKSecp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
167 public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
168 public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
169 public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
170 public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
171 public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
172 public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
173 public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
174 public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
175 public static native LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
176 public static class LDKCOption_u32Z {
177 private LDKCOption_u32Z() {}
178 export class Some extends LDKCOption_u32Z {
180 Some(number some) { this.some = some; }
182 export class None extends LDKCOption_u32Z {
185 static native void init();
187 static { LDKCOption_u32Z.init(); }
188 public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
189 public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
190 public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
191 public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
192 public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
193 public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
194 public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
195 public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
196 public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
197 public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
198 public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
199 public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
200 public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
201 public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
202 public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
203 public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
204 public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
205 public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
206 public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
207 public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
208 public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
209 public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
210 public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
211 public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
212 public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
213 public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
214 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
215 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
216 public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
217 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
218 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
219 public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
220 public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
221 public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
222 public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
223 public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
224 public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
225 public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
226 public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
227 public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
228 public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
229 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
230 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
231 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
232 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
233 public static class LDKMonitorEvent {
234 private LDKMonitorEvent() {}
235 export class HTLCEvent extends LDKMonitorEvent {
236 public number htlc_event;
237 HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
239 export class CommitmentTxBroadcasted extends LDKMonitorEvent {
240 public number commitment_tx_broadcasted;
241 CommitmentTxBroadcasted(number commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
243 static native void init();
245 static { LDKMonitorEvent.init(); }
246 public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
247 public static native long LDKCVec_MonitorEventZ_new(number[] elems);
248 public static class LDKSpendableOutputDescriptor {
249 private LDKSpendableOutputDescriptor() {}
250 export class StaticOutput extends LDKSpendableOutputDescriptor {
251 public number outpoint;
252 public number output;
253 StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
255 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
256 public number delayed_payment_output;
257 DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
259 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
260 public number static_payment_output;
261 StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
263 static native void init();
265 static { LDKSpendableOutputDescriptor.init(); }
266 public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
267 public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
268 public static class LDKEvent {
269 private LDKEvent() {}
270 export class FundingGenerationReady extends LDKEvent {
271 public Uint8Array temporary_channel_id;
272 public number channel_value_satoshis;
273 public Uint8Array output_script;
274 public number user_channel_id;
275 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; }
277 export class PaymentReceived extends LDKEvent {
278 public Uint8Array payment_hash;
279 public Uint8Array payment_secret;
281 PaymentReceived(Uint8Array payment_hash, Uint8Array payment_secret, number amt) { this.payment_hash = payment_hash; this.payment_secret = payment_secret; this.amt = amt; }
283 export class PaymentSent extends LDKEvent {
284 public Uint8Array payment_preimage;
285 PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
287 export class PaymentFailed extends LDKEvent {
288 public Uint8Array payment_hash;
289 public boolean rejected_by_dest;
290 PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
292 export class PendingHTLCsForwardable extends LDKEvent {
293 public number time_forwardable;
294 PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
296 export class SpendableOutputs extends LDKEvent {
297 public number[] outputs;
298 SpendableOutputs(number[] outputs) { this.outputs = outputs; }
300 static native void init();
302 static { LDKEvent.init(); }
303 public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
304 public static native long LDKCVec_EventZ_new(number[] elems);
305 public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
306 public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
307 public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
308 public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
309 public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
310 public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
311 public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
312 public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
313 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
314 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
315 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
316 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
317 public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
318 public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
319 public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
320 public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
321 public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
322 public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
323 public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
324 public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
325 public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
326 public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
327 public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
328 public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
332 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
334 export interface LDKBaseSign {
335 get_per_commitment_point (idx: number): Uint8Array;
336 release_commitment_secret (idx: number): Uint8Array;
337 channel_keys_id (): Uint8Array;
338 sign_counterparty_commitment (commitment_tx: number): number;
339 sign_holder_commitment_and_htlcs (commitment_tx: number): number;
340 sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
341 sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
342 sign_closing_transaction (closing_tx: Uint8Array): number;
343 sign_channel_announcement (msg: number): number;
344 ready_channel (channel_parameters: number): void;
347 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
348 throw new Error('unimplemented'); // TODO: bind to WASM
351 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
354 // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
355 export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
356 if(!isWasmInitialized) {
357 throw new Error("initializeWasm() must be awaited first!");
359 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
360 return decodeArray(nativeResponseValue);
362 // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
363 export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
364 if(!isWasmInitialized) {
365 throw new Error("initializeWasm() must be awaited first!");
367 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
368 return decodeArray(nativeResponseValue);
370 // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
371 export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
372 if(!isWasmInitialized) {
373 throw new Error("initializeWasm() must be awaited first!");
375 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
376 return decodeArray(nativeResponseValue);
378 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
379 export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
380 if(!isWasmInitialized) {
381 throw new Error("initializeWasm() must be awaited first!");
383 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
384 return nativeResponseValue;
386 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
387 export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
388 if(!isWasmInitialized) {
389 throw new Error("initializeWasm() must be awaited first!");
391 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
392 return nativeResponseValue;
394 // LDKCResult_SignatureNoneZ BaseSign_sign_justice_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
395 export function BaseSign_sign_justice_transaction(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
396 if(!isWasmInitialized) {
397 throw new Error("initializeWasm() must be awaited first!");
399 const nativeResponseValue = wasm.BaseSign_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
400 return nativeResponseValue;
402 // LDKCResult_SignatureNoneZ BaseSign_sign_counterparty_htlc_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
403 export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
404 if(!isWasmInitialized) {
405 throw new Error("initializeWasm() must be awaited first!");
407 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
408 return nativeResponseValue;
410 // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
411 export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
412 if(!isWasmInitialized) {
413 throw new Error("initializeWasm() must be awaited first!");
415 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
416 return nativeResponseValue;
418 // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
419 export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
420 if(!isWasmInitialized) {
421 throw new Error("initializeWasm() must be awaited first!");
423 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
424 return nativeResponseValue;
426 // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
427 export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
428 if(!isWasmInitialized) {
429 throw new Error("initializeWasm() must be awaited first!");
431 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
432 // debug statements here
434 // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
435 export function BaseSign_get_pubkeys(this_arg: number): number {
436 if(!isWasmInitialized) {
437 throw new Error("initializeWasm() must be awaited first!");
439 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
440 return nativeResponseValue;
445 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
447 export interface LDKSign {
448 write (): Uint8Array;
451 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
452 throw new Error('unimplemented'); // TODO: bind to WASM
455 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
458 // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
459 export function Sign_write(this_arg: number): Uint8Array {
460 if(!isWasmInitialized) {
461 throw new Error("initializeWasm() must be awaited first!");
463 const nativeResponseValue = wasm.Sign_write(this_arg);
464 return decodeArray(nativeResponseValue);
466 public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
467 public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
468 public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
469 public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
470 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
471 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
472 public static native long LDKCVec_RouteHopZ_new(number[] elems);
473 public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
474 public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
475 public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
476 public static class LDKCOption_u64Z {
477 private LDKCOption_u64Z() {}
478 export class Some extends LDKCOption_u64Z {
480 Some(number some) { this.some = some; }
482 export class None extends LDKCOption_u64Z {
485 static native void init();
487 static { LDKCOption_u64Z.init(); }
488 public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
489 public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
490 public static native long LDKCVec_RouteHintZ_new(number[] elems);
491 public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
492 public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
493 public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
494 public static class LDKErrorAction {
495 private LDKErrorAction() {}
496 export class DisconnectPeer extends LDKErrorAction {
498 DisconnectPeer(number msg) { this.msg = msg; }
500 export class IgnoreError extends LDKErrorAction {
503 export class SendErrorMessage extends LDKErrorAction {
505 SendErrorMessage(number msg) { this.msg = msg; }
507 static native void init();
509 static { LDKErrorAction.init(); }
510 public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
511 public static class LDKHTLCFailChannelUpdate {
512 private LDKHTLCFailChannelUpdate() {}
513 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
515 ChannelUpdateMessage(number msg) { this.msg = msg; }
517 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
518 public number short_channel_id;
519 public boolean is_permanent;
520 ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
522 export class NodeFailure extends LDKHTLCFailChannelUpdate {
523 public Uint8Array node_id;
524 public boolean is_permanent;
525 NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
527 static native void init();
529 static { LDKHTLCFailChannelUpdate.init(); }
530 public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
531 public static class LDKMessageSendEvent {
532 private LDKMessageSendEvent() {}
533 export class SendAcceptChannel extends LDKMessageSendEvent {
534 public Uint8Array node_id;
536 SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
538 export class SendOpenChannel extends LDKMessageSendEvent {
539 public Uint8Array node_id;
541 SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
543 export class SendFundingCreated extends LDKMessageSendEvent {
544 public Uint8Array node_id;
546 SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
548 export class SendFundingSigned extends LDKMessageSendEvent {
549 public Uint8Array node_id;
551 SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
553 export class SendFundingLocked extends LDKMessageSendEvent {
554 public Uint8Array node_id;
556 SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
558 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
559 public Uint8Array node_id;
561 SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
563 export class UpdateHTLCs extends LDKMessageSendEvent {
564 public Uint8Array node_id;
565 public number updates;
566 UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
568 export class SendRevokeAndACK extends LDKMessageSendEvent {
569 public Uint8Array node_id;
571 SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
573 export class SendClosingSigned extends LDKMessageSendEvent {
574 public Uint8Array node_id;
576 SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
578 export class SendShutdown extends LDKMessageSendEvent {
579 public Uint8Array node_id;
581 SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
583 export class SendChannelReestablish extends LDKMessageSendEvent {
584 public Uint8Array node_id;
586 SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
588 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
590 public number update_msg;
591 BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
593 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
595 BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
597 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
599 BroadcastChannelUpdate(number msg) { this.msg = msg; }
601 export class HandleError extends LDKMessageSendEvent {
602 public Uint8Array node_id;
603 public number action;
604 HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
606 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
607 public number update;
608 PaymentFailureNetworkUpdate(number update) { this.update = update; }
610 export class SendChannelRangeQuery extends LDKMessageSendEvent {
611 public Uint8Array node_id;
613 SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
615 export class SendShortIdsQuery extends LDKMessageSendEvent {
616 public Uint8Array node_id;
618 SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
620 export class SendReplyChannelRange extends LDKMessageSendEvent {
621 public Uint8Array node_id;
623 SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
625 static native void init();
627 static { LDKMessageSendEvent.init(); }
628 public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
629 public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
630 public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
631 public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
632 public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
633 public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
634 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
635 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
636 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
637 public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
638 public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
639 public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
640 public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
641 public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
642 public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
643 public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
644 public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
645 public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
646 public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
647 public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
648 public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
649 public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
650 public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
651 public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
652 public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
653 public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
654 public static class LDKCOption_C2Tuple_usizeTransactionZZ {
655 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
656 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
658 Some(number some) { this.some = some; }
660 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
663 static native void init();
665 static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
666 public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
667 public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
668 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
669 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
670 public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
671 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
672 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
673 public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
674 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
675 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
676 public static class LDKNetAddress {
677 private LDKNetAddress() {}
678 export class IPv4 extends LDKNetAddress {
679 public Uint8Array addr;
681 IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
683 export class IPv6 extends LDKNetAddress {
684 public Uint8Array addr;
686 IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
688 export class OnionV2 extends LDKNetAddress {
689 public Uint8Array addr;
691 OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
693 export class OnionV3 extends LDKNetAddress {
694 public Uint8Array ed25519_pubkey;
695 public number checksum;
696 public number version;
698 OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
700 static native void init();
702 static { LDKNetAddress.init(); }
703 public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
704 public static native long LDKCVec_NetAddressZ_new(number[] elems);
705 public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
706 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
707 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
708 public static native long LDKCVec_u64Z_new(number[] elems);
709 public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
710 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
711 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
712 public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
713 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
714 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
715 public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
716 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
717 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
718 public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
719 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
720 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
721 public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
722 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
723 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
724 public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
725 public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
726 public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
727 public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
728 public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
729 public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
730 public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
731 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
732 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
733 public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
734 public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
735 public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
736 public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
737 public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
738 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
739 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
740 public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
741 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
742 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
743 public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
744 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
745 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
746 public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
747 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
748 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
749 public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
750 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
751 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
752 public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
753 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
754 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
755 public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
756 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
757 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
758 public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
759 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
760 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
761 public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
762 public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
763 public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
764 public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
765 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
766 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
767 public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
768 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
769 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
770 public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
771 public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
772 public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
773 public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
774 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
775 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
776 public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
777 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
778 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
779 public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
780 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
781 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
782 public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
783 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
784 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
785 public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
786 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
787 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
788 public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
789 public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
790 public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
791 public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
792 public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
793 public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
794 public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
795 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
796 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
797 public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
798 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
799 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
800 public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
801 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
802 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
803 public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
804 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
805 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
806 public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
807 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
808 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
809 public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
810 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
811 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
812 public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
813 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
814 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
815 public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
816 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
817 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
818 public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
819 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
820 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
821 public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
822 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
823 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
824 public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
825 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
826 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
827 public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
828 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
829 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
830 public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
831 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
832 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
833 public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
834 public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
835 public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
836 public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
837 public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
838 public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
839 public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
840 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
841 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
842 public static native long LDKCVec_TxOutZ_new(number[] elems);
843 public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
844 public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
845 public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
846 public static native boolean LDKCResult_NoneErrorZ_result_ok(long arg);
847 public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
848 public static native LDKIOError LDKCResult_NoneErrorZ_get_err(long arg);
849 public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
850 public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
851 public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
852 public static native LDKIOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
853 public static class LDKAPIError {
854 private LDKAPIError() {}
855 export class APIMisuseError extends LDKAPIError {
856 public Uint8Array err;
857 APIMisuseError(Uint8Array err) { this.err = err; }
859 export class FeeRateTooHigh extends LDKAPIError {
860 public Uint8Array err;
861 public number feerate;
862 FeeRateTooHigh(Uint8Array err, number feerate) { this.err = err; this.feerate = feerate; }
864 export class RouteError extends LDKAPIError {
866 RouteError(String err) { this.err = err; }
868 export class ChannelUnavailable extends LDKAPIError {
869 public Uint8Array err;
870 ChannelUnavailable(Uint8Array err) { this.err = err; }
872 export class MonitorUpdateFailed extends LDKAPIError {
873 MonitorUpdateFailed() { }
875 static native void init();
877 static { LDKAPIError.init(); }
878 public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
879 public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
880 public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
881 public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
882 public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
883 public static native long LDKCVec_APIErrorZ_new(number[] elems);
884 public static class LDKPaymentSendFailure {
885 private LDKPaymentSendFailure() {}
886 export class ParameterError extends LDKPaymentSendFailure {
887 public number parameter_error;
888 ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
890 export class PathParameterError extends LDKPaymentSendFailure {
891 public number[] path_parameter_error;
892 PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
894 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
895 public number[] all_failed_retry_safe;
896 AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
898 export class PartialFailure extends LDKPaymentSendFailure {
899 public number[] partial_failure;
900 PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
902 static native void init();
904 static { LDKPaymentSendFailure.init(); }
905 public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
906 public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
907 public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
908 public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
909 public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
913 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
915 export interface LDKWatch {
916 watch_channel (funding_txo: number, monitor: number): number;
917 update_channel (funding_txo: number, update: number): number;
918 release_pending_monitor_events (): number[];
921 export function LDKWatch_new(impl: LDKWatch): number {
922 throw new Error('unimplemented'); // TODO: bind to WASM
925 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
928 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
929 export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
930 if(!isWasmInitialized) {
931 throw new Error("initializeWasm() must be awaited first!");
933 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
934 return nativeResponseValue;
936 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
937 export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
938 if(!isWasmInitialized) {
939 throw new Error("initializeWasm() must be awaited first!");
941 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
942 return nativeResponseValue;
944 // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
945 export function Watch_release_pending_monitor_events(this_arg: number): number[] {
946 if(!isWasmInitialized) {
947 throw new Error("initializeWasm() must be awaited first!");
949 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
950 return nativeResponseValue;
955 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
957 export interface LDKBroadcasterInterface {
958 broadcast_transaction (tx: Uint8Array): void;
961 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
962 throw new Error('unimplemented'); // TODO: bind to WASM
965 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
968 // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
969 export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
970 if(!isWasmInitialized) {
971 throw new Error("initializeWasm() must be awaited first!");
973 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
974 // debug statements here
979 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
981 export interface LDKKeysInterface {
982 get_node_secret (): Uint8Array;
983 get_destination_script (): Uint8Array;
984 get_shutdown_pubkey (): Uint8Array;
985 get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
986 get_secure_random_bytes (): Uint8Array;
987 read_chan_signer (reader: Uint8Array): number;
990 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
991 throw new Error('unimplemented'); // TODO: bind to WASM
994 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
997 // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
998 export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
999 if(!isWasmInitialized) {
1000 throw new Error("initializeWasm() must be awaited first!");
1002 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
1003 return decodeArray(nativeResponseValue);
1005 // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
1006 export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
1007 if(!isWasmInitialized) {
1008 throw new Error("initializeWasm() must be awaited first!");
1010 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
1011 return decodeArray(nativeResponseValue);
1013 // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
1014 export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
1015 if(!isWasmInitialized) {
1016 throw new Error("initializeWasm() must be awaited first!");
1018 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
1019 return decodeArray(nativeResponseValue);
1021 // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
1022 export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
1023 if(!isWasmInitialized) {
1024 throw new Error("initializeWasm() must be awaited first!");
1026 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
1027 return nativeResponseValue;
1029 // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
1030 export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
1031 if(!isWasmInitialized) {
1032 throw new Error("initializeWasm() must be awaited first!");
1034 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
1035 return decodeArray(nativeResponseValue);
1037 // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
1038 export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
1039 if(!isWasmInitialized) {
1040 throw new Error("initializeWasm() must be awaited first!");
1042 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
1043 return nativeResponseValue;
1048 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1050 export interface LDKFeeEstimator {
1051 get_est_sat_per_1000_weight (confirmation_target: LDKConfirmationTarget): number;
1054 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
1055 throw new Error('unimplemented'); // TODO: bind to WASM
1058 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1061 // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
1062 export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: LDKConfirmationTarget): number {
1063 if(!isWasmInitialized) {
1064 throw new Error("initializeWasm() must be awaited first!");
1066 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
1067 return nativeResponseValue;
1072 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1074 export interface LDKLogger {
1075 log (record: String): void;
1078 export function LDKLogger_new(impl: LDKLogger): number {
1079 throw new Error('unimplemented'); // TODO: bind to WASM
1082 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1085 public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
1086 public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
1087 public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
1088 public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
1089 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
1090 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
1094 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1096 export interface LDKMessageSendEventsProvider {
1097 get_and_clear_pending_msg_events (): number[];
1100 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1101 throw new Error('unimplemented'); // TODO: bind to WASM
1104 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1107 // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1108 export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1109 if(!isWasmInitialized) {
1110 throw new Error("initializeWasm() must be awaited first!");
1112 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1113 return nativeResponseValue;
1118 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1120 export interface LDKEventsProvider {
1121 get_and_clear_pending_events (): number[];
1124 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1125 throw new Error('unimplemented'); // TODO: bind to WASM
1128 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1131 // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider *NONNULL_PTR this_arg
1132 export function EventsProvider_get_and_clear_pending_events(this_arg: number): number[] {
1133 if(!isWasmInitialized) {
1134 throw new Error("initializeWasm() must be awaited first!");
1136 const nativeResponseValue = wasm.EventsProvider_get_and_clear_pending_events(this_arg);
1137 return nativeResponseValue;
1142 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1144 export interface LDKAccess {
1145 get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1148 export function LDKAccess_new(impl: LDKAccess): number {
1149 throw new Error('unimplemented'); // TODO: bind to WASM
1152 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1155 // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1156 export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1157 if(!isWasmInitialized) {
1158 throw new Error("initializeWasm() must be awaited first!");
1160 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1161 return nativeResponseValue;
1166 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1168 export interface LDKListen {
1169 block_connected (block: Uint8Array, height: number): void;
1170 block_disconnected (header: Uint8Array, height: number): void;
1173 export function LDKListen_new(impl: LDKListen): number {
1174 throw new Error('unimplemented'); // TODO: bind to WASM
1177 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1180 // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1181 export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1182 if(!isWasmInitialized) {
1183 throw new Error("initializeWasm() must be awaited first!");
1185 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1186 // debug statements here
1188 // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1189 export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1190 if(!isWasmInitialized) {
1191 throw new Error("initializeWasm() must be awaited first!");
1193 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1194 // debug statements here
1199 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1201 export interface LDKFilter {
1202 register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1203 register_output (output: number): number;
1206 export function LDKFilter_new(impl: LDKFilter): number {
1207 throw new Error('unimplemented'); // TODO: bind to WASM
1210 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1213 // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1214 export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1215 if(!isWasmInitialized) {
1216 throw new Error("initializeWasm() must be awaited first!");
1218 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1219 // debug statements here
1221 // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1222 export function Filter_register_output(this_arg: number, output: number): number {
1223 if(!isWasmInitialized) {
1224 throw new Error("initializeWasm() must be awaited first!");
1226 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1227 return nativeResponseValue;
1232 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1234 export interface LDKPersist {
1235 persist_new_channel (id: number, data: number): number;
1236 update_persisted_channel (id: number, update: number, data: number): number;
1239 export function LDKPersist_new(impl: LDKPersist): number {
1240 throw new Error('unimplemented'); // TODO: bind to WASM
1243 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1246 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1247 export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1248 if(!isWasmInitialized) {
1249 throw new Error("initializeWasm() must be awaited first!");
1251 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1252 return nativeResponseValue;
1254 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
1255 export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1256 if(!isWasmInitialized) {
1257 throw new Error("initializeWasm() must be awaited first!");
1259 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1260 return nativeResponseValue;
1265 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1267 export interface LDKChannelMessageHandler {
1268 handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1269 handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1270 handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1271 handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1272 handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1273 handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1274 handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1275 handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1276 handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1277 handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1278 handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1279 handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1280 handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1281 handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1282 handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1283 peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1284 peer_connected (their_node_id: Uint8Array, msg: number): void;
1285 handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1286 handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1287 handle_error (their_node_id: Uint8Array, msg: number): void;
1290 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1291 throw new Error('unimplemented'); // TODO: bind to WASM
1294 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1297 // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg
1298 export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1299 if(!isWasmInitialized) {
1300 throw new Error("initializeWasm() must be awaited first!");
1302 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1303 // debug statements here
1305 // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg
1306 export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1307 if(!isWasmInitialized) {
1308 throw new Error("initializeWasm() must be awaited first!");
1310 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1311 // debug statements here
1313 // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1314 export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1315 if(!isWasmInitialized) {
1316 throw new Error("initializeWasm() must be awaited first!");
1318 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1319 // debug statements here
1321 // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1322 export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1323 if(!isWasmInitialized) {
1324 throw new Error("initializeWasm() must be awaited first!");
1326 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1327 // debug statements here
1329 // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1330 export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1331 if(!isWasmInitialized) {
1332 throw new Error("initializeWasm() must be awaited first!");
1334 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1335 // debug statements here
1337 // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInitFeatures *NONNULL_PTR their_features, const struct LDKShutdown *NONNULL_PTR msg
1338 export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1339 if(!isWasmInitialized) {
1340 throw new Error("initializeWasm() must be awaited first!");
1342 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1343 // debug statements here
1345 // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1346 export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1347 if(!isWasmInitialized) {
1348 throw new Error("initializeWasm() must be awaited first!");
1350 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1351 // debug statements here
1353 // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1354 export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1355 if(!isWasmInitialized) {
1356 throw new Error("initializeWasm() must be awaited first!");
1358 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1359 // debug statements here
1361 // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1362 export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1363 if(!isWasmInitialized) {
1364 throw new Error("initializeWasm() must be awaited first!");
1366 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1367 // debug statements here
1369 // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1370 export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1371 if(!isWasmInitialized) {
1372 throw new Error("initializeWasm() must be awaited first!");
1374 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1375 // debug statements here
1377 // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1378 export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1379 if(!isWasmInitialized) {
1380 throw new Error("initializeWasm() must be awaited first!");
1382 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1383 // debug statements here
1385 // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1386 export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1387 if(!isWasmInitialized) {
1388 throw new Error("initializeWasm() must be awaited first!");
1390 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1391 // debug statements here
1393 // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1394 export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1395 if(!isWasmInitialized) {
1396 throw new Error("initializeWasm() must be awaited first!");
1398 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1399 // debug statements here
1401 // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1402 export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1403 if(!isWasmInitialized) {
1404 throw new Error("initializeWasm() must be awaited first!");
1406 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1407 // debug statements here
1409 // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1410 export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1411 if(!isWasmInitialized) {
1412 throw new Error("initializeWasm() must be awaited first!");
1414 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1415 // debug statements here
1417 // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1418 export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1419 if(!isWasmInitialized) {
1420 throw new Error("initializeWasm() must be awaited first!");
1422 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1423 // debug statements here
1425 // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1426 export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1427 if(!isWasmInitialized) {
1428 throw new Error("initializeWasm() must be awaited first!");
1430 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1431 // debug statements here
1433 // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1434 export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1435 if(!isWasmInitialized) {
1436 throw new Error("initializeWasm() must be awaited first!");
1438 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1439 // debug statements here
1441 // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
1442 export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1443 if(!isWasmInitialized) {
1444 throw new Error("initializeWasm() must be awaited first!");
1446 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
1447 // debug statements here
1449 // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1450 export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1451 if(!isWasmInitialized) {
1452 throw new Error("initializeWasm() must be awaited first!");
1454 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1455 // debug statements here
1460 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1462 export interface LDKRoutingMessageHandler {
1463 handle_node_announcement (msg: number): number;
1464 handle_channel_announcement (msg: number): number;
1465 handle_channel_update (msg: number): number;
1466 handle_htlc_fail_channel_update (update: number): void;
1467 get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1468 get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1469 sync_routing_table (their_node_id: Uint8Array, init: number): void;
1470 handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1471 handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1472 handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1473 handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1476 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1477 throw new Error('unimplemented'); // TODO: bind to WASM
1480 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1483 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1484 export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1485 if(!isWasmInitialized) {
1486 throw new Error("initializeWasm() must be awaited first!");
1488 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1489 return nativeResponseValue;
1491 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1492 export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1493 if(!isWasmInitialized) {
1494 throw new Error("initializeWasm() must be awaited first!");
1496 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1497 return nativeResponseValue;
1499 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1500 export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1501 if(!isWasmInitialized) {
1502 throw new Error("initializeWasm() must be awaited first!");
1504 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1505 return nativeResponseValue;
1507 // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1508 export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1509 if(!isWasmInitialized) {
1510 throw new Error("initializeWasm() must be awaited first!");
1512 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1513 // debug statements here
1515 // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1516 export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1517 if(!isWasmInitialized) {
1518 throw new Error("initializeWasm() must be awaited first!");
1520 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1521 return nativeResponseValue;
1523 // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1524 export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1525 if(!isWasmInitialized) {
1526 throw new Error("initializeWasm() must be awaited first!");
1528 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1529 return nativeResponseValue;
1531 // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1532 export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1533 if(!isWasmInitialized) {
1534 throw new Error("initializeWasm() must be awaited first!");
1536 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1537 // debug statements here
1539 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1540 export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1541 if(!isWasmInitialized) {
1542 throw new Error("initializeWasm() must be awaited first!");
1544 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1545 return nativeResponseValue;
1547 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1548 export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1549 if(!isWasmInitialized) {
1550 throw new Error("initializeWasm() must be awaited first!");
1552 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1553 return nativeResponseValue;
1555 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1556 export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1557 if(!isWasmInitialized) {
1558 throw new Error("initializeWasm() must be awaited first!");
1560 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1561 return nativeResponseValue;
1563 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1564 export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1565 if(!isWasmInitialized) {
1566 throw new Error("initializeWasm() must be awaited first!");
1568 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1569 return nativeResponseValue;
1574 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1576 export interface LDKSocketDescriptor {
1577 send_data (data: Uint8Array, resume_read: boolean): number;
1578 disconnect_socket (): void;
1579 eq (other_arg: number): boolean;
1583 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1584 throw new Error('unimplemented'); // TODO: bind to WASM
1587 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1590 // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1591 export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1592 if(!isWasmInitialized) {
1593 throw new Error("initializeWasm() must be awaited first!");
1595 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1596 return nativeResponseValue;
1598 // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1599 export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1600 if(!isWasmInitialized) {
1601 throw new Error("initializeWasm() must be awaited first!");
1603 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1604 // debug statements here
1606 // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1607 export function SocketDescriptor_hash(this_arg: number): number {
1608 if(!isWasmInitialized) {
1609 throw new Error("initializeWasm() must be awaited first!");
1611 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1612 return nativeResponseValue;
1614 // void Transaction_free(struct LDKTransaction _res);
1615 export function Transaction_free(_res: Uint8Array): void {
1616 if(!isWasmInitialized) {
1617 throw new Error("initializeWasm() must be awaited first!");
1619 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1620 // debug statements here
1622 // void TxOut_free(struct LDKTxOut _res);
1623 export function TxOut_free(_res: number): void {
1624 if(!isWasmInitialized) {
1625 throw new Error("initializeWasm() must be awaited first!");
1627 const nativeResponseValue = wasm.TxOut_free(_res);
1628 // debug statements here
1630 // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1631 export function TxOut_clone(orig: number): number {
1632 if(!isWasmInitialized) {
1633 throw new Error("initializeWasm() must be awaited first!");
1635 const nativeResponseValue = wasm.TxOut_clone(orig);
1636 return nativeResponseValue;
1638 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
1639 export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
1640 if(!isWasmInitialized) {
1641 throw new Error("initializeWasm() must be awaited first!");
1643 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
1644 return nativeResponseValue;
1646 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
1647 export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
1648 if(!isWasmInitialized) {
1649 throw new Error("initializeWasm() must be awaited first!");
1651 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
1652 return nativeResponseValue;
1654 // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
1655 export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
1656 if(!isWasmInitialized) {
1657 throw new Error("initializeWasm() must be awaited first!");
1659 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
1660 // debug statements here
1662 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
1663 export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
1664 if(!isWasmInitialized) {
1665 throw new Error("initializeWasm() must be awaited first!");
1667 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
1668 return nativeResponseValue;
1670 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
1671 export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
1672 if(!isWasmInitialized) {
1673 throw new Error("initializeWasm() must be awaited first!");
1675 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
1676 return nativeResponseValue;
1678 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
1679 export function CResult_OutPointDecodeErrorZ_err(e: number): number {
1680 if(!isWasmInitialized) {
1681 throw new Error("initializeWasm() must be awaited first!");
1683 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
1684 return nativeResponseValue;
1686 // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
1687 export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
1688 if(!isWasmInitialized) {
1689 throw new Error("initializeWasm() must be awaited first!");
1691 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
1692 // debug statements here
1694 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
1695 export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
1696 if(!isWasmInitialized) {
1697 throw new Error("initializeWasm() must be awaited first!");
1699 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
1700 return nativeResponseValue;
1702 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1703 export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1704 if(!isWasmInitialized) {
1705 throw new Error("initializeWasm() must be awaited first!");
1707 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1708 return nativeResponseValue;
1710 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1711 export function CResult_SecretKeyErrorZ_err(e: LDKSecp256k1Error): number {
1712 if(!isWasmInitialized) {
1713 throw new Error("initializeWasm() must be awaited first!");
1715 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1716 return nativeResponseValue;
1718 // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1719 export function CResult_SecretKeyErrorZ_free(_res: number): void {
1720 if(!isWasmInitialized) {
1721 throw new Error("initializeWasm() must be awaited first!");
1723 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1724 // debug statements here
1726 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1727 export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1728 if(!isWasmInitialized) {
1729 throw new Error("initializeWasm() must be awaited first!");
1731 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1732 return nativeResponseValue;
1734 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1735 export function CResult_PublicKeyErrorZ_err(e: LDKSecp256k1Error): number {
1736 if(!isWasmInitialized) {
1737 throw new Error("initializeWasm() must be awaited first!");
1739 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1740 return nativeResponseValue;
1742 // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1743 export function CResult_PublicKeyErrorZ_free(_res: number): void {
1744 if(!isWasmInitialized) {
1745 throw new Error("initializeWasm() must be awaited first!");
1747 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1748 // debug statements here
1750 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1751 export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1752 if(!isWasmInitialized) {
1753 throw new Error("initializeWasm() must be awaited first!");
1755 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1756 return nativeResponseValue;
1758 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1759 export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1760 if(!isWasmInitialized) {
1761 throw new Error("initializeWasm() must be awaited first!");
1763 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1764 return nativeResponseValue;
1766 // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1767 export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1768 if(!isWasmInitialized) {
1769 throw new Error("initializeWasm() must be awaited first!");
1771 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1772 // debug statements here
1774 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1775 export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
1776 if(!isWasmInitialized) {
1777 throw new Error("initializeWasm() must be awaited first!");
1779 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
1780 return nativeResponseValue;
1782 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1783 export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
1784 if(!isWasmInitialized) {
1785 throw new Error("initializeWasm() must be awaited first!");
1787 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
1788 return nativeResponseValue;
1790 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1791 export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
1792 if(!isWasmInitialized) {
1793 throw new Error("initializeWasm() must be awaited first!");
1795 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
1796 return nativeResponseValue;
1798 // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1799 export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
1800 if(!isWasmInitialized) {
1801 throw new Error("initializeWasm() must be awaited first!");
1803 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
1804 // debug statements here
1806 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1807 export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
1808 if(!isWasmInitialized) {
1809 throw new Error("initializeWasm() must be awaited first!");
1811 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
1812 return nativeResponseValue;
1814 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1815 export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
1816 if(!isWasmInitialized) {
1817 throw new Error("initializeWasm() must be awaited first!");
1819 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
1820 return nativeResponseValue;
1822 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
1823 export function CResult_TxCreationKeysErrorZ_err(e: LDKSecp256k1Error): number {
1824 if(!isWasmInitialized) {
1825 throw new Error("initializeWasm() must be awaited first!");
1827 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
1828 return nativeResponseValue;
1830 // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
1831 export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
1832 if(!isWasmInitialized) {
1833 throw new Error("initializeWasm() must be awaited first!");
1835 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
1836 // debug statements here
1838 // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
1839 export function COption_u32Z_some(o: number): number {
1840 if(!isWasmInitialized) {
1841 throw new Error("initializeWasm() must be awaited first!");
1843 const nativeResponseValue = wasm.COption_u32Z_some(o);
1844 return nativeResponseValue;
1846 // struct LDKCOption_u32Z COption_u32Z_none(void);
1847 export function COption_u32Z_none(): number {
1848 if(!isWasmInitialized) {
1849 throw new Error("initializeWasm() must be awaited first!");
1851 const nativeResponseValue = wasm.COption_u32Z_none();
1852 return nativeResponseValue;
1854 // void COption_u32Z_free(struct LDKCOption_u32Z _res);
1855 export function COption_u32Z_free(_res: number): void {
1856 if(!isWasmInitialized) {
1857 throw new Error("initializeWasm() must be awaited first!");
1859 const nativeResponseValue = wasm.COption_u32Z_free(_res);
1860 // debug statements here
1862 // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
1863 export function COption_u32Z_clone(orig: number): number {
1864 if(!isWasmInitialized) {
1865 throw new Error("initializeWasm() must be awaited first!");
1867 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
1868 return nativeResponseValue;
1870 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
1871 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
1872 if(!isWasmInitialized) {
1873 throw new Error("initializeWasm() must be awaited first!");
1875 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
1876 return nativeResponseValue;
1878 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
1879 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
1880 if(!isWasmInitialized) {
1881 throw new Error("initializeWasm() must be awaited first!");
1883 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
1884 return nativeResponseValue;
1886 // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
1887 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
1888 if(!isWasmInitialized) {
1889 throw new Error("initializeWasm() must be awaited first!");
1891 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
1892 // debug statements here
1894 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
1895 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
1896 if(!isWasmInitialized) {
1897 throw new Error("initializeWasm() must be awaited first!");
1899 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
1900 return nativeResponseValue;
1902 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
1903 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1904 if(!isWasmInitialized) {
1905 throw new Error("initializeWasm() must be awaited first!");
1907 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
1908 return nativeResponseValue;
1910 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1911 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1912 if(!isWasmInitialized) {
1913 throw new Error("initializeWasm() must be awaited first!");
1915 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
1916 return nativeResponseValue;
1918 // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
1919 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1920 if(!isWasmInitialized) {
1921 throw new Error("initializeWasm() must be awaited first!");
1923 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
1924 // debug statements here
1926 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1927 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1928 if(!isWasmInitialized) {
1929 throw new Error("initializeWasm() must be awaited first!");
1931 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
1932 return nativeResponseValue;
1934 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
1935 export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1936 if(!isWasmInitialized) {
1937 throw new Error("initializeWasm() must be awaited first!");
1939 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
1940 return nativeResponseValue;
1942 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1943 export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1944 if(!isWasmInitialized) {
1945 throw new Error("initializeWasm() must be awaited first!");
1947 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
1948 return nativeResponseValue;
1950 // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
1951 export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1952 if(!isWasmInitialized) {
1953 throw new Error("initializeWasm() must be awaited first!");
1955 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
1956 // debug statements here
1958 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1959 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1960 if(!isWasmInitialized) {
1961 throw new Error("initializeWasm() must be awaited first!");
1963 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
1964 return nativeResponseValue;
1966 // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1967 export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
1968 if(!isWasmInitialized) {
1969 throw new Error("initializeWasm() must be awaited first!");
1971 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
1972 // debug statements here
1974 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
1975 export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1976 if(!isWasmInitialized) {
1977 throw new Error("initializeWasm() must be awaited first!");
1979 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
1980 return nativeResponseValue;
1982 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1983 export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
1984 if(!isWasmInitialized) {
1985 throw new Error("initializeWasm() must be awaited first!");
1987 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
1988 return nativeResponseValue;
1990 // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
1991 export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1992 if(!isWasmInitialized) {
1993 throw new Error("initializeWasm() must be awaited first!");
1995 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
1996 // debug statements here
1998 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1999 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2000 if(!isWasmInitialized) {
2001 throw new Error("initializeWasm() must be awaited first!");
2003 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2004 return nativeResponseValue;
2006 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2007 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2008 if(!isWasmInitialized) {
2009 throw new Error("initializeWasm() must be awaited first!");
2011 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2012 return nativeResponseValue;
2014 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2015 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2016 if(!isWasmInitialized) {
2017 throw new Error("initializeWasm() must be awaited first!");
2019 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2020 return nativeResponseValue;
2022 // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2023 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2024 if(!isWasmInitialized) {
2025 throw new Error("initializeWasm() must be awaited first!");
2027 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2028 // debug statements here
2030 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2031 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2032 if(!isWasmInitialized) {
2033 throw new Error("initializeWasm() must be awaited first!");
2035 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
2036 return nativeResponseValue;
2038 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
2039 export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
2040 if(!isWasmInitialized) {
2041 throw new Error("initializeWasm() must be awaited first!");
2043 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
2044 return nativeResponseValue;
2046 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2047 export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
2048 if(!isWasmInitialized) {
2049 throw new Error("initializeWasm() must be awaited first!");
2051 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
2052 return nativeResponseValue;
2054 // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
2055 export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
2056 if(!isWasmInitialized) {
2057 throw new Error("initializeWasm() must be awaited first!");
2059 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
2060 // debug statements here
2062 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2063 export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2064 if(!isWasmInitialized) {
2065 throw new Error("initializeWasm() must be awaited first!");
2067 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
2068 return nativeResponseValue;
2070 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2071 export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2072 if(!isWasmInitialized) {
2073 throw new Error("initializeWasm() must be awaited first!");
2075 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2076 return nativeResponseValue;
2078 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2079 export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2080 if(!isWasmInitialized) {
2081 throw new Error("initializeWasm() must be awaited first!");
2083 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2084 return nativeResponseValue;
2086 // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2087 export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2088 if(!isWasmInitialized) {
2089 throw new Error("initializeWasm() must be awaited first!");
2091 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2092 // debug statements here
2094 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
2095 export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
2096 if(!isWasmInitialized) {
2097 throw new Error("initializeWasm() must be awaited first!");
2099 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
2100 return nativeResponseValue;
2102 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
2103 export function CResult_CVec_SignatureZNoneZ_err(): number {
2104 if(!isWasmInitialized) {
2105 throw new Error("initializeWasm() must be awaited first!");
2107 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
2108 return nativeResponseValue;
2110 // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
2111 export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
2112 if(!isWasmInitialized) {
2113 throw new Error("initializeWasm() must be awaited first!");
2115 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
2116 // debug statements here
2118 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
2119 export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
2120 if(!isWasmInitialized) {
2121 throw new Error("initializeWasm() must be awaited first!");
2123 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
2124 return nativeResponseValue;
2126 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
2127 export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
2128 if(!isWasmInitialized) {
2129 throw new Error("initializeWasm() must be awaited first!");
2131 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
2132 return nativeResponseValue;
2134 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2135 export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
2136 if(!isWasmInitialized) {
2137 throw new Error("initializeWasm() must be awaited first!");
2139 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
2140 return nativeResponseValue;
2142 // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
2143 export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
2144 if(!isWasmInitialized) {
2145 throw new Error("initializeWasm() must be awaited first!");
2147 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
2148 // debug statements here
2150 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
2151 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
2152 if(!isWasmInitialized) {
2153 throw new Error("initializeWasm() must be awaited first!");
2155 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
2156 return nativeResponseValue;
2158 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
2159 export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
2160 if(!isWasmInitialized) {
2161 throw new Error("initializeWasm() must be awaited first!");
2163 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
2164 return nativeResponseValue;
2166 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2167 export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
2168 if(!isWasmInitialized) {
2169 throw new Error("initializeWasm() must be awaited first!");
2171 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
2172 return nativeResponseValue;
2174 // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
2175 export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
2176 if(!isWasmInitialized) {
2177 throw new Error("initializeWasm() must be awaited first!");
2179 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
2180 // debug statements here
2182 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
2183 export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
2184 if(!isWasmInitialized) {
2185 throw new Error("initializeWasm() must be awaited first!");
2187 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
2188 return nativeResponseValue;
2190 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
2191 export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
2192 if(!isWasmInitialized) {
2193 throw new Error("initializeWasm() must be awaited first!");
2195 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
2196 return nativeResponseValue;
2198 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
2199 export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
2200 if(!isWasmInitialized) {
2201 throw new Error("initializeWasm() must be awaited first!");
2203 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
2204 return nativeResponseValue;
2206 // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
2207 export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
2208 if(!isWasmInitialized) {
2209 throw new Error("initializeWasm() must be awaited first!");
2211 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
2212 // debug statements here
2214 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
2215 export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
2216 if(!isWasmInitialized) {
2217 throw new Error("initializeWasm() must be awaited first!");
2219 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
2220 return nativeResponseValue;
2222 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
2223 export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
2224 if(!isWasmInitialized) {
2225 throw new Error("initializeWasm() must be awaited first!");
2227 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
2228 return nativeResponseValue;
2230 // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
2231 export function C2Tuple_OutPointScriptZ_free(_res: number): void {
2232 if(!isWasmInitialized) {
2233 throw new Error("initializeWasm() must be awaited first!");
2235 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
2236 // debug statements here
2238 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
2239 export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
2240 if(!isWasmInitialized) {
2241 throw new Error("initializeWasm() must be awaited first!");
2243 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
2244 return nativeResponseValue;
2246 // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
2247 export function C2Tuple_u32ScriptZ_free(_res: number): void {
2248 if(!isWasmInitialized) {
2249 throw new Error("initializeWasm() must be awaited first!");
2251 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
2252 // debug statements here
2254 // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
2255 export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
2256 if(!isWasmInitialized) {
2257 throw new Error("initializeWasm() must be awaited first!");
2259 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
2260 // debug statements here
2262 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
2263 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
2264 if(!isWasmInitialized) {
2265 throw new Error("initializeWasm() must be awaited first!");
2267 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
2268 return nativeResponseValue;
2270 // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
2271 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
2272 if(!isWasmInitialized) {
2273 throw new Error("initializeWasm() must be awaited first!");
2275 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
2276 // debug statements here
2278 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
2279 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
2280 if(!isWasmInitialized) {
2281 throw new Error("initializeWasm() must be awaited first!");
2283 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
2284 // debug statements here
2286 // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2287 export function CVec_MonitorEventZ_free(_res: number[]): void {
2288 if(!isWasmInitialized) {
2289 throw new Error("initializeWasm() must be awaited first!");
2291 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2292 // debug statements here
2294 // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
2295 export function CVec_EventZ_free(_res: number[]): void {
2296 if(!isWasmInitialized) {
2297 throw new Error("initializeWasm() must be awaited first!");
2299 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
2300 // debug statements here
2302 // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
2303 export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
2304 if(!isWasmInitialized) {
2305 throw new Error("initializeWasm() must be awaited first!");
2307 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
2308 // debug statements here
2310 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2311 export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2312 if(!isWasmInitialized) {
2313 throw new Error("initializeWasm() must be awaited first!");
2315 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2316 return nativeResponseValue;
2318 // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2319 export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2320 if(!isWasmInitialized) {
2321 throw new Error("initializeWasm() must be awaited first!");
2323 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2324 // debug statements here
2326 // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2327 export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2328 if(!isWasmInitialized) {
2329 throw new Error("initializeWasm() must be awaited first!");
2331 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2332 // debug statements here
2334 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
2335 export function C2Tuple_u32TxOutZ_clone(orig: number): number {
2336 if(!isWasmInitialized) {
2337 throw new Error("initializeWasm() must be awaited first!");
2339 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
2340 return nativeResponseValue;
2342 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
2343 export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
2344 if(!isWasmInitialized) {
2345 throw new Error("initializeWasm() must be awaited first!");
2347 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
2348 return nativeResponseValue;
2350 // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
2351 export function C2Tuple_u32TxOutZ_free(_res: number): void {
2352 if(!isWasmInitialized) {
2353 throw new Error("initializeWasm() must be awaited first!");
2355 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
2356 // debug statements here
2358 // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
2359 export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
2360 if(!isWasmInitialized) {
2361 throw new Error("initializeWasm() must be awaited first!");
2363 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
2364 // debug statements here
2366 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
2367 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
2368 if(!isWasmInitialized) {
2369 throw new Error("initializeWasm() must be awaited first!");
2371 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
2372 return nativeResponseValue;
2374 // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
2375 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
2376 if(!isWasmInitialized) {
2377 throw new Error("initializeWasm() must be awaited first!");
2379 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
2380 // debug statements here
2382 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
2383 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
2384 if(!isWasmInitialized) {
2385 throw new Error("initializeWasm() must be awaited first!");
2387 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
2388 // debug statements here
2390 // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
2391 export function CVec_TxidZ_free(_res: Uint8Array[]): void {
2392 if(!isWasmInitialized) {
2393 throw new Error("initializeWasm() must be awaited first!");
2395 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
2396 // debug statements here
2398 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2399 export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2400 if(!isWasmInitialized) {
2401 throw new Error("initializeWasm() must be awaited first!");
2403 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2404 return nativeResponseValue;
2406 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2407 export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
2408 if(!isWasmInitialized) {
2409 throw new Error("initializeWasm() must be awaited first!");
2411 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2412 return nativeResponseValue;
2414 // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2415 export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2416 if(!isWasmInitialized) {
2417 throw new Error("initializeWasm() must be awaited first!");
2419 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2420 // debug statements here
2422 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2423 export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2424 if(!isWasmInitialized) {
2425 throw new Error("initializeWasm() must be awaited first!");
2427 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2428 return nativeResponseValue;
2430 // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
2431 export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
2432 if(!isWasmInitialized) {
2433 throw new Error("initializeWasm() must be awaited first!");
2435 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
2436 return nativeResponseValue;
2438 // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
2439 export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
2440 if(!isWasmInitialized) {
2441 throw new Error("initializeWasm() must be awaited first!");
2443 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
2444 // debug statements here
2446 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
2447 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
2448 if(!isWasmInitialized) {
2449 throw new Error("initializeWasm() must be awaited first!");
2451 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
2452 return nativeResponseValue;
2454 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
2455 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
2456 if(!isWasmInitialized) {
2457 throw new Error("initializeWasm() must be awaited first!");
2459 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
2460 return nativeResponseValue;
2462 // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
2463 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
2464 if(!isWasmInitialized) {
2465 throw new Error("initializeWasm() must be awaited first!");
2467 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
2468 // debug statements here
2470 // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
2471 export function CVec_RouteHopZ_free(_res: number[]): void {
2472 if(!isWasmInitialized) {
2473 throw new Error("initializeWasm() must be awaited first!");
2475 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
2476 // debug statements here
2478 // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
2479 export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
2480 if(!isWasmInitialized) {
2481 throw new Error("initializeWasm() must be awaited first!");
2483 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
2484 // debug statements here
2486 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
2487 export function CResult_RouteDecodeErrorZ_ok(o: number): number {
2488 if(!isWasmInitialized) {
2489 throw new Error("initializeWasm() must be awaited first!");
2491 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
2492 return nativeResponseValue;
2494 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
2495 export function CResult_RouteDecodeErrorZ_err(e: number): number {
2496 if(!isWasmInitialized) {
2497 throw new Error("initializeWasm() must be awaited first!");
2499 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
2500 return nativeResponseValue;
2502 // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
2503 export function CResult_RouteDecodeErrorZ_free(_res: number): void {
2504 if(!isWasmInitialized) {
2505 throw new Error("initializeWasm() must be awaited first!");
2507 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
2508 // debug statements here
2510 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
2511 export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
2512 if(!isWasmInitialized) {
2513 throw new Error("initializeWasm() must be awaited first!");
2515 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
2516 return nativeResponseValue;
2518 // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
2519 export function COption_u64Z_some(o: number): number {
2520 if(!isWasmInitialized) {
2521 throw new Error("initializeWasm() must be awaited first!");
2523 const nativeResponseValue = wasm.COption_u64Z_some(o);
2524 return nativeResponseValue;
2526 // struct LDKCOption_u64Z COption_u64Z_none(void);
2527 export function COption_u64Z_none(): number {
2528 if(!isWasmInitialized) {
2529 throw new Error("initializeWasm() must be awaited first!");
2531 const nativeResponseValue = wasm.COption_u64Z_none();
2532 return nativeResponseValue;
2534 // void COption_u64Z_free(struct LDKCOption_u64Z _res);
2535 export function COption_u64Z_free(_res: number): void {
2536 if(!isWasmInitialized) {
2537 throw new Error("initializeWasm() must be awaited first!");
2539 const nativeResponseValue = wasm.COption_u64Z_free(_res);
2540 // debug statements here
2542 // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
2543 export function COption_u64Z_clone(orig: number): number {
2544 if(!isWasmInitialized) {
2545 throw new Error("initializeWasm() must be awaited first!");
2547 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
2548 return nativeResponseValue;
2550 // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2551 export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2552 if(!isWasmInitialized) {
2553 throw new Error("initializeWasm() must be awaited first!");
2555 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2556 // debug statements here
2558 // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
2559 export function CVec_RouteHintZ_free(_res: number[]): void {
2560 if(!isWasmInitialized) {
2561 throw new Error("initializeWasm() must be awaited first!");
2563 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
2564 // debug statements here
2566 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
2567 export function CResult_RouteLightningErrorZ_ok(o: number): number {
2568 if(!isWasmInitialized) {
2569 throw new Error("initializeWasm() must be awaited first!");
2571 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
2572 return nativeResponseValue;
2574 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
2575 export function CResult_RouteLightningErrorZ_err(e: number): number {
2576 if(!isWasmInitialized) {
2577 throw new Error("initializeWasm() must be awaited first!");
2579 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
2580 return nativeResponseValue;
2582 // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
2583 export function CResult_RouteLightningErrorZ_free(_res: number): void {
2584 if(!isWasmInitialized) {
2585 throw new Error("initializeWasm() must be awaited first!");
2587 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
2588 // debug statements here
2590 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
2591 export function CResult_RouteLightningErrorZ_clone(orig: number): number {
2592 if(!isWasmInitialized) {
2593 throw new Error("initializeWasm() must be awaited first!");
2595 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
2596 return nativeResponseValue;
2598 // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
2599 export function CVec_MessageSendEventZ_free(_res: number[]): void {
2600 if(!isWasmInitialized) {
2601 throw new Error("initializeWasm() must be awaited first!");
2603 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
2604 // debug statements here
2606 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
2607 export function CResult_boolLightningErrorZ_ok(o: boolean): number {
2608 if(!isWasmInitialized) {
2609 throw new Error("initializeWasm() must be awaited first!");
2611 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
2612 return nativeResponseValue;
2614 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
2615 export function CResult_boolLightningErrorZ_err(e: number): number {
2616 if(!isWasmInitialized) {
2617 throw new Error("initializeWasm() must be awaited first!");
2619 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
2620 return nativeResponseValue;
2622 // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
2623 export function CResult_boolLightningErrorZ_free(_res: number): void {
2624 if(!isWasmInitialized) {
2625 throw new Error("initializeWasm() must be awaited first!");
2627 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
2628 // debug statements here
2630 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
2631 export function CResult_boolLightningErrorZ_clone(orig: number): number {
2632 if(!isWasmInitialized) {
2633 throw new Error("initializeWasm() must be awaited first!");
2635 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
2636 return nativeResponseValue;
2638 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
2639 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
2640 if(!isWasmInitialized) {
2641 throw new Error("initializeWasm() must be awaited first!");
2643 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
2644 return nativeResponseValue;
2646 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
2647 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
2648 if(!isWasmInitialized) {
2649 throw new Error("initializeWasm() must be awaited first!");
2651 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
2652 return nativeResponseValue;
2654 // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
2655 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
2656 if(!isWasmInitialized) {
2657 throw new Error("initializeWasm() must be awaited first!");
2659 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
2660 // debug statements here
2662 // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2663 export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
2664 if(!isWasmInitialized) {
2665 throw new Error("initializeWasm() must be awaited first!");
2667 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
2668 // debug statements here
2670 // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2671 export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
2672 if(!isWasmInitialized) {
2673 throw new Error("initializeWasm() must be awaited first!");
2675 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
2676 // debug statements here
2678 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2679 export function CResult_NoneLightningErrorZ_ok(): number {
2680 if(!isWasmInitialized) {
2681 throw new Error("initializeWasm() must be awaited first!");
2683 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
2684 return nativeResponseValue;
2686 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2687 export function CResult_NoneLightningErrorZ_err(e: number): number {
2688 if(!isWasmInitialized) {
2689 throw new Error("initializeWasm() must be awaited first!");
2691 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
2692 return nativeResponseValue;
2694 // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2695 export function CResult_NoneLightningErrorZ_free(_res: number): void {
2696 if(!isWasmInitialized) {
2697 throw new Error("initializeWasm() must be awaited first!");
2699 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
2700 // debug statements here
2702 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
2703 export function CResult_NoneLightningErrorZ_clone(orig: number): number {
2704 if(!isWasmInitialized) {
2705 throw new Error("initializeWasm() must be awaited first!");
2707 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
2708 return nativeResponseValue;
2710 // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
2711 export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
2712 if(!isWasmInitialized) {
2713 throw new Error("initializeWasm() must be awaited first!");
2715 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
2716 // debug statements here
2718 // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2719 export function CVec_u8Z_free(_res: Uint8Array): void {
2720 if(!isWasmInitialized) {
2721 throw new Error("initializeWasm() must be awaited first!");
2723 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
2724 // debug statements here
2726 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
2727 export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
2728 if(!isWasmInitialized) {
2729 throw new Error("initializeWasm() must be awaited first!");
2731 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
2732 return nativeResponseValue;
2734 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2735 export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
2736 if(!isWasmInitialized) {
2737 throw new Error("initializeWasm() must be awaited first!");
2739 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
2740 return nativeResponseValue;
2742 // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
2743 export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
2744 if(!isWasmInitialized) {
2745 throw new Error("initializeWasm() must be awaited first!");
2747 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
2748 // debug statements here
2750 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
2751 export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
2752 if(!isWasmInitialized) {
2753 throw new Error("initializeWasm() must be awaited first!");
2755 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
2756 return nativeResponseValue;
2758 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
2759 export function CResult_NonePeerHandleErrorZ_ok(): number {
2760 if(!isWasmInitialized) {
2761 throw new Error("initializeWasm() must be awaited first!");
2763 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
2764 return nativeResponseValue;
2766 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
2767 export function CResult_NonePeerHandleErrorZ_err(e: number): number {
2768 if(!isWasmInitialized) {
2769 throw new Error("initializeWasm() must be awaited first!");
2771 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
2772 return nativeResponseValue;
2774 // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
2775 export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
2776 if(!isWasmInitialized) {
2777 throw new Error("initializeWasm() must be awaited first!");
2779 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
2780 // debug statements here
2782 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
2783 export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
2784 if(!isWasmInitialized) {
2785 throw new Error("initializeWasm() must be awaited first!");
2787 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
2788 return nativeResponseValue;
2790 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
2791 export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
2792 if(!isWasmInitialized) {
2793 throw new Error("initializeWasm() must be awaited first!");
2795 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
2796 return nativeResponseValue;
2798 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2799 export function CResult_boolPeerHandleErrorZ_err(e: number): number {
2800 if(!isWasmInitialized) {
2801 throw new Error("initializeWasm() must be awaited first!");
2803 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
2804 return nativeResponseValue;
2806 // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
2807 export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
2808 if(!isWasmInitialized) {
2809 throw new Error("initializeWasm() must be awaited first!");
2811 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
2812 // debug statements here
2814 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
2815 export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
2816 if(!isWasmInitialized) {
2817 throw new Error("initializeWasm() must be awaited first!");
2819 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
2820 return nativeResponseValue;
2822 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2823 export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2824 if(!isWasmInitialized) {
2825 throw new Error("initializeWasm() must be awaited first!");
2827 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2828 return nativeResponseValue;
2830 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2831 export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
2832 if(!isWasmInitialized) {
2833 throw new Error("initializeWasm() must be awaited first!");
2835 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2836 return nativeResponseValue;
2838 // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2839 export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2840 if(!isWasmInitialized) {
2841 throw new Error("initializeWasm() must be awaited first!");
2843 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2844 // debug statements here
2846 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2847 export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2848 if(!isWasmInitialized) {
2849 throw new Error("initializeWasm() must be awaited first!");
2851 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2852 return nativeResponseValue;
2854 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
2855 export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
2856 if(!isWasmInitialized) {
2857 throw new Error("initializeWasm() must be awaited first!");
2859 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
2860 return nativeResponseValue;
2862 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
2863 export function COption_C2Tuple_usizeTransactionZZ_none(): number {
2864 if(!isWasmInitialized) {
2865 throw new Error("initializeWasm() must be awaited first!");
2867 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
2868 return nativeResponseValue;
2870 // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
2871 export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
2872 if(!isWasmInitialized) {
2873 throw new Error("initializeWasm() must be awaited first!");
2875 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
2876 // debug statements here
2878 // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2879 export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2880 if(!isWasmInitialized) {
2881 throw new Error("initializeWasm() must be awaited first!");
2883 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2884 // debug statements here
2886 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
2887 export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
2888 if(!isWasmInitialized) {
2889 throw new Error("initializeWasm() must be awaited first!");
2891 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
2892 return nativeResponseValue;
2894 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2895 export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
2896 if(!isWasmInitialized) {
2897 throw new Error("initializeWasm() must be awaited first!");
2899 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
2900 return nativeResponseValue;
2902 // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
2903 export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
2904 if(!isWasmInitialized) {
2905 throw new Error("initializeWasm() must be awaited first!");
2907 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
2908 // debug statements here
2910 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2911 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
2912 if(!isWasmInitialized) {
2913 throw new Error("initializeWasm() must be awaited first!");
2915 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
2916 return nativeResponseValue;
2918 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
2919 export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
2920 if(!isWasmInitialized) {
2921 throw new Error("initializeWasm() must be awaited first!");
2923 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
2924 return nativeResponseValue;
2926 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2927 export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
2928 if(!isWasmInitialized) {
2929 throw new Error("initializeWasm() must be awaited first!");
2931 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
2932 return nativeResponseValue;
2934 // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
2935 export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
2936 if(!isWasmInitialized) {
2937 throw new Error("initializeWasm() must be awaited first!");
2939 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
2940 // debug statements here
2942 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2943 export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
2944 if(!isWasmInitialized) {
2945 throw new Error("initializeWasm() must be awaited first!");
2947 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
2948 return nativeResponseValue;
2950 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2951 export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
2952 if(!isWasmInitialized) {
2953 throw new Error("initializeWasm() must be awaited first!");
2955 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
2956 return nativeResponseValue;
2958 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2959 export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
2960 if(!isWasmInitialized) {
2961 throw new Error("initializeWasm() must be awaited first!");
2963 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
2964 return nativeResponseValue;
2966 // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2967 export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
2968 if(!isWasmInitialized) {
2969 throw new Error("initializeWasm() must be awaited first!");
2971 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
2972 // debug statements here
2974 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
2975 export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
2976 if(!isWasmInitialized) {
2977 throw new Error("initializeWasm() must be awaited first!");
2979 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
2980 return nativeResponseValue;
2982 // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
2983 export function CVec_NetAddressZ_free(_res: number[]): void {
2984 if(!isWasmInitialized) {
2985 throw new Error("initializeWasm() must be awaited first!");
2987 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
2988 // debug statements here
2990 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2991 export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
2992 if(!isWasmInitialized) {
2993 throw new Error("initializeWasm() must be awaited first!");
2995 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
2996 return nativeResponseValue;
2998 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2999 export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
3000 if(!isWasmInitialized) {
3001 throw new Error("initializeWasm() must be awaited first!");
3003 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
3004 return nativeResponseValue;
3006 // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
3007 export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
3008 if(!isWasmInitialized) {
3009 throw new Error("initializeWasm() must be awaited first!");
3011 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
3012 // debug statements here
3014 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
3015 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
3016 if(!isWasmInitialized) {
3017 throw new Error("initializeWasm() must be awaited first!");
3019 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
3020 return nativeResponseValue;
3022 // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
3023 export function CVec_u64Z_free(_res: number[]): void {
3024 if(!isWasmInitialized) {
3025 throw new Error("initializeWasm() must be awaited first!");
3027 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
3028 // debug statements here
3030 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
3031 export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
3032 if(!isWasmInitialized) {
3033 throw new Error("initializeWasm() must be awaited first!");
3035 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
3036 return nativeResponseValue;
3038 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
3039 export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
3040 if(!isWasmInitialized) {
3041 throw new Error("initializeWasm() must be awaited first!");
3043 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
3044 return nativeResponseValue;
3046 // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
3047 export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
3048 if(!isWasmInitialized) {
3049 throw new Error("initializeWasm() must be awaited first!");
3051 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
3052 // debug statements here
3054 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
3055 export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
3056 if(!isWasmInitialized) {
3057 throw new Error("initializeWasm() must be awaited first!");
3059 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
3060 return nativeResponseValue;
3062 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
3063 export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
3064 if(!isWasmInitialized) {
3065 throw new Error("initializeWasm() must be awaited first!");
3067 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
3068 return nativeResponseValue;
3070 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
3071 export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
3072 if(!isWasmInitialized) {
3073 throw new Error("initializeWasm() must be awaited first!");
3075 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
3076 return nativeResponseValue;
3078 // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
3079 export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
3080 if(!isWasmInitialized) {
3081 throw new Error("initializeWasm() must be awaited first!");
3083 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
3084 // debug statements here
3086 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
3087 export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
3088 if(!isWasmInitialized) {
3089 throw new Error("initializeWasm() must be awaited first!");
3091 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
3092 return nativeResponseValue;
3094 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
3095 export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
3096 if(!isWasmInitialized) {
3097 throw new Error("initializeWasm() must be awaited first!");
3099 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
3100 return nativeResponseValue;
3102 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3103 export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
3104 if(!isWasmInitialized) {
3105 throw new Error("initializeWasm() must be awaited first!");
3107 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
3108 return nativeResponseValue;
3110 // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
3111 export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
3112 if(!isWasmInitialized) {
3113 throw new Error("initializeWasm() must be awaited first!");
3115 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
3116 // debug statements here
3118 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
3119 export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
3120 if(!isWasmInitialized) {
3121 throw new Error("initializeWasm() must be awaited first!");
3123 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
3124 return nativeResponseValue;
3126 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3127 export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
3128 if(!isWasmInitialized) {
3129 throw new Error("initializeWasm() must be awaited first!");
3131 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
3132 return nativeResponseValue;
3134 // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
3135 export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
3136 if(!isWasmInitialized) {
3137 throw new Error("initializeWasm() must be awaited first!");
3139 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
3140 // debug statements here
3142 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
3143 export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
3144 if(!isWasmInitialized) {
3145 throw new Error("initializeWasm() must be awaited first!");
3147 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
3148 return nativeResponseValue;
3150 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3151 export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
3152 if(!isWasmInitialized) {
3153 throw new Error("initializeWasm() must be awaited first!");
3155 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
3156 return nativeResponseValue;
3158 // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
3159 export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
3160 if(!isWasmInitialized) {
3161 throw new Error("initializeWasm() must be awaited first!");
3163 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
3164 // debug statements here
3166 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
3167 export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
3168 if(!isWasmInitialized) {
3169 throw new Error("initializeWasm() must be awaited first!");
3171 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
3172 return nativeResponseValue;
3174 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3175 export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
3176 if(!isWasmInitialized) {
3177 throw new Error("initializeWasm() must be awaited first!");
3179 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
3180 return nativeResponseValue;
3182 // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
3183 export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
3184 if(!isWasmInitialized) {
3185 throw new Error("initializeWasm() must be awaited first!");
3187 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
3188 // debug statements here
3190 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
3191 export function CResult_NetAddressu8Z_ok(o: number): number {
3192 if(!isWasmInitialized) {
3193 throw new Error("initializeWasm() must be awaited first!");
3195 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
3196 return nativeResponseValue;
3198 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
3199 export function CResult_NetAddressu8Z_err(e: number): number {
3200 if(!isWasmInitialized) {
3201 throw new Error("initializeWasm() must be awaited first!");
3203 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
3204 return nativeResponseValue;
3206 // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
3207 export function CResult_NetAddressu8Z_free(_res: number): void {
3208 if(!isWasmInitialized) {
3209 throw new Error("initializeWasm() must be awaited first!");
3211 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
3212 // debug statements here
3214 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
3215 export function CResult_NetAddressu8Z_clone(orig: number): number {
3216 if(!isWasmInitialized) {
3217 throw new Error("initializeWasm() must be awaited first!");
3219 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
3220 return nativeResponseValue;
3222 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
3223 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
3224 if(!isWasmInitialized) {
3225 throw new Error("initializeWasm() must be awaited first!");
3227 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
3228 return nativeResponseValue;
3230 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
3231 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
3232 if(!isWasmInitialized) {
3233 throw new Error("initializeWasm() must be awaited first!");
3235 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
3236 return nativeResponseValue;
3238 // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
3239 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
3240 if(!isWasmInitialized) {
3241 throw new Error("initializeWasm() must be awaited first!");
3243 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
3244 // debug statements here
3246 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
3247 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
3248 if(!isWasmInitialized) {
3249 throw new Error("initializeWasm() must be awaited first!");
3251 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
3252 return nativeResponseValue;
3254 // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
3255 export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
3256 if(!isWasmInitialized) {
3257 throw new Error("initializeWasm() must be awaited first!");
3259 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
3260 // debug statements here
3262 // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
3263 export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
3264 if(!isWasmInitialized) {
3265 throw new Error("initializeWasm() must be awaited first!");
3267 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
3268 // debug statements here
3270 // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
3271 export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
3272 if(!isWasmInitialized) {
3273 throw new Error("initializeWasm() must be awaited first!");
3275 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
3276 // debug statements here
3278 // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
3279 export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
3280 if(!isWasmInitialized) {
3281 throw new Error("initializeWasm() must be awaited first!");
3283 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
3284 // debug statements here
3286 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
3287 export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
3288 if(!isWasmInitialized) {
3289 throw new Error("initializeWasm() must be awaited first!");
3291 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
3292 return nativeResponseValue;
3294 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
3295 export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
3296 if(!isWasmInitialized) {
3297 throw new Error("initializeWasm() must be awaited first!");
3299 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
3300 return nativeResponseValue;
3302 // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
3303 export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
3304 if(!isWasmInitialized) {
3305 throw new Error("initializeWasm() must be awaited first!");
3307 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
3308 // debug statements here
3310 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
3311 export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
3312 if(!isWasmInitialized) {
3313 throw new Error("initializeWasm() must be awaited first!");
3315 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
3316 return nativeResponseValue;
3318 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
3319 export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
3320 if(!isWasmInitialized) {
3321 throw new Error("initializeWasm() must be awaited first!");
3323 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
3324 return nativeResponseValue;
3326 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
3327 export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
3328 if(!isWasmInitialized) {
3329 throw new Error("initializeWasm() must be awaited first!");
3331 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
3332 return nativeResponseValue;
3334 // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
3335 export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
3336 if(!isWasmInitialized) {
3337 throw new Error("initializeWasm() must be awaited first!");
3339 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
3340 // debug statements here
3342 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
3343 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
3344 if(!isWasmInitialized) {
3345 throw new Error("initializeWasm() must be awaited first!");
3347 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
3348 return nativeResponseValue;
3350 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
3351 export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
3352 if(!isWasmInitialized) {
3353 throw new Error("initializeWasm() must be awaited first!");
3355 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
3356 return nativeResponseValue;
3358 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
3359 export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
3360 if(!isWasmInitialized) {
3361 throw new Error("initializeWasm() must be awaited first!");
3363 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
3364 return nativeResponseValue;
3366 // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
3367 export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
3368 if(!isWasmInitialized) {
3369 throw new Error("initializeWasm() must be awaited first!");
3371 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
3372 // debug statements here
3374 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
3375 export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
3376 if(!isWasmInitialized) {
3377 throw new Error("initializeWasm() must be awaited first!");
3379 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
3380 return nativeResponseValue;
3382 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
3383 export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
3384 if(!isWasmInitialized) {
3385 throw new Error("initializeWasm() must be awaited first!");
3387 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
3388 return nativeResponseValue;
3390 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3391 export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
3392 if(!isWasmInitialized) {
3393 throw new Error("initializeWasm() must be awaited first!");
3395 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
3396 return nativeResponseValue;
3398 // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
3399 export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
3400 if(!isWasmInitialized) {
3401 throw new Error("initializeWasm() must be awaited first!");
3403 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
3404 // debug statements here
3406 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
3407 export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
3408 if(!isWasmInitialized) {
3409 throw new Error("initializeWasm() must be awaited first!");
3411 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
3412 return nativeResponseValue;
3414 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
3415 export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
3416 if(!isWasmInitialized) {
3417 throw new Error("initializeWasm() must be awaited first!");
3419 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
3420 return nativeResponseValue;
3422 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
3423 export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
3424 if(!isWasmInitialized) {
3425 throw new Error("initializeWasm() must be awaited first!");
3427 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
3428 return nativeResponseValue;
3430 // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
3431 export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
3432 if(!isWasmInitialized) {
3433 throw new Error("initializeWasm() must be awaited first!");
3435 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
3436 // debug statements here
3438 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
3439 export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
3440 if(!isWasmInitialized) {
3441 throw new Error("initializeWasm() must be awaited first!");
3443 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
3444 return nativeResponseValue;
3446 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
3447 export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
3448 if(!isWasmInitialized) {
3449 throw new Error("initializeWasm() must be awaited first!");
3451 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
3452 return nativeResponseValue;
3454 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
3455 export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
3456 if(!isWasmInitialized) {
3457 throw new Error("initializeWasm() must be awaited first!");
3459 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
3460 return nativeResponseValue;
3462 // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
3463 export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
3464 if(!isWasmInitialized) {
3465 throw new Error("initializeWasm() must be awaited first!");
3467 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
3468 // debug statements here
3470 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
3471 export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
3472 if(!isWasmInitialized) {
3473 throw new Error("initializeWasm() must be awaited first!");
3475 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
3476 return nativeResponseValue;
3478 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
3479 export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
3480 if(!isWasmInitialized) {
3481 throw new Error("initializeWasm() must be awaited first!");
3483 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
3484 return nativeResponseValue;
3486 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3487 export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
3488 if(!isWasmInitialized) {
3489 throw new Error("initializeWasm() must be awaited first!");
3491 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
3492 return nativeResponseValue;
3494 // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
3495 export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
3496 if(!isWasmInitialized) {
3497 throw new Error("initializeWasm() must be awaited first!");
3499 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
3500 // debug statements here
3502 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
3503 export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
3504 if(!isWasmInitialized) {
3505 throw new Error("initializeWasm() must be awaited first!");
3507 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
3508 return nativeResponseValue;
3510 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
3511 export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
3512 if(!isWasmInitialized) {
3513 throw new Error("initializeWasm() must be awaited first!");
3515 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
3516 return nativeResponseValue;
3518 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
3519 export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
3520 if(!isWasmInitialized) {
3521 throw new Error("initializeWasm() must be awaited first!");
3523 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
3524 return nativeResponseValue;
3526 // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
3527 export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
3528 if(!isWasmInitialized) {
3529 throw new Error("initializeWasm() must be awaited first!");
3531 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
3532 // debug statements here
3534 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
3535 export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
3536 if(!isWasmInitialized) {
3537 throw new Error("initializeWasm() must be awaited first!");
3539 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
3540 return nativeResponseValue;
3542 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
3543 export function CResult_InitDecodeErrorZ_ok(o: number): number {
3544 if(!isWasmInitialized) {
3545 throw new Error("initializeWasm() must be awaited first!");
3547 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
3548 return nativeResponseValue;
3550 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
3551 export function CResult_InitDecodeErrorZ_err(e: number): number {
3552 if(!isWasmInitialized) {
3553 throw new Error("initializeWasm() must be awaited first!");
3555 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
3556 return nativeResponseValue;
3558 // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
3559 export function CResult_InitDecodeErrorZ_free(_res: number): void {
3560 if(!isWasmInitialized) {
3561 throw new Error("initializeWasm() must be awaited first!");
3563 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
3564 // debug statements here
3566 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
3567 export function CResult_InitDecodeErrorZ_clone(orig: number): number {
3568 if(!isWasmInitialized) {
3569 throw new Error("initializeWasm() must be awaited first!");
3571 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
3572 return nativeResponseValue;
3574 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
3575 export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
3576 if(!isWasmInitialized) {
3577 throw new Error("initializeWasm() must be awaited first!");
3579 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
3580 return nativeResponseValue;
3582 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
3583 export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
3584 if(!isWasmInitialized) {
3585 throw new Error("initializeWasm() must be awaited first!");
3587 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
3588 return nativeResponseValue;
3590 // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
3591 export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
3592 if(!isWasmInitialized) {
3593 throw new Error("initializeWasm() must be awaited first!");
3595 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
3596 // debug statements here
3598 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
3599 export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
3600 if(!isWasmInitialized) {
3601 throw new Error("initializeWasm() must be awaited first!");
3603 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
3604 return nativeResponseValue;
3606 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
3607 export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
3608 if(!isWasmInitialized) {
3609 throw new Error("initializeWasm() must be awaited first!");
3611 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
3612 return nativeResponseValue;
3614 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
3615 export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
3616 if(!isWasmInitialized) {
3617 throw new Error("initializeWasm() must be awaited first!");
3619 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
3620 return nativeResponseValue;
3622 // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
3623 export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
3624 if(!isWasmInitialized) {
3625 throw new Error("initializeWasm() must be awaited first!");
3627 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
3628 // debug statements here
3630 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
3631 export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
3632 if(!isWasmInitialized) {
3633 throw new Error("initializeWasm() must be awaited first!");
3635 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
3636 return nativeResponseValue;
3638 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
3639 export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
3640 if(!isWasmInitialized) {
3641 throw new Error("initializeWasm() must be awaited first!");
3643 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
3644 return nativeResponseValue;
3646 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
3647 export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
3648 if(!isWasmInitialized) {
3649 throw new Error("initializeWasm() must be awaited first!");
3651 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
3652 return nativeResponseValue;
3654 // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
3655 export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
3656 if(!isWasmInitialized) {
3657 throw new Error("initializeWasm() must be awaited first!");
3659 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
3660 // debug statements here
3662 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
3663 export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
3664 if(!isWasmInitialized) {
3665 throw new Error("initializeWasm() must be awaited first!");
3667 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
3668 return nativeResponseValue;
3670 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
3671 export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
3672 if(!isWasmInitialized) {
3673 throw new Error("initializeWasm() must be awaited first!");
3675 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
3676 return nativeResponseValue;
3678 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3679 export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
3680 if(!isWasmInitialized) {
3681 throw new Error("initializeWasm() must be awaited first!");
3683 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
3684 return nativeResponseValue;
3686 // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
3687 export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
3688 if(!isWasmInitialized) {
3689 throw new Error("initializeWasm() must be awaited first!");
3691 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
3692 // debug statements here
3694 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
3695 export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
3696 if(!isWasmInitialized) {
3697 throw new Error("initializeWasm() must be awaited first!");
3699 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
3700 return nativeResponseValue;
3702 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
3703 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
3704 if(!isWasmInitialized) {
3705 throw new Error("initializeWasm() must be awaited first!");
3707 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
3708 return nativeResponseValue;
3710 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3711 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
3712 if(!isWasmInitialized) {
3713 throw new Error("initializeWasm() must be awaited first!");
3715 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
3716 return nativeResponseValue;
3718 // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
3719 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
3720 if(!isWasmInitialized) {
3721 throw new Error("initializeWasm() must be awaited first!");
3723 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
3724 // debug statements here
3726 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
3727 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
3728 if(!isWasmInitialized) {
3729 throw new Error("initializeWasm() must be awaited first!");
3731 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
3732 return nativeResponseValue;
3734 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
3735 export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
3736 if(!isWasmInitialized) {
3737 throw new Error("initializeWasm() must be awaited first!");
3739 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
3740 return nativeResponseValue;
3742 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
3743 export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
3744 if(!isWasmInitialized) {
3745 throw new Error("initializeWasm() must be awaited first!");
3747 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
3748 return nativeResponseValue;
3750 // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
3751 export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
3752 if(!isWasmInitialized) {
3753 throw new Error("initializeWasm() must be awaited first!");
3755 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
3756 // debug statements here
3758 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
3759 export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
3760 if(!isWasmInitialized) {
3761 throw new Error("initializeWasm() must be awaited first!");
3763 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
3764 return nativeResponseValue;
3766 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
3767 export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
3768 if(!isWasmInitialized) {
3769 throw new Error("initializeWasm() must be awaited first!");
3771 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
3772 return nativeResponseValue;
3774 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3775 export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
3776 if(!isWasmInitialized) {
3777 throw new Error("initializeWasm() must be awaited first!");
3779 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
3780 return nativeResponseValue;
3782 // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
3783 export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
3784 if(!isWasmInitialized) {
3785 throw new Error("initializeWasm() must be awaited first!");
3787 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
3788 // debug statements here
3790 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
3791 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
3792 if(!isWasmInitialized) {
3793 throw new Error("initializeWasm() must be awaited first!");
3795 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
3796 return nativeResponseValue;
3798 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
3799 export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
3800 if(!isWasmInitialized) {
3801 throw new Error("initializeWasm() must be awaited first!");
3803 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
3804 return nativeResponseValue;
3806 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3807 export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
3808 if(!isWasmInitialized) {
3809 throw new Error("initializeWasm() must be awaited first!");
3811 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
3812 return nativeResponseValue;
3814 // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
3815 export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
3816 if(!isWasmInitialized) {
3817 throw new Error("initializeWasm() must be awaited first!");
3819 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
3820 // debug statements here
3822 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
3823 export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
3824 if(!isWasmInitialized) {
3825 throw new Error("initializeWasm() must be awaited first!");
3827 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
3828 return nativeResponseValue;
3830 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
3831 export function CResult_PingDecodeErrorZ_ok(o: number): number {
3832 if(!isWasmInitialized) {
3833 throw new Error("initializeWasm() must be awaited first!");
3835 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
3836 return nativeResponseValue;
3838 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
3839 export function CResult_PingDecodeErrorZ_err(e: number): number {
3840 if(!isWasmInitialized) {
3841 throw new Error("initializeWasm() must be awaited first!");
3843 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
3844 return nativeResponseValue;
3846 // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
3847 export function CResult_PingDecodeErrorZ_free(_res: number): void {
3848 if(!isWasmInitialized) {
3849 throw new Error("initializeWasm() must be awaited first!");
3851 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
3852 // debug statements here
3854 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
3855 export function CResult_PingDecodeErrorZ_clone(orig: number): number {
3856 if(!isWasmInitialized) {
3857 throw new Error("initializeWasm() must be awaited first!");
3859 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
3860 return nativeResponseValue;
3862 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
3863 export function CResult_PongDecodeErrorZ_ok(o: number): number {
3864 if(!isWasmInitialized) {
3865 throw new Error("initializeWasm() must be awaited first!");
3867 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
3868 return nativeResponseValue;
3870 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
3871 export function CResult_PongDecodeErrorZ_err(e: number): number {
3872 if(!isWasmInitialized) {
3873 throw new Error("initializeWasm() must be awaited first!");
3875 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
3876 return nativeResponseValue;
3878 // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
3879 export function CResult_PongDecodeErrorZ_free(_res: number): void {
3880 if(!isWasmInitialized) {
3881 throw new Error("initializeWasm() must be awaited first!");
3883 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
3884 // debug statements here
3886 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
3887 export function CResult_PongDecodeErrorZ_clone(orig: number): number {
3888 if(!isWasmInitialized) {
3889 throw new Error("initializeWasm() must be awaited first!");
3891 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
3892 return nativeResponseValue;
3894 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
3895 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
3896 if(!isWasmInitialized) {
3897 throw new Error("initializeWasm() must be awaited first!");
3899 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
3900 return nativeResponseValue;
3902 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
3903 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
3904 if(!isWasmInitialized) {
3905 throw new Error("initializeWasm() must be awaited first!");
3907 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
3908 return nativeResponseValue;
3910 // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
3911 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
3912 if(!isWasmInitialized) {
3913 throw new Error("initializeWasm() must be awaited first!");
3915 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
3916 // debug statements here
3918 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
3919 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
3920 if(!isWasmInitialized) {
3921 throw new Error("initializeWasm() must be awaited first!");
3923 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
3924 return nativeResponseValue;
3926 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
3927 export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
3928 if(!isWasmInitialized) {
3929 throw new Error("initializeWasm() must be awaited first!");
3931 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
3932 return nativeResponseValue;
3934 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
3935 export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
3936 if(!isWasmInitialized) {
3937 throw new Error("initializeWasm() must be awaited first!");
3939 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
3940 return nativeResponseValue;
3942 // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
3943 export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
3944 if(!isWasmInitialized) {
3945 throw new Error("initializeWasm() must be awaited first!");
3947 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
3948 // debug statements here
3950 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
3951 export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
3952 if(!isWasmInitialized) {
3953 throw new Error("initializeWasm() must be awaited first!");
3955 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
3956 return nativeResponseValue;
3958 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
3959 export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
3960 if(!isWasmInitialized) {
3961 throw new Error("initializeWasm() must be awaited first!");
3963 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
3964 return nativeResponseValue;
3966 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3967 export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
3968 if(!isWasmInitialized) {
3969 throw new Error("initializeWasm() must be awaited first!");
3971 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
3972 return nativeResponseValue;
3974 // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
3975 export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
3976 if(!isWasmInitialized) {
3977 throw new Error("initializeWasm() must be awaited first!");
3979 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
3980 // debug statements here
3982 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
3983 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
3984 if(!isWasmInitialized) {
3985 throw new Error("initializeWasm() must be awaited first!");
3987 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
3988 return nativeResponseValue;
3990 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
3991 export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
3992 if(!isWasmInitialized) {
3993 throw new Error("initializeWasm() must be awaited first!");
3995 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
3996 return nativeResponseValue;
3998 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3999 export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
4000 if(!isWasmInitialized) {
4001 throw new Error("initializeWasm() must be awaited first!");
4003 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
4004 return nativeResponseValue;
4006 // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
4007 export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
4008 if(!isWasmInitialized) {
4009 throw new Error("initializeWasm() must be awaited first!");
4011 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
4012 // debug statements here
4014 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4015 export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
4016 if(!isWasmInitialized) {
4017 throw new Error("initializeWasm() must be awaited first!");
4019 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
4020 return nativeResponseValue;
4022 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
4023 export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
4024 if(!isWasmInitialized) {
4025 throw new Error("initializeWasm() must be awaited first!");
4027 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
4028 return nativeResponseValue;
4030 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
4031 export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
4032 if(!isWasmInitialized) {
4033 throw new Error("initializeWasm() must be awaited first!");
4035 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
4036 return nativeResponseValue;
4038 // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
4039 export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
4040 if(!isWasmInitialized) {
4041 throw new Error("initializeWasm() must be awaited first!");
4043 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
4044 // debug statements here
4046 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
4047 export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
4048 if(!isWasmInitialized) {
4049 throw new Error("initializeWasm() must be awaited first!");
4051 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
4052 return nativeResponseValue;
4054 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
4055 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
4056 if(!isWasmInitialized) {
4057 throw new Error("initializeWasm() must be awaited first!");
4059 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
4060 return nativeResponseValue;
4062 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4063 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
4064 if(!isWasmInitialized) {
4065 throw new Error("initializeWasm() must be awaited first!");
4067 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
4068 return nativeResponseValue;
4070 // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
4071 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
4072 if(!isWasmInitialized) {
4073 throw new Error("initializeWasm() must be awaited first!");
4075 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
4076 // debug statements here
4078 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4079 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4080 if(!isWasmInitialized) {
4081 throw new Error("initializeWasm() must be awaited first!");
4083 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
4084 return nativeResponseValue;
4086 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
4087 export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
4088 if(!isWasmInitialized) {
4089 throw new Error("initializeWasm() must be awaited first!");
4091 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
4092 return nativeResponseValue;
4094 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4095 export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
4096 if(!isWasmInitialized) {
4097 throw new Error("initializeWasm() must be awaited first!");
4099 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
4100 return nativeResponseValue;
4102 // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
4103 export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
4104 if(!isWasmInitialized) {
4105 throw new Error("initializeWasm() must be awaited first!");
4107 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
4108 // debug statements here
4110 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4111 export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4112 if(!isWasmInitialized) {
4113 throw new Error("initializeWasm() must be awaited first!");
4115 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
4116 return nativeResponseValue;
4118 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
4119 export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
4120 if(!isWasmInitialized) {
4121 throw new Error("initializeWasm() must be awaited first!");
4123 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
4124 return nativeResponseValue;
4126 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
4127 export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
4128 if(!isWasmInitialized) {
4129 throw new Error("initializeWasm() must be awaited first!");
4131 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
4132 return nativeResponseValue;
4134 // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
4135 export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
4136 if(!isWasmInitialized) {
4137 throw new Error("initializeWasm() must be awaited first!");
4139 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
4140 // debug statements here
4142 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
4143 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
4144 if(!isWasmInitialized) {
4145 throw new Error("initializeWasm() must be awaited first!");
4147 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
4148 return nativeResponseValue;
4150 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
4151 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
4152 if(!isWasmInitialized) {
4153 throw new Error("initializeWasm() must be awaited first!");
4155 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
4156 return nativeResponseValue;
4158 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
4159 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
4160 if(!isWasmInitialized) {
4161 throw new Error("initializeWasm() must be awaited first!");
4163 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
4164 return nativeResponseValue;
4166 // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
4167 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
4168 if(!isWasmInitialized) {
4169 throw new Error("initializeWasm() must be awaited first!");
4171 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
4172 // debug statements here
4174 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
4175 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
4176 if(!isWasmInitialized) {
4177 throw new Error("initializeWasm() must be awaited first!");
4179 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
4180 return nativeResponseValue;
4182 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
4183 export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
4184 if(!isWasmInitialized) {
4185 throw new Error("initializeWasm() must be awaited first!");
4187 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
4188 return nativeResponseValue;
4190 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4191 export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
4192 if(!isWasmInitialized) {
4193 throw new Error("initializeWasm() must be awaited first!");
4195 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
4196 return nativeResponseValue;
4198 // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
4199 export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
4200 if(!isWasmInitialized) {
4201 throw new Error("initializeWasm() must be awaited first!");
4203 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
4204 // debug statements here
4206 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4207 export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
4208 if(!isWasmInitialized) {
4209 throw new Error("initializeWasm() must be awaited first!");
4211 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
4212 return nativeResponseValue;
4214 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
4215 export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
4216 if(!isWasmInitialized) {
4217 throw new Error("initializeWasm() must be awaited first!");
4219 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
4220 return nativeResponseValue;
4222 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4223 export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
4224 if(!isWasmInitialized) {
4225 throw new Error("initializeWasm() must be awaited first!");
4227 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
4228 return nativeResponseValue;
4230 // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
4231 export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
4232 if(!isWasmInitialized) {
4233 throw new Error("initializeWasm() must be awaited first!");
4235 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
4236 // debug statements here
4238 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4239 export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
4240 if(!isWasmInitialized) {
4241 throw new Error("initializeWasm() must be awaited first!");
4243 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
4244 return nativeResponseValue;
4246 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
4247 export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
4248 if(!isWasmInitialized) {
4249 throw new Error("initializeWasm() must be awaited first!");
4251 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
4252 return nativeResponseValue;
4254 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
4255 export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
4256 if(!isWasmInitialized) {
4257 throw new Error("initializeWasm() must be awaited first!");
4259 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
4260 return nativeResponseValue;
4262 // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
4263 export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
4264 if(!isWasmInitialized) {
4265 throw new Error("initializeWasm() must be awaited first!");
4267 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
4268 // debug statements here
4270 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
4271 export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
4272 if(!isWasmInitialized) {
4273 throw new Error("initializeWasm() must be awaited first!");
4275 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
4276 return nativeResponseValue;
4278 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
4279 export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
4280 if(!isWasmInitialized) {
4281 throw new Error("initializeWasm() must be awaited first!");
4283 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
4284 return nativeResponseValue;
4286 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
4287 export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
4288 if(!isWasmInitialized) {
4289 throw new Error("initializeWasm() must be awaited first!");
4291 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
4292 return nativeResponseValue;
4294 // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
4295 export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
4296 if(!isWasmInitialized) {
4297 throw new Error("initializeWasm() must be awaited first!");
4299 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
4300 // debug statements here
4302 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
4303 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
4304 if(!isWasmInitialized) {
4305 throw new Error("initializeWasm() must be awaited first!");
4307 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
4308 return nativeResponseValue;
4310 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
4311 export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
4312 if(!isWasmInitialized) {
4313 throw new Error("initializeWasm() must be awaited first!");
4315 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
4316 return nativeResponseValue;
4318 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
4319 export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
4320 if(!isWasmInitialized) {
4321 throw new Error("initializeWasm() must be awaited first!");
4323 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
4324 return nativeResponseValue;
4326 // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
4327 export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
4328 if(!isWasmInitialized) {
4329 throw new Error("initializeWasm() must be awaited first!");
4331 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
4332 // debug statements here
4334 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
4335 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
4336 if(!isWasmInitialized) {
4337 throw new Error("initializeWasm() must be awaited first!");
4339 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
4340 return nativeResponseValue;
4342 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
4343 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
4344 if(!isWasmInitialized) {
4345 throw new Error("initializeWasm() must be awaited first!");
4347 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
4348 return nativeResponseValue;
4350 // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
4351 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
4352 if(!isWasmInitialized) {
4353 throw new Error("initializeWasm() must be awaited first!");
4355 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
4356 // debug statements here
4358 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
4359 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
4360 if(!isWasmInitialized) {
4361 throw new Error("initializeWasm() must be awaited first!");
4363 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
4364 return nativeResponseValue;
4366 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
4367 export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
4368 if(!isWasmInitialized) {
4369 throw new Error("initializeWasm() must be awaited first!");
4371 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
4372 return nativeResponseValue;
4374 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
4375 export function CResult_SignatureNoneZ_err(): number {
4376 if(!isWasmInitialized) {
4377 throw new Error("initializeWasm() must be awaited first!");
4379 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
4380 return nativeResponseValue;
4382 // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
4383 export function CResult_SignatureNoneZ_free(_res: number): void {
4384 if(!isWasmInitialized) {
4385 throw new Error("initializeWasm() must be awaited first!");
4387 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
4388 // debug statements here
4390 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
4391 export function CResult_SignatureNoneZ_clone(orig: number): number {
4392 if(!isWasmInitialized) {
4393 throw new Error("initializeWasm() must be awaited first!");
4395 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
4396 return nativeResponseValue;
4398 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
4399 export function CResult_SignDecodeErrorZ_ok(o: number): number {
4400 if(!isWasmInitialized) {
4401 throw new Error("initializeWasm() must be awaited first!");
4403 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
4404 return nativeResponseValue;
4406 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
4407 export function CResult_SignDecodeErrorZ_err(e: number): number {
4408 if(!isWasmInitialized) {
4409 throw new Error("initializeWasm() must be awaited first!");
4411 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
4412 return nativeResponseValue;
4414 // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
4415 export function CResult_SignDecodeErrorZ_free(_res: number): void {
4416 if(!isWasmInitialized) {
4417 throw new Error("initializeWasm() must be awaited first!");
4419 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
4420 // debug statements here
4422 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
4423 export function CResult_SignDecodeErrorZ_clone(orig: number): number {
4424 if(!isWasmInitialized) {
4425 throw new Error("initializeWasm() must be awaited first!");
4427 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
4428 return nativeResponseValue;
4430 // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
4431 export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
4432 if(!isWasmInitialized) {
4433 throw new Error("initializeWasm() must be awaited first!");
4435 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
4436 // debug statements here
4438 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
4439 export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
4440 if(!isWasmInitialized) {
4441 throw new Error("initializeWasm() must be awaited first!");
4443 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
4444 return nativeResponseValue;
4446 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
4447 export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
4448 if(!isWasmInitialized) {
4449 throw new Error("initializeWasm() must be awaited first!");
4451 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
4452 return nativeResponseValue;
4454 // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
4455 export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
4456 if(!isWasmInitialized) {
4457 throw new Error("initializeWasm() must be awaited first!");
4459 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
4460 // debug statements here
4462 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
4463 export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
4464 if(!isWasmInitialized) {
4465 throw new Error("initializeWasm() must be awaited first!");
4467 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
4468 return nativeResponseValue;
4470 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
4471 export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
4472 if(!isWasmInitialized) {
4473 throw new Error("initializeWasm() must be awaited first!");
4475 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
4476 return nativeResponseValue;
4478 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
4479 export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
4480 if(!isWasmInitialized) {
4481 throw new Error("initializeWasm() must be awaited first!");
4483 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
4484 return nativeResponseValue;
4486 // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
4487 export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
4488 if(!isWasmInitialized) {
4489 throw new Error("initializeWasm() must be awaited first!");
4491 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
4492 // debug statements here
4494 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
4495 export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
4496 if(!isWasmInitialized) {
4497 throw new Error("initializeWasm() must be awaited first!");
4499 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
4500 return nativeResponseValue;
4502 // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
4503 export function CVec_TxOutZ_free(_res: number[]): void {
4504 if(!isWasmInitialized) {
4505 throw new Error("initializeWasm() must be awaited first!");
4507 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
4508 // debug statements here
4510 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
4511 export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
4512 if(!isWasmInitialized) {
4513 throw new Error("initializeWasm() must be awaited first!");
4515 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
4516 return nativeResponseValue;
4518 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
4519 export function CResult_TransactionNoneZ_err(): number {
4520 if(!isWasmInitialized) {
4521 throw new Error("initializeWasm() must be awaited first!");
4523 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
4524 return nativeResponseValue;
4526 // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
4527 export function CResult_TransactionNoneZ_free(_res: number): void {
4528 if(!isWasmInitialized) {
4529 throw new Error("initializeWasm() must be awaited first!");
4531 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
4532 // debug statements here
4534 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
4535 export function CResult_NoneErrorZ_ok(): number {
4536 if(!isWasmInitialized) {
4537 throw new Error("initializeWasm() must be awaited first!");
4539 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
4540 return nativeResponseValue;
4542 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
4543 export function CResult_NoneErrorZ_err(e: LDKIOError): number {
4544 if(!isWasmInitialized) {
4545 throw new Error("initializeWasm() must be awaited first!");
4547 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
4548 return nativeResponseValue;
4550 // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
4551 export function CResult_NoneErrorZ_free(_res: number): void {
4552 if(!isWasmInitialized) {
4553 throw new Error("initializeWasm() must be awaited first!");
4555 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
4556 // debug statements here
4558 // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
4559 export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
4560 if(!isWasmInitialized) {
4561 throw new Error("initializeWasm() must be awaited first!");
4563 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
4564 // debug statements here
4566 // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
4567 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
4568 if(!isWasmInitialized) {
4569 throw new Error("initializeWasm() must be awaited first!");
4571 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
4572 return nativeResponseValue;
4574 // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
4575 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: LDKIOError): number {
4576 if(!isWasmInitialized) {
4577 throw new Error("initializeWasm() must be awaited first!");
4579 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
4580 return nativeResponseValue;
4582 // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
4583 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
4584 if(!isWasmInitialized) {
4585 throw new Error("initializeWasm() must be awaited first!");
4587 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
4588 // debug statements here
4590 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
4591 export function CResult_NoneAPIErrorZ_ok(): number {
4592 if(!isWasmInitialized) {
4593 throw new Error("initializeWasm() must be awaited first!");
4595 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
4596 return nativeResponseValue;
4598 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
4599 export function CResult_NoneAPIErrorZ_err(e: number): number {
4600 if(!isWasmInitialized) {
4601 throw new Error("initializeWasm() must be awaited first!");
4603 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
4604 return nativeResponseValue;
4606 // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
4607 export function CResult_NoneAPIErrorZ_free(_res: number): void {
4608 if(!isWasmInitialized) {
4609 throw new Error("initializeWasm() must be awaited first!");
4611 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
4612 // debug statements here
4614 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
4615 export function CResult_NoneAPIErrorZ_clone(orig: number): number {
4616 if(!isWasmInitialized) {
4617 throw new Error("initializeWasm() must be awaited first!");
4619 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
4620 return nativeResponseValue;
4622 // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
4623 export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
4624 if(!isWasmInitialized) {
4625 throw new Error("initializeWasm() must be awaited first!");
4627 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
4628 // debug statements here
4630 // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
4631 export function CVec_APIErrorZ_free(_res: number[]): void {
4632 if(!isWasmInitialized) {
4633 throw new Error("initializeWasm() must be awaited first!");
4635 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
4636 // debug statements here
4638 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
4639 export function CResult_NonePaymentSendFailureZ_ok(): number {
4640 if(!isWasmInitialized) {
4641 throw new Error("initializeWasm() must be awaited first!");
4643 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
4644 return nativeResponseValue;
4646 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
4647 export function CResult_NonePaymentSendFailureZ_err(e: number): number {
4648 if(!isWasmInitialized) {
4649 throw new Error("initializeWasm() must be awaited first!");
4651 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
4652 return nativeResponseValue;
4654 // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
4655 export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
4656 if(!isWasmInitialized) {
4657 throw new Error("initializeWasm() must be awaited first!");
4659 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
4660 // debug statements here
4662 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
4663 export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
4664 if(!isWasmInitialized) {
4665 throw new Error("initializeWasm() must be awaited first!");
4667 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
4668 return nativeResponseValue;
4670 // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
4671 export function CVec_ChannelMonitorZ_free(_res: number[]): void {
4672 if(!isWasmInitialized) {
4673 throw new Error("initializeWasm() must be awaited first!");
4675 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
4676 // debug statements here
4678 // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
4679 export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
4680 if(!isWasmInitialized) {
4681 throw new Error("initializeWasm() must be awaited first!");
4683 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
4684 return nativeResponseValue;
4686 // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
4687 export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
4688 if(!isWasmInitialized) {
4689 throw new Error("initializeWasm() must be awaited first!");
4691 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
4692 // debug statements here
4694 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
4695 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
4696 if(!isWasmInitialized) {
4697 throw new Error("initializeWasm() must be awaited first!");
4699 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
4700 return nativeResponseValue;
4702 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
4703 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
4704 if(!isWasmInitialized) {
4705 throw new Error("initializeWasm() must be awaited first!");
4707 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
4708 return nativeResponseValue;
4710 // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
4711 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
4712 if(!isWasmInitialized) {
4713 throw new Error("initializeWasm() must be awaited first!");
4715 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
4716 // debug statements here
4718 // void Event_free(struct LDKEvent this_ptr);
4719 export function Event_free(this_ptr: number): void {
4720 if(!isWasmInitialized) {
4721 throw new Error("initializeWasm() must be awaited first!");
4723 const nativeResponseValue = wasm.Event_free(this_ptr);
4724 // debug statements here
4726 // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
4727 export function Event_clone(orig: number): number {
4728 if(!isWasmInitialized) {
4729 throw new Error("initializeWasm() must be awaited first!");
4731 const nativeResponseValue = wasm.Event_clone(orig);
4732 return nativeResponseValue;
4734 // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
4735 export function Event_write(obj: number): Uint8Array {
4736 if(!isWasmInitialized) {
4737 throw new Error("initializeWasm() must be awaited first!");
4739 const nativeResponseValue = wasm.Event_write(obj);
4740 return decodeArray(nativeResponseValue);
4742 // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
4743 export function MessageSendEvent_free(this_ptr: number): void {
4744 if(!isWasmInitialized) {
4745 throw new Error("initializeWasm() must be awaited first!");
4747 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
4748 // debug statements here
4750 // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
4751 export function MessageSendEvent_clone(orig: number): number {
4752 if(!isWasmInitialized) {
4753 throw new Error("initializeWasm() must be awaited first!");
4755 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
4756 return nativeResponseValue;
4758 // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
4759 export function MessageSendEventsProvider_free(this_ptr: number): void {
4760 if(!isWasmInitialized) {
4761 throw new Error("initializeWasm() must be awaited first!");
4763 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
4764 // debug statements here
4766 // void EventsProvider_free(struct LDKEventsProvider this_ptr);
4767 export function EventsProvider_free(this_ptr: number): void {
4768 if(!isWasmInitialized) {
4769 throw new Error("initializeWasm() must be awaited first!");
4771 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
4772 // debug statements here
4774 // void APIError_free(struct LDKAPIError this_ptr);
4775 export function APIError_free(this_ptr: number): void {
4776 if(!isWasmInitialized) {
4777 throw new Error("initializeWasm() must be awaited first!");
4779 const nativeResponseValue = wasm.APIError_free(this_ptr);
4780 // debug statements here
4782 // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
4783 export function APIError_clone(orig: number): number {
4784 if(!isWasmInitialized) {
4785 throw new Error("initializeWasm() must be awaited first!");
4787 const nativeResponseValue = wasm.APIError_clone(orig);
4788 return nativeResponseValue;
4790 // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
4791 export function Level_clone(orig: number): LDKLevel {
4792 if(!isWasmInitialized) {
4793 throw new Error("initializeWasm() must be awaited first!");
4795 const nativeResponseValue = wasm.Level_clone(orig);
4796 return nativeResponseValue;
4798 // MUST_USE_RES enum LDKLevel Level_max(void);
4799 export function Level_max(): LDKLevel {
4800 if(!isWasmInitialized) {
4801 throw new Error("initializeWasm() must be awaited first!");
4803 const nativeResponseValue = wasm.Level_max();
4804 return nativeResponseValue;
4806 // void Logger_free(struct LDKLogger this_ptr);
4807 export function Logger_free(this_ptr: number): void {
4808 if(!isWasmInitialized) {
4809 throw new Error("initializeWasm() must be awaited first!");
4811 const nativeResponseValue = wasm.Logger_free(this_ptr);
4812 // debug statements here
4814 // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
4815 export function ChannelHandshakeConfig_free(this_obj: number): void {
4816 if(!isWasmInitialized) {
4817 throw new Error("initializeWasm() must be awaited first!");
4819 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
4820 // debug statements here
4822 // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4823 export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
4824 if(!isWasmInitialized) {
4825 throw new Error("initializeWasm() must be awaited first!");
4827 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
4828 return nativeResponseValue;
4830 // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
4831 export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
4832 if(!isWasmInitialized) {
4833 throw new Error("initializeWasm() must be awaited first!");
4835 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
4836 // debug statements here
4838 // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4839 export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
4840 if(!isWasmInitialized) {
4841 throw new Error("initializeWasm() must be awaited first!");
4843 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
4844 return nativeResponseValue;
4846 // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
4847 export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
4848 if(!isWasmInitialized) {
4849 throw new Error("initializeWasm() must be awaited first!");
4851 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
4852 // debug statements here
4854 // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4855 export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
4856 if(!isWasmInitialized) {
4857 throw new Error("initializeWasm() must be awaited first!");
4859 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
4860 return nativeResponseValue;
4862 // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
4863 export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
4864 if(!isWasmInitialized) {
4865 throw new Error("initializeWasm() must be awaited first!");
4867 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
4868 // debug statements here
4870 // 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);
4871 export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
4872 if(!isWasmInitialized) {
4873 throw new Error("initializeWasm() must be awaited first!");
4875 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
4876 return nativeResponseValue;
4878 // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
4879 export function ChannelHandshakeConfig_clone(orig: number): number {
4880 if(!isWasmInitialized) {
4881 throw new Error("initializeWasm() must be awaited first!");
4883 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
4884 return nativeResponseValue;
4886 // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
4887 export function ChannelHandshakeConfig_default(): number {
4888 if(!isWasmInitialized) {
4889 throw new Error("initializeWasm() must be awaited first!");
4891 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
4892 return nativeResponseValue;
4894 // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
4895 export function ChannelHandshakeLimits_free(this_obj: number): void {
4896 if(!isWasmInitialized) {
4897 throw new Error("initializeWasm() must be awaited first!");
4899 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
4900 // debug statements here
4902 // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4903 export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
4904 if(!isWasmInitialized) {
4905 throw new Error("initializeWasm() must be awaited first!");
4907 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
4908 return nativeResponseValue;
4910 // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4911 export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
4912 if(!isWasmInitialized) {
4913 throw new Error("initializeWasm() must be awaited first!");
4915 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
4916 // debug statements here
4918 // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4919 export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
4920 if(!isWasmInitialized) {
4921 throw new Error("initializeWasm() must be awaited first!");
4923 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
4924 return nativeResponseValue;
4926 // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4927 export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
4928 if(!isWasmInitialized) {
4929 throw new Error("initializeWasm() must be awaited first!");
4931 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
4932 // debug statements here
4934 // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4935 export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
4936 if(!isWasmInitialized) {
4937 throw new Error("initializeWasm() must be awaited first!");
4939 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
4940 return nativeResponseValue;
4942 // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4943 export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
4944 if(!isWasmInitialized) {
4945 throw new Error("initializeWasm() must be awaited first!");
4947 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
4948 // debug statements here
4950 // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4951 export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
4952 if(!isWasmInitialized) {
4953 throw new Error("initializeWasm() must be awaited first!");
4955 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
4956 return nativeResponseValue;
4958 // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4959 export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
4960 if(!isWasmInitialized) {
4961 throw new Error("initializeWasm() must be awaited first!");
4963 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
4964 // debug statements here
4966 // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4967 export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
4968 if(!isWasmInitialized) {
4969 throw new Error("initializeWasm() must be awaited first!");
4971 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
4972 return nativeResponseValue;
4974 // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4975 export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
4976 if(!isWasmInitialized) {
4977 throw new Error("initializeWasm() must be awaited first!");
4979 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
4980 // debug statements here
4982 // uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4983 export function ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr: number): number {
4984 if(!isWasmInitialized) {
4985 throw new Error("initializeWasm() must be awaited first!");
4987 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr);
4988 return nativeResponseValue;
4990 // void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4991 export function ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr: number, val: number): void {
4992 if(!isWasmInitialized) {
4993 throw new Error("initializeWasm() must be awaited first!");
4995 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr, val);
4996 // debug statements here
4998 // uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4999 export function ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr: number): number {
5000 if(!isWasmInitialized) {
5001 throw new Error("initializeWasm() must be awaited first!");
5003 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr);
5004 return nativeResponseValue;
5006 // void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5007 export function ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr: number, val: number): void {
5008 if(!isWasmInitialized) {
5009 throw new Error("initializeWasm() must be awaited first!");
5011 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr, val);
5012 // debug statements here
5014 // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5015 export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
5016 if(!isWasmInitialized) {
5017 throw new Error("initializeWasm() must be awaited first!");
5019 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
5020 return nativeResponseValue;
5022 // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
5023 export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
5024 if(!isWasmInitialized) {
5025 throw new Error("initializeWasm() must be awaited first!");
5027 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
5028 // debug statements here
5030 // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5031 export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
5032 if(!isWasmInitialized) {
5033 throw new Error("initializeWasm() must be awaited first!");
5035 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
5036 return nativeResponseValue;
5038 // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
5039 export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
5040 if(!isWasmInitialized) {
5041 throw new Error("initializeWasm() must be awaited first!");
5043 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
5044 // debug statements here
5046 // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5047 export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
5048 if(!isWasmInitialized) {
5049 throw new Error("initializeWasm() must be awaited first!");
5051 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
5052 return nativeResponseValue;
5054 // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
5055 export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
5056 if(!isWasmInitialized) {
5057 throw new Error("initializeWasm() must be awaited first!");
5059 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
5060 // debug statements here
5062 // 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);
5063 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 {
5064 if(!isWasmInitialized) {
5065 throw new Error("initializeWasm() must be awaited first!");
5067 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);
5068 return nativeResponseValue;
5070 // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
5071 export function ChannelHandshakeLimits_clone(orig: number): number {
5072 if(!isWasmInitialized) {
5073 throw new Error("initializeWasm() must be awaited first!");
5075 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
5076 return nativeResponseValue;
5078 // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
5079 export function ChannelHandshakeLimits_default(): number {
5080 if(!isWasmInitialized) {
5081 throw new Error("initializeWasm() must be awaited first!");
5083 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
5084 return nativeResponseValue;
5086 // void ChannelConfig_free(struct LDKChannelConfig this_obj);
5087 export function ChannelConfig_free(this_obj: number): void {
5088 if(!isWasmInitialized) {
5089 throw new Error("initializeWasm() must be awaited first!");
5091 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
5092 // debug statements here
5094 // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
5095 export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
5096 if(!isWasmInitialized) {
5097 throw new Error("initializeWasm() must be awaited first!");
5099 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
5100 return nativeResponseValue;
5102 // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
5103 export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
5104 if(!isWasmInitialized) {
5105 throw new Error("initializeWasm() must be awaited first!");
5107 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
5108 // debug statements here
5110 // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
5111 export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
5112 if(!isWasmInitialized) {
5113 throw new Error("initializeWasm() must be awaited first!");
5115 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
5116 return nativeResponseValue;
5118 // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
5119 export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
5120 if(!isWasmInitialized) {
5121 throw new Error("initializeWasm() must be awaited first!");
5123 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
5124 // debug statements here
5126 // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
5127 export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
5128 if(!isWasmInitialized) {
5129 throw new Error("initializeWasm() must be awaited first!");
5131 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
5132 return nativeResponseValue;
5134 // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
5135 export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
5136 if(!isWasmInitialized) {
5137 throw new Error("initializeWasm() must be awaited first!");
5139 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
5140 // debug statements here
5142 // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
5143 export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
5144 if(!isWasmInitialized) {
5145 throw new Error("initializeWasm() must be awaited first!");
5147 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
5148 return nativeResponseValue;
5150 // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
5151 export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
5152 if(!isWasmInitialized) {
5153 throw new Error("initializeWasm() must be awaited first!");
5155 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
5156 // debug statements here
5158 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
5159 export function ChannelConfig_new(fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
5160 if(!isWasmInitialized) {
5161 throw new Error("initializeWasm() must be awaited first!");
5163 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
5164 return nativeResponseValue;
5166 // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
5167 export function ChannelConfig_clone(orig: number): number {
5168 if(!isWasmInitialized) {
5169 throw new Error("initializeWasm() must be awaited first!");
5171 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
5172 return nativeResponseValue;
5174 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
5175 export function ChannelConfig_default(): number {
5176 if(!isWasmInitialized) {
5177 throw new Error("initializeWasm() must be awaited first!");
5179 const nativeResponseValue = wasm.ChannelConfig_default();
5180 return nativeResponseValue;
5182 // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
5183 export function ChannelConfig_write(obj: number): Uint8Array {
5184 if(!isWasmInitialized) {
5185 throw new Error("initializeWasm() must be awaited first!");
5187 const nativeResponseValue = wasm.ChannelConfig_write(obj);
5188 return decodeArray(nativeResponseValue);
5190 // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
5191 export function ChannelConfig_read(ser: Uint8Array): number {
5192 if(!isWasmInitialized) {
5193 throw new Error("initializeWasm() must be awaited first!");
5195 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
5196 return nativeResponseValue;
5198 // void UserConfig_free(struct LDKUserConfig this_obj);
5199 export function UserConfig_free(this_obj: number): void {
5200 if(!isWasmInitialized) {
5201 throw new Error("initializeWasm() must be awaited first!");
5203 const nativeResponseValue = wasm.UserConfig_free(this_obj);
5204 // debug statements here
5206 // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5207 export function UserConfig_get_own_channel_config(this_ptr: number): number {
5208 if(!isWasmInitialized) {
5209 throw new Error("initializeWasm() must be awaited first!");
5211 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
5212 return nativeResponseValue;
5214 // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
5215 export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
5216 if(!isWasmInitialized) {
5217 throw new Error("initializeWasm() must be awaited first!");
5219 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
5220 // debug statements here
5222 // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5223 export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
5224 if(!isWasmInitialized) {
5225 throw new Error("initializeWasm() must be awaited first!");
5227 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
5228 return nativeResponseValue;
5230 // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
5231 export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
5232 if(!isWasmInitialized) {
5233 throw new Error("initializeWasm() must be awaited first!");
5235 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
5236 // debug statements here
5238 // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5239 export function UserConfig_get_channel_options(this_ptr: number): number {
5240 if(!isWasmInitialized) {
5241 throw new Error("initializeWasm() must be awaited first!");
5243 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
5244 return nativeResponseValue;
5246 // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
5247 export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
5248 if(!isWasmInitialized) {
5249 throw new Error("initializeWasm() must be awaited first!");
5251 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
5252 // debug statements here
5254 // 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);
5255 export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
5256 if(!isWasmInitialized) {
5257 throw new Error("initializeWasm() must be awaited first!");
5259 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
5260 return nativeResponseValue;
5262 // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
5263 export function UserConfig_clone(orig: number): number {
5264 if(!isWasmInitialized) {
5265 throw new Error("initializeWasm() must be awaited first!");
5267 const nativeResponseValue = wasm.UserConfig_clone(orig);
5268 return nativeResponseValue;
5270 // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
5271 export function UserConfig_default(): number {
5272 if(!isWasmInitialized) {
5273 throw new Error("initializeWasm() must be awaited first!");
5275 const nativeResponseValue = wasm.UserConfig_default();
5276 return nativeResponseValue;
5278 // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
5279 export function AccessError_clone(orig: number): LDKAccessError {
5280 if(!isWasmInitialized) {
5281 throw new Error("initializeWasm() must be awaited first!");
5283 const nativeResponseValue = wasm.AccessError_clone(orig);
5284 return nativeResponseValue;
5286 // void Access_free(struct LDKAccess this_ptr);
5287 export function Access_free(this_ptr: number): void {
5288 if(!isWasmInitialized) {
5289 throw new Error("initializeWasm() must be awaited first!");
5291 const nativeResponseValue = wasm.Access_free(this_ptr);
5292 // debug statements here
5294 // void Listen_free(struct LDKListen this_ptr);
5295 export function Listen_free(this_ptr: number): void {
5296 if(!isWasmInitialized) {
5297 throw new Error("initializeWasm() must be awaited first!");
5299 const nativeResponseValue = wasm.Listen_free(this_ptr);
5300 // debug statements here
5302 // void Watch_free(struct LDKWatch this_ptr);
5303 export function Watch_free(this_ptr: number): void {
5304 if(!isWasmInitialized) {
5305 throw new Error("initializeWasm() must be awaited first!");
5307 const nativeResponseValue = wasm.Watch_free(this_ptr);
5308 // debug statements here
5310 // void Filter_free(struct LDKFilter this_ptr);
5311 export function Filter_free(this_ptr: number): void {
5312 if(!isWasmInitialized) {
5313 throw new Error("initializeWasm() must be awaited first!");
5315 const nativeResponseValue = wasm.Filter_free(this_ptr);
5316 // debug statements here
5318 // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
5319 export function WatchedOutput_free(this_obj: number): void {
5320 if(!isWasmInitialized) {
5321 throw new Error("initializeWasm() must be awaited first!");
5323 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
5324 // debug statements here
5326 // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
5327 export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
5328 if(!isWasmInitialized) {
5329 throw new Error("initializeWasm() must be awaited first!");
5331 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
5332 return decodeArray(nativeResponseValue);
5334 // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5335 export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
5336 if(!isWasmInitialized) {
5337 throw new Error("initializeWasm() must be awaited first!");
5339 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
5340 // debug statements here
5342 // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
5343 export function WatchedOutput_get_outpoint(this_ptr: number): number {
5344 if(!isWasmInitialized) {
5345 throw new Error("initializeWasm() must be awaited first!");
5347 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
5348 return nativeResponseValue;
5350 // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5351 export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
5352 if(!isWasmInitialized) {
5353 throw new Error("initializeWasm() must be awaited first!");
5355 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
5356 // debug statements here
5358 // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
5359 export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
5360 if(!isWasmInitialized) {
5361 throw new Error("initializeWasm() must be awaited first!");
5363 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
5364 return decodeArray(nativeResponseValue);
5366 // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
5367 export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
5368 if(!isWasmInitialized) {
5369 throw new Error("initializeWasm() must be awaited first!");
5371 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
5372 // debug statements here
5374 // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
5375 export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
5376 if(!isWasmInitialized) {
5377 throw new Error("initializeWasm() must be awaited first!");
5379 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
5380 return nativeResponseValue;
5382 // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
5383 export function BroadcasterInterface_free(this_ptr: number): void {
5384 if(!isWasmInitialized) {
5385 throw new Error("initializeWasm() must be awaited first!");
5387 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
5388 // debug statements here
5390 // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
5391 export function ConfirmationTarget_clone(orig: number): LDKConfirmationTarget {
5392 if(!isWasmInitialized) {
5393 throw new Error("initializeWasm() must be awaited first!");
5395 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
5396 return nativeResponseValue;
5398 // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
5399 export function FeeEstimator_free(this_ptr: number): void {
5400 if(!isWasmInitialized) {
5401 throw new Error("initializeWasm() must be awaited first!");
5403 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
5404 // debug statements here
5406 // void ChainMonitor_free(struct LDKChainMonitor this_obj);
5407 export function ChainMonitor_free(this_obj: number): void {
5408 if(!isWasmInitialized) {
5409 throw new Error("initializeWasm() must be awaited first!");
5411 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
5412 // debug statements here
5414 // void ChainMonitor_block_connected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
5415 export function ChainMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
5416 if(!isWasmInitialized) {
5417 throw new Error("initializeWasm() must be awaited first!");
5419 const nativeResponseValue = wasm.ChainMonitor_block_connected(this_arg, encodeArray(header), txdata, height);
5420 // debug statements here
5422 // void ChainMonitor_transactions_confirmed(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
5423 export function ChainMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
5424 if(!isWasmInitialized) {
5425 throw new Error("initializeWasm() must be awaited first!");
5427 const nativeResponseValue = wasm.ChainMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
5428 // debug statements here
5430 // void ChainMonitor_update_best_block(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height);
5431 export function ChainMonitor_update_best_block(this_arg: number, header: Uint8Array, height: number): void {
5432 if(!isWasmInitialized) {
5433 throw new Error("initializeWasm() must be awaited first!");
5435 const nativeResponseValue = wasm.ChainMonitor_update_best_block(this_arg, encodeArray(header), height);
5436 // debug statements here
5438 // void ChainMonitor_block_disconnected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t disconnected_height);
5439 export function ChainMonitor_block_disconnected(this_arg: number, header: Uint8Array, disconnected_height: number): void {
5440 if(!isWasmInitialized) {
5441 throw new Error("initializeWasm() must be awaited first!");
5443 const nativeResponseValue = wasm.ChainMonitor_block_disconnected(this_arg, encodeArray(header), disconnected_height);
5444 // debug statements here
5446 // void ChainMonitor_transaction_unconfirmed(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*txid)[32]);
5447 export function ChainMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
5448 if(!isWasmInitialized) {
5449 throw new Error("initializeWasm() must be awaited first!");
5451 const nativeResponseValue = wasm.ChainMonitor_transaction_unconfirmed(this_arg, encodeArray(txid));
5452 // debug statements here
5454 // MUST_USE_RES struct LDKCVec_TxidZ ChainMonitor_get_relevant_txids(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5455 export function ChainMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
5456 if(!isWasmInitialized) {
5457 throw new Error("initializeWasm() must be awaited first!");
5459 const nativeResponseValue = wasm.ChainMonitor_get_relevant_txids(this_arg);
5460 return nativeResponseValue;
5462 // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
5463 export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
5464 if(!isWasmInitialized) {
5465 throw new Error("initializeWasm() must be awaited first!");
5467 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
5468 return nativeResponseValue;
5470 // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5471 export function ChainMonitor_as_Watch(this_arg: number): number {
5472 if(!isWasmInitialized) {
5473 throw new Error("initializeWasm() must be awaited first!");
5475 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
5476 return nativeResponseValue;
5478 // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5479 export function ChainMonitor_as_EventsProvider(this_arg: number): number {
5480 if(!isWasmInitialized) {
5481 throw new Error("initializeWasm() must be awaited first!");
5483 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
5484 return nativeResponseValue;
5486 // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
5487 export function ChannelMonitorUpdate_free(this_obj: number): void {
5488 if(!isWasmInitialized) {
5489 throw new Error("initializeWasm() must be awaited first!");
5491 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
5492 // debug statements here
5494 // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
5495 export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
5496 if(!isWasmInitialized) {
5497 throw new Error("initializeWasm() must be awaited first!");
5499 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
5500 return nativeResponseValue;
5502 // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
5503 export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
5504 if(!isWasmInitialized) {
5505 throw new Error("initializeWasm() must be awaited first!");
5507 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
5508 // debug statements here
5510 // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
5511 export function ChannelMonitorUpdate_clone(orig: number): number {
5512 if(!isWasmInitialized) {
5513 throw new Error("initializeWasm() must be awaited first!");
5515 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
5516 return nativeResponseValue;
5518 // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
5519 export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
5520 if(!isWasmInitialized) {
5521 throw new Error("initializeWasm() must be awaited first!");
5523 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
5524 return decodeArray(nativeResponseValue);
5526 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
5527 export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
5528 if(!isWasmInitialized) {
5529 throw new Error("initializeWasm() must be awaited first!");
5531 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
5532 return nativeResponseValue;
5534 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
5535 export function ChannelMonitorUpdateErr_clone(orig: number): LDKChannelMonitorUpdateErr {
5536 if(!isWasmInitialized) {
5537 throw new Error("initializeWasm() must be awaited first!");
5539 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
5540 return nativeResponseValue;
5542 // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
5543 export function MonitorUpdateError_free(this_obj: number): void {
5544 if(!isWasmInitialized) {
5545 throw new Error("initializeWasm() must be awaited first!");
5547 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
5548 // debug statements here
5550 // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
5551 export function MonitorUpdateError_clone(orig: number): number {
5552 if(!isWasmInitialized) {
5553 throw new Error("initializeWasm() must be awaited first!");
5555 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
5556 return nativeResponseValue;
5558 // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
5559 export function MonitorEvent_free(this_ptr: number): void {
5560 if(!isWasmInitialized) {
5561 throw new Error("initializeWasm() must be awaited first!");
5563 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
5564 // debug statements here
5566 // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
5567 export function MonitorEvent_clone(orig: number): number {
5568 if(!isWasmInitialized) {
5569 throw new Error("initializeWasm() must be awaited first!");
5571 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
5572 return nativeResponseValue;
5574 // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
5575 export function HTLCUpdate_free(this_obj: number): void {
5576 if(!isWasmInitialized) {
5577 throw new Error("initializeWasm() must be awaited first!");
5579 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
5580 // debug statements here
5582 // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
5583 export function HTLCUpdate_clone(orig: number): number {
5584 if(!isWasmInitialized) {
5585 throw new Error("initializeWasm() must be awaited first!");
5587 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
5588 return nativeResponseValue;
5590 // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
5591 export function HTLCUpdate_write(obj: number): Uint8Array {
5592 if(!isWasmInitialized) {
5593 throw new Error("initializeWasm() must be awaited first!");
5595 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
5596 return decodeArray(nativeResponseValue);
5598 // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
5599 export function HTLCUpdate_read(ser: Uint8Array): number {
5600 if(!isWasmInitialized) {
5601 throw new Error("initializeWasm() must be awaited first!");
5603 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
5604 return nativeResponseValue;
5606 // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
5607 export function ChannelMonitor_free(this_obj: number): void {
5608 if(!isWasmInitialized) {
5609 throw new Error("initializeWasm() must be awaited first!");
5611 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
5612 // debug statements here
5614 // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
5615 export function ChannelMonitor_clone(orig: number): number {
5616 if(!isWasmInitialized) {
5617 throw new Error("initializeWasm() must be awaited first!");
5619 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
5620 return nativeResponseValue;
5622 // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
5623 export function ChannelMonitor_write(obj: number): Uint8Array {
5624 if(!isWasmInitialized) {
5625 throw new Error("initializeWasm() must be awaited first!");
5627 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
5628 return decodeArray(nativeResponseValue);
5630 // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
5631 export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
5632 if(!isWasmInitialized) {
5633 throw new Error("initializeWasm() must be awaited first!");
5635 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
5636 return nativeResponseValue;
5638 // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5639 export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
5640 if(!isWasmInitialized) {
5641 throw new Error("initializeWasm() must be awaited first!");
5643 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
5644 return nativeResponseValue;
5646 // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5647 export function ChannelMonitor_get_funding_txo(this_arg: number): number {
5648 if(!isWasmInitialized) {
5649 throw new Error("initializeWasm() must be awaited first!");
5651 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
5652 return nativeResponseValue;
5654 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5655 export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
5656 if(!isWasmInitialized) {
5657 throw new Error("initializeWasm() must be awaited first!");
5659 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
5660 return nativeResponseValue;
5662 // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
5663 export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
5664 if(!isWasmInitialized) {
5665 throw new Error("initializeWasm() must be awaited first!");
5667 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
5668 // debug statements here
5670 // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5671 export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
5672 if(!isWasmInitialized) {
5673 throw new Error("initializeWasm() must be awaited first!");
5675 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
5676 return nativeResponseValue;
5678 // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5679 export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
5680 if(!isWasmInitialized) {
5681 throw new Error("initializeWasm() must be awaited first!");
5683 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
5684 return nativeResponseValue;
5686 // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
5687 export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
5688 if(!isWasmInitialized) {
5689 throw new Error("initializeWasm() must be awaited first!");
5691 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
5692 return nativeResponseValue;
5694 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
5695 export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5696 if(!isWasmInitialized) {
5697 throw new Error("initializeWasm() must be awaited first!");
5699 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
5700 return nativeResponseValue;
5702 // void ChannelMonitor_block_disconnected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
5703 export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
5704 if(!isWasmInitialized) {
5705 throw new Error("initializeWasm() must be awaited first!");
5707 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
5708 // debug statements here
5710 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_transactions_confirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
5711 export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5712 if(!isWasmInitialized) {
5713 throw new Error("initializeWasm() must be awaited first!");
5715 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
5716 return nativeResponseValue;
5718 // void ChannelMonitor_transaction_unconfirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
5719 export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
5720 if(!isWasmInitialized) {
5721 throw new Error("initializeWasm() must be awaited first!");
5723 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
5724 // debug statements here
5726 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_update_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
5727 export function ChannelMonitor_update_best_block(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5728 if(!isWasmInitialized) {
5729 throw new Error("initializeWasm() must be awaited first!");
5731 const nativeResponseValue = wasm.ChannelMonitor_update_best_block(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
5732 return nativeResponseValue;
5734 // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5735 export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
5736 if(!isWasmInitialized) {
5737 throw new Error("initializeWasm() must be awaited first!");
5739 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
5740 return nativeResponseValue;
5742 // void Persist_free(struct LDKPersist this_ptr);
5743 export function Persist_free(this_ptr: number): void {
5744 if(!isWasmInitialized) {
5745 throw new Error("initializeWasm() must be awaited first!");
5747 const nativeResponseValue = wasm.Persist_free(this_ptr);
5748 // debug statements here
5750 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
5751 export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
5752 if(!isWasmInitialized) {
5753 throw new Error("initializeWasm() must be awaited first!");
5755 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
5756 return nativeResponseValue;
5758 // void OutPoint_free(struct LDKOutPoint this_obj);
5759 export function OutPoint_free(this_obj: number): void {
5760 if(!isWasmInitialized) {
5761 throw new Error("initializeWasm() must be awaited first!");
5763 const nativeResponseValue = wasm.OutPoint_free(this_obj);
5764 // debug statements here
5766 // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
5767 export function OutPoint_get_txid(this_ptr: number): Uint8Array {
5768 if(!isWasmInitialized) {
5769 throw new Error("initializeWasm() must be awaited first!");
5771 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
5772 return decodeArray(nativeResponseValue);
5774 // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5775 export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
5776 if(!isWasmInitialized) {
5777 throw new Error("initializeWasm() must be awaited first!");
5779 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
5780 // debug statements here
5782 // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
5783 export function OutPoint_get_index(this_ptr: number): number {
5784 if(!isWasmInitialized) {
5785 throw new Error("initializeWasm() must be awaited first!");
5787 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
5788 return nativeResponseValue;
5790 // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
5791 export function OutPoint_set_index(this_ptr: number, val: number): void {
5792 if(!isWasmInitialized) {
5793 throw new Error("initializeWasm() must be awaited first!");
5795 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
5796 // debug statements here
5798 // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
5799 export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
5800 if(!isWasmInitialized) {
5801 throw new Error("initializeWasm() must be awaited first!");
5803 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
5804 return nativeResponseValue;
5806 // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
5807 export function OutPoint_clone(orig: number): number {
5808 if(!isWasmInitialized) {
5809 throw new Error("initializeWasm() must be awaited first!");
5811 const nativeResponseValue = wasm.OutPoint_clone(orig);
5812 return nativeResponseValue;
5814 // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
5815 export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
5816 if(!isWasmInitialized) {
5817 throw new Error("initializeWasm() must be awaited first!");
5819 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
5820 return decodeArray(nativeResponseValue);
5822 // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
5823 export function OutPoint_write(obj: number): Uint8Array {
5824 if(!isWasmInitialized) {
5825 throw new Error("initializeWasm() must be awaited first!");
5827 const nativeResponseValue = wasm.OutPoint_write(obj);
5828 return decodeArray(nativeResponseValue);
5830 // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
5831 export function OutPoint_read(ser: Uint8Array): number {
5832 if(!isWasmInitialized) {
5833 throw new Error("initializeWasm() must be awaited first!");
5835 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
5836 return nativeResponseValue;
5838 // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
5839 export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
5840 if(!isWasmInitialized) {
5841 throw new Error("initializeWasm() must be awaited first!");
5843 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
5844 // debug statements here
5846 // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5847 export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5848 if(!isWasmInitialized) {
5849 throw new Error("initializeWasm() must be awaited first!");
5851 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
5852 return nativeResponseValue;
5854 // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5855 export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5856 if(!isWasmInitialized) {
5857 throw new Error("initializeWasm() must be awaited first!");
5859 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5860 // debug statements here
5862 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5863 export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
5864 if(!isWasmInitialized) {
5865 throw new Error("initializeWasm() must be awaited first!");
5867 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
5868 return decodeArray(nativeResponseValue);
5870 // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5871 export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5872 if(!isWasmInitialized) {
5873 throw new Error("initializeWasm() must be awaited first!");
5875 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
5876 // debug statements here
5878 // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5879 export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
5880 if(!isWasmInitialized) {
5881 throw new Error("initializeWasm() must be awaited first!");
5883 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
5884 return nativeResponseValue;
5886 // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
5887 export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
5888 if(!isWasmInitialized) {
5889 throw new Error("initializeWasm() must be awaited first!");
5891 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
5892 // debug statements here
5894 // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5895 export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5896 if(!isWasmInitialized) {
5897 throw new Error("initializeWasm() must be awaited first!");
5899 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
5900 // debug statements here
5902 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5903 export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
5904 if(!isWasmInitialized) {
5905 throw new Error("initializeWasm() must be awaited first!");
5907 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
5908 return decodeArray(nativeResponseValue);
5910 // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5911 export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
5912 if(!isWasmInitialized) {
5913 throw new Error("initializeWasm() must be awaited first!");
5915 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
5916 // debug statements here
5918 // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5919 export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5920 if(!isWasmInitialized) {
5921 throw new Error("initializeWasm() must be awaited first!");
5923 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5924 return decodeArray(nativeResponseValue);
5926 // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5927 export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5928 if(!isWasmInitialized) {
5929 throw new Error("initializeWasm() must be awaited first!");
5931 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5932 // debug statements here
5934 // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5935 export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5936 if(!isWasmInitialized) {
5937 throw new Error("initializeWasm() must be awaited first!");
5939 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5940 return nativeResponseValue;
5942 // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5943 export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5944 if(!isWasmInitialized) {
5945 throw new Error("initializeWasm() must be awaited first!");
5947 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5948 // debug statements here
5950 // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKPublicKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
5951 export function DelayedPaymentOutputDescriptor_new(outpoint_arg: number, per_commitment_point_arg: Uint8Array, to_self_delay_arg: number, output_arg: number, revocation_pubkey_arg: Uint8Array, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
5952 if(!isWasmInitialized) {
5953 throw new Error("initializeWasm() must be awaited first!");
5955 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_new(outpoint_arg, encodeArray(per_commitment_point_arg), to_self_delay_arg, output_arg, encodeArray(revocation_pubkey_arg), encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
5956 return nativeResponseValue;
5958 // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
5959 export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
5960 if(!isWasmInitialized) {
5961 throw new Error("initializeWasm() must be awaited first!");
5963 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
5964 return nativeResponseValue;
5966 // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
5967 export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
5968 if(!isWasmInitialized) {
5969 throw new Error("initializeWasm() must be awaited first!");
5971 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
5972 // debug statements here
5974 // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5975 export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5976 if(!isWasmInitialized) {
5977 throw new Error("initializeWasm() must be awaited first!");
5979 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
5980 return nativeResponseValue;
5982 // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5983 export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5984 if(!isWasmInitialized) {
5985 throw new Error("initializeWasm() must be awaited first!");
5987 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5988 // debug statements here
5990 // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5991 export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5992 if(!isWasmInitialized) {
5993 throw new Error("initializeWasm() must be awaited first!");
5995 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
5996 // debug statements here
5998 // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5999 export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
6000 if(!isWasmInitialized) {
6001 throw new Error("initializeWasm() must be awaited first!");
6003 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
6004 return decodeArray(nativeResponseValue);
6006 // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6007 export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
6008 if(!isWasmInitialized) {
6009 throw new Error("initializeWasm() must be awaited first!");
6011 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
6012 // debug statements here
6014 // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6015 export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
6016 if(!isWasmInitialized) {
6017 throw new Error("initializeWasm() must be awaited first!");
6019 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
6020 return nativeResponseValue;
6022 // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
6023 export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
6024 if(!isWasmInitialized) {
6025 throw new Error("initializeWasm() must be awaited first!");
6027 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
6028 // debug statements here
6030 // MUST_USE_RES struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKTxOut output_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
6031 export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
6032 if(!isWasmInitialized) {
6033 throw new Error("initializeWasm() must be awaited first!");
6035 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
6036 return nativeResponseValue;
6038 // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
6039 export function StaticPaymentOutputDescriptor_clone(orig: number): number {
6040 if(!isWasmInitialized) {
6041 throw new Error("initializeWasm() must be awaited first!");
6043 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
6044 return nativeResponseValue;
6046 // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
6047 export function SpendableOutputDescriptor_free(this_ptr: number): void {
6048 if(!isWasmInitialized) {
6049 throw new Error("initializeWasm() must be awaited first!");
6051 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
6052 // debug statements here
6054 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
6055 export function SpendableOutputDescriptor_clone(orig: number): number {
6056 if(!isWasmInitialized) {
6057 throw new Error("initializeWasm() must be awaited first!");
6059 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
6060 return nativeResponseValue;
6062 // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
6063 export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
6064 if(!isWasmInitialized) {
6065 throw new Error("initializeWasm() must be awaited first!");
6067 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
6068 return decodeArray(nativeResponseValue);
6070 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
6071 export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
6072 if(!isWasmInitialized) {
6073 throw new Error("initializeWasm() must be awaited first!");
6075 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
6076 return nativeResponseValue;
6078 // void BaseSign_free(struct LDKBaseSign this_ptr);
6079 export function BaseSign_free(this_ptr: number): void {
6080 if(!isWasmInitialized) {
6081 throw new Error("initializeWasm() must be awaited first!");
6083 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
6084 // debug statements here
6086 // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
6087 export function Sign_clone(orig: number): number {
6088 if(!isWasmInitialized) {
6089 throw new Error("initializeWasm() must be awaited first!");
6091 const nativeResponseValue = wasm.Sign_clone(orig);
6092 return nativeResponseValue;
6094 // void Sign_free(struct LDKSign this_ptr);
6095 export function Sign_free(this_ptr: number): void {
6096 if(!isWasmInitialized) {
6097 throw new Error("initializeWasm() must be awaited first!");
6099 const nativeResponseValue = wasm.Sign_free(this_ptr);
6100 // debug statements here
6102 // void KeysInterface_free(struct LDKKeysInterface this_ptr);
6103 export function KeysInterface_free(this_ptr: number): void {
6104 if(!isWasmInitialized) {
6105 throw new Error("initializeWasm() must be awaited first!");
6107 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
6108 // debug statements here
6110 // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
6111 export function InMemorySigner_free(this_obj: number): void {
6112 if(!isWasmInitialized) {
6113 throw new Error("initializeWasm() must be awaited first!");
6115 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
6116 // debug statements here
6118 // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6119 export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
6120 if(!isWasmInitialized) {
6121 throw new Error("initializeWasm() must be awaited first!");
6123 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
6124 return decodeArray(nativeResponseValue);
6126 // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6127 export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
6128 if(!isWasmInitialized) {
6129 throw new Error("initializeWasm() must be awaited first!");
6131 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
6132 // debug statements here
6134 // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6135 export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
6136 if(!isWasmInitialized) {
6137 throw new Error("initializeWasm() must be awaited first!");
6139 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
6140 return decodeArray(nativeResponseValue);
6142 // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6143 export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
6144 if(!isWasmInitialized) {
6145 throw new Error("initializeWasm() must be awaited first!");
6147 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
6148 // debug statements here
6150 // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6151 export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
6152 if(!isWasmInitialized) {
6153 throw new Error("initializeWasm() must be awaited first!");
6155 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
6156 return decodeArray(nativeResponseValue);
6158 // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6159 export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
6160 if(!isWasmInitialized) {
6161 throw new Error("initializeWasm() must be awaited first!");
6163 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
6164 // debug statements here
6166 // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6167 export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
6168 if(!isWasmInitialized) {
6169 throw new Error("initializeWasm() must be awaited first!");
6171 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
6172 return decodeArray(nativeResponseValue);
6174 // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6175 export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
6176 if(!isWasmInitialized) {
6177 throw new Error("initializeWasm() must be awaited first!");
6179 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
6180 // debug statements here
6182 // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6183 export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
6184 if(!isWasmInitialized) {
6185 throw new Error("initializeWasm() must be awaited first!");
6187 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
6188 return decodeArray(nativeResponseValue);
6190 // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6191 export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
6192 if(!isWasmInitialized) {
6193 throw new Error("initializeWasm() must be awaited first!");
6195 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
6196 // debug statements here
6198 // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6199 export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
6200 if(!isWasmInitialized) {
6201 throw new Error("initializeWasm() must be awaited first!");
6203 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
6204 return decodeArray(nativeResponseValue);
6206 // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6207 export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
6208 if(!isWasmInitialized) {
6209 throw new Error("initializeWasm() must be awaited first!");
6211 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
6212 // debug statements here
6214 // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
6215 export function InMemorySigner_clone(orig: number): number {
6216 if(!isWasmInitialized) {
6217 throw new Error("initializeWasm() must be awaited first!");
6219 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
6220 return nativeResponseValue;
6222 // MUST_USE_RES struct LDKInMemorySigner InMemorySigner_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKThirtyTwoBytes channel_keys_id);
6223 export function InMemorySigner_new(funding_key: Uint8Array, revocation_base_key: Uint8Array, payment_key: Uint8Array, delayed_payment_base_key: Uint8Array, htlc_base_key: Uint8Array, commitment_seed: Uint8Array, channel_value_satoshis: number, channel_keys_id: Uint8Array): number {
6224 if(!isWasmInitialized) {
6225 throw new Error("initializeWasm() must be awaited first!");
6227 const nativeResponseValue = wasm.InMemorySigner_new(encodeArray(funding_key), encodeArray(revocation_base_key), encodeArray(payment_key), encodeArray(delayed_payment_base_key), encodeArray(htlc_base_key), encodeArray(commitment_seed), channel_value_satoshis, encodeArray(channel_keys_id));
6228 return nativeResponseValue;
6230 // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6231 export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
6232 if(!isWasmInitialized) {
6233 throw new Error("initializeWasm() must be awaited first!");
6235 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
6236 return nativeResponseValue;
6238 // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6239 export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
6240 if(!isWasmInitialized) {
6241 throw new Error("initializeWasm() must be awaited first!");
6243 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
6244 return nativeResponseValue;
6246 // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6247 export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
6248 if(!isWasmInitialized) {
6249 throw new Error("initializeWasm() must be awaited first!");
6251 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
6252 return nativeResponseValue;
6254 // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6255 export function InMemorySigner_is_outbound(this_arg: number): boolean {
6256 if(!isWasmInitialized) {
6257 throw new Error("initializeWasm() must be awaited first!");
6259 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
6260 return nativeResponseValue;
6262 // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6263 export function InMemorySigner_funding_outpoint(this_arg: number): number {
6264 if(!isWasmInitialized) {
6265 throw new Error("initializeWasm() must be awaited first!");
6267 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
6268 return nativeResponseValue;
6270 // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6271 export function InMemorySigner_get_channel_parameters(this_arg: number): number {
6272 if(!isWasmInitialized) {
6273 throw new Error("initializeWasm() must be awaited first!");
6275 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
6276 return nativeResponseValue;
6278 // MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_counterparty_payment_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR descriptor);
6279 export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
6280 if(!isWasmInitialized) {
6281 throw new Error("initializeWasm() must be awaited first!");
6283 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
6284 return nativeResponseValue;
6286 // MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_dynamic_p2wsh_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR descriptor);
6287 export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
6288 if(!isWasmInitialized) {
6289 throw new Error("initializeWasm() must be awaited first!");
6291 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
6292 return nativeResponseValue;
6294 // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6295 export function InMemorySigner_as_BaseSign(this_arg: number): number {
6296 if(!isWasmInitialized) {
6297 throw new Error("initializeWasm() must be awaited first!");
6299 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
6300 return nativeResponseValue;
6302 // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6303 export function InMemorySigner_as_Sign(this_arg: number): number {
6304 if(!isWasmInitialized) {
6305 throw new Error("initializeWasm() must be awaited first!");
6307 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
6308 return nativeResponseValue;
6310 // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
6311 export function InMemorySigner_write(obj: number): Uint8Array {
6312 if(!isWasmInitialized) {
6313 throw new Error("initializeWasm() must be awaited first!");
6315 const nativeResponseValue = wasm.InMemorySigner_write(obj);
6316 return decodeArray(nativeResponseValue);
6318 // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
6319 export function InMemorySigner_read(ser: Uint8Array): number {
6320 if(!isWasmInitialized) {
6321 throw new Error("initializeWasm() must be awaited first!");
6323 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
6324 return nativeResponseValue;
6326 // void KeysManager_free(struct LDKKeysManager this_obj);
6327 export function KeysManager_free(this_obj: number): void {
6328 if(!isWasmInitialized) {
6329 throw new Error("initializeWasm() must be awaited first!");
6331 const nativeResponseValue = wasm.KeysManager_free(this_obj);
6332 // debug statements here
6334 // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
6335 export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
6336 if(!isWasmInitialized) {
6337 throw new Error("initializeWasm() must be awaited first!");
6339 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
6340 return nativeResponseValue;
6342 // MUST_USE_RES struct LDKInMemorySigner KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
6343 export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
6344 if(!isWasmInitialized) {
6345 throw new Error("initializeWasm() must be awaited first!");
6347 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
6348 return nativeResponseValue;
6350 // MUST_USE_RES struct LDKCResult_TransactionNoneZ KeysManager_spend_spendable_outputs(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight);
6351 export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
6352 if(!isWasmInitialized) {
6353 throw new Error("initializeWasm() must be awaited first!");
6355 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
6356 return nativeResponseValue;
6358 // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
6359 export function KeysManager_as_KeysInterface(this_arg: number): number {
6360 if(!isWasmInitialized) {
6361 throw new Error("initializeWasm() must be awaited first!");
6363 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
6364 return nativeResponseValue;
6366 // void ChannelManager_free(struct LDKChannelManager this_obj);
6367 export function ChannelManager_free(this_obj: number): void {
6368 if(!isWasmInitialized) {
6369 throw new Error("initializeWasm() must be awaited first!");
6371 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
6372 // debug statements here
6374 // void ChainParameters_free(struct LDKChainParameters this_obj);
6375 export function ChainParameters_free(this_obj: number): void {
6376 if(!isWasmInitialized) {
6377 throw new Error("initializeWasm() must be awaited first!");
6379 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
6380 // debug statements here
6382 // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6383 export function ChainParameters_get_network(this_ptr: number): LDKNetwork {
6384 if(!isWasmInitialized) {
6385 throw new Error("initializeWasm() must be awaited first!");
6387 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
6388 return nativeResponseValue;
6390 // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
6391 export function ChainParameters_set_network(this_ptr: number, val: LDKNetwork): void {
6392 if(!isWasmInitialized) {
6393 throw new Error("initializeWasm() must be awaited first!");
6395 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
6396 // debug statements here
6398 // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6399 export function ChainParameters_get_best_block(this_ptr: number): number {
6400 if(!isWasmInitialized) {
6401 throw new Error("initializeWasm() must be awaited first!");
6403 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
6404 return nativeResponseValue;
6406 // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
6407 export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
6408 if(!isWasmInitialized) {
6409 throw new Error("initializeWasm() must be awaited first!");
6411 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
6412 // debug statements here
6414 // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
6415 export function ChainParameters_new(network_arg: LDKNetwork, best_block_arg: number): number {
6416 if(!isWasmInitialized) {
6417 throw new Error("initializeWasm() must be awaited first!");
6419 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
6420 return nativeResponseValue;
6422 // void BestBlock_free(struct LDKBestBlock this_obj);
6423 export function BestBlock_free(this_obj: number): void {
6424 if(!isWasmInitialized) {
6425 throw new Error("initializeWasm() must be awaited first!");
6427 const nativeResponseValue = wasm.BestBlock_free(this_obj);
6428 // debug statements here
6430 // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
6431 export function BestBlock_clone(orig: number): number {
6432 if(!isWasmInitialized) {
6433 throw new Error("initializeWasm() must be awaited first!");
6435 const nativeResponseValue = wasm.BestBlock_clone(orig);
6436 return nativeResponseValue;
6438 // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
6439 export function BestBlock_from_genesis(network: LDKNetwork): number {
6440 if(!isWasmInitialized) {
6441 throw new Error("initializeWasm() must be awaited first!");
6443 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
6444 return nativeResponseValue;
6446 // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
6447 export function BestBlock_new(block_hash: Uint8Array, height: number): number {
6448 if(!isWasmInitialized) {
6449 throw new Error("initializeWasm() must be awaited first!");
6451 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
6452 return nativeResponseValue;
6454 // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
6455 export function BestBlock_block_hash(this_arg: number): Uint8Array {
6456 if(!isWasmInitialized) {
6457 throw new Error("initializeWasm() must be awaited first!");
6459 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
6460 return decodeArray(nativeResponseValue);
6462 // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
6463 export function BestBlock_height(this_arg: number): number {
6464 if(!isWasmInitialized) {
6465 throw new Error("initializeWasm() must be awaited first!");
6467 const nativeResponseValue = wasm.BestBlock_height(this_arg);
6468 return nativeResponseValue;
6470 // void ChannelDetails_free(struct LDKChannelDetails this_obj);
6471 export function ChannelDetails_free(this_obj: number): void {
6472 if(!isWasmInitialized) {
6473 throw new Error("initializeWasm() must be awaited first!");
6475 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
6476 // debug statements here
6478 // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
6479 export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
6480 if(!isWasmInitialized) {
6481 throw new Error("initializeWasm() must be awaited first!");
6483 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
6484 return decodeArray(nativeResponseValue);
6486 // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6487 export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
6488 if(!isWasmInitialized) {
6489 throw new Error("initializeWasm() must be awaited first!");
6491 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
6492 // debug statements here
6494 // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6495 export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
6496 if(!isWasmInitialized) {
6497 throw new Error("initializeWasm() must be awaited first!");
6499 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
6500 return nativeResponseValue;
6502 // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
6503 export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
6504 if(!isWasmInitialized) {
6505 throw new Error("initializeWasm() must be awaited first!");
6507 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
6508 // debug statements here
6510 // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6511 export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
6512 if(!isWasmInitialized) {
6513 throw new Error("initializeWasm() must be awaited first!");
6515 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
6516 return decodeArray(nativeResponseValue);
6518 // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6519 export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
6520 if(!isWasmInitialized) {
6521 throw new Error("initializeWasm() must be awaited first!");
6523 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
6524 // debug statements here
6526 // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6527 export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
6528 if(!isWasmInitialized) {
6529 throw new Error("initializeWasm() must be awaited first!");
6531 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
6532 return nativeResponseValue;
6534 // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6535 export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
6536 if(!isWasmInitialized) {
6537 throw new Error("initializeWasm() must be awaited first!");
6539 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
6540 // debug statements here
6542 // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6543 export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
6544 if(!isWasmInitialized) {
6545 throw new Error("initializeWasm() must be awaited first!");
6547 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
6548 return nativeResponseValue;
6550 // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6551 export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
6552 if(!isWasmInitialized) {
6553 throw new Error("initializeWasm() must be awaited first!");
6555 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
6556 // debug statements here
6558 // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6559 export function ChannelDetails_get_user_id(this_ptr: number): number {
6560 if(!isWasmInitialized) {
6561 throw new Error("initializeWasm() must be awaited first!");
6563 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
6564 return nativeResponseValue;
6566 // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6567 export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
6568 if(!isWasmInitialized) {
6569 throw new Error("initializeWasm() must be awaited first!");
6571 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
6572 // debug statements here
6574 // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6575 export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
6576 if(!isWasmInitialized) {
6577 throw new Error("initializeWasm() must be awaited first!");
6579 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
6580 return nativeResponseValue;
6582 // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6583 export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
6584 if(!isWasmInitialized) {
6585 throw new Error("initializeWasm() must be awaited first!");
6587 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
6588 // debug statements here
6590 // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6591 export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
6592 if(!isWasmInitialized) {
6593 throw new Error("initializeWasm() must be awaited first!");
6595 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
6596 return nativeResponseValue;
6598 // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6599 export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
6600 if(!isWasmInitialized) {
6601 throw new Error("initializeWasm() must be awaited first!");
6603 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
6604 // debug statements here
6606 // bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6607 export function ChannelDetails_get_is_live(this_ptr: number): boolean {
6608 if(!isWasmInitialized) {
6609 throw new Error("initializeWasm() must be awaited first!");
6611 const nativeResponseValue = wasm.ChannelDetails_get_is_live(this_ptr);
6612 return nativeResponseValue;
6614 // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
6615 export function ChannelDetails_set_is_live(this_ptr: number, val: boolean): void {
6616 if(!isWasmInitialized) {
6617 throw new Error("initializeWasm() must be awaited first!");
6619 const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
6620 // debug statements here
6622 // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
6623 export function ChannelDetails_clone(orig: number): number {
6624 if(!isWasmInitialized) {
6625 throw new Error("initializeWasm() must be awaited first!");
6627 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
6628 return nativeResponseValue;
6630 // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
6631 export function PaymentSendFailure_free(this_ptr: number): void {
6632 if(!isWasmInitialized) {
6633 throw new Error("initializeWasm() must be awaited first!");
6635 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
6636 // debug statements here
6638 // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
6639 export function PaymentSendFailure_clone(orig: number): number {
6640 if(!isWasmInitialized) {
6641 throw new Error("initializeWasm() must be awaited first!");
6643 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
6644 return nativeResponseValue;
6646 // MUST_USE_RES struct LDKChannelManager ChannelManager_new(struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, struct LDKChainParameters params);
6647 export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
6648 if(!isWasmInitialized) {
6649 throw new Error("initializeWasm() must be awaited first!");
6651 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
6652 return nativeResponseValue;
6654 // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
6655 export function ChannelManager_get_current_default_configuration(this_arg: number): number {
6656 if(!isWasmInitialized) {
6657 throw new Error("initializeWasm() must be awaited first!");
6659 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
6660 return nativeResponseValue;
6662 // 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);
6663 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 {
6664 if(!isWasmInitialized) {
6665 throw new Error("initializeWasm() must be awaited first!");
6667 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
6668 return nativeResponseValue;
6670 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6671 export function ChannelManager_list_channels(this_arg: number): number[] {
6672 if(!isWasmInitialized) {
6673 throw new Error("initializeWasm() must be awaited first!");
6675 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
6676 return nativeResponseValue;
6678 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6679 export function ChannelManager_list_usable_channels(this_arg: number): number[] {
6680 if(!isWasmInitialized) {
6681 throw new Error("initializeWasm() must be awaited first!");
6683 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
6684 return nativeResponseValue;
6686 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6687 export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
6688 if(!isWasmInitialized) {
6689 throw new Error("initializeWasm() must be awaited first!");
6691 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
6692 return nativeResponseValue;
6694 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6695 export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
6696 if(!isWasmInitialized) {
6697 throw new Error("initializeWasm() must be awaited first!");
6699 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
6700 return nativeResponseValue;
6702 // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6703 export function ChannelManager_force_close_all_channels(this_arg: number): void {
6704 if(!isWasmInitialized) {
6705 throw new Error("initializeWasm() must be awaited first!");
6707 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
6708 // debug statements here
6710 // 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);
6711 export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
6712 if(!isWasmInitialized) {
6713 throw new Error("initializeWasm() must be awaited first!");
6715 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
6716 return nativeResponseValue;
6718 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKTransaction funding_transaction);
6719 export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
6720 if(!isWasmInitialized) {
6721 throw new Error("initializeWasm() must be awaited first!");
6723 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
6724 return nativeResponseValue;
6726 // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
6727 export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
6728 if(!isWasmInitialized) {
6729 throw new Error("initializeWasm() must be awaited first!");
6731 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
6732 // debug statements here
6734 // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
6735 export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
6736 if(!isWasmInitialized) {
6737 throw new Error("initializeWasm() must be awaited first!");
6739 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
6740 // debug statements here
6742 // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
6743 export function ChannelManager_timer_tick_occurred(this_arg: number): void {
6744 if(!isWasmInitialized) {
6745 throw new Error("initializeWasm() must be awaited first!");
6747 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
6748 // debug statements here
6750 // 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);
6751 export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): boolean {
6752 if(!isWasmInitialized) {
6753 throw new Error("initializeWasm() must be awaited first!");
6755 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash), encodeArray(payment_secret));
6756 return nativeResponseValue;
6758 // 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);
6759 export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array, payment_secret: Uint8Array, expected_amount: number): boolean {
6760 if(!isWasmInitialized) {
6761 throw new Error("initializeWasm() must be awaited first!");
6763 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage), encodeArray(payment_secret), expected_amount);
6764 return nativeResponseValue;
6766 // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
6767 export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
6768 if(!isWasmInitialized) {
6769 throw new Error("initializeWasm() must be awaited first!");
6771 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
6772 return decodeArray(nativeResponseValue);
6774 // 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);
6775 export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
6776 if(!isWasmInitialized) {
6777 throw new Error("initializeWasm() must be awaited first!");
6779 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
6780 // debug statements here
6782 // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6783 export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
6784 if(!isWasmInitialized) {
6785 throw new Error("initializeWasm() must be awaited first!");
6787 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
6788 return nativeResponseValue;
6790 // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6791 export function ChannelManager_as_EventsProvider(this_arg: number): number {
6792 if(!isWasmInitialized) {
6793 throw new Error("initializeWasm() must be awaited first!");
6795 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
6796 return nativeResponseValue;
6798 // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
6799 export function ChannelManager_as_Listen(this_arg: number): number {
6800 if(!isWasmInitialized) {
6801 throw new Error("initializeWasm() must be awaited first!");
6803 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
6804 return nativeResponseValue;
6806 // void ChannelManager_transactions_confirmed(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKCVec_C2Tuple_usizeTransactionZZ txdata);
6807 export function ChannelManager_transactions_confirmed(this_arg: number, header: Uint8Array, height: number, txdata: number[]): void {
6808 if(!isWasmInitialized) {
6809 throw new Error("initializeWasm() must be awaited first!");
6811 const nativeResponseValue = wasm.ChannelManager_transactions_confirmed(this_arg, encodeArray(header), height, txdata);
6812 // debug statements here
6814 // void ChannelManager_update_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height);
6815 export function ChannelManager_update_best_block(this_arg: number, header: Uint8Array, height: number): void {
6816 if(!isWasmInitialized) {
6817 throw new Error("initializeWasm() must be awaited first!");
6819 const nativeResponseValue = wasm.ChannelManager_update_best_block(this_arg, encodeArray(header), height);
6820 // debug statements here
6822 // MUST_USE_RES struct LDKCVec_TxidZ ChannelManager_get_relevant_txids(const struct LDKChannelManager *NONNULL_PTR this_arg);
6823 export function ChannelManager_get_relevant_txids(this_arg: number): Uint8Array[] {
6824 if(!isWasmInitialized) {
6825 throw new Error("initializeWasm() must be awaited first!");
6827 const nativeResponseValue = wasm.ChannelManager_get_relevant_txids(this_arg);
6828 return nativeResponseValue;
6830 // void ChannelManager_transaction_unconfirmed(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*txid)[32]);
6831 export function ChannelManager_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
6832 if(!isWasmInitialized) {
6833 throw new Error("initializeWasm() must be awaited first!");
6835 const nativeResponseValue = wasm.ChannelManager_transaction_unconfirmed(this_arg, encodeArray(txid));
6836 // debug statements here
6838 // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
6839 export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
6840 if(!isWasmInitialized) {
6841 throw new Error("initializeWasm() must be awaited first!");
6843 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
6844 return nativeResponseValue;
6846 // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
6847 export function ChannelManager_await_persistable_update(this_arg: number): void {
6848 if(!isWasmInitialized) {
6849 throw new Error("initializeWasm() must be awaited first!");
6851 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
6852 // debug statements here
6854 // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
6855 export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
6856 if(!isWasmInitialized) {
6857 throw new Error("initializeWasm() must be awaited first!");
6859 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
6860 return nativeResponseValue;
6862 // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
6863 export function ChannelManager_write(obj: number): Uint8Array {
6864 if(!isWasmInitialized) {
6865 throw new Error("initializeWasm() must be awaited first!");
6867 const nativeResponseValue = wasm.ChannelManager_write(obj);
6868 return decodeArray(nativeResponseValue);
6870 // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
6871 export function ChannelManagerReadArgs_free(this_obj: number): void {
6872 if(!isWasmInitialized) {
6873 throw new Error("initializeWasm() must be awaited first!");
6875 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
6876 // debug statements here
6878 // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6879 export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
6880 if(!isWasmInitialized) {
6881 throw new Error("initializeWasm() must be awaited first!");
6883 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
6884 return nativeResponseValue;
6886 // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
6887 export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
6888 if(!isWasmInitialized) {
6889 throw new Error("initializeWasm() must be awaited first!");
6891 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
6892 // debug statements here
6894 // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6895 export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
6896 if(!isWasmInitialized) {
6897 throw new Error("initializeWasm() must be awaited first!");
6899 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
6900 return nativeResponseValue;
6902 // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
6903 export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
6904 if(!isWasmInitialized) {
6905 throw new Error("initializeWasm() must be awaited first!");
6907 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
6908 // debug statements here
6910 // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6911 export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
6912 if(!isWasmInitialized) {
6913 throw new Error("initializeWasm() must be awaited first!");
6915 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
6916 return nativeResponseValue;
6918 // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
6919 export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
6920 if(!isWasmInitialized) {
6921 throw new Error("initializeWasm() must be awaited first!");
6923 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
6924 // debug statements here
6926 // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6927 export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
6928 if(!isWasmInitialized) {
6929 throw new Error("initializeWasm() must be awaited first!");
6931 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
6932 return nativeResponseValue;
6934 // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
6935 export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
6936 if(!isWasmInitialized) {
6937 throw new Error("initializeWasm() must be awaited first!");
6939 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
6940 // debug statements here
6942 // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6943 export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
6944 if(!isWasmInitialized) {
6945 throw new Error("initializeWasm() must be awaited first!");
6947 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
6948 return nativeResponseValue;
6950 // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
6951 export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
6952 if(!isWasmInitialized) {
6953 throw new Error("initializeWasm() must be awaited first!");
6955 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
6956 // debug statements here
6958 // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6959 export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
6960 if(!isWasmInitialized) {
6961 throw new Error("initializeWasm() must be awaited first!");
6963 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
6964 return nativeResponseValue;
6966 // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
6967 export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
6968 if(!isWasmInitialized) {
6969 throw new Error("initializeWasm() must be awaited first!");
6971 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
6972 // debug statements here
6974 // 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);
6975 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 {
6976 if(!isWasmInitialized) {
6977 throw new Error("initializeWasm() must be awaited first!");
6979 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
6980 return nativeResponseValue;
6982 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
6983 export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
6984 if(!isWasmInitialized) {
6985 throw new Error("initializeWasm() must be awaited first!");
6987 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
6988 return nativeResponseValue;
6990 // void DecodeError_free(struct LDKDecodeError this_obj);
6991 export function DecodeError_free(this_obj: number): void {
6992 if(!isWasmInitialized) {
6993 throw new Error("initializeWasm() must be awaited first!");
6995 const nativeResponseValue = wasm.DecodeError_free(this_obj);
6996 // debug statements here
6998 // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
6999 export function DecodeError_clone(orig: number): number {
7000 if(!isWasmInitialized) {
7001 throw new Error("initializeWasm() must be awaited first!");
7003 const nativeResponseValue = wasm.DecodeError_clone(orig);
7004 return nativeResponseValue;
7006 // void Init_free(struct LDKInit this_obj);
7007 export function Init_free(this_obj: number): void {
7008 if(!isWasmInitialized) {
7009 throw new Error("initializeWasm() must be awaited first!");
7011 const nativeResponseValue = wasm.Init_free(this_obj);
7012 // debug statements here
7014 // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
7015 export function Init_get_features(this_ptr: number): number {
7016 if(!isWasmInitialized) {
7017 throw new Error("initializeWasm() must be awaited first!");
7019 const nativeResponseValue = wasm.Init_get_features(this_ptr);
7020 return nativeResponseValue;
7022 // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
7023 export function Init_set_features(this_ptr: number, val: number): void {
7024 if(!isWasmInitialized) {
7025 throw new Error("initializeWasm() must be awaited first!");
7027 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
7028 // debug statements here
7030 // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
7031 export function Init_new(features_arg: number): number {
7032 if(!isWasmInitialized) {
7033 throw new Error("initializeWasm() must be awaited first!");
7035 const nativeResponseValue = wasm.Init_new(features_arg);
7036 return nativeResponseValue;
7038 // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
7039 export function Init_clone(orig: number): number {
7040 if(!isWasmInitialized) {
7041 throw new Error("initializeWasm() must be awaited first!");
7043 const nativeResponseValue = wasm.Init_clone(orig);
7044 return nativeResponseValue;
7046 // void ErrorMessage_free(struct LDKErrorMessage this_obj);
7047 export function ErrorMessage_free(this_obj: number): void {
7048 if(!isWasmInitialized) {
7049 throw new Error("initializeWasm() must be awaited first!");
7051 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
7052 // debug statements here
7054 // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
7055 export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
7056 if(!isWasmInitialized) {
7057 throw new Error("initializeWasm() must be awaited first!");
7059 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
7060 return decodeArray(nativeResponseValue);
7062 // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7063 export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
7064 if(!isWasmInitialized) {
7065 throw new Error("initializeWasm() must be awaited first!");
7067 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
7068 // debug statements here
7070 // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
7071 export function ErrorMessage_get_data(this_ptr: number): String {
7072 if(!isWasmInitialized) {
7073 throw new Error("initializeWasm() must be awaited first!");
7075 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
7076 return nativeResponseValue;
7078 // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7079 export function ErrorMessage_set_data(this_ptr: number, val: Uint8Array): void {
7080 if(!isWasmInitialized) {
7081 throw new Error("initializeWasm() must be awaited first!");
7083 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, encodeArray(val));
7084 // debug statements here
7086 // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
7087 export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: Uint8Array): number {
7088 if(!isWasmInitialized) {
7089 throw new Error("initializeWasm() must be awaited first!");
7091 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
7092 return nativeResponseValue;
7094 // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
7095 export function ErrorMessage_clone(orig: number): number {
7096 if(!isWasmInitialized) {
7097 throw new Error("initializeWasm() must be awaited first!");
7099 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
7100 return nativeResponseValue;
7102 // void Ping_free(struct LDKPing this_obj);
7103 export function Ping_free(this_obj: number): void {
7104 if(!isWasmInitialized) {
7105 throw new Error("initializeWasm() must be awaited first!");
7107 const nativeResponseValue = wasm.Ping_free(this_obj);
7108 // debug statements here
7110 // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
7111 export function Ping_get_ponglen(this_ptr: number): number {
7112 if(!isWasmInitialized) {
7113 throw new Error("initializeWasm() must be awaited first!");
7115 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
7116 return nativeResponseValue;
7118 // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
7119 export function Ping_set_ponglen(this_ptr: number, val: number): void {
7120 if(!isWasmInitialized) {
7121 throw new Error("initializeWasm() must be awaited first!");
7123 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
7124 // debug statements here
7126 // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
7127 export function Ping_get_byteslen(this_ptr: number): number {
7128 if(!isWasmInitialized) {
7129 throw new Error("initializeWasm() must be awaited first!");
7131 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
7132 return nativeResponseValue;
7134 // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
7135 export function Ping_set_byteslen(this_ptr: number, val: number): void {
7136 if(!isWasmInitialized) {
7137 throw new Error("initializeWasm() must be awaited first!");
7139 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
7140 // debug statements here
7142 // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
7143 export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
7144 if(!isWasmInitialized) {
7145 throw new Error("initializeWasm() must be awaited first!");
7147 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
7148 return nativeResponseValue;
7150 // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
7151 export function Ping_clone(orig: number): number {
7152 if(!isWasmInitialized) {
7153 throw new Error("initializeWasm() must be awaited first!");
7155 const nativeResponseValue = wasm.Ping_clone(orig);
7156 return nativeResponseValue;
7158 // void Pong_free(struct LDKPong this_obj);
7159 export function Pong_free(this_obj: number): void {
7160 if(!isWasmInitialized) {
7161 throw new Error("initializeWasm() must be awaited first!");
7163 const nativeResponseValue = wasm.Pong_free(this_obj);
7164 // debug statements here
7166 // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
7167 export function Pong_get_byteslen(this_ptr: number): number {
7168 if(!isWasmInitialized) {
7169 throw new Error("initializeWasm() must be awaited first!");
7171 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
7172 return nativeResponseValue;
7174 // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
7175 export function Pong_set_byteslen(this_ptr: number, val: number): void {
7176 if(!isWasmInitialized) {
7177 throw new Error("initializeWasm() must be awaited first!");
7179 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
7180 // debug statements here
7182 // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
7183 export function Pong_new(byteslen_arg: number): number {
7184 if(!isWasmInitialized) {
7185 throw new Error("initializeWasm() must be awaited first!");
7187 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
7188 return nativeResponseValue;
7190 // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
7191 export function Pong_clone(orig: number): number {
7192 if(!isWasmInitialized) {
7193 throw new Error("initializeWasm() must be awaited first!");
7195 const nativeResponseValue = wasm.Pong_clone(orig);
7196 return nativeResponseValue;
7198 // void OpenChannel_free(struct LDKOpenChannel this_obj);
7199 export function OpenChannel_free(this_obj: number): void {
7200 if(!isWasmInitialized) {
7201 throw new Error("initializeWasm() must be awaited first!");
7203 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
7204 // debug statements here
7206 // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
7207 export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
7208 if(!isWasmInitialized) {
7209 throw new Error("initializeWasm() must be awaited first!");
7211 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
7212 return decodeArray(nativeResponseValue);
7214 // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7215 export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
7216 if(!isWasmInitialized) {
7217 throw new Error("initializeWasm() must be awaited first!");
7219 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
7220 // debug statements here
7222 // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
7223 export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
7224 if(!isWasmInitialized) {
7225 throw new Error("initializeWasm() must be awaited first!");
7227 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
7228 return decodeArray(nativeResponseValue);
7230 // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7231 export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7232 if(!isWasmInitialized) {
7233 throw new Error("initializeWasm() must be awaited first!");
7235 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
7236 // debug statements here
7238 // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7239 export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
7240 if(!isWasmInitialized) {
7241 throw new Error("initializeWasm() must be awaited first!");
7243 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
7244 return nativeResponseValue;
7246 // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7247 export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
7248 if(!isWasmInitialized) {
7249 throw new Error("initializeWasm() must be awaited first!");
7251 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
7252 // debug statements here
7254 // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7255 export function OpenChannel_get_push_msat(this_ptr: number): number {
7256 if(!isWasmInitialized) {
7257 throw new Error("initializeWasm() must be awaited first!");
7259 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
7260 return nativeResponseValue;
7262 // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7263 export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
7264 if(!isWasmInitialized) {
7265 throw new Error("initializeWasm() must be awaited first!");
7267 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
7268 // debug statements here
7270 // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7271 export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
7272 if(!isWasmInitialized) {
7273 throw new Error("initializeWasm() must be awaited first!");
7275 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
7276 return nativeResponseValue;
7278 // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7279 export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
7280 if(!isWasmInitialized) {
7281 throw new Error("initializeWasm() must be awaited first!");
7283 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
7284 // debug statements here
7286 // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7287 export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
7288 if(!isWasmInitialized) {
7289 throw new Error("initializeWasm() must be awaited first!");
7291 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
7292 return nativeResponseValue;
7294 // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7295 export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7296 if(!isWasmInitialized) {
7297 throw new Error("initializeWasm() must be awaited first!");
7299 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
7300 // debug statements here
7302 // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7303 export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
7304 if(!isWasmInitialized) {
7305 throw new Error("initializeWasm() must be awaited first!");
7307 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
7308 return nativeResponseValue;
7310 // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7311 export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
7312 if(!isWasmInitialized) {
7313 throw new Error("initializeWasm() must be awaited first!");
7315 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
7316 // debug statements here
7318 // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7319 export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
7320 if(!isWasmInitialized) {
7321 throw new Error("initializeWasm() must be awaited first!");
7323 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
7324 return nativeResponseValue;
7326 // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7327 export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
7328 if(!isWasmInitialized) {
7329 throw new Error("initializeWasm() must be awaited first!");
7331 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
7332 // debug statements here
7334 // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7335 export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
7336 if(!isWasmInitialized) {
7337 throw new Error("initializeWasm() must be awaited first!");
7339 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
7340 return nativeResponseValue;
7342 // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
7343 export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
7344 if(!isWasmInitialized) {
7345 throw new Error("initializeWasm() must be awaited first!");
7347 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
7348 // debug statements here
7350 // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7351 export function OpenChannel_get_to_self_delay(this_ptr: number): number {
7352 if(!isWasmInitialized) {
7353 throw new Error("initializeWasm() must be awaited first!");
7355 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
7356 return nativeResponseValue;
7358 // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
7359 export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
7360 if(!isWasmInitialized) {
7361 throw new Error("initializeWasm() must be awaited first!");
7363 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
7364 // debug statements here
7366 // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7367 export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
7368 if(!isWasmInitialized) {
7369 throw new Error("initializeWasm() must be awaited first!");
7371 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
7372 return nativeResponseValue;
7374 // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
7375 export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
7376 if(!isWasmInitialized) {
7377 throw new Error("initializeWasm() must be awaited first!");
7379 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
7380 // debug statements here
7382 // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7383 export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
7384 if(!isWasmInitialized) {
7385 throw new Error("initializeWasm() must be awaited first!");
7387 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
7388 return decodeArray(nativeResponseValue);
7390 // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7391 export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
7392 if(!isWasmInitialized) {
7393 throw new Error("initializeWasm() must be awaited first!");
7395 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
7396 // debug statements here
7398 // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7399 export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
7400 if(!isWasmInitialized) {
7401 throw new Error("initializeWasm() must be awaited first!");
7403 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
7404 return decodeArray(nativeResponseValue);
7406 // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7407 export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
7408 if(!isWasmInitialized) {
7409 throw new Error("initializeWasm() must be awaited first!");
7411 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
7412 // debug statements here
7414 // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7415 export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
7416 if(!isWasmInitialized) {
7417 throw new Error("initializeWasm() must be awaited first!");
7419 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
7420 return decodeArray(nativeResponseValue);
7422 // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7423 export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
7424 if(!isWasmInitialized) {
7425 throw new Error("initializeWasm() must be awaited first!");
7427 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
7428 // debug statements here
7430 // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7431 export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
7432 if(!isWasmInitialized) {
7433 throw new Error("initializeWasm() must be awaited first!");
7435 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
7436 return decodeArray(nativeResponseValue);
7438 // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7439 export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
7440 if(!isWasmInitialized) {
7441 throw new Error("initializeWasm() must be awaited first!");
7443 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
7444 // debug statements here
7446 // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7447 export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
7448 if(!isWasmInitialized) {
7449 throw new Error("initializeWasm() must be awaited first!");
7451 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
7452 return decodeArray(nativeResponseValue);
7454 // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7455 export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7456 if(!isWasmInitialized) {
7457 throw new Error("initializeWasm() must be awaited first!");
7459 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7460 // debug statements here
7462 // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7463 export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7464 if(!isWasmInitialized) {
7465 throw new Error("initializeWasm() must be awaited first!");
7467 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
7468 return decodeArray(nativeResponseValue);
7470 // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7471 export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7472 if(!isWasmInitialized) {
7473 throw new Error("initializeWasm() must be awaited first!");
7475 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7476 // debug statements here
7478 // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7479 export function OpenChannel_get_channel_flags(this_ptr: number): number {
7480 if(!isWasmInitialized) {
7481 throw new Error("initializeWasm() must be awaited first!");
7483 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
7484 return nativeResponseValue;
7486 // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
7487 export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
7488 if(!isWasmInitialized) {
7489 throw new Error("initializeWasm() must be awaited first!");
7491 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
7492 // debug statements here
7494 // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
7495 export function OpenChannel_clone(orig: number): number {
7496 if(!isWasmInitialized) {
7497 throw new Error("initializeWasm() must be awaited first!");
7499 const nativeResponseValue = wasm.OpenChannel_clone(orig);
7500 return nativeResponseValue;
7502 // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
7503 export function AcceptChannel_free(this_obj: number): void {
7504 if(!isWasmInitialized) {
7505 throw new Error("initializeWasm() must be awaited first!");
7507 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
7508 // debug statements here
7510 // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
7511 export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
7512 if(!isWasmInitialized) {
7513 throw new Error("initializeWasm() must be awaited first!");
7515 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
7516 return decodeArray(nativeResponseValue);
7518 // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7519 export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7520 if(!isWasmInitialized) {
7521 throw new Error("initializeWasm() must be awaited first!");
7523 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
7524 // debug statements here
7526 // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7527 export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
7528 if(!isWasmInitialized) {
7529 throw new Error("initializeWasm() must be awaited first!");
7531 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
7532 return nativeResponseValue;
7534 // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7535 export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
7536 if(!isWasmInitialized) {
7537 throw new Error("initializeWasm() must be awaited first!");
7539 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
7540 // debug statements here
7542 // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7543 export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
7544 if(!isWasmInitialized) {
7545 throw new Error("initializeWasm() must be awaited first!");
7547 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
7548 return nativeResponseValue;
7550 // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7551 export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7552 if(!isWasmInitialized) {
7553 throw new Error("initializeWasm() must be awaited first!");
7555 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
7556 // debug statements here
7558 // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7559 export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
7560 if(!isWasmInitialized) {
7561 throw new Error("initializeWasm() must be awaited first!");
7563 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
7564 return nativeResponseValue;
7566 // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7567 export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
7568 if(!isWasmInitialized) {
7569 throw new Error("initializeWasm() must be awaited first!");
7571 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
7572 // debug statements here
7574 // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7575 export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
7576 if(!isWasmInitialized) {
7577 throw new Error("initializeWasm() must be awaited first!");
7579 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
7580 return nativeResponseValue;
7582 // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7583 export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
7584 if(!isWasmInitialized) {
7585 throw new Error("initializeWasm() must be awaited first!");
7587 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
7588 // debug statements here
7590 // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7591 export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
7592 if(!isWasmInitialized) {
7593 throw new Error("initializeWasm() must be awaited first!");
7595 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
7596 return nativeResponseValue;
7598 // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
7599 export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
7600 if(!isWasmInitialized) {
7601 throw new Error("initializeWasm() must be awaited first!");
7603 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
7604 // debug statements here
7606 // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7607 export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
7608 if(!isWasmInitialized) {
7609 throw new Error("initializeWasm() must be awaited first!");
7611 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
7612 return nativeResponseValue;
7614 // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7615 export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
7616 if(!isWasmInitialized) {
7617 throw new Error("initializeWasm() must be awaited first!");
7619 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
7620 // debug statements here
7622 // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7623 export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
7624 if(!isWasmInitialized) {
7625 throw new Error("initializeWasm() must be awaited first!");
7627 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
7628 return nativeResponseValue;
7630 // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7631 export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
7632 if(!isWasmInitialized) {
7633 throw new Error("initializeWasm() must be awaited first!");
7635 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
7636 // debug statements here
7638 // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7639 export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
7640 if(!isWasmInitialized) {
7641 throw new Error("initializeWasm() must be awaited first!");
7643 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
7644 return decodeArray(nativeResponseValue);
7646 // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7647 export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
7648 if(!isWasmInitialized) {
7649 throw new Error("initializeWasm() must be awaited first!");
7651 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
7652 // debug statements here
7654 // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7655 export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
7656 if(!isWasmInitialized) {
7657 throw new Error("initializeWasm() must be awaited first!");
7659 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
7660 return decodeArray(nativeResponseValue);
7662 // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7663 export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
7664 if(!isWasmInitialized) {
7665 throw new Error("initializeWasm() must be awaited first!");
7667 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
7668 // debug statements here
7670 // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7671 export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
7672 if(!isWasmInitialized) {
7673 throw new Error("initializeWasm() must be awaited first!");
7675 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
7676 return decodeArray(nativeResponseValue);
7678 // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7679 export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
7680 if(!isWasmInitialized) {
7681 throw new Error("initializeWasm() must be awaited first!");
7683 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
7684 // debug statements here
7686 // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7687 export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
7688 if(!isWasmInitialized) {
7689 throw new Error("initializeWasm() must be awaited first!");
7691 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
7692 return decodeArray(nativeResponseValue);
7694 // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7695 export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
7696 if(!isWasmInitialized) {
7697 throw new Error("initializeWasm() must be awaited first!");
7699 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
7700 // debug statements here
7702 // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7703 export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
7704 if(!isWasmInitialized) {
7705 throw new Error("initializeWasm() must be awaited first!");
7707 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
7708 return decodeArray(nativeResponseValue);
7710 // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7711 export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7712 if(!isWasmInitialized) {
7713 throw new Error("initializeWasm() must be awaited first!");
7715 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7716 // debug statements here
7718 // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7719 export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7720 if(!isWasmInitialized) {
7721 throw new Error("initializeWasm() must be awaited first!");
7723 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
7724 return decodeArray(nativeResponseValue);
7726 // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7727 export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7728 if(!isWasmInitialized) {
7729 throw new Error("initializeWasm() must be awaited first!");
7731 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7732 // debug statements here
7734 // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
7735 export function AcceptChannel_clone(orig: number): number {
7736 if(!isWasmInitialized) {
7737 throw new Error("initializeWasm() must be awaited first!");
7739 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
7740 return nativeResponseValue;
7742 // void FundingCreated_free(struct LDKFundingCreated this_obj);
7743 export function FundingCreated_free(this_obj: number): void {
7744 if(!isWasmInitialized) {
7745 throw new Error("initializeWasm() must be awaited first!");
7747 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
7748 // debug statements here
7750 // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7751 export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
7752 if(!isWasmInitialized) {
7753 throw new Error("initializeWasm() must be awaited first!");
7755 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
7756 return decodeArray(nativeResponseValue);
7758 // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7759 export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7760 if(!isWasmInitialized) {
7761 throw new Error("initializeWasm() must be awaited first!");
7763 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
7764 // debug statements here
7766 // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7767 export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
7768 if(!isWasmInitialized) {
7769 throw new Error("initializeWasm() must be awaited first!");
7771 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
7772 return decodeArray(nativeResponseValue);
7774 // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7775 export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
7776 if(!isWasmInitialized) {
7777 throw new Error("initializeWasm() must be awaited first!");
7779 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
7780 // debug statements here
7782 // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7783 export function FundingCreated_get_funding_output_index(this_ptr: number): number {
7784 if(!isWasmInitialized) {
7785 throw new Error("initializeWasm() must be awaited first!");
7787 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
7788 return nativeResponseValue;
7790 // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
7791 export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
7792 if(!isWasmInitialized) {
7793 throw new Error("initializeWasm() must be awaited first!");
7795 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
7796 // debug statements here
7798 // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7799 export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
7800 if(!isWasmInitialized) {
7801 throw new Error("initializeWasm() must be awaited first!");
7803 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
7804 return decodeArray(nativeResponseValue);
7806 // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
7807 export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
7808 if(!isWasmInitialized) {
7809 throw new Error("initializeWasm() must be awaited first!");
7811 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
7812 // debug statements here
7814 // 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);
7815 export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
7816 if(!isWasmInitialized) {
7817 throw new Error("initializeWasm() must be awaited first!");
7819 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
7820 return nativeResponseValue;
7822 // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
7823 export function FundingCreated_clone(orig: number): number {
7824 if(!isWasmInitialized) {
7825 throw new Error("initializeWasm() must be awaited first!");
7827 const nativeResponseValue = wasm.FundingCreated_clone(orig);
7828 return nativeResponseValue;
7830 // void FundingSigned_free(struct LDKFundingSigned this_obj);
7831 export function FundingSigned_free(this_obj: number): void {
7832 if(!isWasmInitialized) {
7833 throw new Error("initializeWasm() must be awaited first!");
7835 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
7836 // debug statements here
7838 // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
7839 export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
7840 if(!isWasmInitialized) {
7841 throw new Error("initializeWasm() must be awaited first!");
7843 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
7844 return decodeArray(nativeResponseValue);
7846 // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7847 export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7848 if(!isWasmInitialized) {
7849 throw new Error("initializeWasm() must be awaited first!");
7851 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
7852 // debug statements here
7854 // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
7855 export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
7856 if(!isWasmInitialized) {
7857 throw new Error("initializeWasm() must be awaited first!");
7859 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
7860 return decodeArray(nativeResponseValue);
7862 // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7863 export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7864 if(!isWasmInitialized) {
7865 throw new Error("initializeWasm() must be awaited first!");
7867 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
7868 // debug statements here
7870 // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
7871 export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
7872 if(!isWasmInitialized) {
7873 throw new Error("initializeWasm() must be awaited first!");
7875 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
7876 return nativeResponseValue;
7878 // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
7879 export function FundingSigned_clone(orig: number): number {
7880 if(!isWasmInitialized) {
7881 throw new Error("initializeWasm() must be awaited first!");
7883 const nativeResponseValue = wasm.FundingSigned_clone(orig);
7884 return nativeResponseValue;
7886 // void FundingLocked_free(struct LDKFundingLocked this_obj);
7887 export function FundingLocked_free(this_obj: number): void {
7888 if(!isWasmInitialized) {
7889 throw new Error("initializeWasm() must be awaited first!");
7891 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
7892 // debug statements here
7894 // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
7895 export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
7896 if(!isWasmInitialized) {
7897 throw new Error("initializeWasm() must be awaited first!");
7899 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
7900 return decodeArray(nativeResponseValue);
7902 // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7903 export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
7904 if(!isWasmInitialized) {
7905 throw new Error("initializeWasm() must be awaited first!");
7907 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
7908 // debug statements here
7910 // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
7911 export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
7912 if(!isWasmInitialized) {
7913 throw new Error("initializeWasm() must be awaited first!");
7915 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
7916 return decodeArray(nativeResponseValue);
7918 // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7919 export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7920 if(!isWasmInitialized) {
7921 throw new Error("initializeWasm() must be awaited first!");
7923 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
7924 // debug statements here
7926 // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
7927 export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
7928 if(!isWasmInitialized) {
7929 throw new Error("initializeWasm() must be awaited first!");
7931 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
7932 return nativeResponseValue;
7934 // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
7935 export function FundingLocked_clone(orig: number): number {
7936 if(!isWasmInitialized) {
7937 throw new Error("initializeWasm() must be awaited first!");
7939 const nativeResponseValue = wasm.FundingLocked_clone(orig);
7940 return nativeResponseValue;
7942 // void Shutdown_free(struct LDKShutdown this_obj);
7943 export function Shutdown_free(this_obj: number): void {
7944 if(!isWasmInitialized) {
7945 throw new Error("initializeWasm() must be awaited first!");
7947 const nativeResponseValue = wasm.Shutdown_free(this_obj);
7948 // debug statements here
7950 // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
7951 export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
7952 if(!isWasmInitialized) {
7953 throw new Error("initializeWasm() must be awaited first!");
7955 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
7956 return decodeArray(nativeResponseValue);
7958 // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7959 export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
7960 if(!isWasmInitialized) {
7961 throw new Error("initializeWasm() must be awaited first!");
7963 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
7964 // debug statements here
7966 // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
7967 export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
7968 if(!isWasmInitialized) {
7969 throw new Error("initializeWasm() must be awaited first!");
7971 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
7972 return decodeArray(nativeResponseValue);
7974 // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7975 export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
7976 if(!isWasmInitialized) {
7977 throw new Error("initializeWasm() must be awaited first!");
7979 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
7980 // debug statements here
7982 // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
7983 export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
7984 if(!isWasmInitialized) {
7985 throw new Error("initializeWasm() must be awaited first!");
7987 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
7988 return nativeResponseValue;
7990 // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
7991 export function Shutdown_clone(orig: number): number {
7992 if(!isWasmInitialized) {
7993 throw new Error("initializeWasm() must be awaited first!");
7995 const nativeResponseValue = wasm.Shutdown_clone(orig);
7996 return nativeResponseValue;
7998 // void ClosingSigned_free(struct LDKClosingSigned this_obj);
7999 export function ClosingSigned_free(this_obj: number): void {
8000 if(!isWasmInitialized) {
8001 throw new Error("initializeWasm() must be awaited first!");
8003 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
8004 // debug statements here
8006 // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
8007 export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
8008 if(!isWasmInitialized) {
8009 throw new Error("initializeWasm() must be awaited first!");
8011 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
8012 return decodeArray(nativeResponseValue);
8014 // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8015 export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
8016 if(!isWasmInitialized) {
8017 throw new Error("initializeWasm() must be awaited first!");
8019 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
8020 // debug statements here
8022 // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
8023 export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
8024 if(!isWasmInitialized) {
8025 throw new Error("initializeWasm() must be awaited first!");
8027 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
8028 return nativeResponseValue;
8030 // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
8031 export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
8032 if(!isWasmInitialized) {
8033 throw new Error("initializeWasm() must be awaited first!");
8035 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
8036 // debug statements here
8038 // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
8039 export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
8040 if(!isWasmInitialized) {
8041 throw new Error("initializeWasm() must be awaited first!");
8043 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
8044 return decodeArray(nativeResponseValue);
8046 // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
8047 export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
8048 if(!isWasmInitialized) {
8049 throw new Error("initializeWasm() must be awaited first!");
8051 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
8052 // debug statements here
8054 // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
8055 export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
8056 if(!isWasmInitialized) {
8057 throw new Error("initializeWasm() must be awaited first!");
8059 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
8060 return nativeResponseValue;
8062 // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
8063 export function ClosingSigned_clone(orig: number): number {
8064 if(!isWasmInitialized) {
8065 throw new Error("initializeWasm() must be awaited first!");
8067 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
8068 return nativeResponseValue;
8070 // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
8071 export function UpdateAddHTLC_free(this_obj: number): void {
8072 if(!isWasmInitialized) {
8073 throw new Error("initializeWasm() must be awaited first!");
8075 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
8076 // debug statements here
8078 // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
8079 export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
8080 if(!isWasmInitialized) {
8081 throw new Error("initializeWasm() must be awaited first!");
8083 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
8084 return decodeArray(nativeResponseValue);
8086 // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8087 export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
8088 if(!isWasmInitialized) {
8089 throw new Error("initializeWasm() must be awaited first!");
8091 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
8092 // debug statements here
8094 // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
8095 export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
8096 if(!isWasmInitialized) {
8097 throw new Error("initializeWasm() must be awaited first!");
8099 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
8100 return nativeResponseValue;
8102 // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
8103 export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
8104 if(!isWasmInitialized) {
8105 throw new Error("initializeWasm() must be awaited first!");
8107 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
8108 // debug statements here
8110 // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
8111 export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
8112 if(!isWasmInitialized) {
8113 throw new Error("initializeWasm() must be awaited first!");
8115 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
8116 return nativeResponseValue;
8118 // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
8119 export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
8120 if(!isWasmInitialized) {
8121 throw new Error("initializeWasm() must be awaited first!");
8123 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
8124 // debug statements here
8126 // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
8127 export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
8128 if(!isWasmInitialized) {
8129 throw new Error("initializeWasm() must be awaited first!");
8131 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
8132 return decodeArray(nativeResponseValue);
8134 // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8135 export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
8136 if(!isWasmInitialized) {
8137 throw new Error("initializeWasm() must be awaited first!");
8139 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
8140 // debug statements here
8142 // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
8143 export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
8144 if(!isWasmInitialized) {
8145 throw new Error("initializeWasm() must be awaited first!");
8147 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
8148 return nativeResponseValue;
8150 // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
8151 export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
8152 if(!isWasmInitialized) {
8153 throw new Error("initializeWasm() must be awaited first!");
8155 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
8156 // debug statements here
8158 // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
8159 export function UpdateAddHTLC_clone(orig: number): number {
8160 if(!isWasmInitialized) {
8161 throw new Error("initializeWasm() must be awaited first!");
8163 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
8164 return nativeResponseValue;
8166 // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
8167 export function UpdateFulfillHTLC_free(this_obj: number): void {
8168 if(!isWasmInitialized) {
8169 throw new Error("initializeWasm() must be awaited first!");
8171 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
8172 // debug statements here
8174 // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
8175 export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
8176 if(!isWasmInitialized) {
8177 throw new Error("initializeWasm() must be awaited first!");
8179 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
8180 return decodeArray(nativeResponseValue);
8182 // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8183 export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
8184 if(!isWasmInitialized) {
8185 throw new Error("initializeWasm() must be awaited first!");
8187 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
8188 // debug statements here
8190 // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
8191 export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
8192 if(!isWasmInitialized) {
8193 throw new Error("initializeWasm() must be awaited first!");
8195 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
8196 return nativeResponseValue;
8198 // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
8199 export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
8200 if(!isWasmInitialized) {
8201 throw new Error("initializeWasm() must be awaited first!");
8203 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
8204 // debug statements here
8206 // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
8207 export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
8208 if(!isWasmInitialized) {
8209 throw new Error("initializeWasm() must be awaited first!");
8211 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
8212 return decodeArray(nativeResponseValue);
8214 // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8215 export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
8216 if(!isWasmInitialized) {
8217 throw new Error("initializeWasm() must be awaited first!");
8219 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
8220 // debug statements here
8222 // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
8223 export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
8224 if(!isWasmInitialized) {
8225 throw new Error("initializeWasm() must be awaited first!");
8227 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
8228 return nativeResponseValue;
8230 // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
8231 export function UpdateFulfillHTLC_clone(orig: number): number {
8232 if(!isWasmInitialized) {
8233 throw new Error("initializeWasm() must be awaited first!");
8235 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
8236 return nativeResponseValue;
8238 // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
8239 export function UpdateFailHTLC_free(this_obj: number): void {
8240 if(!isWasmInitialized) {
8241 throw new Error("initializeWasm() must be awaited first!");
8243 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
8244 // debug statements here
8246 // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
8247 export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
8248 if(!isWasmInitialized) {
8249 throw new Error("initializeWasm() must be awaited first!");
8251 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
8252 return decodeArray(nativeResponseValue);
8254 // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8255 export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
8256 if(!isWasmInitialized) {
8257 throw new Error("initializeWasm() must be awaited first!");
8259 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
8260 // debug statements here
8262 // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
8263 export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
8264 if(!isWasmInitialized) {
8265 throw new Error("initializeWasm() must be awaited first!");
8267 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
8268 return nativeResponseValue;
8270 // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
8271 export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
8272 if(!isWasmInitialized) {
8273 throw new Error("initializeWasm() must be awaited first!");
8275 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
8276 // debug statements here
8278 // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
8279 export function UpdateFailHTLC_clone(orig: number): number {
8280 if(!isWasmInitialized) {
8281 throw new Error("initializeWasm() must be awaited first!");
8283 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
8284 return nativeResponseValue;
8286 // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
8287 export function UpdateFailMalformedHTLC_free(this_obj: number): void {
8288 if(!isWasmInitialized) {
8289 throw new Error("initializeWasm() must be awaited first!");
8291 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
8292 // debug statements here
8294 // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
8295 export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
8296 if(!isWasmInitialized) {
8297 throw new Error("initializeWasm() must be awaited first!");
8299 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
8300 return decodeArray(nativeResponseValue);
8302 // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8303 export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
8304 if(!isWasmInitialized) {
8305 throw new Error("initializeWasm() must be awaited first!");
8307 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
8308 // debug statements here
8310 // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
8311 export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
8312 if(!isWasmInitialized) {
8313 throw new Error("initializeWasm() must be awaited first!");
8315 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
8316 return nativeResponseValue;
8318 // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
8319 export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
8320 if(!isWasmInitialized) {
8321 throw new Error("initializeWasm() must be awaited first!");
8323 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
8324 // debug statements here
8326 // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
8327 export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
8328 if(!isWasmInitialized) {
8329 throw new Error("initializeWasm() must be awaited first!");
8331 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
8332 return nativeResponseValue;
8334 // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
8335 export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
8336 if(!isWasmInitialized) {
8337 throw new Error("initializeWasm() must be awaited first!");
8339 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
8340 // debug statements here
8342 // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
8343 export function UpdateFailMalformedHTLC_clone(orig: number): number {
8344 if(!isWasmInitialized) {
8345 throw new Error("initializeWasm() must be awaited first!");
8347 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
8348 return nativeResponseValue;
8350 // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
8351 export function CommitmentSigned_free(this_obj: number): void {
8352 if(!isWasmInitialized) {
8353 throw new Error("initializeWasm() must be awaited first!");
8355 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
8356 // debug statements here
8358 // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
8359 export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
8360 if(!isWasmInitialized) {
8361 throw new Error("initializeWasm() must be awaited first!");
8363 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
8364 return decodeArray(nativeResponseValue);
8366 // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8367 export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
8368 if(!isWasmInitialized) {
8369 throw new Error("initializeWasm() must be awaited first!");
8371 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
8372 // debug statements here
8374 // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
8375 export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
8376 if(!isWasmInitialized) {
8377 throw new Error("initializeWasm() must be awaited first!");
8379 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
8380 return decodeArray(nativeResponseValue);
8382 // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
8383 export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
8384 if(!isWasmInitialized) {
8385 throw new Error("initializeWasm() must be awaited first!");
8387 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
8388 // debug statements here
8390 // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
8391 export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
8392 if(!isWasmInitialized) {
8393 throw new Error("initializeWasm() must be awaited first!");
8395 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
8396 // debug statements here
8398 // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
8399 export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
8400 if(!isWasmInitialized) {
8401 throw new Error("initializeWasm() must be awaited first!");
8403 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
8404 return nativeResponseValue;
8406 // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
8407 export function CommitmentSigned_clone(orig: number): number {
8408 if(!isWasmInitialized) {
8409 throw new Error("initializeWasm() must be awaited first!");
8411 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
8412 return nativeResponseValue;
8414 // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
8415 export function RevokeAndACK_free(this_obj: number): void {
8416 if(!isWasmInitialized) {
8417 throw new Error("initializeWasm() must be awaited first!");
8419 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
8420 // debug statements here
8422 // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
8423 export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
8424 if(!isWasmInitialized) {
8425 throw new Error("initializeWasm() must be awaited first!");
8427 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
8428 return decodeArray(nativeResponseValue);
8430 // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8431 export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
8432 if(!isWasmInitialized) {
8433 throw new Error("initializeWasm() must be awaited first!");
8435 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
8436 // debug statements here
8438 // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
8439 export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
8440 if(!isWasmInitialized) {
8441 throw new Error("initializeWasm() must be awaited first!");
8443 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
8444 return decodeArray(nativeResponseValue);
8446 // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8447 export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
8448 if(!isWasmInitialized) {
8449 throw new Error("initializeWasm() must be awaited first!");
8451 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
8452 // debug statements here
8454 // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
8455 export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
8456 if(!isWasmInitialized) {
8457 throw new Error("initializeWasm() must be awaited first!");
8459 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
8460 return decodeArray(nativeResponseValue);
8462 // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8463 export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8464 if(!isWasmInitialized) {
8465 throw new Error("initializeWasm() must be awaited first!");
8467 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
8468 // debug statements here
8470 // 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);
8471 export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
8472 if(!isWasmInitialized) {
8473 throw new Error("initializeWasm() must be awaited first!");
8475 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
8476 return nativeResponseValue;
8478 // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
8479 export function RevokeAndACK_clone(orig: number): number {
8480 if(!isWasmInitialized) {
8481 throw new Error("initializeWasm() must be awaited first!");
8483 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
8484 return nativeResponseValue;
8486 // void UpdateFee_free(struct LDKUpdateFee this_obj);
8487 export function UpdateFee_free(this_obj: number): void {
8488 if(!isWasmInitialized) {
8489 throw new Error("initializeWasm() must be awaited first!");
8491 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
8492 // debug statements here
8494 // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
8495 export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
8496 if(!isWasmInitialized) {
8497 throw new Error("initializeWasm() must be awaited first!");
8499 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
8500 return decodeArray(nativeResponseValue);
8502 // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8503 export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
8504 if(!isWasmInitialized) {
8505 throw new Error("initializeWasm() must be awaited first!");
8507 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
8508 // debug statements here
8510 // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
8511 export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
8512 if(!isWasmInitialized) {
8513 throw new Error("initializeWasm() must be awaited first!");
8515 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
8516 return nativeResponseValue;
8518 // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
8519 export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
8520 if(!isWasmInitialized) {
8521 throw new Error("initializeWasm() must be awaited first!");
8523 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
8524 // debug statements here
8526 // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
8527 export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
8528 if(!isWasmInitialized) {
8529 throw new Error("initializeWasm() must be awaited first!");
8531 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
8532 return nativeResponseValue;
8534 // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
8535 export function UpdateFee_clone(orig: number): number {
8536 if(!isWasmInitialized) {
8537 throw new Error("initializeWasm() must be awaited first!");
8539 const nativeResponseValue = wasm.UpdateFee_clone(orig);
8540 return nativeResponseValue;
8542 // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
8543 export function DataLossProtect_free(this_obj: number): void {
8544 if(!isWasmInitialized) {
8545 throw new Error("initializeWasm() must be awaited first!");
8547 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
8548 // debug statements here
8550 // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
8551 export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
8552 if(!isWasmInitialized) {
8553 throw new Error("initializeWasm() must be awaited first!");
8555 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
8556 return decodeArray(nativeResponseValue);
8558 // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8559 export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
8560 if(!isWasmInitialized) {
8561 throw new Error("initializeWasm() must be awaited first!");
8563 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
8564 // debug statements here
8566 // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
8567 export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
8568 if(!isWasmInitialized) {
8569 throw new Error("initializeWasm() must be awaited first!");
8571 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
8572 return decodeArray(nativeResponseValue);
8574 // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8575 export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8576 if(!isWasmInitialized) {
8577 throw new Error("initializeWasm() must be awaited first!");
8579 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
8580 // debug statements here
8582 // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
8583 export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
8584 if(!isWasmInitialized) {
8585 throw new Error("initializeWasm() must be awaited first!");
8587 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
8588 return nativeResponseValue;
8590 // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
8591 export function DataLossProtect_clone(orig: number): number {
8592 if(!isWasmInitialized) {
8593 throw new Error("initializeWasm() must be awaited first!");
8595 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
8596 return nativeResponseValue;
8598 // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
8599 export function ChannelReestablish_free(this_obj: number): void {
8600 if(!isWasmInitialized) {
8601 throw new Error("initializeWasm() must be awaited first!");
8603 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
8604 // debug statements here
8606 // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
8607 export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
8608 if(!isWasmInitialized) {
8609 throw new Error("initializeWasm() must be awaited first!");
8611 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
8612 return decodeArray(nativeResponseValue);
8614 // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8615 export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
8616 if(!isWasmInitialized) {
8617 throw new Error("initializeWasm() must be awaited first!");
8619 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
8620 // debug statements here
8622 // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8623 export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
8624 if(!isWasmInitialized) {
8625 throw new Error("initializeWasm() must be awaited first!");
8627 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
8628 return nativeResponseValue;
8630 // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8631 export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
8632 if(!isWasmInitialized) {
8633 throw new Error("initializeWasm() must be awaited first!");
8635 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
8636 // debug statements here
8638 // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8639 export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
8640 if(!isWasmInitialized) {
8641 throw new Error("initializeWasm() must be awaited first!");
8643 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
8644 return nativeResponseValue;
8646 // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8647 export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
8648 if(!isWasmInitialized) {
8649 throw new Error("initializeWasm() must be awaited first!");
8651 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
8652 // debug statements here
8654 // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
8655 export function ChannelReestablish_clone(orig: number): number {
8656 if(!isWasmInitialized) {
8657 throw new Error("initializeWasm() must be awaited first!");
8659 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
8660 return nativeResponseValue;
8662 // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
8663 export function AnnouncementSignatures_free(this_obj: number): void {
8664 if(!isWasmInitialized) {
8665 throw new Error("initializeWasm() must be awaited first!");
8667 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
8668 // debug statements here
8670 // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
8671 export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
8672 if(!isWasmInitialized) {
8673 throw new Error("initializeWasm() must be awaited first!");
8675 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
8676 return decodeArray(nativeResponseValue);
8678 // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8679 export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
8680 if(!isWasmInitialized) {
8681 throw new Error("initializeWasm() must be awaited first!");
8683 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
8684 // debug statements here
8686 // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8687 export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
8688 if(!isWasmInitialized) {
8689 throw new Error("initializeWasm() must be awaited first!");
8691 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
8692 return nativeResponseValue;
8694 // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
8695 export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
8696 if(!isWasmInitialized) {
8697 throw new Error("initializeWasm() must be awaited first!");
8699 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
8700 // debug statements here
8702 // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8703 export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
8704 if(!isWasmInitialized) {
8705 throw new Error("initializeWasm() must be awaited first!");
8707 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
8708 return decodeArray(nativeResponseValue);
8710 // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8711 export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
8712 if(!isWasmInitialized) {
8713 throw new Error("initializeWasm() must be awaited first!");
8715 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
8716 // debug statements here
8718 // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8719 export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
8720 if(!isWasmInitialized) {
8721 throw new Error("initializeWasm() must be awaited first!");
8723 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
8724 return decodeArray(nativeResponseValue);
8726 // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8727 export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
8728 if(!isWasmInitialized) {
8729 throw new Error("initializeWasm() must be awaited first!");
8731 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
8732 // debug statements here
8734 // 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);
8735 export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
8736 if(!isWasmInitialized) {
8737 throw new Error("initializeWasm() must be awaited first!");
8739 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
8740 return nativeResponseValue;
8742 // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
8743 export function AnnouncementSignatures_clone(orig: number): number {
8744 if(!isWasmInitialized) {
8745 throw new Error("initializeWasm() must be awaited first!");
8747 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
8748 return nativeResponseValue;
8750 // void NetAddress_free(struct LDKNetAddress this_ptr);
8751 export function NetAddress_free(this_ptr: number): void {
8752 if(!isWasmInitialized) {
8753 throw new Error("initializeWasm() must be awaited first!");
8755 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
8756 // debug statements here
8758 // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
8759 export function NetAddress_clone(orig: number): number {
8760 if(!isWasmInitialized) {
8761 throw new Error("initializeWasm() must be awaited first!");
8763 const nativeResponseValue = wasm.NetAddress_clone(orig);
8764 return nativeResponseValue;
8766 // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
8767 export function NetAddress_write(obj: number): Uint8Array {
8768 if(!isWasmInitialized) {
8769 throw new Error("initializeWasm() must be awaited first!");
8771 const nativeResponseValue = wasm.NetAddress_write(obj);
8772 return decodeArray(nativeResponseValue);
8774 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
8775 export function Result_read(ser: Uint8Array): number {
8776 if(!isWasmInitialized) {
8777 throw new Error("initializeWasm() must be awaited first!");
8779 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
8780 return nativeResponseValue;
8782 // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
8783 export function UnsignedNodeAnnouncement_free(this_obj: number): void {
8784 if(!isWasmInitialized) {
8785 throw new Error("initializeWasm() must be awaited first!");
8787 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
8788 // debug statements here
8790 // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8791 export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
8792 if(!isWasmInitialized) {
8793 throw new Error("initializeWasm() must be awaited first!");
8795 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
8796 return nativeResponseValue;
8798 // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
8799 export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
8800 if(!isWasmInitialized) {
8801 throw new Error("initializeWasm() must be awaited first!");
8803 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
8804 // debug statements here
8806 // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8807 export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
8808 if(!isWasmInitialized) {
8809 throw new Error("initializeWasm() must be awaited first!");
8811 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
8812 return nativeResponseValue;
8814 // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
8815 export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
8816 if(!isWasmInitialized) {
8817 throw new Error("initializeWasm() must be awaited first!");
8819 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
8820 // debug statements here
8822 // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8823 export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
8824 if(!isWasmInitialized) {
8825 throw new Error("initializeWasm() must be awaited first!");
8827 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
8828 return decodeArray(nativeResponseValue);
8830 // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8831 export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
8832 if(!isWasmInitialized) {
8833 throw new Error("initializeWasm() must be awaited first!");
8835 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
8836 // debug statements here
8838 // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
8839 export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
8840 if(!isWasmInitialized) {
8841 throw new Error("initializeWasm() must be awaited first!");
8843 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
8844 return decodeArray(nativeResponseValue);
8846 // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
8847 export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
8848 if(!isWasmInitialized) {
8849 throw new Error("initializeWasm() must be awaited first!");
8851 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
8852 // debug statements here
8854 // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
8855 export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
8856 if(!isWasmInitialized) {
8857 throw new Error("initializeWasm() must be awaited first!");
8859 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
8860 return decodeArray(nativeResponseValue);
8862 // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8863 export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
8864 if(!isWasmInitialized) {
8865 throw new Error("initializeWasm() must be awaited first!");
8867 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
8868 // debug statements here
8870 // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
8871 export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
8872 if(!isWasmInitialized) {
8873 throw new Error("initializeWasm() must be awaited first!");
8875 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
8876 // debug statements here
8878 // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
8879 export function UnsignedNodeAnnouncement_clone(orig: number): number {
8880 if(!isWasmInitialized) {
8881 throw new Error("initializeWasm() must be awaited first!");
8883 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
8884 return nativeResponseValue;
8886 // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
8887 export function NodeAnnouncement_free(this_obj: number): void {
8888 if(!isWasmInitialized) {
8889 throw new Error("initializeWasm() must be awaited first!");
8891 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
8892 // debug statements here
8894 // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8895 export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
8896 if(!isWasmInitialized) {
8897 throw new Error("initializeWasm() must be awaited first!");
8899 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
8900 return decodeArray(nativeResponseValue);
8902 // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8903 export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
8904 if(!isWasmInitialized) {
8905 throw new Error("initializeWasm() must be awaited first!");
8907 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
8908 // debug statements here
8910 // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8911 export function NodeAnnouncement_get_contents(this_ptr: number): number {
8912 if(!isWasmInitialized) {
8913 throw new Error("initializeWasm() must be awaited first!");
8915 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
8916 return nativeResponseValue;
8918 // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
8919 export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
8920 if(!isWasmInitialized) {
8921 throw new Error("initializeWasm() must be awaited first!");
8923 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
8924 // debug statements here
8926 // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
8927 export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
8928 if(!isWasmInitialized) {
8929 throw new Error("initializeWasm() must be awaited first!");
8931 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
8932 return nativeResponseValue;
8934 // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
8935 export function NodeAnnouncement_clone(orig: number): number {
8936 if(!isWasmInitialized) {
8937 throw new Error("initializeWasm() must be awaited first!");
8939 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
8940 return nativeResponseValue;
8942 // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
8943 export function UnsignedChannelAnnouncement_free(this_obj: number): void {
8944 if(!isWasmInitialized) {
8945 throw new Error("initializeWasm() must be awaited first!");
8947 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
8948 // debug statements here
8950 // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8951 export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
8952 if(!isWasmInitialized) {
8953 throw new Error("initializeWasm() must be awaited first!");
8955 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
8956 return nativeResponseValue;
8958 // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
8959 export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
8960 if(!isWasmInitialized) {
8961 throw new Error("initializeWasm() must be awaited first!");
8963 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
8964 // debug statements here
8966 // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
8967 export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
8968 if(!isWasmInitialized) {
8969 throw new Error("initializeWasm() must be awaited first!");
8971 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
8972 return decodeArray(nativeResponseValue);
8974 // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8975 export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8976 if(!isWasmInitialized) {
8977 throw new Error("initializeWasm() must be awaited first!");
8979 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
8980 // debug statements here
8982 // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8983 export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
8984 if(!isWasmInitialized) {
8985 throw new Error("initializeWasm() must be awaited first!");
8987 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
8988 return nativeResponseValue;
8990 // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
8991 export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
8992 if(!isWasmInitialized) {
8993 throw new Error("initializeWasm() must be awaited first!");
8995 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
8996 // debug statements here
8998 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8999 export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
9000 if(!isWasmInitialized) {
9001 throw new Error("initializeWasm() must be awaited first!");
9003 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
9004 return decodeArray(nativeResponseValue);
9006 // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9007 export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
9008 if(!isWasmInitialized) {
9009 throw new Error("initializeWasm() must be awaited first!");
9011 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
9012 // debug statements here
9014 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
9015 export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
9016 if(!isWasmInitialized) {
9017 throw new Error("initializeWasm() must be awaited first!");
9019 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
9020 return decodeArray(nativeResponseValue);
9022 // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9023 export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
9024 if(!isWasmInitialized) {
9025 throw new Error("initializeWasm() must be awaited first!");
9027 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
9028 // debug statements here
9030 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
9031 export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
9032 if(!isWasmInitialized) {
9033 throw new Error("initializeWasm() must be awaited first!");
9035 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
9036 return decodeArray(nativeResponseValue);
9038 // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9039 export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
9040 if(!isWasmInitialized) {
9041 throw new Error("initializeWasm() must be awaited first!");
9043 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
9044 // debug statements here
9046 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
9047 export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
9048 if(!isWasmInitialized) {
9049 throw new Error("initializeWasm() must be awaited first!");
9051 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
9052 return decodeArray(nativeResponseValue);
9054 // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9055 export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
9056 if(!isWasmInitialized) {
9057 throw new Error("initializeWasm() must be awaited first!");
9059 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
9060 // debug statements here
9062 // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
9063 export function UnsignedChannelAnnouncement_clone(orig: number): number {
9064 if(!isWasmInitialized) {
9065 throw new Error("initializeWasm() must be awaited first!");
9067 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
9068 return nativeResponseValue;
9070 // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
9071 export function ChannelAnnouncement_free(this_obj: number): void {
9072 if(!isWasmInitialized) {
9073 throw new Error("initializeWasm() must be awaited first!");
9075 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
9076 // debug statements here
9078 // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
9079 export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
9080 if(!isWasmInitialized) {
9081 throw new Error("initializeWasm() must be awaited first!");
9083 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
9084 return decodeArray(nativeResponseValue);
9086 // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
9087 export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
9088 if(!isWasmInitialized) {
9089 throw new Error("initializeWasm() must be awaited first!");
9091 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
9092 // debug statements here
9094 // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
9095 export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
9096 if(!isWasmInitialized) {
9097 throw new Error("initializeWasm() must be awaited first!");
9099 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
9100 return decodeArray(nativeResponseValue);
9102 // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
9103 export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
9104 if(!isWasmInitialized) {
9105 throw new Error("initializeWasm() must be awaited first!");
9107 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
9108 // debug statements here
9110 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
9111 export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
9112 if(!isWasmInitialized) {
9113 throw new Error("initializeWasm() must be awaited first!");
9115 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
9116 return decodeArray(nativeResponseValue);
9118 // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
9119 export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
9120 if(!isWasmInitialized) {
9121 throw new Error("initializeWasm() must be awaited first!");
9123 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
9124 // debug statements here
9126 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
9127 export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
9128 if(!isWasmInitialized) {
9129 throw new Error("initializeWasm() must be awaited first!");
9131 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
9132 return decodeArray(nativeResponseValue);
9134 // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
9135 export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
9136 if(!isWasmInitialized) {
9137 throw new Error("initializeWasm() must be awaited first!");
9139 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
9140 // debug statements here
9142 // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
9143 export function ChannelAnnouncement_get_contents(this_ptr: number): number {
9144 if(!isWasmInitialized) {
9145 throw new Error("initializeWasm() must be awaited first!");
9147 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
9148 return nativeResponseValue;
9150 // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
9151 export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
9152 if(!isWasmInitialized) {
9153 throw new Error("initializeWasm() must be awaited first!");
9155 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
9156 // debug statements here
9158 // 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);
9159 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 {
9160 if(!isWasmInitialized) {
9161 throw new Error("initializeWasm() must be awaited first!");
9163 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);
9164 return nativeResponseValue;
9166 // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
9167 export function ChannelAnnouncement_clone(orig: number): number {
9168 if(!isWasmInitialized) {
9169 throw new Error("initializeWasm() must be awaited first!");
9171 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
9172 return nativeResponseValue;
9174 // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
9175 export function UnsignedChannelUpdate_free(this_obj: number): void {
9176 if(!isWasmInitialized) {
9177 throw new Error("initializeWasm() must be awaited first!");
9179 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
9180 // debug statements here
9182 // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
9183 export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
9184 if(!isWasmInitialized) {
9185 throw new Error("initializeWasm() must be awaited first!");
9187 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
9188 return decodeArray(nativeResponseValue);
9190 // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9191 export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9192 if(!isWasmInitialized) {
9193 throw new Error("initializeWasm() must be awaited first!");
9195 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
9196 // debug statements here
9198 // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9199 export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
9200 if(!isWasmInitialized) {
9201 throw new Error("initializeWasm() must be awaited first!");
9203 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
9204 return nativeResponseValue;
9206 // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
9207 export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
9208 if(!isWasmInitialized) {
9209 throw new Error("initializeWasm() must be awaited first!");
9211 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
9212 // debug statements here
9214 // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9215 export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
9216 if(!isWasmInitialized) {
9217 throw new Error("initializeWasm() must be awaited first!");
9219 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
9220 return nativeResponseValue;
9222 // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
9223 export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
9224 if(!isWasmInitialized) {
9225 throw new Error("initializeWasm() must be awaited first!");
9227 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
9228 // debug statements here
9230 // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9231 export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
9232 if(!isWasmInitialized) {
9233 throw new Error("initializeWasm() must be awaited first!");
9235 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
9236 return nativeResponseValue;
9238 // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
9239 export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
9240 if(!isWasmInitialized) {
9241 throw new Error("initializeWasm() must be awaited first!");
9243 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
9244 // debug statements here
9246 // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9247 export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
9248 if(!isWasmInitialized) {
9249 throw new Error("initializeWasm() must be awaited first!");
9251 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
9252 return nativeResponseValue;
9254 // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
9255 export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9256 if(!isWasmInitialized) {
9257 throw new Error("initializeWasm() must be awaited first!");
9259 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
9260 // debug statements here
9262 // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9263 export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
9264 if(!isWasmInitialized) {
9265 throw new Error("initializeWasm() must be awaited first!");
9267 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
9268 return nativeResponseValue;
9270 // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
9271 export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
9272 if(!isWasmInitialized) {
9273 throw new Error("initializeWasm() must be awaited first!");
9275 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
9276 // debug statements here
9278 // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9279 export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
9280 if(!isWasmInitialized) {
9281 throw new Error("initializeWasm() must be awaited first!");
9283 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
9284 return nativeResponseValue;
9286 // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
9287 export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
9288 if(!isWasmInitialized) {
9289 throw new Error("initializeWasm() must be awaited first!");
9291 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
9292 // debug statements here
9294 // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9295 export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
9296 if(!isWasmInitialized) {
9297 throw new Error("initializeWasm() must be awaited first!");
9299 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
9300 return nativeResponseValue;
9302 // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
9303 export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
9304 if(!isWasmInitialized) {
9305 throw new Error("initializeWasm() must be awaited first!");
9307 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
9308 // debug statements here
9310 // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
9311 export function UnsignedChannelUpdate_clone(orig: number): number {
9312 if(!isWasmInitialized) {
9313 throw new Error("initializeWasm() must be awaited first!");
9315 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
9316 return nativeResponseValue;
9318 // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
9319 export function ChannelUpdate_free(this_obj: number): void {
9320 if(!isWasmInitialized) {
9321 throw new Error("initializeWasm() must be awaited first!");
9323 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
9324 // debug statements here
9326 // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
9327 export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
9328 if(!isWasmInitialized) {
9329 throw new Error("initializeWasm() must be awaited first!");
9331 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
9332 return decodeArray(nativeResponseValue);
9334 // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
9335 export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
9336 if(!isWasmInitialized) {
9337 throw new Error("initializeWasm() must be awaited first!");
9339 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
9340 // debug statements here
9342 // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
9343 export function ChannelUpdate_get_contents(this_ptr: number): number {
9344 if(!isWasmInitialized) {
9345 throw new Error("initializeWasm() must be awaited first!");
9347 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
9348 return nativeResponseValue;
9350 // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
9351 export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
9352 if(!isWasmInitialized) {
9353 throw new Error("initializeWasm() must be awaited first!");
9355 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
9356 // debug statements here
9358 // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
9359 export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
9360 if(!isWasmInitialized) {
9361 throw new Error("initializeWasm() must be awaited first!");
9363 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
9364 return nativeResponseValue;
9366 // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
9367 export function ChannelUpdate_clone(orig: number): number {
9368 if(!isWasmInitialized) {
9369 throw new Error("initializeWasm() must be awaited first!");
9371 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
9372 return nativeResponseValue;
9374 // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
9375 export function QueryChannelRange_free(this_obj: number): void {
9376 if(!isWasmInitialized) {
9377 throw new Error("initializeWasm() must be awaited first!");
9379 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
9380 // debug statements here
9382 // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
9383 export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
9384 if(!isWasmInitialized) {
9385 throw new Error("initializeWasm() must be awaited first!");
9387 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
9388 return decodeArray(nativeResponseValue);
9390 // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9391 export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9392 if(!isWasmInitialized) {
9393 throw new Error("initializeWasm() must be awaited first!");
9395 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
9396 // debug statements here
9398 // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
9399 export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
9400 if(!isWasmInitialized) {
9401 throw new Error("initializeWasm() must be awaited first!");
9403 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
9404 return nativeResponseValue;
9406 // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9407 export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
9408 if(!isWasmInitialized) {
9409 throw new Error("initializeWasm() must be awaited first!");
9411 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
9412 // debug statements here
9414 // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
9415 export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
9416 if(!isWasmInitialized) {
9417 throw new Error("initializeWasm() must be awaited first!");
9419 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
9420 return nativeResponseValue;
9422 // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9423 export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
9424 if(!isWasmInitialized) {
9425 throw new Error("initializeWasm() must be awaited first!");
9427 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
9428 // debug statements here
9430 // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
9431 export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
9432 if(!isWasmInitialized) {
9433 throw new Error("initializeWasm() must be awaited first!");
9435 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
9436 return nativeResponseValue;
9438 // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
9439 export function QueryChannelRange_clone(orig: number): number {
9440 if(!isWasmInitialized) {
9441 throw new Error("initializeWasm() must be awaited first!");
9443 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
9444 return nativeResponseValue;
9446 // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
9447 export function ReplyChannelRange_free(this_obj: number): void {
9448 if(!isWasmInitialized) {
9449 throw new Error("initializeWasm() must be awaited first!");
9451 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
9452 // debug statements here
9454 // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
9455 export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
9456 if(!isWasmInitialized) {
9457 throw new Error("initializeWasm() must be awaited first!");
9459 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
9460 return decodeArray(nativeResponseValue);
9462 // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9463 export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9464 if(!isWasmInitialized) {
9465 throw new Error("initializeWasm() must be awaited first!");
9467 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
9468 // debug statements here
9470 // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9471 export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
9472 if(!isWasmInitialized) {
9473 throw new Error("initializeWasm() must be awaited first!");
9475 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
9476 return nativeResponseValue;
9478 // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9479 export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
9480 if(!isWasmInitialized) {
9481 throw new Error("initializeWasm() must be awaited first!");
9483 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
9484 // debug statements here
9486 // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9487 export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
9488 if(!isWasmInitialized) {
9489 throw new Error("initializeWasm() must be awaited first!");
9491 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
9492 return nativeResponseValue;
9494 // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9495 export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
9496 if(!isWasmInitialized) {
9497 throw new Error("initializeWasm() must be awaited first!");
9499 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
9500 // debug statements here
9502 // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9503 export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
9504 if(!isWasmInitialized) {
9505 throw new Error("initializeWasm() must be awaited first!");
9507 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
9508 return nativeResponseValue;
9510 // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
9511 export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
9512 if(!isWasmInitialized) {
9513 throw new Error("initializeWasm() must be awaited first!");
9515 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
9516 // debug statements here
9518 // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9519 export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
9520 if(!isWasmInitialized) {
9521 throw new Error("initializeWasm() must be awaited first!");
9523 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
9524 // debug statements here
9526 // 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);
9527 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 {
9528 if(!isWasmInitialized) {
9529 throw new Error("initializeWasm() must be awaited first!");
9531 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
9532 return nativeResponseValue;
9534 // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
9535 export function ReplyChannelRange_clone(orig: number): number {
9536 if(!isWasmInitialized) {
9537 throw new Error("initializeWasm() must be awaited first!");
9539 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
9540 return nativeResponseValue;
9542 // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
9543 export function QueryShortChannelIds_free(this_obj: number): void {
9544 if(!isWasmInitialized) {
9545 throw new Error("initializeWasm() must be awaited first!");
9547 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
9548 // debug statements here
9550 // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
9551 export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
9552 if(!isWasmInitialized) {
9553 throw new Error("initializeWasm() must be awaited first!");
9555 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
9556 return decodeArray(nativeResponseValue);
9558 // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9559 export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9560 if(!isWasmInitialized) {
9561 throw new Error("initializeWasm() must be awaited first!");
9563 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
9564 // debug statements here
9566 // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9567 export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
9568 if(!isWasmInitialized) {
9569 throw new Error("initializeWasm() must be awaited first!");
9571 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
9572 // debug statements here
9574 // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
9575 export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
9576 if(!isWasmInitialized) {
9577 throw new Error("initializeWasm() must be awaited first!");
9579 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
9580 return nativeResponseValue;
9582 // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
9583 export function QueryShortChannelIds_clone(orig: number): number {
9584 if(!isWasmInitialized) {
9585 throw new Error("initializeWasm() must be awaited first!");
9587 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
9588 return nativeResponseValue;
9590 // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
9591 export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
9592 if(!isWasmInitialized) {
9593 throw new Error("initializeWasm() must be awaited first!");
9595 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
9596 // debug statements here
9598 // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
9599 export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
9600 if(!isWasmInitialized) {
9601 throw new Error("initializeWasm() must be awaited first!");
9603 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
9604 return decodeArray(nativeResponseValue);
9606 // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9607 export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9608 if(!isWasmInitialized) {
9609 throw new Error("initializeWasm() must be awaited first!");
9611 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
9612 // debug statements here
9614 // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
9615 export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
9616 if(!isWasmInitialized) {
9617 throw new Error("initializeWasm() must be awaited first!");
9619 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
9620 return nativeResponseValue;
9622 // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
9623 export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
9624 if(!isWasmInitialized) {
9625 throw new Error("initializeWasm() must be awaited first!");
9627 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
9628 // debug statements here
9630 // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
9631 export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
9632 if(!isWasmInitialized) {
9633 throw new Error("initializeWasm() must be awaited first!");
9635 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
9636 return nativeResponseValue;
9638 // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
9639 export function ReplyShortChannelIdsEnd_clone(orig: number): number {
9640 if(!isWasmInitialized) {
9641 throw new Error("initializeWasm() must be awaited first!");
9643 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
9644 return nativeResponseValue;
9646 // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
9647 export function GossipTimestampFilter_free(this_obj: number): void {
9648 if(!isWasmInitialized) {
9649 throw new Error("initializeWasm() must be awaited first!");
9651 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
9652 // debug statements here
9654 // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
9655 export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
9656 if(!isWasmInitialized) {
9657 throw new Error("initializeWasm() must be awaited first!");
9659 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
9660 return decodeArray(nativeResponseValue);
9662 // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9663 export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9664 if(!isWasmInitialized) {
9665 throw new Error("initializeWasm() must be awaited first!");
9667 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
9668 // debug statements here
9670 // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9671 export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
9672 if(!isWasmInitialized) {
9673 throw new Error("initializeWasm() must be awaited first!");
9675 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
9676 return nativeResponseValue;
9678 // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9679 export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
9680 if(!isWasmInitialized) {
9681 throw new Error("initializeWasm() must be awaited first!");
9683 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
9684 // debug statements here
9686 // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9687 export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
9688 if(!isWasmInitialized) {
9689 throw new Error("initializeWasm() must be awaited first!");
9691 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
9692 return nativeResponseValue;
9694 // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9695 export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
9696 if(!isWasmInitialized) {
9697 throw new Error("initializeWasm() must be awaited first!");
9699 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
9700 // debug statements here
9702 // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
9703 export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
9704 if(!isWasmInitialized) {
9705 throw new Error("initializeWasm() must be awaited first!");
9707 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
9708 return nativeResponseValue;
9710 // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
9711 export function GossipTimestampFilter_clone(orig: number): number {
9712 if(!isWasmInitialized) {
9713 throw new Error("initializeWasm() must be awaited first!");
9715 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
9716 return nativeResponseValue;
9718 // void ErrorAction_free(struct LDKErrorAction this_ptr);
9719 export function ErrorAction_free(this_ptr: number): void {
9720 if(!isWasmInitialized) {
9721 throw new Error("initializeWasm() must be awaited first!");
9723 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
9724 // debug statements here
9726 // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
9727 export function ErrorAction_clone(orig: number): number {
9728 if(!isWasmInitialized) {
9729 throw new Error("initializeWasm() must be awaited first!");
9731 const nativeResponseValue = wasm.ErrorAction_clone(orig);
9732 return nativeResponseValue;
9734 // void LightningError_free(struct LDKLightningError this_obj);
9735 export function LightningError_free(this_obj: number): void {
9736 if(!isWasmInitialized) {
9737 throw new Error("initializeWasm() must be awaited first!");
9739 const nativeResponseValue = wasm.LightningError_free(this_obj);
9740 // debug statements here
9742 // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
9743 export function LightningError_get_err(this_ptr: number): String {
9744 if(!isWasmInitialized) {
9745 throw new Error("initializeWasm() must be awaited first!");
9747 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
9748 return nativeResponseValue;
9750 // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9751 export function LightningError_set_err(this_ptr: number, val: Uint8Array): void {
9752 if(!isWasmInitialized) {
9753 throw new Error("initializeWasm() must be awaited first!");
9755 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, encodeArray(val));
9756 // debug statements here
9758 // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
9759 export function LightningError_get_action(this_ptr: number): number {
9760 if(!isWasmInitialized) {
9761 throw new Error("initializeWasm() must be awaited first!");
9763 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
9764 return nativeResponseValue;
9766 // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
9767 export function LightningError_set_action(this_ptr: number, val: number): void {
9768 if(!isWasmInitialized) {
9769 throw new Error("initializeWasm() must be awaited first!");
9771 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
9772 // debug statements here
9774 // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
9775 export function LightningError_new(err_arg: Uint8Array, action_arg: number): number {
9776 if(!isWasmInitialized) {
9777 throw new Error("initializeWasm() must be awaited first!");
9779 const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
9780 return nativeResponseValue;
9782 // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
9783 export function LightningError_clone(orig: number): number {
9784 if(!isWasmInitialized) {
9785 throw new Error("initializeWasm() must be awaited first!");
9787 const nativeResponseValue = wasm.LightningError_clone(orig);
9788 return nativeResponseValue;
9790 // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
9791 export function CommitmentUpdate_free(this_obj: number): void {
9792 if(!isWasmInitialized) {
9793 throw new Error("initializeWasm() must be awaited first!");
9795 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
9796 // debug statements here
9798 // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
9799 export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
9800 if(!isWasmInitialized) {
9801 throw new Error("initializeWasm() must be awaited first!");
9803 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
9804 // debug statements here
9806 // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
9807 export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
9808 if(!isWasmInitialized) {
9809 throw new Error("initializeWasm() must be awaited first!");
9811 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
9812 // debug statements here
9814 // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
9815 export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
9816 if(!isWasmInitialized) {
9817 throw new Error("initializeWasm() must be awaited first!");
9819 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
9820 // debug statements here
9822 // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
9823 export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
9824 if(!isWasmInitialized) {
9825 throw new Error("initializeWasm() must be awaited first!");
9827 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
9828 // debug statements here
9830 // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9831 export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
9832 if(!isWasmInitialized) {
9833 throw new Error("initializeWasm() must be awaited first!");
9835 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
9836 return nativeResponseValue;
9838 // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
9839 export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
9840 if(!isWasmInitialized) {
9841 throw new Error("initializeWasm() must be awaited first!");
9843 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
9844 // debug statements here
9846 // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9847 export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
9848 if(!isWasmInitialized) {
9849 throw new Error("initializeWasm() must be awaited first!");
9851 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
9852 return nativeResponseValue;
9854 // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
9855 export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
9856 if(!isWasmInitialized) {
9857 throw new Error("initializeWasm() must be awaited first!");
9859 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
9860 // debug statements here
9862 // 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);
9863 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 {
9864 if(!isWasmInitialized) {
9865 throw new Error("initializeWasm() must be awaited first!");
9867 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);
9868 return nativeResponseValue;
9870 // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
9871 export function CommitmentUpdate_clone(orig: number): number {
9872 if(!isWasmInitialized) {
9873 throw new Error("initializeWasm() must be awaited first!");
9875 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
9876 return nativeResponseValue;
9878 // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
9879 export function HTLCFailChannelUpdate_free(this_ptr: number): void {
9880 if(!isWasmInitialized) {
9881 throw new Error("initializeWasm() must be awaited first!");
9883 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
9884 // debug statements here
9886 // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
9887 export function HTLCFailChannelUpdate_clone(orig: number): number {
9888 if(!isWasmInitialized) {
9889 throw new Error("initializeWasm() must be awaited first!");
9891 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
9892 return nativeResponseValue;
9894 // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
9895 export function ChannelMessageHandler_free(this_ptr: number): void {
9896 if(!isWasmInitialized) {
9897 throw new Error("initializeWasm() must be awaited first!");
9899 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
9900 // debug statements here
9902 // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
9903 export function RoutingMessageHandler_free(this_ptr: number): void {
9904 if(!isWasmInitialized) {
9905 throw new Error("initializeWasm() must be awaited first!");
9907 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
9908 // debug statements here
9910 // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
9911 export function AcceptChannel_write(obj: number): Uint8Array {
9912 if(!isWasmInitialized) {
9913 throw new Error("initializeWasm() must be awaited first!");
9915 const nativeResponseValue = wasm.AcceptChannel_write(obj);
9916 return decodeArray(nativeResponseValue);
9918 // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
9919 export function AcceptChannel_read(ser: Uint8Array): number {
9920 if(!isWasmInitialized) {
9921 throw new Error("initializeWasm() must be awaited first!");
9923 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
9924 return nativeResponseValue;
9926 // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
9927 export function AnnouncementSignatures_write(obj: number): Uint8Array {
9928 if(!isWasmInitialized) {
9929 throw new Error("initializeWasm() must be awaited first!");
9931 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
9932 return decodeArray(nativeResponseValue);
9934 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
9935 export function AnnouncementSignatures_read(ser: Uint8Array): number {
9936 if(!isWasmInitialized) {
9937 throw new Error("initializeWasm() must be awaited first!");
9939 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
9940 return nativeResponseValue;
9942 // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
9943 export function ChannelReestablish_write(obj: number): Uint8Array {
9944 if(!isWasmInitialized) {
9945 throw new Error("initializeWasm() must be awaited first!");
9947 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
9948 return decodeArray(nativeResponseValue);
9950 // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
9951 export function ChannelReestablish_read(ser: Uint8Array): number {
9952 if(!isWasmInitialized) {
9953 throw new Error("initializeWasm() must be awaited first!");
9955 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
9956 return nativeResponseValue;
9958 // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
9959 export function ClosingSigned_write(obj: number): Uint8Array {
9960 if(!isWasmInitialized) {
9961 throw new Error("initializeWasm() must be awaited first!");
9963 const nativeResponseValue = wasm.ClosingSigned_write(obj);
9964 return decodeArray(nativeResponseValue);
9966 // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
9967 export function ClosingSigned_read(ser: Uint8Array): number {
9968 if(!isWasmInitialized) {
9969 throw new Error("initializeWasm() must be awaited first!");
9971 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
9972 return nativeResponseValue;
9974 // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
9975 export function CommitmentSigned_write(obj: number): Uint8Array {
9976 if(!isWasmInitialized) {
9977 throw new Error("initializeWasm() must be awaited first!");
9979 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
9980 return decodeArray(nativeResponseValue);
9982 // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
9983 export function CommitmentSigned_read(ser: Uint8Array): number {
9984 if(!isWasmInitialized) {
9985 throw new Error("initializeWasm() must be awaited first!");
9987 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
9988 return nativeResponseValue;
9990 // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
9991 export function FundingCreated_write(obj: number): Uint8Array {
9992 if(!isWasmInitialized) {
9993 throw new Error("initializeWasm() must be awaited first!");
9995 const nativeResponseValue = wasm.FundingCreated_write(obj);
9996 return decodeArray(nativeResponseValue);
9998 // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
9999 export function FundingCreated_read(ser: Uint8Array): number {
10000 if(!isWasmInitialized) {
10001 throw new Error("initializeWasm() must be awaited first!");
10003 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
10004 return nativeResponseValue;
10006 // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
10007 export function FundingSigned_write(obj: number): Uint8Array {
10008 if(!isWasmInitialized) {
10009 throw new Error("initializeWasm() must be awaited first!");
10011 const nativeResponseValue = wasm.FundingSigned_write(obj);
10012 return decodeArray(nativeResponseValue);
10014 // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
10015 export function FundingSigned_read(ser: Uint8Array): number {
10016 if(!isWasmInitialized) {
10017 throw new Error("initializeWasm() must be awaited first!");
10019 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
10020 return nativeResponseValue;
10022 // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
10023 export function FundingLocked_write(obj: number): Uint8Array {
10024 if(!isWasmInitialized) {
10025 throw new Error("initializeWasm() must be awaited first!");
10027 const nativeResponseValue = wasm.FundingLocked_write(obj);
10028 return decodeArray(nativeResponseValue);
10030 // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
10031 export function FundingLocked_read(ser: Uint8Array): number {
10032 if(!isWasmInitialized) {
10033 throw new Error("initializeWasm() must be awaited first!");
10035 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
10036 return nativeResponseValue;
10038 // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
10039 export function Init_write(obj: number): Uint8Array {
10040 if(!isWasmInitialized) {
10041 throw new Error("initializeWasm() must be awaited first!");
10043 const nativeResponseValue = wasm.Init_write(obj);
10044 return decodeArray(nativeResponseValue);
10046 // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
10047 export function Init_read(ser: Uint8Array): number {
10048 if(!isWasmInitialized) {
10049 throw new Error("initializeWasm() must be awaited first!");
10051 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
10052 return nativeResponseValue;
10054 // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
10055 export function OpenChannel_write(obj: number): Uint8Array {
10056 if(!isWasmInitialized) {
10057 throw new Error("initializeWasm() must be awaited first!");
10059 const nativeResponseValue = wasm.OpenChannel_write(obj);
10060 return decodeArray(nativeResponseValue);
10062 // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
10063 export function OpenChannel_read(ser: Uint8Array): number {
10064 if(!isWasmInitialized) {
10065 throw new Error("initializeWasm() must be awaited first!");
10067 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
10068 return nativeResponseValue;
10070 // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
10071 export function RevokeAndACK_write(obj: number): Uint8Array {
10072 if(!isWasmInitialized) {
10073 throw new Error("initializeWasm() must be awaited first!");
10075 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
10076 return decodeArray(nativeResponseValue);
10078 // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
10079 export function RevokeAndACK_read(ser: Uint8Array): number {
10080 if(!isWasmInitialized) {
10081 throw new Error("initializeWasm() must be awaited first!");
10083 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
10084 return nativeResponseValue;
10086 // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
10087 export function Shutdown_write(obj: number): Uint8Array {
10088 if(!isWasmInitialized) {
10089 throw new Error("initializeWasm() must be awaited first!");
10091 const nativeResponseValue = wasm.Shutdown_write(obj);
10092 return decodeArray(nativeResponseValue);
10094 // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
10095 export function Shutdown_read(ser: Uint8Array): number {
10096 if(!isWasmInitialized) {
10097 throw new Error("initializeWasm() must be awaited first!");
10099 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
10100 return nativeResponseValue;
10102 // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
10103 export function UpdateFailHTLC_write(obj: number): Uint8Array {
10104 if(!isWasmInitialized) {
10105 throw new Error("initializeWasm() must be awaited first!");
10107 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
10108 return decodeArray(nativeResponseValue);
10110 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
10111 export function UpdateFailHTLC_read(ser: Uint8Array): number {
10112 if(!isWasmInitialized) {
10113 throw new Error("initializeWasm() must be awaited first!");
10115 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
10116 return nativeResponseValue;
10118 // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
10119 export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
10120 if(!isWasmInitialized) {
10121 throw new Error("initializeWasm() must be awaited first!");
10123 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
10124 return decodeArray(nativeResponseValue);
10126 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
10127 export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
10128 if(!isWasmInitialized) {
10129 throw new Error("initializeWasm() must be awaited first!");
10131 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
10132 return nativeResponseValue;
10134 // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
10135 export function UpdateFee_write(obj: number): Uint8Array {
10136 if(!isWasmInitialized) {
10137 throw new Error("initializeWasm() must be awaited first!");
10139 const nativeResponseValue = wasm.UpdateFee_write(obj);
10140 return decodeArray(nativeResponseValue);
10142 // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
10143 export function UpdateFee_read(ser: Uint8Array): number {
10144 if(!isWasmInitialized) {
10145 throw new Error("initializeWasm() must be awaited first!");
10147 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
10148 return nativeResponseValue;
10150 // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
10151 export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
10152 if(!isWasmInitialized) {
10153 throw new Error("initializeWasm() must be awaited first!");
10155 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
10156 return decodeArray(nativeResponseValue);
10158 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
10159 export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
10160 if(!isWasmInitialized) {
10161 throw new Error("initializeWasm() must be awaited first!");
10163 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
10164 return nativeResponseValue;
10166 // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
10167 export function UpdateAddHTLC_write(obj: number): Uint8Array {
10168 if(!isWasmInitialized) {
10169 throw new Error("initializeWasm() must be awaited first!");
10171 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
10172 return decodeArray(nativeResponseValue);
10174 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
10175 export function UpdateAddHTLC_read(ser: Uint8Array): number {
10176 if(!isWasmInitialized) {
10177 throw new Error("initializeWasm() must be awaited first!");
10179 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
10180 return nativeResponseValue;
10182 // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
10183 export function Ping_write(obj: number): Uint8Array {
10184 if(!isWasmInitialized) {
10185 throw new Error("initializeWasm() must be awaited first!");
10187 const nativeResponseValue = wasm.Ping_write(obj);
10188 return decodeArray(nativeResponseValue);
10190 // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
10191 export function Ping_read(ser: Uint8Array): number {
10192 if(!isWasmInitialized) {
10193 throw new Error("initializeWasm() must be awaited first!");
10195 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
10196 return nativeResponseValue;
10198 // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
10199 export function Pong_write(obj: number): Uint8Array {
10200 if(!isWasmInitialized) {
10201 throw new Error("initializeWasm() must be awaited first!");
10203 const nativeResponseValue = wasm.Pong_write(obj);
10204 return decodeArray(nativeResponseValue);
10206 // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
10207 export function Pong_read(ser: Uint8Array): number {
10208 if(!isWasmInitialized) {
10209 throw new Error("initializeWasm() must be awaited first!");
10211 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
10212 return nativeResponseValue;
10214 // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
10215 export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
10216 if(!isWasmInitialized) {
10217 throw new Error("initializeWasm() must be awaited first!");
10219 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
10220 return decodeArray(nativeResponseValue);
10222 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
10223 export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
10224 if(!isWasmInitialized) {
10225 throw new Error("initializeWasm() must be awaited first!");
10227 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
10228 return nativeResponseValue;
10230 // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
10231 export function ChannelAnnouncement_write(obj: number): Uint8Array {
10232 if(!isWasmInitialized) {
10233 throw new Error("initializeWasm() must be awaited first!");
10235 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
10236 return decodeArray(nativeResponseValue);
10238 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
10239 export function ChannelAnnouncement_read(ser: Uint8Array): number {
10240 if(!isWasmInitialized) {
10241 throw new Error("initializeWasm() must be awaited first!");
10243 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
10244 return nativeResponseValue;
10246 // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
10247 export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
10248 if(!isWasmInitialized) {
10249 throw new Error("initializeWasm() must be awaited first!");
10251 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
10252 return decodeArray(nativeResponseValue);
10254 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
10255 export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
10256 if(!isWasmInitialized) {
10257 throw new Error("initializeWasm() must be awaited first!");
10259 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
10260 return nativeResponseValue;
10262 // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
10263 export function ChannelUpdate_write(obj: number): Uint8Array {
10264 if(!isWasmInitialized) {
10265 throw new Error("initializeWasm() must be awaited first!");
10267 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
10268 return decodeArray(nativeResponseValue);
10270 // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
10271 export function ChannelUpdate_read(ser: Uint8Array): number {
10272 if(!isWasmInitialized) {
10273 throw new Error("initializeWasm() must be awaited first!");
10275 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
10276 return nativeResponseValue;
10278 // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
10279 export function ErrorMessage_write(obj: number): Uint8Array {
10280 if(!isWasmInitialized) {
10281 throw new Error("initializeWasm() must be awaited first!");
10283 const nativeResponseValue = wasm.ErrorMessage_write(obj);
10284 return decodeArray(nativeResponseValue);
10286 // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
10287 export function ErrorMessage_read(ser: Uint8Array): number {
10288 if(!isWasmInitialized) {
10289 throw new Error("initializeWasm() must be awaited first!");
10291 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
10292 return nativeResponseValue;
10294 // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
10295 export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
10296 if(!isWasmInitialized) {
10297 throw new Error("initializeWasm() must be awaited first!");
10299 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
10300 return decodeArray(nativeResponseValue);
10302 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
10303 export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
10304 if(!isWasmInitialized) {
10305 throw new Error("initializeWasm() must be awaited first!");
10307 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
10308 return nativeResponseValue;
10310 // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
10311 export function NodeAnnouncement_write(obj: number): Uint8Array {
10312 if(!isWasmInitialized) {
10313 throw new Error("initializeWasm() must be awaited first!");
10315 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
10316 return decodeArray(nativeResponseValue);
10318 // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
10319 export function NodeAnnouncement_read(ser: Uint8Array): number {
10320 if(!isWasmInitialized) {
10321 throw new Error("initializeWasm() must be awaited first!");
10323 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
10324 return nativeResponseValue;
10326 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
10327 export function QueryShortChannelIds_read(ser: Uint8Array): number {
10328 if(!isWasmInitialized) {
10329 throw new Error("initializeWasm() must be awaited first!");
10331 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
10332 return nativeResponseValue;
10334 // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
10335 export function QueryShortChannelIds_write(obj: number): Uint8Array {
10336 if(!isWasmInitialized) {
10337 throw new Error("initializeWasm() must be awaited first!");
10339 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
10340 return decodeArray(nativeResponseValue);
10342 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
10343 export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
10344 if(!isWasmInitialized) {
10345 throw new Error("initializeWasm() must be awaited first!");
10347 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
10348 return nativeResponseValue;
10350 // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
10351 export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
10352 if(!isWasmInitialized) {
10353 throw new Error("initializeWasm() must be awaited first!");
10355 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
10356 return decodeArray(nativeResponseValue);
10358 // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
10359 export function QueryChannelRange_end_blocknum(this_arg: number): number {
10360 if(!isWasmInitialized) {
10361 throw new Error("initializeWasm() must be awaited first!");
10363 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
10364 return nativeResponseValue;
10366 // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
10367 export function QueryChannelRange_read(ser: Uint8Array): number {
10368 if(!isWasmInitialized) {
10369 throw new Error("initializeWasm() must be awaited first!");
10371 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
10372 return nativeResponseValue;
10374 // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
10375 export function QueryChannelRange_write(obj: number): Uint8Array {
10376 if(!isWasmInitialized) {
10377 throw new Error("initializeWasm() must be awaited first!");
10379 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
10380 return decodeArray(nativeResponseValue);
10382 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
10383 export function ReplyChannelRange_read(ser: Uint8Array): number {
10384 if(!isWasmInitialized) {
10385 throw new Error("initializeWasm() must be awaited first!");
10387 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
10388 return nativeResponseValue;
10390 // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
10391 export function ReplyChannelRange_write(obj: number): Uint8Array {
10392 if(!isWasmInitialized) {
10393 throw new Error("initializeWasm() must be awaited first!");
10395 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
10396 return decodeArray(nativeResponseValue);
10398 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
10399 export function GossipTimestampFilter_read(ser: Uint8Array): number {
10400 if(!isWasmInitialized) {
10401 throw new Error("initializeWasm() must be awaited first!");
10403 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
10404 return nativeResponseValue;
10406 // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
10407 export function GossipTimestampFilter_write(obj: number): Uint8Array {
10408 if(!isWasmInitialized) {
10409 throw new Error("initializeWasm() must be awaited first!");
10411 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
10412 return decodeArray(nativeResponseValue);
10414 // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
10415 export function IgnoringMessageHandler_free(this_obj: number): void {
10416 if(!isWasmInitialized) {
10417 throw new Error("initializeWasm() must be awaited first!");
10419 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
10420 // debug statements here
10422 // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
10423 export function IgnoringMessageHandler_new(): number {
10424 if(!isWasmInitialized) {
10425 throw new Error("initializeWasm() must be awaited first!");
10427 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
10428 return nativeResponseValue;
10430 // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
10431 export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
10432 if(!isWasmInitialized) {
10433 throw new Error("initializeWasm() must be awaited first!");
10435 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
10436 return nativeResponseValue;
10438 // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
10439 export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
10440 if(!isWasmInitialized) {
10441 throw new Error("initializeWasm() must be awaited first!");
10443 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
10444 return nativeResponseValue;
10446 // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
10447 export function ErroringMessageHandler_free(this_obj: number): void {
10448 if(!isWasmInitialized) {
10449 throw new Error("initializeWasm() must be awaited first!");
10451 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
10452 // debug statements here
10454 // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
10455 export function ErroringMessageHandler_new(): number {
10456 if(!isWasmInitialized) {
10457 throw new Error("initializeWasm() must be awaited first!");
10459 const nativeResponseValue = wasm.ErroringMessageHandler_new();
10460 return nativeResponseValue;
10462 // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
10463 export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
10464 if(!isWasmInitialized) {
10465 throw new Error("initializeWasm() must be awaited first!");
10467 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
10468 return nativeResponseValue;
10470 // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
10471 export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
10472 if(!isWasmInitialized) {
10473 throw new Error("initializeWasm() must be awaited first!");
10475 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
10476 return nativeResponseValue;
10478 // void MessageHandler_free(struct LDKMessageHandler this_obj);
10479 export function MessageHandler_free(this_obj: number): void {
10480 if(!isWasmInitialized) {
10481 throw new Error("initializeWasm() must be awaited first!");
10483 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
10484 // debug statements here
10486 // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10487 export function MessageHandler_get_chan_handler(this_ptr: number): number {
10488 if(!isWasmInitialized) {
10489 throw new Error("initializeWasm() must be awaited first!");
10491 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
10492 return nativeResponseValue;
10494 // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
10495 export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
10496 if(!isWasmInitialized) {
10497 throw new Error("initializeWasm() must be awaited first!");
10499 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
10500 // debug statements here
10502 // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10503 export function MessageHandler_get_route_handler(this_ptr: number): number {
10504 if(!isWasmInitialized) {
10505 throw new Error("initializeWasm() must be awaited first!");
10507 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
10508 return nativeResponseValue;
10510 // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
10511 export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
10512 if(!isWasmInitialized) {
10513 throw new Error("initializeWasm() must be awaited first!");
10515 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
10516 // debug statements here
10518 // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
10519 export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
10520 if(!isWasmInitialized) {
10521 throw new Error("initializeWasm() must be awaited first!");
10523 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
10524 return nativeResponseValue;
10526 // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
10527 export function SocketDescriptor_clone(orig: number): number {
10528 if(!isWasmInitialized) {
10529 throw new Error("initializeWasm() must be awaited first!");
10531 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
10532 return nativeResponseValue;
10534 // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
10535 export function SocketDescriptor_free(this_ptr: number): void {
10536 if(!isWasmInitialized) {
10537 throw new Error("initializeWasm() must be awaited first!");
10539 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
10540 // debug statements here
10542 // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
10543 export function PeerHandleError_free(this_obj: number): void {
10544 if(!isWasmInitialized) {
10545 throw new Error("initializeWasm() must be awaited first!");
10547 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
10548 // debug statements here
10550 // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
10551 export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
10552 if(!isWasmInitialized) {
10553 throw new Error("initializeWasm() must be awaited first!");
10555 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
10556 return nativeResponseValue;
10558 // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
10559 export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
10560 if(!isWasmInitialized) {
10561 throw new Error("initializeWasm() must be awaited first!");
10563 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
10564 // debug statements here
10566 // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
10567 export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
10568 if(!isWasmInitialized) {
10569 throw new Error("initializeWasm() must be awaited first!");
10571 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
10572 return nativeResponseValue;
10574 // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
10575 export function PeerHandleError_clone(orig: number): number {
10576 if(!isWasmInitialized) {
10577 throw new Error("initializeWasm() must be awaited first!");
10579 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
10580 return nativeResponseValue;
10582 // void PeerManager_free(struct LDKPeerManager this_obj);
10583 export function PeerManager_free(this_obj: number): void {
10584 if(!isWasmInitialized) {
10585 throw new Error("initializeWasm() must be awaited first!");
10587 const nativeResponseValue = wasm.PeerManager_free(this_obj);
10588 // debug statements here
10590 // 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);
10591 export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
10592 if(!isWasmInitialized) {
10593 throw new Error("initializeWasm() must be awaited first!");
10595 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
10596 return nativeResponseValue;
10598 // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
10599 export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
10600 if(!isWasmInitialized) {
10601 throw new Error("initializeWasm() must be awaited first!");
10603 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
10604 return nativeResponseValue;
10606 // 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);
10607 export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
10608 if(!isWasmInitialized) {
10609 throw new Error("initializeWasm() must be awaited first!");
10611 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
10612 return nativeResponseValue;
10614 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
10615 export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
10616 if(!isWasmInitialized) {
10617 throw new Error("initializeWasm() must be awaited first!");
10619 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
10620 return nativeResponseValue;
10622 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10623 export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
10624 if(!isWasmInitialized) {
10625 throw new Error("initializeWasm() must be awaited first!");
10627 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
10628 return nativeResponseValue;
10630 // 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);
10631 export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
10632 if(!isWasmInitialized) {
10633 throw new Error("initializeWasm() must be awaited first!");
10635 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
10636 return nativeResponseValue;
10638 // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
10639 export function PeerManager_process_events(this_arg: number): void {
10640 if(!isWasmInitialized) {
10641 throw new Error("initializeWasm() must be awaited first!");
10643 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
10644 // debug statements here
10646 // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10647 export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
10648 if(!isWasmInitialized) {
10649 throw new Error("initializeWasm() must be awaited first!");
10651 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
10652 // debug statements here
10654 // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
10655 export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
10656 if(!isWasmInitialized) {
10657 throw new Error("initializeWasm() must be awaited first!");
10659 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
10660 // debug statements here
10662 // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
10663 export function PeerManager_timer_tick_occurred(this_arg: number): void {
10664 if(!isWasmInitialized) {
10665 throw new Error("initializeWasm() must be awaited first!");
10667 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
10668 // debug statements here
10670 // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
10671 export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
10672 if(!isWasmInitialized) {
10673 throw new Error("initializeWasm() must be awaited first!");
10675 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
10676 return decodeArray(nativeResponseValue);
10678 // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
10679 export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
10680 if(!isWasmInitialized) {
10681 throw new Error("initializeWasm() must be awaited first!");
10683 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
10684 return nativeResponseValue;
10686 // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
10687 export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
10688 if(!isWasmInitialized) {
10689 throw new Error("initializeWasm() must be awaited first!");
10691 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
10692 return nativeResponseValue;
10694 // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
10695 export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
10696 if(!isWasmInitialized) {
10697 throw new Error("initializeWasm() must be awaited first!");
10699 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
10700 return nativeResponseValue;
10702 // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
10703 export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
10704 if(!isWasmInitialized) {
10705 throw new Error("initializeWasm() must be awaited first!");
10707 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
10708 return nativeResponseValue;
10710 // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
10711 export function TxCreationKeys_free(this_obj: number): void {
10712 if(!isWasmInitialized) {
10713 throw new Error("initializeWasm() must be awaited first!");
10715 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
10716 // debug statements here
10718 // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10719 export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
10720 if(!isWasmInitialized) {
10721 throw new Error("initializeWasm() must be awaited first!");
10723 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
10724 return decodeArray(nativeResponseValue);
10726 // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10727 export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10728 if(!isWasmInitialized) {
10729 throw new Error("initializeWasm() must be awaited first!");
10731 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
10732 // debug statements here
10734 // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10735 export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
10736 if(!isWasmInitialized) {
10737 throw new Error("initializeWasm() must be awaited first!");
10739 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
10740 return decodeArray(nativeResponseValue);
10742 // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10743 export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
10744 if(!isWasmInitialized) {
10745 throw new Error("initializeWasm() must be awaited first!");
10747 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
10748 // debug statements here
10750 // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10751 export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
10752 if(!isWasmInitialized) {
10753 throw new Error("initializeWasm() must be awaited first!");
10755 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
10756 return decodeArray(nativeResponseValue);
10758 // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10759 export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
10760 if(!isWasmInitialized) {
10761 throw new Error("initializeWasm() must be awaited first!");
10763 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
10764 // debug statements here
10766 // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10767 export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
10768 if(!isWasmInitialized) {
10769 throw new Error("initializeWasm() must be awaited first!");
10771 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
10772 return decodeArray(nativeResponseValue);
10774 // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10775 export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
10776 if(!isWasmInitialized) {
10777 throw new Error("initializeWasm() must be awaited first!");
10779 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
10780 // debug statements here
10782 // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10783 export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
10784 if(!isWasmInitialized) {
10785 throw new Error("initializeWasm() must be awaited first!");
10787 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
10788 return decodeArray(nativeResponseValue);
10790 // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10791 export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
10792 if(!isWasmInitialized) {
10793 throw new Error("initializeWasm() must be awaited first!");
10795 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
10796 // debug statements here
10798 // 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);
10799 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 {
10800 if(!isWasmInitialized) {
10801 throw new Error("initializeWasm() must be awaited first!");
10803 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));
10804 return nativeResponseValue;
10806 // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
10807 export function TxCreationKeys_clone(orig: number): number {
10808 if(!isWasmInitialized) {
10809 throw new Error("initializeWasm() must be awaited first!");
10811 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
10812 return nativeResponseValue;
10814 // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
10815 export function TxCreationKeys_write(obj: number): Uint8Array {
10816 if(!isWasmInitialized) {
10817 throw new Error("initializeWasm() must be awaited first!");
10819 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
10820 return decodeArray(nativeResponseValue);
10822 // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
10823 export function TxCreationKeys_read(ser: Uint8Array): number {
10824 if(!isWasmInitialized) {
10825 throw new Error("initializeWasm() must be awaited first!");
10827 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
10828 return nativeResponseValue;
10830 // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
10831 export function ChannelPublicKeys_free(this_obj: number): void {
10832 if(!isWasmInitialized) {
10833 throw new Error("initializeWasm() must be awaited first!");
10835 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
10836 // debug statements here
10838 // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10839 export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
10840 if(!isWasmInitialized) {
10841 throw new Error("initializeWasm() must be awaited first!");
10843 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
10844 return decodeArray(nativeResponseValue);
10846 // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10847 export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10848 if(!isWasmInitialized) {
10849 throw new Error("initializeWasm() must be awaited first!");
10851 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
10852 // debug statements here
10854 // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10855 export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
10856 if(!isWasmInitialized) {
10857 throw new Error("initializeWasm() must be awaited first!");
10859 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
10860 return decodeArray(nativeResponseValue);
10862 // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10863 export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10864 if(!isWasmInitialized) {
10865 throw new Error("initializeWasm() must be awaited first!");
10867 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
10868 // debug statements here
10870 // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10871 export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
10872 if(!isWasmInitialized) {
10873 throw new Error("initializeWasm() must be awaited first!");
10875 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
10876 return decodeArray(nativeResponseValue);
10878 // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10879 export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
10880 if(!isWasmInitialized) {
10881 throw new Error("initializeWasm() must be awaited first!");
10883 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
10884 // debug statements here
10886 // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10887 export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10888 if(!isWasmInitialized) {
10889 throw new Error("initializeWasm() must be awaited first!");
10891 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
10892 return decodeArray(nativeResponseValue);
10894 // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10895 export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10896 if(!isWasmInitialized) {
10897 throw new Error("initializeWasm() must be awaited first!");
10899 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10900 // debug statements here
10902 // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10903 export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
10904 if(!isWasmInitialized) {
10905 throw new Error("initializeWasm() must be awaited first!");
10907 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
10908 return decodeArray(nativeResponseValue);
10910 // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10911 export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10912 if(!isWasmInitialized) {
10913 throw new Error("initializeWasm() must be awaited first!");
10915 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
10916 // debug statements here
10918 // 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);
10919 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 {
10920 if(!isWasmInitialized) {
10921 throw new Error("initializeWasm() must be awaited first!");
10923 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));
10924 return nativeResponseValue;
10926 // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
10927 export function ChannelPublicKeys_clone(orig: number): number {
10928 if(!isWasmInitialized) {
10929 throw new Error("initializeWasm() must be awaited first!");
10931 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
10932 return nativeResponseValue;
10934 // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
10935 export function ChannelPublicKeys_write(obj: number): Uint8Array {
10936 if(!isWasmInitialized) {
10937 throw new Error("initializeWasm() must be awaited first!");
10939 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
10940 return decodeArray(nativeResponseValue);
10942 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
10943 export function ChannelPublicKeys_read(ser: Uint8Array): number {
10944 if(!isWasmInitialized) {
10945 throw new Error("initializeWasm() must be awaited first!");
10947 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
10948 return nativeResponseValue;
10950 // 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);
10951 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 {
10952 if(!isWasmInitialized) {
10953 throw new Error("initializeWasm() must be awaited first!");
10955 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));
10956 return nativeResponseValue;
10958 // 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);
10959 export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
10960 if(!isWasmInitialized) {
10961 throw new Error("initializeWasm() must be awaited first!");
10963 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
10964 return nativeResponseValue;
10966 // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
10967 export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
10968 if(!isWasmInitialized) {
10969 throw new Error("initializeWasm() must be awaited first!");
10971 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
10972 return decodeArray(nativeResponseValue);
10974 // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
10975 export function HTLCOutputInCommitment_free(this_obj: number): void {
10976 if(!isWasmInitialized) {
10977 throw new Error("initializeWasm() must be awaited first!");
10979 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
10980 // debug statements here
10982 // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10983 export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
10984 if(!isWasmInitialized) {
10985 throw new Error("initializeWasm() must be awaited first!");
10987 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
10988 return nativeResponseValue;
10990 // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
10991 export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
10992 if(!isWasmInitialized) {
10993 throw new Error("initializeWasm() must be awaited first!");
10995 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
10996 // debug statements here
10998 // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10999 export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
11000 if(!isWasmInitialized) {
11001 throw new Error("initializeWasm() must be awaited first!");
11003 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
11004 return nativeResponseValue;
11006 // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
11007 export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
11008 if(!isWasmInitialized) {
11009 throw new Error("initializeWasm() must be awaited first!");
11011 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
11012 // debug statements here
11014 // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
11015 export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
11016 if(!isWasmInitialized) {
11017 throw new Error("initializeWasm() must be awaited first!");
11019 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
11020 return nativeResponseValue;
11022 // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
11023 export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
11024 if(!isWasmInitialized) {
11025 throw new Error("initializeWasm() must be awaited first!");
11027 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
11028 // debug statements here
11030 // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
11031 export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
11032 if(!isWasmInitialized) {
11033 throw new Error("initializeWasm() must be awaited first!");
11035 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
11036 return decodeArray(nativeResponseValue);
11038 // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11039 export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
11040 if(!isWasmInitialized) {
11041 throw new Error("initializeWasm() must be awaited first!");
11043 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
11044 // debug statements here
11046 // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
11047 export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
11048 if(!isWasmInitialized) {
11049 throw new Error("initializeWasm() must be awaited first!");
11051 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
11052 return nativeResponseValue;
11054 // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
11055 export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
11056 if(!isWasmInitialized) {
11057 throw new Error("initializeWasm() must be awaited first!");
11059 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
11060 // debug statements here
11062 // MUST_USE_RES struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_new(bool offered_arg, uint64_t amount_msat_arg, uint32_t cltv_expiry_arg, struct LDKThirtyTwoBytes payment_hash_arg, struct LDKCOption_u32Z transaction_output_index_arg);
11063 export function HTLCOutputInCommitment_new(offered_arg: boolean, amount_msat_arg: number, cltv_expiry_arg: number, payment_hash_arg: Uint8Array, transaction_output_index_arg: number): number {
11064 if(!isWasmInitialized) {
11065 throw new Error("initializeWasm() must be awaited first!");
11067 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
11068 return nativeResponseValue;
11070 // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
11071 export function HTLCOutputInCommitment_clone(orig: number): number {
11072 if(!isWasmInitialized) {
11073 throw new Error("initializeWasm() must be awaited first!");
11075 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
11076 return nativeResponseValue;
11078 // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
11079 export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
11080 if(!isWasmInitialized) {
11081 throw new Error("initializeWasm() must be awaited first!");
11083 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
11084 return decodeArray(nativeResponseValue);
11086 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
11087 export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
11088 if(!isWasmInitialized) {
11089 throw new Error("initializeWasm() must be awaited first!");
11091 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
11092 return nativeResponseValue;
11094 // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
11095 export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
11096 if(!isWasmInitialized) {
11097 throw new Error("initializeWasm() must be awaited first!");
11099 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
11100 return decodeArray(nativeResponseValue);
11102 // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
11103 export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
11104 if(!isWasmInitialized) {
11105 throw new Error("initializeWasm() must be awaited first!");
11107 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
11108 return decodeArray(nativeResponseValue);
11110 // 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);
11111 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 {
11112 if(!isWasmInitialized) {
11113 throw new Error("initializeWasm() must be awaited first!");
11115 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(prev_hash), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
11116 return decodeArray(nativeResponseValue);
11118 // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
11119 export function ChannelTransactionParameters_free(this_obj: number): void {
11120 if(!isWasmInitialized) {
11121 throw new Error("initializeWasm() must be awaited first!");
11123 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
11124 // debug statements here
11126 // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
11127 export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
11128 if(!isWasmInitialized) {
11129 throw new Error("initializeWasm() must be awaited first!");
11131 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
11132 return nativeResponseValue;
11134 // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
11135 export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
11136 if(!isWasmInitialized) {
11137 throw new Error("initializeWasm() must be awaited first!");
11139 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
11140 // debug statements here
11142 // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
11143 export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
11144 if(!isWasmInitialized) {
11145 throw new Error("initializeWasm() must be awaited first!");
11147 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
11148 return nativeResponseValue;
11150 // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
11151 export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
11152 if(!isWasmInitialized) {
11153 throw new Error("initializeWasm() must be awaited first!");
11155 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
11156 // debug statements here
11158 // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
11159 export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
11160 if(!isWasmInitialized) {
11161 throw new Error("initializeWasm() must be awaited first!");
11163 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
11164 return nativeResponseValue;
11166 // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
11167 export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
11168 if(!isWasmInitialized) {
11169 throw new Error("initializeWasm() must be awaited first!");
11171 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
11172 // debug statements here
11174 // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
11175 export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
11176 if(!isWasmInitialized) {
11177 throw new Error("initializeWasm() must be awaited first!");
11179 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
11180 return nativeResponseValue;
11182 // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
11183 export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
11184 if(!isWasmInitialized) {
11185 throw new Error("initializeWasm() must be awaited first!");
11187 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
11188 // debug statements here
11190 // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
11191 export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
11192 if(!isWasmInitialized) {
11193 throw new Error("initializeWasm() must be awaited first!");
11195 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
11196 return nativeResponseValue;
11198 // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
11199 export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
11200 if(!isWasmInitialized) {
11201 throw new Error("initializeWasm() must be awaited first!");
11203 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
11204 // debug statements here
11206 // 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);
11207 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 {
11208 if(!isWasmInitialized) {
11209 throw new Error("initializeWasm() must be awaited first!");
11211 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
11212 return nativeResponseValue;
11214 // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
11215 export function ChannelTransactionParameters_clone(orig: number): number {
11216 if(!isWasmInitialized) {
11217 throw new Error("initializeWasm() must be awaited first!");
11219 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
11220 return nativeResponseValue;
11222 // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
11223 export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
11224 if(!isWasmInitialized) {
11225 throw new Error("initializeWasm() must be awaited first!");
11227 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
11228 // debug statements here
11230 // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
11231 export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
11232 if(!isWasmInitialized) {
11233 throw new Error("initializeWasm() must be awaited first!");
11235 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
11236 return nativeResponseValue;
11238 // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
11239 export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
11240 if(!isWasmInitialized) {
11241 throw new Error("initializeWasm() must be awaited first!");
11243 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
11244 // debug statements here
11246 // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
11247 export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
11248 if(!isWasmInitialized) {
11249 throw new Error("initializeWasm() must be awaited first!");
11251 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
11252 return nativeResponseValue;
11254 // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
11255 export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
11256 if(!isWasmInitialized) {
11257 throw new Error("initializeWasm() must be awaited first!");
11259 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
11260 // debug statements here
11262 // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
11263 export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
11264 if(!isWasmInitialized) {
11265 throw new Error("initializeWasm() must be awaited first!");
11267 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
11268 return nativeResponseValue;
11270 // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
11271 export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
11272 if(!isWasmInitialized) {
11273 throw new Error("initializeWasm() must be awaited first!");
11275 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
11276 return nativeResponseValue;
11278 // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
11279 export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
11280 if(!isWasmInitialized) {
11281 throw new Error("initializeWasm() must be awaited first!");
11283 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
11284 return nativeResponseValue;
11286 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
11287 export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
11288 if(!isWasmInitialized) {
11289 throw new Error("initializeWasm() must be awaited first!");
11291 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
11292 return nativeResponseValue;
11294 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
11295 export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
11296 if(!isWasmInitialized) {
11297 throw new Error("initializeWasm() must be awaited first!");
11299 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
11300 return nativeResponseValue;
11302 // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
11303 export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
11304 if(!isWasmInitialized) {
11305 throw new Error("initializeWasm() must be awaited first!");
11307 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
11308 return decodeArray(nativeResponseValue);
11310 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
11311 export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
11312 if(!isWasmInitialized) {
11313 throw new Error("initializeWasm() must be awaited first!");
11315 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
11316 return nativeResponseValue;
11318 // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
11319 export function ChannelTransactionParameters_write(obj: number): Uint8Array {
11320 if(!isWasmInitialized) {
11321 throw new Error("initializeWasm() must be awaited first!");
11323 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
11324 return decodeArray(nativeResponseValue);
11326 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
11327 export function ChannelTransactionParameters_read(ser: Uint8Array): number {
11328 if(!isWasmInitialized) {
11329 throw new Error("initializeWasm() must be awaited first!");
11331 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
11332 return nativeResponseValue;
11334 // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
11335 export function DirectedChannelTransactionParameters_free(this_obj: number): void {
11336 if(!isWasmInitialized) {
11337 throw new Error("initializeWasm() must be awaited first!");
11339 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
11340 // debug statements here
11342 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11343 export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
11344 if(!isWasmInitialized) {
11345 throw new Error("initializeWasm() must be awaited first!");
11347 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
11348 return nativeResponseValue;
11350 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11351 export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
11352 if(!isWasmInitialized) {
11353 throw new Error("initializeWasm() must be awaited first!");
11355 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
11356 return nativeResponseValue;
11358 // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11359 export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
11360 if(!isWasmInitialized) {
11361 throw new Error("initializeWasm() must be awaited first!");
11363 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
11364 return nativeResponseValue;
11366 // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11367 export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
11368 if(!isWasmInitialized) {
11369 throw new Error("initializeWasm() must be awaited first!");
11371 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
11372 return nativeResponseValue;
11374 // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11375 export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
11376 if(!isWasmInitialized) {
11377 throw new Error("initializeWasm() must be awaited first!");
11379 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
11380 return nativeResponseValue;
11382 // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
11383 export function HolderCommitmentTransaction_free(this_obj: number): void {
11384 if(!isWasmInitialized) {
11385 throw new Error("initializeWasm() must be awaited first!");
11387 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
11388 // debug statements here
11390 // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
11391 export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
11392 if(!isWasmInitialized) {
11393 throw new Error("initializeWasm() must be awaited first!");
11395 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
11396 return decodeArray(nativeResponseValue);
11398 // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
11399 export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
11400 if(!isWasmInitialized) {
11401 throw new Error("initializeWasm() must be awaited first!");
11403 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
11404 // debug statements here
11406 // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
11407 export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
11408 if(!isWasmInitialized) {
11409 throw new Error("initializeWasm() must be awaited first!");
11411 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
11412 // debug statements here
11414 // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
11415 export function HolderCommitmentTransaction_clone(orig: number): number {
11416 if(!isWasmInitialized) {
11417 throw new Error("initializeWasm() must be awaited first!");
11419 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
11420 return nativeResponseValue;
11422 // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
11423 export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
11424 if(!isWasmInitialized) {
11425 throw new Error("initializeWasm() must be awaited first!");
11427 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
11428 return decodeArray(nativeResponseValue);
11430 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
11431 export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
11432 if(!isWasmInitialized) {
11433 throw new Error("initializeWasm() must be awaited first!");
11435 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
11436 return nativeResponseValue;
11438 // 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);
11439 export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
11440 if(!isWasmInitialized) {
11441 throw new Error("initializeWasm() must be awaited first!");
11443 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
11444 return nativeResponseValue;
11446 // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
11447 export function BuiltCommitmentTransaction_free(this_obj: number): void {
11448 if(!isWasmInitialized) {
11449 throw new Error("initializeWasm() must be awaited first!");
11451 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
11452 // debug statements here
11454 // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
11455 export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
11456 if(!isWasmInitialized) {
11457 throw new Error("initializeWasm() must be awaited first!");
11459 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
11460 return decodeArray(nativeResponseValue);
11462 // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
11463 export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
11464 if(!isWasmInitialized) {
11465 throw new Error("initializeWasm() must be awaited first!");
11467 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
11468 // debug statements here
11470 // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
11471 export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
11472 if(!isWasmInitialized) {
11473 throw new Error("initializeWasm() must be awaited first!");
11475 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
11476 return decodeArray(nativeResponseValue);
11478 // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11479 export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
11480 if(!isWasmInitialized) {
11481 throw new Error("initializeWasm() must be awaited first!");
11483 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
11484 // debug statements here
11486 // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
11487 export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
11488 if(!isWasmInitialized) {
11489 throw new Error("initializeWasm() must be awaited first!");
11491 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
11492 return nativeResponseValue;
11494 // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
11495 export function BuiltCommitmentTransaction_clone(orig: number): number {
11496 if(!isWasmInitialized) {
11497 throw new Error("initializeWasm() must be awaited first!");
11499 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
11500 return nativeResponseValue;
11502 // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
11503 export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
11504 if(!isWasmInitialized) {
11505 throw new Error("initializeWasm() must be awaited first!");
11507 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
11508 return decodeArray(nativeResponseValue);
11510 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
11511 export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
11512 if(!isWasmInitialized) {
11513 throw new Error("initializeWasm() must be awaited first!");
11515 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
11516 return nativeResponseValue;
11518 // 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);
11519 export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11520 if(!isWasmInitialized) {
11521 throw new Error("initializeWasm() must be awaited first!");
11523 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
11524 return decodeArray(nativeResponseValue);
11526 // 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);
11527 export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11528 if(!isWasmInitialized) {
11529 throw new Error("initializeWasm() must be awaited first!");
11531 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
11532 return decodeArray(nativeResponseValue);
11534 // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
11535 export function CommitmentTransaction_free(this_obj: number): void {
11536 if(!isWasmInitialized) {
11537 throw new Error("initializeWasm() must be awaited first!");
11539 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
11540 // debug statements here
11542 // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
11543 export function CommitmentTransaction_clone(orig: number): number {
11544 if(!isWasmInitialized) {
11545 throw new Error("initializeWasm() must be awaited first!");
11547 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
11548 return nativeResponseValue;
11550 // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
11551 export function CommitmentTransaction_write(obj: number): Uint8Array {
11552 if(!isWasmInitialized) {
11553 throw new Error("initializeWasm() must be awaited first!");
11555 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
11556 return decodeArray(nativeResponseValue);
11558 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
11559 export function CommitmentTransaction_read(ser: Uint8Array): number {
11560 if(!isWasmInitialized) {
11561 throw new Error("initializeWasm() must be awaited first!");
11563 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
11564 return nativeResponseValue;
11566 // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11567 export function CommitmentTransaction_commitment_number(this_arg: number): number {
11568 if(!isWasmInitialized) {
11569 throw new Error("initializeWasm() must be awaited first!");
11571 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
11572 return nativeResponseValue;
11574 // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11575 export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
11576 if(!isWasmInitialized) {
11577 throw new Error("initializeWasm() must be awaited first!");
11579 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
11580 return nativeResponseValue;
11582 // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11583 export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
11584 if(!isWasmInitialized) {
11585 throw new Error("initializeWasm() must be awaited first!");
11587 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
11588 return nativeResponseValue;
11590 // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11591 export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
11592 if(!isWasmInitialized) {
11593 throw new Error("initializeWasm() must be awaited first!");
11595 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
11596 return nativeResponseValue;
11598 // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11599 export function CommitmentTransaction_trust(this_arg: number): number {
11600 if(!isWasmInitialized) {
11601 throw new Error("initializeWasm() must be awaited first!");
11603 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
11604 return nativeResponseValue;
11606 // 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);
11607 export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
11608 if(!isWasmInitialized) {
11609 throw new Error("initializeWasm() must be awaited first!");
11611 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
11612 return nativeResponseValue;
11614 // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
11615 export function TrustedCommitmentTransaction_free(this_obj: number): void {
11616 if(!isWasmInitialized) {
11617 throw new Error("initializeWasm() must be awaited first!");
11619 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
11620 // debug statements here
11622 // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11623 export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
11624 if(!isWasmInitialized) {
11625 throw new Error("initializeWasm() must be awaited first!");
11627 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
11628 return decodeArray(nativeResponseValue);
11630 // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11631 export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
11632 if(!isWasmInitialized) {
11633 throw new Error("initializeWasm() must be awaited first!");
11635 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
11636 return nativeResponseValue;
11638 // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11639 export function TrustedCommitmentTransaction_keys(this_arg: number): number {
11640 if(!isWasmInitialized) {
11641 throw new Error("initializeWasm() must be awaited first!");
11643 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
11644 return nativeResponseValue;
11646 // 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);
11647 export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
11648 if(!isWasmInitialized) {
11649 throw new Error("initializeWasm() must be awaited first!");
11651 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
11652 return nativeResponseValue;
11654 // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
11655 export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
11656 if(!isWasmInitialized) {
11657 throw new Error("initializeWasm() must be awaited first!");
11659 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
11660 return nativeResponseValue;
11662 // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
11663 export function InitFeatures_clone(orig: number): number {
11664 if(!isWasmInitialized) {
11665 throw new Error("initializeWasm() must be awaited first!");
11667 const nativeResponseValue = wasm.InitFeatures_clone(orig);
11668 return nativeResponseValue;
11670 // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
11671 export function NodeFeatures_clone(orig: number): number {
11672 if(!isWasmInitialized) {
11673 throw new Error("initializeWasm() must be awaited first!");
11675 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
11676 return nativeResponseValue;
11678 // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
11679 export function ChannelFeatures_clone(orig: number): number {
11680 if(!isWasmInitialized) {
11681 throw new Error("initializeWasm() must be awaited first!");
11683 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
11684 return nativeResponseValue;
11686 // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
11687 export function InvoiceFeatures_clone(orig: number): number {
11688 if(!isWasmInitialized) {
11689 throw new Error("initializeWasm() must be awaited first!");
11691 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
11692 return nativeResponseValue;
11694 // void InitFeatures_free(struct LDKInitFeatures this_obj);
11695 export function InitFeatures_free(this_obj: number): void {
11696 if(!isWasmInitialized) {
11697 throw new Error("initializeWasm() must be awaited first!");
11699 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
11700 // debug statements here
11702 // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
11703 export function NodeFeatures_free(this_obj: number): void {
11704 if(!isWasmInitialized) {
11705 throw new Error("initializeWasm() must be awaited first!");
11707 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
11708 // debug statements here
11710 // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
11711 export function ChannelFeatures_free(this_obj: number): void {
11712 if(!isWasmInitialized) {
11713 throw new Error("initializeWasm() must be awaited first!");
11715 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
11716 // debug statements here
11718 // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
11719 export function InvoiceFeatures_free(this_obj: number): void {
11720 if(!isWasmInitialized) {
11721 throw new Error("initializeWasm() must be awaited first!");
11723 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
11724 // debug statements here
11726 // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
11727 export function InitFeatures_empty(): number {
11728 if(!isWasmInitialized) {
11729 throw new Error("initializeWasm() must be awaited first!");
11731 const nativeResponseValue = wasm.InitFeatures_empty();
11732 return nativeResponseValue;
11734 // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
11735 export function InitFeatures_known(): number {
11736 if(!isWasmInitialized) {
11737 throw new Error("initializeWasm() must be awaited first!");
11739 const nativeResponseValue = wasm.InitFeatures_known();
11740 return nativeResponseValue;
11742 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
11743 export function NodeFeatures_empty(): number {
11744 if(!isWasmInitialized) {
11745 throw new Error("initializeWasm() must be awaited first!");
11747 const nativeResponseValue = wasm.NodeFeatures_empty();
11748 return nativeResponseValue;
11750 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
11751 export function NodeFeatures_known(): number {
11752 if(!isWasmInitialized) {
11753 throw new Error("initializeWasm() must be awaited first!");
11755 const nativeResponseValue = wasm.NodeFeatures_known();
11756 return nativeResponseValue;
11758 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
11759 export function ChannelFeatures_empty(): number {
11760 if(!isWasmInitialized) {
11761 throw new Error("initializeWasm() must be awaited first!");
11763 const nativeResponseValue = wasm.ChannelFeatures_empty();
11764 return nativeResponseValue;
11766 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
11767 export function ChannelFeatures_known(): number {
11768 if(!isWasmInitialized) {
11769 throw new Error("initializeWasm() must be awaited first!");
11771 const nativeResponseValue = wasm.ChannelFeatures_known();
11772 return nativeResponseValue;
11774 // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
11775 export function InvoiceFeatures_empty(): number {
11776 if(!isWasmInitialized) {
11777 throw new Error("initializeWasm() must be awaited first!");
11779 const nativeResponseValue = wasm.InvoiceFeatures_empty();
11780 return nativeResponseValue;
11782 // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
11783 export function InvoiceFeatures_known(): number {
11784 if(!isWasmInitialized) {
11785 throw new Error("initializeWasm() must be awaited first!");
11787 const nativeResponseValue = wasm.InvoiceFeatures_known();
11788 return nativeResponseValue;
11790 // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
11791 export function InitFeatures_write(obj: number): Uint8Array {
11792 if(!isWasmInitialized) {
11793 throw new Error("initializeWasm() must be awaited first!");
11795 const nativeResponseValue = wasm.InitFeatures_write(obj);
11796 return decodeArray(nativeResponseValue);
11798 // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
11799 export function NodeFeatures_write(obj: number): Uint8Array {
11800 if(!isWasmInitialized) {
11801 throw new Error("initializeWasm() must be awaited first!");
11803 const nativeResponseValue = wasm.NodeFeatures_write(obj);
11804 return decodeArray(nativeResponseValue);
11806 // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
11807 export function ChannelFeatures_write(obj: number): Uint8Array {
11808 if(!isWasmInitialized) {
11809 throw new Error("initializeWasm() must be awaited first!");
11811 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
11812 return decodeArray(nativeResponseValue);
11814 // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
11815 export function InvoiceFeatures_write(obj: number): Uint8Array {
11816 if(!isWasmInitialized) {
11817 throw new Error("initializeWasm() must be awaited first!");
11819 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
11820 return decodeArray(nativeResponseValue);
11822 // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
11823 export function InitFeatures_read(ser: Uint8Array): number {
11824 if(!isWasmInitialized) {
11825 throw new Error("initializeWasm() must be awaited first!");
11827 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
11828 return nativeResponseValue;
11830 // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
11831 export function NodeFeatures_read(ser: Uint8Array): number {
11832 if(!isWasmInitialized) {
11833 throw new Error("initializeWasm() must be awaited first!");
11835 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
11836 return nativeResponseValue;
11838 // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
11839 export function ChannelFeatures_read(ser: Uint8Array): number {
11840 if(!isWasmInitialized) {
11841 throw new Error("initializeWasm() must be awaited first!");
11843 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
11844 return nativeResponseValue;
11846 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
11847 export function InvoiceFeatures_read(ser: Uint8Array): number {
11848 if(!isWasmInitialized) {
11849 throw new Error("initializeWasm() must be awaited first!");
11851 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
11852 return nativeResponseValue;
11854 // void RouteHop_free(struct LDKRouteHop this_obj);
11855 export function RouteHop_free(this_obj: number): void {
11856 if(!isWasmInitialized) {
11857 throw new Error("initializeWasm() must be awaited first!");
11859 const nativeResponseValue = wasm.RouteHop_free(this_obj);
11860 // debug statements here
11862 // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11863 export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
11864 if(!isWasmInitialized) {
11865 throw new Error("initializeWasm() must be awaited first!");
11867 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
11868 return decodeArray(nativeResponseValue);
11870 // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11871 export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
11872 if(!isWasmInitialized) {
11873 throw new Error("initializeWasm() must be awaited first!");
11875 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
11876 // debug statements here
11878 // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11879 export function RouteHop_get_node_features(this_ptr: number): number {
11880 if(!isWasmInitialized) {
11881 throw new Error("initializeWasm() must be awaited first!");
11883 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
11884 return nativeResponseValue;
11886 // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11887 export function RouteHop_set_node_features(this_ptr: number, val: number): void {
11888 if(!isWasmInitialized) {
11889 throw new Error("initializeWasm() must be awaited first!");
11891 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
11892 // debug statements here
11894 // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11895 export function RouteHop_get_short_channel_id(this_ptr: number): number {
11896 if(!isWasmInitialized) {
11897 throw new Error("initializeWasm() must be awaited first!");
11899 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
11900 return nativeResponseValue;
11902 // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11903 export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
11904 if(!isWasmInitialized) {
11905 throw new Error("initializeWasm() must be awaited first!");
11907 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
11908 // debug statements here
11910 // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11911 export function RouteHop_get_channel_features(this_ptr: number): number {
11912 if(!isWasmInitialized) {
11913 throw new Error("initializeWasm() must be awaited first!");
11915 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
11916 return nativeResponseValue;
11918 // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11919 export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
11920 if(!isWasmInitialized) {
11921 throw new Error("initializeWasm() must be awaited first!");
11923 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
11924 // debug statements here
11926 // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11927 export function RouteHop_get_fee_msat(this_ptr: number): number {
11928 if(!isWasmInitialized) {
11929 throw new Error("initializeWasm() must be awaited first!");
11931 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
11932 return nativeResponseValue;
11934 // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11935 export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
11936 if(!isWasmInitialized) {
11937 throw new Error("initializeWasm() must be awaited first!");
11939 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
11940 // debug statements here
11942 // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11943 export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
11944 if(!isWasmInitialized) {
11945 throw new Error("initializeWasm() must be awaited first!");
11947 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
11948 return nativeResponseValue;
11950 // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
11951 export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11952 if(!isWasmInitialized) {
11953 throw new Error("initializeWasm() must be awaited first!");
11955 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
11956 // debug statements here
11958 // 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);
11959 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 {
11960 if(!isWasmInitialized) {
11961 throw new Error("initializeWasm() must be awaited first!");
11963 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);
11964 return nativeResponseValue;
11966 // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
11967 export function RouteHop_clone(orig: number): number {
11968 if(!isWasmInitialized) {
11969 throw new Error("initializeWasm() must be awaited first!");
11971 const nativeResponseValue = wasm.RouteHop_clone(orig);
11972 return nativeResponseValue;
11974 // void Route_free(struct LDKRoute this_obj);
11975 export function Route_free(this_obj: number): void {
11976 if(!isWasmInitialized) {
11977 throw new Error("initializeWasm() must be awaited first!");
11979 const nativeResponseValue = wasm.Route_free(this_obj);
11980 // debug statements here
11982 // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
11983 export function Route_set_paths(this_ptr: number, val: number[][]): void {
11984 if(!isWasmInitialized) {
11985 throw new Error("initializeWasm() must be awaited first!");
11987 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
11988 // debug statements here
11990 // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
11991 export function Route_new(paths_arg: number[][]): number {
11992 if(!isWasmInitialized) {
11993 throw new Error("initializeWasm() must be awaited first!");
11995 const nativeResponseValue = wasm.Route_new(paths_arg);
11996 return nativeResponseValue;
11998 // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
11999 export function Route_clone(orig: number): number {
12000 if(!isWasmInitialized) {
12001 throw new Error("initializeWasm() must be awaited first!");
12003 const nativeResponseValue = wasm.Route_clone(orig);
12004 return nativeResponseValue;
12006 // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
12007 export function Route_write(obj: number): Uint8Array {
12008 if(!isWasmInitialized) {
12009 throw new Error("initializeWasm() must be awaited first!");
12011 const nativeResponseValue = wasm.Route_write(obj);
12012 return decodeArray(nativeResponseValue);
12014 // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
12015 export function Route_read(ser: Uint8Array): number {
12016 if(!isWasmInitialized) {
12017 throw new Error("initializeWasm() must be awaited first!");
12019 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
12020 return nativeResponseValue;
12022 // void RouteHint_free(struct LDKRouteHint this_obj);
12023 export function RouteHint_free(this_obj: number): void {
12024 if(!isWasmInitialized) {
12025 throw new Error("initializeWasm() must be awaited first!");
12027 const nativeResponseValue = wasm.RouteHint_free(this_obj);
12028 // debug statements here
12030 // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
12031 export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
12032 if(!isWasmInitialized) {
12033 throw new Error("initializeWasm() must be awaited first!");
12035 const nativeResponseValue = wasm.RouteHint_get_src_node_id(this_ptr);
12036 return decodeArray(nativeResponseValue);
12038 // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12039 export function RouteHint_set_src_node_id(this_ptr: number, val: Uint8Array): void {
12040 if(!isWasmInitialized) {
12041 throw new Error("initializeWasm() must be awaited first!");
12043 const nativeResponseValue = wasm.RouteHint_set_src_node_id(this_ptr, encodeArray(val));
12044 // debug statements here
12046 // uint64_t RouteHint_get_short_channel_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
12047 export function RouteHint_get_short_channel_id(this_ptr: number): number {
12048 if(!isWasmInitialized) {
12049 throw new Error("initializeWasm() must be awaited first!");
12051 const nativeResponseValue = wasm.RouteHint_get_short_channel_id(this_ptr);
12052 return nativeResponseValue;
12054 // void RouteHint_set_short_channel_id(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
12055 export function RouteHint_set_short_channel_id(this_ptr: number, val: number): void {
12056 if(!isWasmInitialized) {
12057 throw new Error("initializeWasm() must be awaited first!");
12059 const nativeResponseValue = wasm.RouteHint_set_short_channel_id(this_ptr, val);
12060 // debug statements here
12062 // struct LDKRoutingFees RouteHint_get_fees(const struct LDKRouteHint *NONNULL_PTR this_ptr);
12063 export function RouteHint_get_fees(this_ptr: number): number {
12064 if(!isWasmInitialized) {
12065 throw new Error("initializeWasm() must be awaited first!");
12067 const nativeResponseValue = wasm.RouteHint_get_fees(this_ptr);
12068 return nativeResponseValue;
12070 // void RouteHint_set_fees(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12071 export function RouteHint_set_fees(this_ptr: number, val: number): void {
12072 if(!isWasmInitialized) {
12073 throw new Error("initializeWasm() must be awaited first!");
12075 const nativeResponseValue = wasm.RouteHint_set_fees(this_ptr, val);
12076 // debug statements here
12078 // uint16_t RouteHint_get_cltv_expiry_delta(const struct LDKRouteHint *NONNULL_PTR this_ptr);
12079 export function RouteHint_get_cltv_expiry_delta(this_ptr: number): number {
12080 if(!isWasmInitialized) {
12081 throw new Error("initializeWasm() must be awaited first!");
12083 const nativeResponseValue = wasm.RouteHint_get_cltv_expiry_delta(this_ptr);
12084 return nativeResponseValue;
12086 // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
12087 export function RouteHint_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12088 if(!isWasmInitialized) {
12089 throw new Error("initializeWasm() must be awaited first!");
12091 const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
12092 // debug statements here
12094 // struct LDKCOption_u64Z RouteHint_get_htlc_minimum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
12095 export function RouteHint_get_htlc_minimum_msat(this_ptr: number): number {
12096 if(!isWasmInitialized) {
12097 throw new Error("initializeWasm() must be awaited first!");
12099 const nativeResponseValue = wasm.RouteHint_get_htlc_minimum_msat(this_ptr);
12100 return nativeResponseValue;
12102 // void RouteHint_set_htlc_minimum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12103 export function RouteHint_set_htlc_minimum_msat(this_ptr: number, val: number): void {
12104 if(!isWasmInitialized) {
12105 throw new Error("initializeWasm() must be awaited first!");
12107 const nativeResponseValue = wasm.RouteHint_set_htlc_minimum_msat(this_ptr, val);
12108 // debug statements here
12110 // struct LDKCOption_u64Z RouteHint_get_htlc_maximum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
12111 export function RouteHint_get_htlc_maximum_msat(this_ptr: number): number {
12112 if(!isWasmInitialized) {
12113 throw new Error("initializeWasm() must be awaited first!");
12115 const nativeResponseValue = wasm.RouteHint_get_htlc_maximum_msat(this_ptr);
12116 return nativeResponseValue;
12118 // void RouteHint_set_htlc_maximum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12119 export function RouteHint_set_htlc_maximum_msat(this_ptr: number, val: number): void {
12120 if(!isWasmInitialized) {
12121 throw new Error("initializeWasm() must be awaited first!");
12123 const nativeResponseValue = wasm.RouteHint_set_htlc_maximum_msat(this_ptr, val);
12124 // debug statements here
12126 // 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, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
12127 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, htlc_maximum_msat_arg: number): number {
12128 if(!isWasmInitialized) {
12129 throw new Error("initializeWasm() must be awaited first!");
12131 const nativeResponseValue = wasm.RouteHint_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
12132 return nativeResponseValue;
12134 // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
12135 export function RouteHint_clone(orig: number): number {
12136 if(!isWasmInitialized) {
12137 throw new Error("initializeWasm() must be awaited first!");
12139 const nativeResponseValue = wasm.RouteHint_clone(orig);
12140 return nativeResponseValue;
12142 // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
12143 export function get_route(our_node_id: Uint8Array, network: number, payee: Uint8Array, payee_features: number, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
12144 if(!isWasmInitialized) {
12145 throw new Error("initializeWasm() must be awaited first!");
12147 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
12148 return nativeResponseValue;
12150 // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
12151 export function NetworkGraph_free(this_obj: number): void {
12152 if(!isWasmInitialized) {
12153 throw new Error("initializeWasm() must be awaited first!");
12155 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
12156 // debug statements here
12158 // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
12159 export function NetworkGraph_clone(orig: number): number {
12160 if(!isWasmInitialized) {
12161 throw new Error("initializeWasm() must be awaited first!");
12163 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
12164 return nativeResponseValue;
12166 // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
12167 export function LockedNetworkGraph_free(this_obj: number): void {
12168 if(!isWasmInitialized) {
12169 throw new Error("initializeWasm() must be awaited first!");
12171 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_obj);
12172 // debug statements here
12174 // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
12175 export function NetGraphMsgHandler_free(this_obj: number): void {
12176 if(!isWasmInitialized) {
12177 throw new Error("initializeWasm() must be awaited first!");
12179 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
12180 // debug statements here
12182 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
12183 export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
12184 if(!isWasmInitialized) {
12185 throw new Error("initializeWasm() must be awaited first!");
12187 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
12188 return nativeResponseValue;
12190 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
12191 export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
12192 if(!isWasmInitialized) {
12193 throw new Error("initializeWasm() must be awaited first!");
12195 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
12196 return nativeResponseValue;
12198 // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
12199 export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
12200 if(!isWasmInitialized) {
12201 throw new Error("initializeWasm() must be awaited first!");
12203 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
12204 // debug statements here
12206 // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
12207 export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
12208 if(!isWasmInitialized) {
12209 throw new Error("initializeWasm() must be awaited first!");
12211 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
12212 return nativeResponseValue;
12214 // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
12215 export function LockedNetworkGraph_graph(this_arg: number): number {
12216 if(!isWasmInitialized) {
12217 throw new Error("initializeWasm() must be awaited first!");
12219 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
12220 return nativeResponseValue;
12222 // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
12223 export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
12224 if(!isWasmInitialized) {
12225 throw new Error("initializeWasm() must be awaited first!");
12227 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
12228 return nativeResponseValue;
12230 // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
12231 export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
12232 if(!isWasmInitialized) {
12233 throw new Error("initializeWasm() must be awaited first!");
12235 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
12236 return nativeResponseValue;
12238 // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
12239 export function DirectionalChannelInfo_free(this_obj: number): void {
12240 if(!isWasmInitialized) {
12241 throw new Error("initializeWasm() must be awaited first!");
12243 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
12244 // debug statements here
12246 // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12247 export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
12248 if(!isWasmInitialized) {
12249 throw new Error("initializeWasm() must be awaited first!");
12251 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
12252 return nativeResponseValue;
12254 // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
12255 export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
12256 if(!isWasmInitialized) {
12257 throw new Error("initializeWasm() must be awaited first!");
12259 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
12260 // debug statements here
12262 // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12263 export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
12264 if(!isWasmInitialized) {
12265 throw new Error("initializeWasm() must be awaited first!");
12267 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
12268 return nativeResponseValue;
12270 // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
12271 export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
12272 if(!isWasmInitialized) {
12273 throw new Error("initializeWasm() must be awaited first!");
12275 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
12276 // debug statements here
12278 // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12279 export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
12280 if(!isWasmInitialized) {
12281 throw new Error("initializeWasm() must be awaited first!");
12283 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
12284 return nativeResponseValue;
12286 // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
12287 export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12288 if(!isWasmInitialized) {
12289 throw new Error("initializeWasm() must be awaited first!");
12291 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
12292 // debug statements here
12294 // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12295 export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
12296 if(!isWasmInitialized) {
12297 throw new Error("initializeWasm() must be awaited first!");
12299 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
12300 return nativeResponseValue;
12302 // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
12303 export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
12304 if(!isWasmInitialized) {
12305 throw new Error("initializeWasm() must be awaited first!");
12307 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
12308 // debug statements here
12310 // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12311 export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
12312 if(!isWasmInitialized) {
12313 throw new Error("initializeWasm() must be awaited first!");
12315 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
12316 return nativeResponseValue;
12318 // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12319 export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
12320 if(!isWasmInitialized) {
12321 throw new Error("initializeWasm() must be awaited first!");
12323 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
12324 // debug statements here
12326 // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12327 export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
12328 if(!isWasmInitialized) {
12329 throw new Error("initializeWasm() must be awaited first!");
12331 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
12332 return nativeResponseValue;
12334 // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12335 export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
12336 if(!isWasmInitialized) {
12337 throw new Error("initializeWasm() must be awaited first!");
12339 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
12340 // debug statements here
12342 // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12343 export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
12344 if(!isWasmInitialized) {
12345 throw new Error("initializeWasm() must be awaited first!");
12347 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
12348 return nativeResponseValue;
12350 // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
12351 export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
12352 if(!isWasmInitialized) {
12353 throw new Error("initializeWasm() must be awaited first!");
12355 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
12356 // debug statements here
12358 // MUST_USE_RES struct LDKDirectionalChannelInfo DirectionalChannelInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
12359 export function DirectionalChannelInfo_new(last_update_arg: number, enabled_arg: boolean, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number, fees_arg: number, last_update_message_arg: number): number {
12360 if(!isWasmInitialized) {
12361 throw new Error("initializeWasm() must be awaited first!");
12363 const nativeResponseValue = wasm.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg, last_update_message_arg);
12364 return nativeResponseValue;
12366 // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
12367 export function DirectionalChannelInfo_clone(orig: number): number {
12368 if(!isWasmInitialized) {
12369 throw new Error("initializeWasm() must be awaited first!");
12371 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
12372 return nativeResponseValue;
12374 // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
12375 export function DirectionalChannelInfo_write(obj: number): Uint8Array {
12376 if(!isWasmInitialized) {
12377 throw new Error("initializeWasm() must be awaited first!");
12379 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
12380 return decodeArray(nativeResponseValue);
12382 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
12383 export function DirectionalChannelInfo_read(ser: Uint8Array): number {
12384 if(!isWasmInitialized) {
12385 throw new Error("initializeWasm() must be awaited first!");
12387 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
12388 return nativeResponseValue;
12390 // void ChannelInfo_free(struct LDKChannelInfo this_obj);
12391 export function ChannelInfo_free(this_obj: number): void {
12392 if(!isWasmInitialized) {
12393 throw new Error("initializeWasm() must be awaited first!");
12395 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
12396 // debug statements here
12398 // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12399 export function ChannelInfo_get_features(this_ptr: number): number {
12400 if(!isWasmInitialized) {
12401 throw new Error("initializeWasm() must be awaited first!");
12403 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
12404 return nativeResponseValue;
12406 // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
12407 export function ChannelInfo_set_features(this_ptr: number, val: number): void {
12408 if(!isWasmInitialized) {
12409 throw new Error("initializeWasm() must be awaited first!");
12411 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
12412 // debug statements here
12414 // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12415 export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
12416 if(!isWasmInitialized) {
12417 throw new Error("initializeWasm() must be awaited first!");
12419 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
12420 return decodeArray(nativeResponseValue);
12422 // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12423 export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
12424 if(!isWasmInitialized) {
12425 throw new Error("initializeWasm() must be awaited first!");
12427 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
12428 // debug statements here
12430 // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12431 export function ChannelInfo_get_one_to_two(this_ptr: number): number {
12432 if(!isWasmInitialized) {
12433 throw new Error("initializeWasm() must be awaited first!");
12435 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
12436 return nativeResponseValue;
12438 // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
12439 export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
12440 if(!isWasmInitialized) {
12441 throw new Error("initializeWasm() must be awaited first!");
12443 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
12444 // debug statements here
12446 // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12447 export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
12448 if(!isWasmInitialized) {
12449 throw new Error("initializeWasm() must be awaited first!");
12451 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
12452 return decodeArray(nativeResponseValue);
12454 // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12455 export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
12456 if(!isWasmInitialized) {
12457 throw new Error("initializeWasm() must be awaited first!");
12459 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
12460 // debug statements here
12462 // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12463 export function ChannelInfo_get_two_to_one(this_ptr: number): number {
12464 if(!isWasmInitialized) {
12465 throw new Error("initializeWasm() must be awaited first!");
12467 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
12468 return nativeResponseValue;
12470 // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
12471 export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
12472 if(!isWasmInitialized) {
12473 throw new Error("initializeWasm() must be awaited first!");
12475 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
12476 // debug statements here
12478 // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12479 export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
12480 if(!isWasmInitialized) {
12481 throw new Error("initializeWasm() must be awaited first!");
12483 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
12484 return nativeResponseValue;
12486 // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12487 export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
12488 if(!isWasmInitialized) {
12489 throw new Error("initializeWasm() must be awaited first!");
12491 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
12492 // debug statements here
12494 // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12495 export function ChannelInfo_get_announcement_message(this_ptr: number): number {
12496 if(!isWasmInitialized) {
12497 throw new Error("initializeWasm() must be awaited first!");
12499 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
12500 return nativeResponseValue;
12502 // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
12503 export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
12504 if(!isWasmInitialized) {
12505 throw new Error("initializeWasm() must be awaited first!");
12507 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
12508 // debug statements here
12510 // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKPublicKey node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKPublicKey node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
12511 export function ChannelInfo_new(features_arg: number, node_one_arg: Uint8Array, one_to_two_arg: number, node_two_arg: Uint8Array, two_to_one_arg: number, capacity_sats_arg: number, announcement_message_arg: number): number {
12512 if(!isWasmInitialized) {
12513 throw new Error("initializeWasm() must be awaited first!");
12515 const nativeResponseValue = wasm.ChannelInfo_new(features_arg, encodeArray(node_one_arg), one_to_two_arg, encodeArray(node_two_arg), two_to_one_arg, capacity_sats_arg, announcement_message_arg);
12516 return nativeResponseValue;
12518 // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
12519 export function ChannelInfo_clone(orig: number): number {
12520 if(!isWasmInitialized) {
12521 throw new Error("initializeWasm() must be awaited first!");
12523 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
12524 return nativeResponseValue;
12526 // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
12527 export function ChannelInfo_write(obj: number): Uint8Array {
12528 if(!isWasmInitialized) {
12529 throw new Error("initializeWasm() must be awaited first!");
12531 const nativeResponseValue = wasm.ChannelInfo_write(obj);
12532 return decodeArray(nativeResponseValue);
12534 // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
12535 export function ChannelInfo_read(ser: Uint8Array): number {
12536 if(!isWasmInitialized) {
12537 throw new Error("initializeWasm() must be awaited first!");
12539 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
12540 return nativeResponseValue;
12542 // void RoutingFees_free(struct LDKRoutingFees this_obj);
12543 export function RoutingFees_free(this_obj: number): void {
12544 if(!isWasmInitialized) {
12545 throw new Error("initializeWasm() must be awaited first!");
12547 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
12548 // debug statements here
12550 // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
12551 export function RoutingFees_get_base_msat(this_ptr: number): number {
12552 if(!isWasmInitialized) {
12553 throw new Error("initializeWasm() must be awaited first!");
12555 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
12556 return nativeResponseValue;
12558 // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
12559 export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
12560 if(!isWasmInitialized) {
12561 throw new Error("initializeWasm() must be awaited first!");
12563 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
12564 // debug statements here
12566 // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
12567 export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
12568 if(!isWasmInitialized) {
12569 throw new Error("initializeWasm() must be awaited first!");
12571 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
12572 return nativeResponseValue;
12574 // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
12575 export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
12576 if(!isWasmInitialized) {
12577 throw new Error("initializeWasm() must be awaited first!");
12579 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
12580 // debug statements here
12582 // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
12583 export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
12584 if(!isWasmInitialized) {
12585 throw new Error("initializeWasm() must be awaited first!");
12587 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
12588 return nativeResponseValue;
12590 // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
12591 export function RoutingFees_clone(orig: number): number {
12592 if(!isWasmInitialized) {
12593 throw new Error("initializeWasm() must be awaited first!");
12595 const nativeResponseValue = wasm.RoutingFees_clone(orig);
12596 return nativeResponseValue;
12598 // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
12599 export function RoutingFees_read(ser: Uint8Array): number {
12600 if(!isWasmInitialized) {
12601 throw new Error("initializeWasm() must be awaited first!");
12603 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
12604 return nativeResponseValue;
12606 // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
12607 export function RoutingFees_write(obj: number): Uint8Array {
12608 if(!isWasmInitialized) {
12609 throw new Error("initializeWasm() must be awaited first!");
12611 const nativeResponseValue = wasm.RoutingFees_write(obj);
12612 return decodeArray(nativeResponseValue);
12614 // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
12615 export function NodeAnnouncementInfo_free(this_obj: number): void {
12616 if(!isWasmInitialized) {
12617 throw new Error("initializeWasm() must be awaited first!");
12619 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
12620 // debug statements here
12622 // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12623 export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
12624 if(!isWasmInitialized) {
12625 throw new Error("initializeWasm() must be awaited first!");
12627 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
12628 return nativeResponseValue;
12630 // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
12631 export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
12632 if(!isWasmInitialized) {
12633 throw new Error("initializeWasm() must be awaited first!");
12635 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
12636 // debug statements here
12638 // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12639 export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
12640 if(!isWasmInitialized) {
12641 throw new Error("initializeWasm() must be awaited first!");
12643 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
12644 return nativeResponseValue;
12646 // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
12647 export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
12648 if(!isWasmInitialized) {
12649 throw new Error("initializeWasm() must be awaited first!");
12651 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
12652 // debug statements here
12654 // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
12655 export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
12656 if(!isWasmInitialized) {
12657 throw new Error("initializeWasm() must be awaited first!");
12659 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
12660 return decodeArray(nativeResponseValue);
12662 // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
12663 export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
12664 if(!isWasmInitialized) {
12665 throw new Error("initializeWasm() must be awaited first!");
12667 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
12668 // debug statements here
12670 // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
12671 export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
12672 if(!isWasmInitialized) {
12673 throw new Error("initializeWasm() must be awaited first!");
12675 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
12676 return decodeArray(nativeResponseValue);
12678 // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12679 export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
12680 if(!isWasmInitialized) {
12681 throw new Error("initializeWasm() must be awaited first!");
12683 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
12684 // debug statements here
12686 // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
12687 export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
12688 if(!isWasmInitialized) {
12689 throw new Error("initializeWasm() must be awaited first!");
12691 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
12692 // debug statements here
12694 // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12695 export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
12696 if(!isWasmInitialized) {
12697 throw new Error("initializeWasm() must be awaited first!");
12699 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
12700 return nativeResponseValue;
12702 // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
12703 export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
12704 if(!isWasmInitialized) {
12705 throw new Error("initializeWasm() must be awaited first!");
12707 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
12708 // debug statements here
12710 // 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);
12711 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 {
12712 if(!isWasmInitialized) {
12713 throw new Error("initializeWasm() must be awaited first!");
12715 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
12716 return nativeResponseValue;
12718 // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
12719 export function NodeAnnouncementInfo_clone(orig: number): number {
12720 if(!isWasmInitialized) {
12721 throw new Error("initializeWasm() must be awaited first!");
12723 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
12724 return nativeResponseValue;
12726 // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
12727 export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
12728 if(!isWasmInitialized) {
12729 throw new Error("initializeWasm() must be awaited first!");
12731 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
12732 return decodeArray(nativeResponseValue);
12734 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
12735 export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
12736 if(!isWasmInitialized) {
12737 throw new Error("initializeWasm() must be awaited first!");
12739 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
12740 return nativeResponseValue;
12742 // void NodeInfo_free(struct LDKNodeInfo this_obj);
12743 export function NodeInfo_free(this_obj: number): void {
12744 if(!isWasmInitialized) {
12745 throw new Error("initializeWasm() must be awaited first!");
12747 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
12748 // debug statements here
12750 // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12751 export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
12752 if(!isWasmInitialized) {
12753 throw new Error("initializeWasm() must be awaited first!");
12755 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
12756 // debug statements here
12758 // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12759 export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
12760 if(!isWasmInitialized) {
12761 throw new Error("initializeWasm() must be awaited first!");
12763 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
12764 return nativeResponseValue;
12766 // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12767 export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
12768 if(!isWasmInitialized) {
12769 throw new Error("initializeWasm() must be awaited first!");
12771 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
12772 // debug statements here
12774 // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12775 export function NodeInfo_get_announcement_info(this_ptr: number): number {
12776 if(!isWasmInitialized) {
12777 throw new Error("initializeWasm() must be awaited first!");
12779 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
12780 return nativeResponseValue;
12782 // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
12783 export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
12784 if(!isWasmInitialized) {
12785 throw new Error("initializeWasm() must be awaited first!");
12787 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
12788 // debug statements here
12790 // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
12791 export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
12792 if(!isWasmInitialized) {
12793 throw new Error("initializeWasm() must be awaited first!");
12795 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
12796 return nativeResponseValue;
12798 // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
12799 export function NodeInfo_clone(orig: number): number {
12800 if(!isWasmInitialized) {
12801 throw new Error("initializeWasm() must be awaited first!");
12803 const nativeResponseValue = wasm.NodeInfo_clone(orig);
12804 return nativeResponseValue;
12806 // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
12807 export function NodeInfo_write(obj: number): Uint8Array {
12808 if(!isWasmInitialized) {
12809 throw new Error("initializeWasm() must be awaited first!");
12811 const nativeResponseValue = wasm.NodeInfo_write(obj);
12812 return decodeArray(nativeResponseValue);
12814 // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
12815 export function NodeInfo_read(ser: Uint8Array): number {
12816 if(!isWasmInitialized) {
12817 throw new Error("initializeWasm() must be awaited first!");
12819 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
12820 return nativeResponseValue;
12822 // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
12823 export function NetworkGraph_write(obj: number): Uint8Array {
12824 if(!isWasmInitialized) {
12825 throw new Error("initializeWasm() must be awaited first!");
12827 const nativeResponseValue = wasm.NetworkGraph_write(obj);
12828 return decodeArray(nativeResponseValue);
12830 // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
12831 export function NetworkGraph_read(ser: Uint8Array): number {
12832 if(!isWasmInitialized) {
12833 throw new Error("initializeWasm() must be awaited first!");
12835 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
12836 return nativeResponseValue;
12838 // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
12839 export function NetworkGraph_new(genesis_hash: Uint8Array): number {
12840 if(!isWasmInitialized) {
12841 throw new Error("initializeWasm() must be awaited first!");
12843 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
12844 return nativeResponseValue;
12846 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
12847 export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
12848 if(!isWasmInitialized) {
12849 throw new Error("initializeWasm() must be awaited first!");
12851 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
12852 return nativeResponseValue;
12854 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
12855 export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
12856 if(!isWasmInitialized) {
12857 throw new Error("initializeWasm() must be awaited first!");
12859 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
12860 return nativeResponseValue;
12862 // 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);
12863 export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
12864 if(!isWasmInitialized) {
12865 throw new Error("initializeWasm() must be awaited first!");
12867 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
12868 return nativeResponseValue;
12870 // 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);
12871 export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
12872 if(!isWasmInitialized) {
12873 throw new Error("initializeWasm() must be awaited first!");
12875 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
12876 return nativeResponseValue;
12878 // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
12879 export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
12880 if(!isWasmInitialized) {
12881 throw new Error("initializeWasm() must be awaited first!");
12883 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
12884 // debug statements here
12886 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
12887 export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
12888 if(!isWasmInitialized) {
12889 throw new Error("initializeWasm() must be awaited first!");
12891 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
12892 return nativeResponseValue;
12894 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
12895 export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
12896 if(!isWasmInitialized) {
12897 throw new Error("initializeWasm() must be awaited first!");
12899 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
12900 return nativeResponseValue;
12902 // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
12903 export function FilesystemPersister_free(this_obj: number): void {
12904 if(!isWasmInitialized) {
12905 throw new Error("initializeWasm() must be awaited first!");
12907 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
12908 // debug statements here
12910 // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKCVec_u8Z path_to_channel_data);
12911 export function FilesystemPersister_new(path_to_channel_data: Uint8Array): number {
12912 if(!isWasmInitialized) {
12913 throw new Error("initializeWasm() must be awaited first!");
12915 const nativeResponseValue = wasm.FilesystemPersister_new(encodeArray(path_to_channel_data));
12916 return nativeResponseValue;
12918 // MUST_USE_RES struct LDKCVec_u8Z FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
12919 export function FilesystemPersister_get_data_dir(this_arg: number): Uint8Array {
12920 if(!isWasmInitialized) {
12921 throw new Error("initializeWasm() must be awaited first!");
12923 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
12924 return decodeArray(nativeResponseValue);
12926 // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKCVec_u8Z data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
12927 export function FilesystemPersister_persist_manager(data_dir: Uint8Array, manager: number): number {
12928 if(!isWasmInitialized) {
12929 throw new Error("initializeWasm() must be awaited first!");
12931 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(encodeArray(data_dir), manager);
12932 return nativeResponseValue;
12934 // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
12935 export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
12936 if(!isWasmInitialized) {
12937 throw new Error("initializeWasm() must be awaited first!");
12939 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
12940 return nativeResponseValue;
12942 // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
12943 export function FilesystemPersister_as_Persist(this_arg: number): number {
12944 if(!isWasmInitialized) {
12945 throw new Error("initializeWasm() must be awaited first!");
12947 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
12948 return nativeResponseValue;
12951 export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
12952 if(isWasmInitialized && !allowDoubleInitialization) {
12955 const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
12956 wasm = wasmInstance.exports;
12957 isWasmInitialized = true;