var getRandomValues: Function;
imports.wasi_snapshot_preview1 = {
- "fd_write": (fd: number, iovec_array_ptr: number, iovec_array_len: number) => {
+ "fd_write": (fd: number, iovec_array_ptr: number, iovec_array_len: number, bytes_written_ptr: number) => {
// This should generally only be used to print panic messages
- console.log("FD_WRITE to " + fd + " in " + iovec_array_len + " chunks.");
const ptr_len_view = new Uint32Array(wasm.memory.buffer, iovec_array_ptr, iovec_array_len * 2);
+ var bytes_written = 0;
for (var i = 0; i < iovec_array_len; i++) {
const bytes_view = new Uint8Array(wasm.memory.buffer, ptr_len_view[i*2], ptr_len_view[i*2+1]);
- console.log(String.fromCharCode(...bytes_view));
+ console.log("[fd " + fd + "]: " + String.fromCharCode(...bytes_view));
+ bytes_written += ptr_len_view[i*2+1];
}
+ const written_view = new Uint32Array(wasm.memory.buffer, bytes_written_ptr, 1);
+ written_view[0] = bytes_written;
return 0;
},
"fd_close": (_fd: number) => {
},
"environ_sizes_get": (environ_var_count_ptr: number, environ_len_ptr: number) => {
// This is called before fd_write to format + print panic messages
- console.log("wasi_snapshot_preview1:environ_sizes_get");
const out_count_view = new Uint32Array(wasm.memory.buffer, environ_var_count_ptr, 1);
out_count_view[0] = 0;
const out_len_view = new Uint32Array(wasm.memory.buffer, environ_len_ptr, 1);
return 0;
},
"environ_get": (environ_ptr: number, environ_buf_ptr: number) => {
- // This is called before fd_write to format + print panic messages
+ // This is called before fd_write to format + print panic messages,
+ // but only if we have variables in environ_sizes_get, so shouldn't ever actually happen!
console.log("wasi_snapshot_preview1:environ_get");
return 58; // Note supported - we said there were 0 environment entries!
},
isWasmInitialized = true;
}
+const fn_list = ["uuuuuu", "buuuuu", "bbbbbb", "ubuuuu", "uubuuu"];
+
/* @internal */
export async function initializeWasmFromUint8Array(wasmBinary: Uint8Array) {
- imports.env["js_invoke_function_u"] = js_invoke;
- imports.env["js_invoke_function_b"] = js_invoke;
+ for (const fn of fn_list) { imports.env["js_invoke_function_" + fn] = js_invoke; }
const { instance: wasmInstance } = await WebAssembly.instantiate(wasmBinary, imports);
await finishInitializeWasm(wasmInstance);
}
/* @internal */
export async function initializeWasmFetch(uri: string) {
+ for (const fn of fn_list) { imports.env["js_invoke_function_" + fn] = js_invoke; }
const stream = fetch(uri);
- imports.env["js_invoke_function_u"] = js_invoke;
- imports.env["js_invoke_function_b"] = js_invoke;
const { instance: wasmInstance } = await WebAssembly.instantiateStreaming(stream, imports);
await finishInitializeWasm(wasmInstance);
}
/* @internal */
export function encodeUint8Array (inputArray: Uint8Array): number {
- const cArrayPointer = wasm.TS_malloc(inputArray.length + 4);
- const arrayLengthView = new Uint32Array(wasm.memory.buffer, cArrayPointer, 1);
- arrayLengthView[0] = inputArray.length;
- const arrayMemoryView = new Uint8Array(wasm.memory.buffer, cArrayPointer + 4, inputArray.length);
+ const cArrayPointer = wasm.TS_malloc(inputArray.length + 8);
+ const arrayLengthView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
+ arrayLengthView[0] = BigInt(inputArray.length);
+ const arrayMemoryView = new Uint8Array(wasm.memory.buffer, cArrayPointer + 8, inputArray.length);
arrayMemoryView.set(inputArray);
return cArrayPointer;
}
/* @internal */
export function encodeUint32Array (inputArray: Uint32Array|Array<number>): number {
- const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 4);
- const arrayMemoryView = new Uint32Array(wasm.memory.buffer, cArrayPointer, inputArray.length);
- arrayMemoryView.set(inputArray, 1);
- arrayMemoryView[0] = inputArray.length;
+ const cArrayPointer = wasm.TS_malloc((inputArray.length + 2) * 4);
+ const arrayLengthView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
+ arrayLengthView[0] = BigInt(inputArray.length);
+ const arrayMemoryView = new Uint32Array(wasm.memory.buffer, cArrayPointer + 8, inputArray.length);
+ arrayMemoryView.set(inputArray);
return cArrayPointer;
}
/* @internal */
export function encodeUint64Array (inputArray: BigUint64Array|Array<bigint>): number {
- const cArrayPointer = wasm.TS_malloc(inputArray.length * 8 + 1);
- const arrayLengthView = new Uint32Array(wasm.memory.buffer, cArrayPointer, 1);
- arrayLengthView[0] = inputArray.length;
- const arrayMemoryView = new BigUint64Array(wasm.memory.buffer, cArrayPointer + 4, inputArray.length);
- arrayMemoryView.set(inputArray);
+ const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 8);
+ const arrayMemoryView = new BigUint64Array(wasm.memory.buffer, cArrayPointer, 1);
+ arrayMemoryView.set(inputArray, 1);
+ arrayMemoryView[0] = BigInt(inputArray.length);
return cArrayPointer;
}
/* @internal */
export function check_arr_len(arr: Uint8Array, len: number): Uint8Array {
- if (arr.length != len) { throw new Error("Expected array of length " + len + "got " + arr.length); }
+ if (arr.length != len) { throw new Error("Expected array of length " + len + " got " + arr.length); }
return arr;
}
/* @internal */
export function getArrayLength(arrayPointer: number): number {
- const arraySizeViewer = new Uint32Array(wasm.memory.buffer, arrayPointer, 1);
- return arraySizeViewer[0];
+ const arraySizeViewer = new BigUint64Array(wasm.memory.buffer, arrayPointer, 1);
+ const len = arraySizeViewer[0];
+ if (len >= (2n ** 32n)) throw new Error("Bogus Array Size");
+ return Number(len % (2n ** 32n));
}
/* @internal */
export function decodeUint8Array (arrayPointer: number, free = true): Uint8Array {
const arraySize = getArrayLength(arrayPointer);
- const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 4, arraySize);
+ const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 8, arraySize);
// Clone the contents, TODO: In the future we should wrap the Viewer in a class that
// will free the underlying memory when it becomes unreachable instead of copying here.
// Note that doing so may have edge-case interactions with memory resizing (invalidating the buffer).
const arraySize = getArrayLength(arrayPointer);
const actualArrayViewer = new Uint32Array(
wasm.memory.buffer, // value
- arrayPointer + 4, // offset (ignoring length bytes)
+ arrayPointer + 8, // offset (ignoring length bytes)
arraySize // uint32 count
);
// Clone the contents, TODO: In the future we should wrap the Viewer in a class that
}
return actualArray;
}
-
+/* @internal */
+export function decodeUint64Array (arrayPointer: number, free = true): bigint[] {
+ const arraySize = getArrayLength(arrayPointer);
+ const actualArrayViewer = new BigUint64Array(
+ wasm.memory.buffer, // value
+ arrayPointer + 8, // offset (ignoring length bytes)
+ arraySize // uint32 count
+ );
+ // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
+ // will free the underlying memory when it becomes unreachable instead of copying here.
+ const actualArray = new Array(arraySize);
+ for (var i = 0; i < arraySize; i++) actualArray[i] = actualArrayViewer[i];
+ if (free) {
+ wasm.TS_free(arrayPointer);
+ }
+ return actualArray;
+}
export function freeWasmMemory(pointer: number) { wasm.TS_free(pointer); }
/* @internal */
export function getU32ArrayElem(arrayPointer: number, idx: number): number {
- const actualArrayViewer = new Uint32Array(wasm.memory.buffer, arrayPointer + 4, idx + 1);
+ const actualArrayViewer = new Uint32Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
return actualArrayViewer[idx];
}
/* @internal */
export function getU8ArrayElem(arrayPointer: number, idx: number): number {
- const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 4, idx + 1);
+ const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 8, idx + 1);
return actualArrayViewer[idx];
}
/* @internal */
export function decodeString(stringPointer: number, free = true): string {
const arraySize = getArrayLength(stringPointer);
- const memoryView = new Uint8Array(wasm.memory.buffer, stringPointer + 4, arraySize);
+ const memoryView = new Uint8Array(wasm.memory.buffer, stringPointer + 8, arraySize);
const result = new TextDecoder("utf-8").decode(memoryView);
if (free) {
/* @internal */ export function getRemainingAllocationCount(): number { return 0; }
/* @internal */ export function debugPrintRemainingAllocs() { }
-/* @internal */
+/**
+ * An error when accessing the chain via [`Access`].
+ */
export enum AccessError {
/**
* The requested chain is unknown.
}
-/* @internal */
+/**
+ * An enum which can either contain a or not
+ */
export enum COption_NoneZ {
/**
* When we're in this state, this COption_NoneZ contains a
}
-/* @internal */
+/**
+ * An error enum representing a failure to persist a channel monitor update.
+ */
export enum ChannelMonitorUpdateErr {
/**
* Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
}
-/* @internal */
+/**
+ * An enum that represents the speed at which we want a transaction to confirm used for feerate
+ * estimation.
+ */
export enum ConfirmationTarget {
/**
* We are happy with this transaction confirming slowly when feerate drops some.
}
-/* @internal */
+/**
+ * Errors that may occur when constructing a new `RawInvoice` or `Invoice`
+ */
export enum CreationError {
/**
* The supplied description string was longer than 639 __bytes__ (see [`Description::new(...)`](./struct.Description.html#method.new))
}
-/* @internal */
+/**
+ * Enum representing the crypto currencies (or networks) supported by this library
+ */
export enum Currency {
/**
* Bitcoin mainnet
}
-/* @internal */
+/**
+ * Represents an IO Error. Note that some information is lost in the conversion from Rust.
+ */
export enum IOError {
LDKIOError_NotFound,
LDKIOError_PermissionDenied,
}
-/* @internal */
+/**
+ * An enum representing the available verbosity levels of the logger.
+ */
export enum Level {
/**
* Designates extremely verbose information, including gossip-induced messages
}
-/* @internal */
+/**
+ * An enum representing the possible Bitcoin or test networks which we can run on
+ */
export enum Network {
/**
* The main Bitcoin blockchain.
}
-/* @internal */
+/**
+ * Specifies the recipient of an invoice, to indicate to [`KeysInterface::sign_invoice`] what node
+ * secret key should be used to sign the invoice.
+ */
export enum Recipient {
/**
* The invoice should be signed with the local node secret key.
}
-/* @internal */
+/**
+ * Represents an error returned from libsecp256k1 during validation of some secp256k1 data
+ */
export enum Secp256k1Error {
/**
* Signature failed verification
}
-/* @internal */
+/**
+ * Errors that may occur when converting a `RawInvoice` to an `Invoice`. They relate to the
+ * requirements sections in BOLT #11
+ */
export enum SemanticError {
/**
* The invoice is missing the mandatory payment hash
}
-/* @internal */
+/**
+ * SI prefixes for the human readable part
+ */
export enum SiPrefix {
/**
* 10^-3
return nativeResponseValue;
}
/* @internal */
+export class LDKHTLCDestination {
+ protected constructor() {}
+}
+/* @internal */
+export function LDKHTLCDestination_ty_from_ptr(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKHTLCDestination_ty_from_ptr(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKHTLCDestination_NextHopChannel_get_node_id(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKHTLCDestination_NextHopChannel_get_node_id(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKHTLCDestination_NextHopChannel_get_channel_id(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKHTLCDestination_NextHopChannel_get_channel_id(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKHTLCDestination_UnknownNextHop_get_requested_forward_scid(ptr: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKHTLCDestination_UnknownNextHop_get_requested_forward_scid(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKHTLCDestination_FailedPayment_get_payment_hash(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKHTLCDestination_FailedPayment_get_payment_hash(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export class LDKCOption_HTLCDestinationZ {
+ protected constructor() {}
+}
+/* @internal */
+export function LDKCOption_HTLCDestinationZ_ty_from_ptr(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKCOption_HTLCDestinationZ_ty_from_ptr(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKCOption_HTLCDestinationZ_Some_get_some(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKCOption_HTLCDestinationZ_Some_get_some(ptr);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_HTLCDestinationZ CResult_COption_HTLCDestinationZDecodeErrorZ_get_ok(LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_COption_HTLCDestinationZDecodeErrorZ_get_ok(owner: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_HTLCDestinationZDecodeErrorZ_get_ok(owner);
+ return nativeResponseValue;
+}
+ // struct LDKDecodeError CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_HTLCDestinationZDecodeErrorZ_get_err(owner);
+ return nativeResponseValue;
+}
+/* @internal */
export class LDKNetworkUpdate {
protected constructor() {}
}
return nativeResponseValue;
}
/* @internal */
+export function LDKEvent_ProbeSuccessful_get_payment_id(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEvent_ProbeSuccessful_get_payment_id(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKEvent_ProbeSuccessful_get_payment_hash(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEvent_ProbeSuccessful_get_payment_hash(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKEvent_ProbeSuccessful_get_path(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEvent_ProbeSuccessful_get_path(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKEvent_ProbeFailed_get_payment_id(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEvent_ProbeFailed_get_payment_id(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKEvent_ProbeFailed_get_payment_hash(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEvent_ProbeFailed_get_payment_hash(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKEvent_ProbeFailed_get_path(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEvent_ProbeFailed_get_path(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKEvent_ProbeFailed_get_short_channel_id(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEvent_ProbeFailed_get_short_channel_id(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
export function LDKEvent_PendingHTLCsForwardable_get_time_forwardable(ptr: number): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
return nativeResponseValue;
}
/* @internal */
+export function LDKEvent_HTLCHandlingFailed_get_prev_channel_id(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEvent_HTLCHandlingFailed_get_prev_channel_id(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKEvent_HTLCHandlingFailed_get_failed_next_destination(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEvent_HTLCHandlingFailed_get_failed_next_destination(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
export class LDKCOption_EventZ {
protected constructor() {}
}
const nativeResponseValue = wasm.TS_LDKMonitorEvent_UpdateFailed_get_update_failed(ptr);
return nativeResponseValue;
}
- // struct LDKOutPoint C2Tuple_OutPointCVec_MonitorEventZZ_get_a(LDKC2Tuple_OutPointCVec_MonitorEventZZ *NONNULL_PTR owner);
+ // struct LDKOutPoint C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
/* @internal */
-export function C2Tuple_OutPointCVec_MonitorEventZZ_get_a(owner: number): number {
+export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_C2Tuple_OutPointCVec_MonitorEventZZ_get_a(owner);
+ const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_a(owner);
return nativeResponseValue;
}
- // struct LDKCVec_MonitorEventZ C2Tuple_OutPointCVec_MonitorEventZZ_get_b(LDKC2Tuple_OutPointCVec_MonitorEventZZ *NONNULL_PTR owner);
+ // struct LDKCVec_MonitorEventZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
/* @internal */
-export function C2Tuple_OutPointCVec_MonitorEventZZ_get_b(owner: number): number {
+export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_C2Tuple_OutPointCVec_MonitorEventZZ_get_b(owner);
+ const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_b(owner);
+ return nativeResponseValue;
+}
+ // struct LDKPublicKey C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR owner);
+/* @internal */
+export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_get_c(owner);
return nativeResponseValue;
}
/* @internal */
}
const nativeResponseValue = wasm.TS_LDKNetAddress_OnionV3_get_port(ptr);
return nativeResponseValue;
+}
+/* @internal */
+export function LDKNetAddress_Hostname_get_hostname(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKNetAddress_Hostname_get_hostname(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKNetAddress_Hostname_get_port(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKNetAddress_Hostname_get_port(ptr);
+ return nativeResponseValue;
}
// struct LDKNodeAnnouncementInfo CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner);
/* @internal */
const nativeResponseValue = wasm.TS_Watch_update_channel(this_arg, funding_txo, update);
return nativeResponseValue;
}
- // LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
+ // LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
/* @internal */
export function Watch_release_pending_monitor_events(this_arg: number): number {
if(!isWasmInitialized) {
channel_penalty_msat (short_channel_id: bigint, source: number, target: number, usage: number): bigint;
payment_path_failed (path: number, short_channel_id: bigint): void;
payment_path_successful (path: number): void;
+ probe_failed (path: number, short_channel_id: bigint): void;
+ probe_successful (path: number): void;
write (): number;
}
}
const nativeResponseValue = wasm.TS_Score_payment_path_successful(this_arg, path);
// debug statements here
+}
+ // void Score_probe_failed LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id
+/* @internal */
+export function Score_probe_failed(this_arg: number, path: number, short_channel_id: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Score_probe_failed(this_arg, path, short_channel_id);
+ // debug statements here
+}
+ // void Score_probe_successful LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path
+/* @internal */
+export function Score_probe_successful(this_arg: number, path: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Score_probe_successful(this_arg, path);
+ // debug statements here
}
// LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
/* @internal */
}
const nativeResponseValue = wasm.TS_COption_u64Z_clone(orig);
return nativeResponseValue;
+}
+ // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
+/* @internal */
+export function CVec_u64Z_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CVec_u64Z_free(_res);
+ // debug statements here
}
// struct LDKCResult_PaymentParametersDecodeErrorZ CResult_PaymentParametersDecodeErrorZ_ok(struct LDKPaymentParameters o);
/* @internal */
}
const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig);
return nativeResponseValue;
+}
+ // struct LDKCOption_HTLCDestinationZ COption_HTLCDestinationZ_some(struct LDKHTLCDestination o);
+/* @internal */
+export function COption_HTLCDestinationZ_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_HTLCDestinationZ_some(o);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_HTLCDestinationZ COption_HTLCDestinationZ_none(void);
+/* @internal */
+export function COption_HTLCDestinationZ_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_HTLCDestinationZ_none();
+ return nativeResponseValue;
+}
+ // void COption_HTLCDestinationZ_free(struct LDKCOption_HTLCDestinationZ _res);
+/* @internal */
+export function COption_HTLCDestinationZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_HTLCDestinationZ_free(_res);
+ // debug statements here
+}
+ // uintptr_t COption_HTLCDestinationZ_clone_ptr(LDKCOption_HTLCDestinationZ *NONNULL_PTR arg);
+/* @internal */
+export function COption_HTLCDestinationZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_HTLCDestinationZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_HTLCDestinationZ COption_HTLCDestinationZ_clone(const struct LDKCOption_HTLCDestinationZ *NONNULL_PTR orig);
+/* @internal */
+export function COption_HTLCDestinationZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_HTLCDestinationZ_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ CResult_COption_HTLCDestinationZDecodeErrorZ_ok(struct LDKCOption_HTLCDestinationZ o);
+/* @internal */
+export function CResult_COption_HTLCDestinationZDecodeErrorZ_ok(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_HTLCDestinationZDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ CResult_COption_HTLCDestinationZDecodeErrorZ_err(struct LDKDecodeError e);
+/* @internal */
+export function CResult_COption_HTLCDestinationZDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_HTLCDestinationZDecodeErrorZ_err(e);
+ return nativeResponseValue;
+}
+ // bool CResult_COption_HTLCDestinationZDecodeErrorZ_is_ok(const struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_COption_HTLCDestinationZDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_HTLCDestinationZDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_COption_HTLCDestinationZDecodeErrorZ_free(struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ _res);
+/* @internal */
+export function CResult_COption_HTLCDestinationZDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_HTLCDestinationZDecodeErrorZ_free(_res);
+ // debug statements here
+}
+ // uintptr_t CResult_COption_HTLCDestinationZDecodeErrorZ_clone_ptr(LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_COption_HTLCDestinationZDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_HTLCDestinationZDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ CResult_COption_HTLCDestinationZDecodeErrorZ_clone(const struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_COption_HTLCDestinationZDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_COption_HTLCDestinationZDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
}
// struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
/* @internal */
const nativeResponseValue = wasm.TS_CVec_MonitorEventZ_free(_res);
// debug statements here
}
- // uintptr_t C2Tuple_OutPointCVec_MonitorEventZZ_clone_ptr(LDKC2Tuple_OutPointCVec_MonitorEventZZ *NONNULL_PTR arg);
+ // uintptr_t C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR arg);
/* @internal */
-export function C2Tuple_OutPointCVec_MonitorEventZZ_clone_ptr(arg: number): number {
+export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_C2Tuple_OutPointCVec_MonitorEventZZ_clone_ptr(arg);
+ const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone_ptr(arg);
return nativeResponseValue;
}
- // struct LDKC2Tuple_OutPointCVec_MonitorEventZZ C2Tuple_OutPointCVec_MonitorEventZZ_clone(const struct LDKC2Tuple_OutPointCVec_MonitorEventZZ *NONNULL_PTR orig);
+ // struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig);
/* @internal */
-export function C2Tuple_OutPointCVec_MonitorEventZZ_clone(orig: number): number {
+export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_C2Tuple_OutPointCVec_MonitorEventZZ_clone(orig);
+ const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(orig);
return nativeResponseValue;
}
- // struct LDKC2Tuple_OutPointCVec_MonitorEventZZ C2Tuple_OutPointCVec_MonitorEventZZ_new(struct LDKOutPoint a, struct LDKCVec_MonitorEventZ b);
+ // struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKCVec_MonitorEventZ b, struct LDKPublicKey c);
/* @internal */
-export function C2Tuple_OutPointCVec_MonitorEventZZ_new(a: number, b: number): number {
+export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a: number, b: number, c: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_C2Tuple_OutPointCVec_MonitorEventZZ_new(a, b);
+ const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(a, b, c);
return nativeResponseValue;
}
- // void C2Tuple_OutPointCVec_MonitorEventZZ_free(struct LDKC2Tuple_OutPointCVec_MonitorEventZZ _res);
+ // void C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res);
/* @internal */
-export function C2Tuple_OutPointCVec_MonitorEventZZ_free(_res: number): void {
+export function C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_C2Tuple_OutPointCVec_MonitorEventZZ_free(_res);
+ const nativeResponseValue = wasm.TS_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(_res);
// debug statements here
}
- // void CVec_C2Tuple_OutPointCVec_MonitorEventZZZ_free(struct LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ _res);
+ // void CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res);
/* @internal */
-export function CVec_C2Tuple_OutPointCVec_MonitorEventZZZ_free(_res: number): void {
+export function CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_CVec_C2Tuple_OutPointCVec_MonitorEventZZZ_free(_res);
+ const nativeResponseValue = wasm.TS_CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(_res);
// debug statements here
}
// struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
}
const nativeResponseValue = wasm.TS_CResult_NodeAliasDecodeErrorZ_clone(orig);
return nativeResponseValue;
-}
- // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
-/* @internal */
-export function CVec_u64Z_free(_res: number): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_CVec_u64Z_free(_res);
- // debug statements here
}
// struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
/* @internal */
}
const nativeResponseValue = wasm.TS_ClosureReason_read(ser);
return nativeResponseValue;
+}
+ // void HTLCDestination_free(struct LDKHTLCDestination this_ptr);
+/* @internal */
+export function HTLCDestination_free(this_ptr: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_free(this_ptr);
+ // debug statements here
+}
+ // uintptr_t HTLCDestination_clone_ptr(LDKHTLCDestination *NONNULL_PTR arg);
+/* @internal */
+export function HTLCDestination_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKHTLCDestination HTLCDestination_clone(const struct LDKHTLCDestination *NONNULL_PTR orig);
+/* @internal */
+export function HTLCDestination_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKThirtyTwoBytes channel_id);
+/* @internal */
+export function HTLCDestination_next_hop_channel(node_id: number, channel_id: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_next_hop_channel(node_id, channel_id);
+ return nativeResponseValue;
+}
+ // struct LDKHTLCDestination HTLCDestination_unknown_next_hop(uint64_t requested_forward_scid);
+/* @internal */
+export function HTLCDestination_unknown_next_hop(requested_forward_scid: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_unknown_next_hop(requested_forward_scid);
+ return nativeResponseValue;
+}
+ // struct LDKHTLCDestination HTLCDestination_failed_payment(struct LDKThirtyTwoBytes payment_hash);
+/* @internal */
+export function HTLCDestination_failed_payment(payment_hash: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_failed_payment(payment_hash);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z HTLCDestination_write(const struct LDKHTLCDestination *NONNULL_PTR obj);
+/* @internal */
+export function HTLCDestination_write(obj: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ HTLCDestination_read(struct LDKu8slice ser);
+/* @internal */
+export function HTLCDestination_read(ser: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_read(ser);
+ return nativeResponseValue;
}
// void Event_free(struct LDKEvent this_ptr);
/* @internal */
}
const nativeResponseValue = wasm.TS_Event_payment_path_failed(payment_id, payment_hash, rejected_by_dest, network_update, all_paths_failed, path, short_channel_id, retry);
return nativeResponseValue;
+}
+ // struct LDKEvent Event_probe_successful(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKCVec_RouteHopZ path);
+/* @internal */
+export function Event_probe_successful(payment_id: number, payment_hash: number, path: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_probe_successful(payment_id, payment_hash, path);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_probe_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKCVec_RouteHopZ path, struct LDKCOption_u64Z short_channel_id);
+/* @internal */
+export function Event_probe_failed(payment_id: number, payment_hash: number, path: number, short_channel_id: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_probe_failed(payment_id, payment_hash, path, short_channel_id);
+ return nativeResponseValue;
}
// struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
/* @internal */
}
const nativeResponseValue = wasm.TS_Event_open_channel_request(temporary_channel_id, counterparty_node_id, funding_satoshis, push_msat, channel_type);
return nativeResponseValue;
+}
+ // struct LDKEvent Event_htlchandling_failed(struct LDKThirtyTwoBytes prev_channel_id, struct LDKHTLCDestination failed_next_destination);
+/* @internal */
+export function Event_htlchandling_failed(prev_channel_id: number, failed_next_destination: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_htlchandling_failed(prev_channel_id, failed_next_destination);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_BigSize_new(a_arg);
return nativeResponseValue;
+}
+ // void Hostname_free(struct LDKHostname this_obj);
+/* @internal */
+export function Hostname_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Hostname_free(this_obj);
+ // debug statements here
+}
+ // uintptr_t Hostname_clone_ptr(LDKHostname *NONNULL_PTR arg);
+/* @internal */
+export function Hostname_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Hostname_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKHostname Hostname_clone(const struct LDKHostname *NONNULL_PTR orig);
+/* @internal */
+export function Hostname_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Hostname_clone(orig);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint8_t Hostname_len(const struct LDKHostname *NONNULL_PTR this_arg);
+/* @internal */
+export function Hostname_len(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Hostname_len(this_arg);
+ return nativeResponseValue;
}
// struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
/* @internal */
const nativeResponseValue = wasm.TS_ChannelMonitor_write(obj);
return nativeResponseValue;
}
- // MUST_USE_RES struct LDKCResult_NoneNoneZ 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);
+ // MUST_USE_RES struct LDKCResult_NoneNoneZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
/* @internal */
export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
if(!isWasmInitialized) {
}
const nativeResponseValue = wasm.TS_ChannelMonitor_get_and_clear_pending_events(this_arg);
return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKPublicKey ChannelMonitor_get_counterparty_node_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
+/* @internal */
+export function ChannelMonitor_get_counterparty_node_id(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMonitor_get_counterparty_node_id(this_arg);
+ return nativeResponseValue;
}
// 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);
/* @internal */
}
const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
// debug statements here
+}
+ // struct LDKTxOut DelayedPaymentOutputDescriptor_get_output(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+/* @internal */
+export function DelayedPaymentOutputDescriptor_get_output(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_output(this_ptr);
+ return nativeResponseValue;
}
// void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
/* @internal */
}
const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
// debug statements here
+}
+ // struct LDKTxOut StaticPaymentOutputDescriptor_get_output(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+/* @internal */
+export function StaticPaymentOutputDescriptor_get_output(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_output(this_ptr);
+ return nativeResponseValue;
}
// void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
/* @internal */
}
const nativeResponseValue = wasm.TS_ChannelManager_send_spontaneous_payment(this_arg, route, payment_preimage);
return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ ChannelManager_send_probe(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ hops);
+/* @internal */
+export function ChannelManager_send_probe(this_arg: number, hops: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelManager_send_probe(this_arg, hops);
+ return nativeResponseValue;
}
// 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 LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction);
/* @internal */
}
const nativeResponseValue = wasm.TS_CommitmentSigned_set_signature(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_SignatureZ CommitmentSigned_get_htlc_signatures(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
+/* @internal */
+export function CommitmentSigned_get_htlc_signatures(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CommitmentSigned_get_htlc_signatures(this_ptr);
+ return nativeResponseValue;
}
// void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
/* @internal */
}
const nativeResponseValue = wasm.TS_NetAddress_onion_v3(ed25519_pubkey, checksum, version, port);
return nativeResponseValue;
+}
+ // struct LDKNetAddress NetAddress_hostname(struct LDKHostname hostname, uint16_t port);
+/* @internal */
+export function NetAddress_hostname(hostname: number, port: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NetAddress_hostname(hostname, port);
+ return nativeResponseValue;
}
// struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
/* @internal */
}
const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_alias(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_NetAddressZ UnsignedNodeAnnouncement_get_addresses(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
+/* @internal */
+export function UnsignedNodeAnnouncement_get_addresses(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_addresses(this_ptr);
+ return nativeResponseValue;
}
// void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
/* @internal */
}
const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
// debug statements here
+}
+ // uint64_t UnsignedChannelUpdate_get_htlc_maximum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
+/* @internal */
+export function UnsignedChannelUpdate_get_htlc_maximum_msat(this_ptr: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_htlc_maximum_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void UnsignedChannelUpdate_set_htlc_maximum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function UnsignedChannelUpdate_set_htlc_maximum_msat(this_ptr: number, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_htlc_maximum_msat(this_ptr, val);
+ // debug statements here
}
// uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
/* @internal */
}
const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_u8Z UnsignedChannelUpdate_get_excess_data(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
+/* @internal */
+export function UnsignedChannelUpdate_get_excess_data(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_excess_data(this_ptr);
+ return nativeResponseValue;
}
// void UnsignedChannelUpdate_set_excess_data(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
/* @internal */
}
const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_excess_data(this_ptr, val);
// debug statements here
+}
+ // MUST_USE_RES struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_new(struct LDKThirtyTwoBytes chain_hash_arg, uint64_t short_channel_id_arg, uint32_t timestamp_arg, uint8_t flags_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, uint64_t htlc_maximum_msat_arg, uint32_t fee_base_msat_arg, uint32_t fee_proportional_millionths_arg, struct LDKCVec_u8Z excess_data_arg);
+/* @internal */
+export function UnsignedChannelUpdate_new(chain_hash_arg: number, short_channel_id_arg: bigint, timestamp_arg: number, flags_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: bigint, htlc_maximum_msat_arg: bigint, fee_base_msat_arg: number, fee_proportional_millionths_arg: number, excess_data_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_new(chain_hash_arg, short_channel_id_arg, timestamp_arg, flags_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fee_base_msat_arg, fee_proportional_millionths_arg, excess_data_arg);
+ return nativeResponseValue;
}
// uintptr_t UnsignedChannelUpdate_clone_ptr(LDKUnsignedChannelUpdate *NONNULL_PTR arg);
/* @internal */
}
const nativeResponseValue = wasm.TS_ReplyChannelRange_set_sync_complete(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_u64Z ReplyChannelRange_get_short_channel_ids(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
+/* @internal */
+export function ReplyChannelRange_get_short_channel_ids(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReplyChannelRange_get_short_channel_ids(this_ptr);
+ return nativeResponseValue;
}
// void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
/* @internal */
}
const nativeResponseValue = wasm.TS_QueryShortChannelIds_set_chain_hash(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_u64Z QueryShortChannelIds_get_short_channel_ids(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr);
+/* @internal */
+export function QueryShortChannelIds_get_short_channel_ids(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_QueryShortChannelIds_get_short_channel_ids(this_ptr);
+ return nativeResponseValue;
}
// void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
/* @internal */
}
const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_set_counterparty_sig(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_SignatureZ HolderCommitmentTransaction_get_counterparty_htlc_sigs(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
+/* @internal */
+export function HolderCommitmentTransaction_get_counterparty_htlc_sigs(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_get_counterparty_htlc_sigs(this_ptr);
+ return nativeResponseValue;
}
// void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
/* @internal */
const nativeResponseValue = wasm.TS_ChannelUpdateInfo_set_htlc_minimum_msat(this_ptr, val);
// debug statements here
}
- // struct LDKCOption_u64Z ChannelUpdateInfo_get_htlc_maximum_msat(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+ // uint64_t ChannelUpdateInfo_get_htlc_maximum_msat(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
/* @internal */
-export function ChannelUpdateInfo_get_htlc_maximum_msat(this_ptr: number): number {
+export function ChannelUpdateInfo_get_htlc_maximum_msat(this_ptr: number): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
const nativeResponseValue = wasm.TS_ChannelUpdateInfo_get_htlc_maximum_msat(this_ptr);
return nativeResponseValue;
}
- // void ChannelUpdateInfo_set_htlc_maximum_msat(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ // void ChannelUpdateInfo_set_htlc_maximum_msat(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint64_t val);
/* @internal */
-export function ChannelUpdateInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
+export function ChannelUpdateInfo_set_htlc_maximum_msat(this_ptr: number, val: bigint): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
const nativeResponseValue = wasm.TS_ChannelUpdateInfo_set_last_update_message(this_ptr, val);
// debug statements here
}
- // MUST_USE_RES struct LDKChannelUpdateInfo ChannelUpdateInfo_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);
+ // MUST_USE_RES struct LDKChannelUpdateInfo ChannelUpdateInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, uint64_t htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
/* @internal */
-export function ChannelUpdateInfo_new(last_update_arg: number, enabled_arg: boolean, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: bigint, htlc_maximum_msat_arg: number, fees_arg: number, last_update_message_arg: number): number {
+export function ChannelUpdateInfo_new(last_update_arg: number, enabled_arg: boolean, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: bigint, htlc_maximum_msat_arg: bigint, fees_arg: number, last_update_message_arg: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
}
const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_alias(this_ptr, val);
// debug statements here
+}
+ // struct LDKCVec_NetAddressZ NodeAnnouncementInfo_get_addresses(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+/* @internal */
+export function NodeAnnouncementInfo_get_addresses(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_addresses(this_ptr);
+ return nativeResponseValue;
}
// void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
/* @internal */
}
const nativeResponseValue = wasm.TS_NodeInfo_free(this_obj);
// debug statements here
+}
+ // struct LDKCVec_u64Z NodeInfo_get_channels(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
+/* @internal */
+export function NodeInfo_get_channels(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeInfo_get_channels(this_ptr);
+ return nativeResponseValue;
}
// void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
/* @internal */
}
const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_unsigned(this_arg, msg);
return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKChannelInfo ReadOnlyNetworkGraph_channel(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id);
+/* @internal */
+export function ReadOnlyNetworkGraph_channel(this_arg: number, short_channel_id: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_channel(this_arg, short_channel_id);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCVec_u64Z ReadOnlyNetworkGraph_list_channels(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg);
+/* @internal */
+export function ReadOnlyNetworkGraph_list_channels(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_list_channels(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKNodeInfo ReadOnlyNetworkGraph_node(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+/* @internal */
+export function ReadOnlyNetworkGraph_node(this_arg: number, node_id: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_node(this_arg, node_id);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCVec_NodeIdZ ReadOnlyNetworkGraph_list_nodes(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg);
+/* @internal */
+export function ReadOnlyNetworkGraph_list_nodes(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_list_nodes(this_arg);
+ return nativeResponseValue;
}
// MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
/* @internal */
const nativeResponseValue = wasm.TS_PaymentParameters_set_max_total_cltv_expiry_delta(this_ptr, val);
// debug statements here
}
- // uint8_t PaymentParameters_get_max_mpp_path_count(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+ // uint8_t PaymentParameters_get_max_path_count(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function PaymentParameters_get_max_path_count(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentParameters_get_max_path_count(this_ptr);
+ return nativeResponseValue;
+}
+ // void PaymentParameters_set_max_path_count(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint8_t val);
+/* @internal */
+export function PaymentParameters_set_max_path_count(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentParameters_set_max_path_count(this_ptr, val);
+ // debug statements here
+}
+ // uint8_t PaymentParameters_get_max_channel_saturation_power_of_half(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
/* @internal */
-export function PaymentParameters_get_max_mpp_path_count(this_ptr: number): number {
+export function PaymentParameters_get_max_channel_saturation_power_of_half(this_ptr: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_PaymentParameters_get_max_mpp_path_count(this_ptr);
+ const nativeResponseValue = wasm.TS_PaymentParameters_get_max_channel_saturation_power_of_half(this_ptr);
return nativeResponseValue;
}
- // void PaymentParameters_set_max_mpp_path_count(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint8_t val);
+ // void PaymentParameters_set_max_channel_saturation_power_of_half(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint8_t val);
/* @internal */
-export function PaymentParameters_set_max_mpp_path_count(this_ptr: number, val: number): void {
+export function PaymentParameters_set_max_channel_saturation_power_of_half(this_ptr: number, val: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_PaymentParameters_set_max_mpp_path_count(this_ptr, val);
+ const nativeResponseValue = wasm.TS_PaymentParameters_set_max_channel_saturation_power_of_half(this_ptr, val);
// debug statements here
}
- // MUST_USE_RES struct LDKPaymentParameters PaymentParameters_new(struct LDKPublicKey payee_pubkey_arg, struct LDKInvoiceFeatures features_arg, struct LDKCVec_RouteHintZ route_hints_arg, struct LDKCOption_u64Z expiry_time_arg, uint32_t max_total_cltv_expiry_delta_arg, uint8_t max_mpp_path_count_arg);
+ // struct LDKCVec_u64Z PaymentParameters_get_previously_failed_channels(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
/* @internal */
-export function PaymentParameters_new(payee_pubkey_arg: number, features_arg: number, route_hints_arg: number, expiry_time_arg: number, max_total_cltv_expiry_delta_arg: number, max_mpp_path_count_arg: number): number {
+export function PaymentParameters_get_previously_failed_channels(this_ptr: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_PaymentParameters_new(payee_pubkey_arg, features_arg, route_hints_arg, expiry_time_arg, max_total_cltv_expiry_delta_arg, max_mpp_path_count_arg);
+ const nativeResponseValue = wasm.TS_PaymentParameters_get_previously_failed_channels(this_ptr);
+ return nativeResponseValue;
+}
+ // void PaymentParameters_set_previously_failed_channels(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
+/* @internal */
+export function PaymentParameters_set_previously_failed_channels(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentParameters_set_previously_failed_channels(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKPaymentParameters PaymentParameters_new(struct LDKPublicKey payee_pubkey_arg, struct LDKInvoiceFeatures features_arg, struct LDKCVec_RouteHintZ route_hints_arg, struct LDKCOption_u64Z expiry_time_arg, uint32_t max_total_cltv_expiry_delta_arg, uint8_t max_path_count_arg, uint8_t max_channel_saturation_power_of_half_arg, struct LDKCVec_u64Z previously_failed_channels_arg);
+/* @internal */
+export function PaymentParameters_new(payee_pubkey_arg: number, features_arg: number, route_hints_arg: number, expiry_time_arg: number, max_total_cltv_expiry_delta_arg: number, max_path_count_arg: number, max_channel_saturation_power_of_half_arg: number, previously_failed_channels_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentParameters_new(payee_pubkey_arg, features_arg, route_hints_arg, expiry_time_arg, max_total_cltv_expiry_delta_arg, max_path_count_arg, max_channel_saturation_power_of_half_arg, previously_failed_channels_arg);
return nativeResponseValue;
}
// uintptr_t PaymentParameters_clone_ptr(LDKPaymentParameters *NONNULL_PTR arg);
}
const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_base_penalty_msat(this_ptr, val);
// debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_base_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_base_penalty_amount_multiplier_msat(this_ptr: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_base_penalty_amount_multiplier_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_base_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_base_penalty_amount_multiplier_msat(this_ptr: number, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_base_penalty_amount_multiplier_msat(this_ptr, val);
+ // debug statements here
}
// uint64_t ProbabilisticScoringParameters_get_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
/* @internal */
const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_liquidity_offset_half_life(this_ptr, val);
// debug statements here
}
- // uint64_t ProbabilisticScoringParameters_get_amount_penalty_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+ // uint64_t ProbabilisticScoringParameters_get_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
/* @internal */
-export function ProbabilisticScoringParameters_get_amount_penalty_multiplier_msat(this_ptr: number): bigint {
+export function ProbabilisticScoringParameters_get_liquidity_penalty_amount_multiplier_msat(this_ptr: number): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_amount_penalty_multiplier_msat(this_ptr);
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_liquidity_penalty_amount_multiplier_msat(this_ptr);
return nativeResponseValue;
}
- // void ProbabilisticScoringParameters_set_amount_penalty_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+ // void ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
/* @internal */
-export function ProbabilisticScoringParameters_set_amount_penalty_multiplier_msat(this_ptr: number, val: bigint): void {
+export function ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(this_ptr: number, val: bigint): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_amount_penalty_multiplier_msat(this_ptr, val);
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(this_ptr, val);
// debug statements here
}
// uint64_t ProbabilisticScoringParameters_get_anti_probing_penalty_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
}
const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_anti_probing_penalty_msat(this_ptr, val);
// debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_considered_impossible_penalty_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_considered_impossible_penalty_msat(this_ptr: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_considered_impossible_penalty_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_considered_impossible_penalty_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_considered_impossible_penalty_msat(this_ptr: number, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_considered_impossible_penalty_msat(this_ptr, val);
+ // debug statements here
}
// uintptr_t ProbabilisticScoringParameters_clone_ptr(LDKProbabilisticScoringParameters *NONNULL_PTR arg);
/* @internal */
const nativeResponseValue = wasm.TS_ProbabilisticScorer_remove_banned(this_arg, node_id);
// debug statements here
}
- // void ProbabilisticScorer_clear_banned(struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
+ // void ProbabilisticScorer_set_manual_penalty(struct LDKProbabilisticScorer *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id, uint64_t penalty);
+/* @internal */
+export function ProbabilisticScorer_set_manual_penalty(this_arg: number, node_id: number, penalty: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_set_manual_penalty(this_arg, node_id, penalty);
+ // debug statements here
+}
+ // void ProbabilisticScorer_remove_manual_penalty(struct LDKProbabilisticScorer *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+/* @internal */
+export function ProbabilisticScorer_remove_manual_penalty(this_arg: number, node_id: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_remove_manual_penalty(this_arg, node_id);
+ // debug statements here
+}
+ // void ProbabilisticScorer_clear_manual_penalties(struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
/* @internal */
-export function ProbabilisticScorer_clear_banned(this_arg: number): void {
+export function ProbabilisticScorer_clear_manual_penalties(this_arg: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_ProbabilisticScorer_clear_banned(this_arg);
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_clear_manual_penalties(this_arg);
// debug statements here
}
// void ProbabilisticScoringParameters_add_banned_from_list(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_arg, struct LDKCVec_NodeIdZ node_ids);
case 37: fn = Object.getOwnPropertyDescriptor(obj, "channel_penalty_msat"); break;
case 38: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_failed"); break;
case 39: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_successful"); break;
- case 40: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
- case 41: fn = Object.getOwnPropertyDescriptor(obj, "persist_manager"); break;
- case 42: fn = Object.getOwnPropertyDescriptor(obj, "persist_graph"); break;
- case 43: fn = Object.getOwnPropertyDescriptor(obj, "persist_scorer"); break;
- case 44: fn = Object.getOwnPropertyDescriptor(obj, "filtered_block_connected"); break;
- case 45: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break;
- case 46: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break;
- case 47: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break;
- case 48: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break;
- case 49: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break;
- case 50: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); break;
- case 51: fn = Object.getOwnPropertyDescriptor(obj, "persist_new_channel"); break;
- case 52: fn = Object.getOwnPropertyDescriptor(obj, "update_persisted_channel"); break;
- case 53: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel"); break;
- case 54: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break;
- case 55: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break;
- case 56: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break;
- case 57: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_ready"); break;
- case 58: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break;
- case 59: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break;
- case 60: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_add_htlc"); break;
- case 61: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fulfill_htlc"); break;
- case 62: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_htlc"); break;
- case 63: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_malformed_htlc"); break;
- case 64: fn = Object.getOwnPropertyDescriptor(obj, "handle_commitment_signed"); break;
- case 65: fn = Object.getOwnPropertyDescriptor(obj, "handle_revoke_and_ack"); break;
- case 66: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fee"); break;
- case 67: fn = Object.getOwnPropertyDescriptor(obj, "handle_announcement_signatures"); break;
- case 68: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
- case 69: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
- case 70: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_reestablish"); break;
- case 71: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
- case 72: fn = Object.getOwnPropertyDescriptor(obj, "handle_error"); break;
- case 73: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break;
- case 74: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break;
- case 75: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
- case 76: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcements"); break;
- case 77: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcements"); break;
- case 78: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
- case 79: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break;
- case 80: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break;
- case 81: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break;
- case 82: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break;
- case 83: fn = Object.getOwnPropertyDescriptor(obj, "read"); break;
- case 84: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
- case 85: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break;
- case 86: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break;
- case 87: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break;
- case 88: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break;
- case 89: fn = Object.getOwnPropertyDescriptor(obj, "hash"); break;
- case 90: fn = Object.getOwnPropertyDescriptor(obj, "lock"); break;
- case 91: fn = Object.getOwnPropertyDescriptor(obj, "node_id"); break;
- case 92: fn = Object.getOwnPropertyDescriptor(obj, "first_hops"); break;
- case 93: fn = Object.getOwnPropertyDescriptor(obj, "send_payment"); break;
- case 94: fn = Object.getOwnPropertyDescriptor(obj, "send_spontaneous_payment"); break;
- case 95: fn = Object.getOwnPropertyDescriptor(obj, "retry_payment"); break;
- case 96: fn = Object.getOwnPropertyDescriptor(obj, "abandon_payment"); break;
- case 97: fn = Object.getOwnPropertyDescriptor(obj, "find_route"); break;
+ case 40: fn = Object.getOwnPropertyDescriptor(obj, "probe_failed"); break;
+ case 41: fn = Object.getOwnPropertyDescriptor(obj, "probe_successful"); break;
+ case 42: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 43: fn = Object.getOwnPropertyDescriptor(obj, "persist_manager"); break;
+ case 44: fn = Object.getOwnPropertyDescriptor(obj, "persist_graph"); break;
+ case 45: fn = Object.getOwnPropertyDescriptor(obj, "persist_scorer"); break;
+ case 46: fn = Object.getOwnPropertyDescriptor(obj, "filtered_block_connected"); break;
+ case 47: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break;
+ case 48: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break;
+ case 49: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break;
+ case 50: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break;
+ case 51: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break;
+ case 52: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); break;
+ case 53: fn = Object.getOwnPropertyDescriptor(obj, "persist_new_channel"); break;
+ case 54: fn = Object.getOwnPropertyDescriptor(obj, "update_persisted_channel"); break;
+ case 55: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel"); break;
+ case 56: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break;
+ case 57: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break;
+ case 58: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break;
+ case 59: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_ready"); break;
+ case 60: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break;
+ case 61: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break;
+ case 62: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_add_htlc"); break;
+ case 63: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fulfill_htlc"); break;
+ case 64: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_htlc"); break;
+ case 65: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_malformed_htlc"); break;
+ case 66: fn = Object.getOwnPropertyDescriptor(obj, "handle_commitment_signed"); break;
+ case 67: fn = Object.getOwnPropertyDescriptor(obj, "handle_revoke_and_ack"); break;
+ case 68: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fee"); break;
+ case 69: fn = Object.getOwnPropertyDescriptor(obj, "handle_announcement_signatures"); break;
+ case 70: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
+ case 71: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 72: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_reestablish"); break;
+ case 73: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
+ case 74: fn = Object.getOwnPropertyDescriptor(obj, "handle_error"); break;
+ case 75: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break;
+ case 76: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break;
+ case 77: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
+ case 78: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcements"); break;
+ case 79: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcements"); break;
+ case 80: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 81: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break;
+ case 82: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break;
+ case 83: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break;
+ case 84: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break;
+ case 85: fn = Object.getOwnPropertyDescriptor(obj, "read"); break;
+ case 86: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
+ case 87: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break;
+ case 88: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break;
+ case 89: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break;
+ case 90: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break;
+ case 91: fn = Object.getOwnPropertyDescriptor(obj, "hash"); break;
+ case 92: fn = Object.getOwnPropertyDescriptor(obj, "lock"); break;
+ case 93: fn = Object.getOwnPropertyDescriptor(obj, "node_id"); break;
+ case 94: fn = Object.getOwnPropertyDescriptor(obj, "first_hops"); break;
+ case 95: fn = Object.getOwnPropertyDescriptor(obj, "send_payment"); break;
+ case 96: fn = Object.getOwnPropertyDescriptor(obj, "send_spontaneous_payment"); break;
+ case 97: fn = Object.getOwnPropertyDescriptor(obj, "retry_payment"); break;
+ case 98: fn = Object.getOwnPropertyDescriptor(obj, "abandon_payment"); break;
+ case 99: fn = Object.getOwnPropertyDescriptor(obj, "find_route"); break;
default:
console.error("Got unknown function call from C!");
throw new Error("Got unknown function call from C!");