}
if (decodeString(wasm.TS_get_lib_version_string()) !== version.get_ldk_java_bindings_version())
- throw new Error("Compiled LDK library and LDK class failes do not match");
+ throw new Error("Compiled LDK library and LDK class files do not match");
// Fetching the LDK versions from C also checks that the header and binaries match
const c_bindings_ver: number = wasm.TS_get_ldk_c_bindings_version();
const ldk_ver: number = wasm.TS_get_ldk_version();
/* @internal */
export async function initializeWasmFromUint8Array(wasmBinary: Uint8Array) {
- imports.env["js_invoke_function"] = js_invoke;
+ imports.env["js_invoke_function_u"] = js_invoke;
+ imports.env["js_invoke_function_b"] = js_invoke;
const { instance: wasmInstance } = await WebAssembly.instantiate(wasmBinary, imports);
await finishInitializeWasm(wasmInstance);
}
/* @internal */
export async function initializeWasmFetch(uri: string) {
const stream = fetch(uri);
- imports.env["js_invoke_function"] = js_invoke;
+ 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 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 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_CResult_FixedPenaltyScorerDecodeErrorZ_get_err(owner);
return nativeResponseValue;
+}
+ // uint64_t C2Tuple_u64u64Z_get_a(LDKC2Tuple_u64u64Z *NONNULL_PTR owner);
+/* @internal */
+export function C2Tuple_u64u64Z_get_a(owner: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_C2Tuple_u64u64Z_get_a(owner);
+ return nativeResponseValue;
+}
+ // uint64_t C2Tuple_u64u64Z_get_b(LDKC2Tuple_u64u64Z *NONNULL_PTR owner);
+/* @internal */
+export function C2Tuple_u64u64Z_get_b(owner: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_C2Tuple_u64u64Z_get_b(owner);
+ return nativeResponseValue;
+}
+/* @internal */
+export class LDKCOption_C2Tuple_u64u64ZZ {
+ protected constructor() {}
+}
+/* @internal */
+export function LDKCOption_C2Tuple_u64u64ZZ_ty_from_ptr(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKCOption_C2Tuple_u64u64ZZ_ty_from_ptr(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKCOption_C2Tuple_u64u64ZZ_Some_get_some(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKCOption_C2Tuple_u64u64ZZ_Some_get_some(ptr);
+ return nativeResponseValue;
}
/* @internal */
export interface LDKLogger {
}
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_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner);
return nativeResponseValue;
+}
+ // struct LDKNodeAlias CResult_NodeAliasDecodeErrorZ_get_ok(LDKCResult_NodeAliasDecodeErrorZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_NodeAliasDecodeErrorZ_get_ok(owner: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NodeAliasDecodeErrorZ_get_ok(owner);
+ return nativeResponseValue;
+}
+ // struct LDKDecodeError CResult_NodeAliasDecodeErrorZ_get_err(LDKCResult_NodeAliasDecodeErrorZ *NONNULL_PTR owner);
+/* @internal */
+export function CResult_NodeAliasDecodeErrorZ_get_err(owner: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NodeAliasDecodeErrorZ_get_err(owner);
+ return nativeResponseValue;
}
// struct LDKNodeInfo CResult_NodeInfoDecodeErrorZ_get_ok(LDKCResult_NodeInfoDecodeErrorZ *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 */
return nativeResponseValue;
}
/* @internal */
+export function LDKEffectiveCapacity_Total_get_htlc_maximum_msat(ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEffectiveCapacity_Total_get_htlc_maximum_msat(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
export interface LDKLockableScore {
lock (): number;
}
}
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_FixedPenaltyScorerDecodeErrorZ_clone(orig);
return nativeResponseValue;
+}
+ // uintptr_t C2Tuple_u64u64Z_clone_ptr(LDKC2Tuple_u64u64Z *NONNULL_PTR arg);
+/* @internal */
+export function C2Tuple_u64u64Z_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_C2Tuple_u64u64Z_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_clone(const struct LDKC2Tuple_u64u64Z *NONNULL_PTR orig);
+/* @internal */
+export function C2Tuple_u64u64Z_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_C2Tuple_u64u64Z_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
+/* @internal */
+export function C2Tuple_u64u64Z_new(a: bigint, b: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_C2Tuple_u64u64Z_new(a, b);
+ return nativeResponseValue;
+}
+ // void C2Tuple_u64u64Z_free(struct LDKC2Tuple_u64u64Z _res);
+/* @internal */
+export function C2Tuple_u64u64Z_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_C2Tuple_u64u64Z_free(_res);
+ // debug statements here
+}
+ // struct LDKCOption_C2Tuple_u64u64ZZ COption_C2Tuple_u64u64ZZ_some(struct LDKC2Tuple_u64u64Z o);
+/* @internal */
+export function COption_C2Tuple_u64u64ZZ_some(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_C2Tuple_u64u64ZZ_some(o);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_C2Tuple_u64u64ZZ COption_C2Tuple_u64u64ZZ_none(void);
+/* @internal */
+export function COption_C2Tuple_u64u64ZZ_none(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_C2Tuple_u64u64ZZ_none();
+ return nativeResponseValue;
+}
+ // void COption_C2Tuple_u64u64ZZ_free(struct LDKCOption_C2Tuple_u64u64ZZ _res);
+/* @internal */
+export function COption_C2Tuple_u64u64ZZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_C2Tuple_u64u64ZZ_free(_res);
+ // debug statements here
+}
+ // uintptr_t COption_C2Tuple_u64u64ZZ_clone_ptr(LDKCOption_C2Tuple_u64u64ZZ *NONNULL_PTR arg);
+/* @internal */
+export function COption_C2Tuple_u64u64ZZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_C2Tuple_u64u64ZZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_C2Tuple_u64u64ZZ COption_C2Tuple_u64u64ZZ_clone(const struct LDKCOption_C2Tuple_u64u64ZZ *NONNULL_PTR orig);
+/* @internal */
+export function COption_C2Tuple_u64u64ZZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_C2Tuple_u64u64ZZ_clone(orig);
+ return nativeResponseValue;
+}
+ // void CVec_NodeIdZ_free(struct LDKCVec_NodeIdZ _res);
+/* @internal */
+export function CVec_NodeIdZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CVec_NodeIdZ_free(_res);
+ // debug statements here
}
// struct LDKCResult_ProbabilisticScorerDecodeErrorZ CResult_ProbabilisticScorerDecodeErrorZ_ok(struct LDKProbabilisticScorer o);
/* @internal */
const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
return nativeResponseValue;
}
- // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
+ // struct LDKCResult_NodeAliasDecodeErrorZ CResult_NodeAliasDecodeErrorZ_ok(struct LDKNodeAlias o);
/* @internal */
-export function CVec_u64Z_free(_res: number): void {
+export function CResult_NodeAliasDecodeErrorZ_ok(o: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_CVec_u64Z_free(_res);
+ const nativeResponseValue = wasm.TS_CResult_NodeAliasDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_NodeAliasDecodeErrorZ CResult_NodeAliasDecodeErrorZ_err(struct LDKDecodeError e);
+/* @internal */
+export function CResult_NodeAliasDecodeErrorZ_err(e: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NodeAliasDecodeErrorZ_err(e);
+ return nativeResponseValue;
+}
+ // bool CResult_NodeAliasDecodeErrorZ_is_ok(const struct LDKCResult_NodeAliasDecodeErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_NodeAliasDecodeErrorZ_is_ok(o: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NodeAliasDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_NodeAliasDecodeErrorZ_free(struct LDKCResult_NodeAliasDecodeErrorZ _res);
+/* @internal */
+export function CResult_NodeAliasDecodeErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NodeAliasDecodeErrorZ_free(_res);
// debug statements here
+}
+ // uintptr_t CResult_NodeAliasDecodeErrorZ_clone_ptr(LDKCResult_NodeAliasDecodeErrorZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_NodeAliasDecodeErrorZ_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NodeAliasDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_NodeAliasDecodeErrorZ CResult_NodeAliasDecodeErrorZ_clone(const struct LDKCResult_NodeAliasDecodeErrorZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_NodeAliasDecodeErrorZ_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NodeAliasDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
}
// struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
/* @internal */
}
const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig);
return nativeResponseValue;
+}
+ // void CVec_ThirtyTwoBytesZ_free(struct LDKCVec_ThirtyTwoBytesZ _res);
+/* @internal */
+export function CVec_ThirtyTwoBytesZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CVec_ThirtyTwoBytesZ_free(_res);
+ // debug statements here
}
// uintptr_t C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR arg);
/* @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_ChannelHandshakeConfig_set_negotiate_scid_privacy(this_ptr, val);
// debug statements here
}
- // 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, uint8_t max_inbound_htlc_value_in_flight_percent_of_channel_arg, bool negotiate_scid_privacy_arg);
+ // bool ChannelHandshakeConfig_get_announced_channel(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
/* @internal */
-export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: bigint, max_inbound_htlc_value_in_flight_percent_of_channel_arg: number, negotiate_scid_privacy_arg: boolean): number {
+export function ChannelHandshakeConfig_get_announced_channel(this_ptr: number): boolean {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg, max_inbound_htlc_value_in_flight_percent_of_channel_arg, negotiate_scid_privacy_arg);
+ const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_announced_channel(this_ptr);
+ return nativeResponseValue;
+}
+ // void ChannelHandshakeConfig_set_announced_channel(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, bool val);
+/* @internal */
+export function ChannelHandshakeConfig_set_announced_channel(this_ptr: number, val: boolean): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_announced_channel(this_ptr, val);
+ // debug statements here
+}
+ // bool ChannelHandshakeConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
+/* @internal */
+export function ChannelHandshakeConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
+ return nativeResponseValue;
+}
+ // void ChannelHandshakeConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, bool val);
+/* @internal */
+export function ChannelHandshakeConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
+ // debug statements here
+}
+ // 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, uint8_t max_inbound_htlc_value_in_flight_percent_of_channel_arg, bool negotiate_scid_privacy_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
+/* @internal */
+export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: bigint, max_inbound_htlc_value_in_flight_percent_of_channel_arg: number, negotiate_scid_privacy_arg: boolean, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg, max_inbound_htlc_value_in_flight_percent_of_channel_arg, negotiate_scid_privacy_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
return nativeResponseValue;
}
// uintptr_t ChannelHandshakeConfig_clone_ptr(LDKChannelHandshakeConfig *NONNULL_PTR arg);
}
const nativeResponseValue = wasm.TS_ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
// debug statements here
-}
- // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
-/* @internal */
-export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelConfig_get_announced_channel(this_ptr);
- return nativeResponseValue;
-}
- // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
-/* @internal */
-export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelConfig_set_announced_channel(this_ptr, val);
- // debug statements here
-}
- // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
-/* @internal */
-export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
- return nativeResponseValue;
-}
- // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
-/* @internal */
-export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
- if(!isWasmInitialized) {
- throw new Error("initializeWasm() must be awaited first!");
- }
- const nativeResponseValue = wasm.TS_ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
- // debug statements here
}
// uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
/* @internal */
const nativeResponseValue = wasm.TS_ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
// debug statements here
}
- // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t forwarding_fee_proportional_millionths_arg, uint32_t forwarding_fee_base_msat_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg, uint64_t max_dust_htlc_exposure_msat_arg, uint64_t force_close_avoidance_max_fee_satoshis_arg);
+ // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t forwarding_fee_proportional_millionths_arg, uint32_t forwarding_fee_base_msat_arg, uint16_t cltv_expiry_delta_arg, uint64_t max_dust_htlc_exposure_msat_arg, uint64_t force_close_avoidance_max_fee_satoshis_arg);
/* @internal */
-export function ChannelConfig_new(forwarding_fee_proportional_millionths_arg: number, forwarding_fee_base_msat_arg: number, cltv_expiry_delta_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean, max_dust_htlc_exposure_msat_arg: bigint, force_close_avoidance_max_fee_satoshis_arg: bigint): number {
+export function ChannelConfig_new(forwarding_fee_proportional_millionths_arg: number, forwarding_fee_base_msat_arg: number, cltv_expiry_delta_arg: number, max_dust_htlc_exposure_msat_arg: bigint, force_close_avoidance_max_fee_satoshis_arg: bigint): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_ChannelConfig_new(forwarding_fee_proportional_millionths_arg, forwarding_fee_base_msat_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg, max_dust_htlc_exposure_msat_arg, force_close_avoidance_max_fee_satoshis_arg);
+ const nativeResponseValue = wasm.TS_ChannelConfig_new(forwarding_fee_proportional_millionths_arg, forwarding_fee_base_msat_arg, cltv_expiry_delta_arg, max_dust_htlc_exposure_msat_arg, force_close_avoidance_max_fee_satoshis_arg);
return nativeResponseValue;
}
// uintptr_t ChannelConfig_clone_ptr(LDKChannelConfig *NONNULL_PTR arg);
const nativeResponseValue = wasm.TS_UserConfig_free(this_obj);
// debug statements here
}
- // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
+ // struct LDKChannelHandshakeConfig UserConfig_get_channel_handshake_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
/* @internal */
-export function UserConfig_get_own_channel_config(this_ptr: number): number {
+export function UserConfig_get_channel_handshake_config(this_ptr: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_UserConfig_get_own_channel_config(this_ptr);
+ const nativeResponseValue = wasm.TS_UserConfig_get_channel_handshake_config(this_ptr);
return nativeResponseValue;
}
- // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
+ // void UserConfig_set_channel_handshake_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
/* @internal */
-export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
+export function UserConfig_set_channel_handshake_config(this_ptr: number, val: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_UserConfig_set_own_channel_config(this_ptr, val);
+ const nativeResponseValue = wasm.TS_UserConfig_set_channel_handshake_config(this_ptr, val);
// debug statements here
}
- // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
+ // struct LDKChannelHandshakeLimits UserConfig_get_channel_handshake_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
/* @internal */
-export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
+export function UserConfig_get_channel_handshake_limits(this_ptr: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_UserConfig_get_peer_channel_config_limits(this_ptr);
+ const nativeResponseValue = wasm.TS_UserConfig_get_channel_handshake_limits(this_ptr);
return nativeResponseValue;
}
- // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
+ // void UserConfig_set_channel_handshake_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
/* @internal */
-export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
+export function UserConfig_set_channel_handshake_limits(this_ptr: number, val: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_UserConfig_set_peer_channel_config_limits(this_ptr, val);
+ const nativeResponseValue = wasm.TS_UserConfig_set_channel_handshake_limits(this_ptr, val);
// debug statements here
}
- // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
+ // struct LDKChannelConfig UserConfig_get_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
/* @internal */
-export function UserConfig_get_channel_options(this_ptr: number): number {
+export function UserConfig_get_channel_config(this_ptr: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_UserConfig_get_channel_options(this_ptr);
+ const nativeResponseValue = wasm.TS_UserConfig_get_channel_config(this_ptr);
return nativeResponseValue;
}
- // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
+ // void UserConfig_set_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
/* @internal */
-export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
+export function UserConfig_set_channel_config(this_ptr: number, val: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_UserConfig_set_channel_options(this_ptr, val);
+ const nativeResponseValue = wasm.TS_UserConfig_set_channel_config(this_ptr, val);
// debug statements here
}
// bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
const nativeResponseValue = wasm.TS_UserConfig_set_manually_accept_inbound_channels(this_ptr, val);
// debug statements here
}
- // 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, bool accept_forwards_to_priv_channels_arg, bool accept_inbound_channels_arg, bool manually_accept_inbound_channels_arg);
+ // MUST_USE_RES struct LDKUserConfig UserConfig_new(struct LDKChannelHandshakeConfig channel_handshake_config_arg, struct LDKChannelHandshakeLimits channel_handshake_limits_arg, struct LDKChannelConfig channel_config_arg, bool accept_forwards_to_priv_channels_arg, bool accept_inbound_channels_arg, bool manually_accept_inbound_channels_arg);
/* @internal */
-export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number, accept_forwards_to_priv_channels_arg: boolean, accept_inbound_channels_arg: boolean, manually_accept_inbound_channels_arg: boolean): number {
+export function UserConfig_new(channel_handshake_config_arg: number, channel_handshake_limits_arg: number, channel_config_arg: number, accept_forwards_to_priv_channels_arg: boolean, accept_inbound_channels_arg: boolean, manually_accept_inbound_channels_arg: boolean): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg);
+ const nativeResponseValue = wasm.TS_UserConfig_new(channel_handshake_config_arg, channel_handshake_limits_arg, channel_config_arg, accept_forwards_to_priv_channels_arg, accept_inbound_channels_arg, manually_accept_inbound_channels_arg);
return nativeResponseValue;
}
// uintptr_t UserConfig_clone_ptr(LDKUserConfig *NONNULL_PTR arg);
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_ChannelDetails_set_inbound_htlc_maximum_msat(this_ptr, val);
// debug statements here
}
- // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKChannelTypeFeatures channel_type_arg, struct LDKCOption_u64Z short_channel_id_arg, struct LDKCOption_u64Z outbound_scid_alias_arg, struct LDKCOption_u64Z inbound_scid_alias_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, uint64_t user_channel_id_arg, uint64_t balance_msat_arg, uint64_t outbound_capacity_msat_arg, uint64_t next_outbound_htlc_limit_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_channel_ready_arg, bool is_usable_arg, bool is_public_arg, struct LDKCOption_u64Z inbound_htlc_minimum_msat_arg, struct LDKCOption_u64Z inbound_htlc_maximum_msat_arg);
+ // struct LDKChannelConfig ChannelDetails_get_config(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
/* @internal */
-export function ChannelDetails_new(channel_id_arg: number, counterparty_arg: number, funding_txo_arg: number, channel_type_arg: number, short_channel_id_arg: number, outbound_scid_alias_arg: number, inbound_scid_alias_arg: number, channel_value_satoshis_arg: bigint, unspendable_punishment_reserve_arg: number, user_channel_id_arg: bigint, balance_msat_arg: bigint, outbound_capacity_msat_arg: bigint, next_outbound_htlc_limit_msat_arg: bigint, inbound_capacity_msat_arg: bigint, confirmations_required_arg: number, force_close_spend_delay_arg: number, is_outbound_arg: boolean, is_channel_ready_arg: boolean, is_usable_arg: boolean, is_public_arg: boolean, inbound_htlc_minimum_msat_arg: number, inbound_htlc_maximum_msat_arg: number): number {
+export function ChannelDetails_get_config(this_ptr: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_ChannelDetails_new(channel_id_arg, counterparty_arg, funding_txo_arg, channel_type_arg, short_channel_id_arg, outbound_scid_alias_arg, inbound_scid_alias_arg, channel_value_satoshis_arg, unspendable_punishment_reserve_arg, user_channel_id_arg, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg, force_close_spend_delay_arg, is_outbound_arg, is_channel_ready_arg, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg, inbound_htlc_maximum_msat_arg);
+ const nativeResponseValue = wasm.TS_ChannelDetails_get_config(this_ptr);
+ return nativeResponseValue;
+}
+ // void ChannelDetails_set_config(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
+/* @internal */
+export function ChannelDetails_set_config(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelDetails_set_config(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKChannelTypeFeatures channel_type_arg, struct LDKCOption_u64Z short_channel_id_arg, struct LDKCOption_u64Z outbound_scid_alias_arg, struct LDKCOption_u64Z inbound_scid_alias_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, uint64_t user_channel_id_arg, uint64_t balance_msat_arg, uint64_t outbound_capacity_msat_arg, uint64_t next_outbound_htlc_limit_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_channel_ready_arg, bool is_usable_arg, bool is_public_arg, struct LDKCOption_u64Z inbound_htlc_minimum_msat_arg, struct LDKCOption_u64Z inbound_htlc_maximum_msat_arg, struct LDKChannelConfig config_arg);
+/* @internal */
+export function ChannelDetails_new(channel_id_arg: number, counterparty_arg: number, funding_txo_arg: number, channel_type_arg: number, short_channel_id_arg: number, outbound_scid_alias_arg: number, inbound_scid_alias_arg: number, channel_value_satoshis_arg: bigint, unspendable_punishment_reserve_arg: number, user_channel_id_arg: bigint, balance_msat_arg: bigint, outbound_capacity_msat_arg: bigint, next_outbound_htlc_limit_msat_arg: bigint, inbound_capacity_msat_arg: bigint, confirmations_required_arg: number, force_close_spend_delay_arg: number, is_outbound_arg: boolean, is_channel_ready_arg: boolean, is_usable_arg: boolean, is_public_arg: boolean, inbound_htlc_minimum_msat_arg: number, inbound_htlc_maximum_msat_arg: number, config_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelDetails_new(channel_id_arg, counterparty_arg, funding_txo_arg, channel_type_arg, short_channel_id_arg, outbound_scid_alias_arg, inbound_scid_alias_arg, channel_value_satoshis_arg, unspendable_punishment_reserve_arg, user_channel_id_arg, balance_msat_arg, outbound_capacity_msat_arg, next_outbound_htlc_limit_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg, force_close_spend_delay_arg, is_outbound_arg, is_channel_ready_arg, is_usable_arg, is_public_arg, inbound_htlc_minimum_msat_arg, inbound_htlc_maximum_msat_arg, config_arg);
return nativeResponseValue;
}
// uintptr_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg);
const nativeResponseValue = wasm.TS_ChannelManager_close_channel_with_target_feerate(this_arg, channel_id, counterparty_node_id, target_feerate_sats_per_1000_weight);
return nativeResponseValue;
}
- // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id);
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id);
+/* @internal */
+export function ChannelManager_force_close_broadcasting_latest_txn(this_arg: number, channel_id: number, counterparty_node_id: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelManager_force_close_broadcasting_latest_txn(this_arg, channel_id, counterparty_node_id);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id);
/* @internal */
-export function ChannelManager_force_close_channel(this_arg: number, channel_id: number, counterparty_node_id: number): number {
+export function ChannelManager_force_close_without_broadcasting_txn(this_arg: number, channel_id: number, counterparty_node_id: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_ChannelManager_force_close_channel(this_arg, channel_id, counterparty_node_id);
+ const nativeResponseValue = wasm.TS_ChannelManager_force_close_without_broadcasting_txn(this_arg, channel_id, counterparty_node_id);
return nativeResponseValue;
}
- // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
+ // void ChannelManager_force_close_all_channels_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg);
+/* @internal */
+export function ChannelManager_force_close_all_channels_broadcasting_latest_txn(this_arg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelManager_force_close_all_channels_broadcasting_latest_txn(this_arg);
+ // debug statements here
+}
+ // void ChannelManager_force_close_all_channels_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg);
/* @internal */
-export function ChannelManager_force_close_all_channels(this_arg: number): void {
+export function ChannelManager_force_close_all_channels_without_broadcasting_txn(this_arg: number): void {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_ChannelManager_force_close_all_channels(this_arg);
+ const nativeResponseValue = wasm.TS_ChannelManager_force_close_all_channels_without_broadcasting_txn(this_arg);
// debug statements here
}
// MUST_USE_RES struct LDKCResult_PaymentIdPaymentSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
}
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_ChannelManager_broadcast_node_announcement(this_arg, rgb, alias, addresses);
// debug statements here
+}
+ // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config);
+/* @internal */
+export function ChannelManager_update_channel_config(this_arg: number, counterparty_node_id: number, channel_ids: number, config: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelManager_update_channel_config(this_arg, counterparty_node_id, channel_ids, config);
+ return nativeResponseValue;
}
// void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
/* @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_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_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_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_EffectiveCapacity_maximum_htlc(amount_msat);
return nativeResponseValue;
}
- // struct LDKEffectiveCapacity EffectiveCapacity_total(uint64_t capacity_msat);
+ // struct LDKEffectiveCapacity EffectiveCapacity_total(uint64_t capacity_msat, struct LDKCOption_u64Z htlc_maximum_msat);
/* @internal */
-export function EffectiveCapacity_total(capacity_msat: bigint): number {
+export function EffectiveCapacity_total(capacity_msat: bigint, htlc_maximum_msat: number): number {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_EffectiveCapacity_total(capacity_msat);
+ const nativeResponseValue = wasm.TS_EffectiveCapacity_total(capacity_msat, htlc_maximum_msat);
return nativeResponseValue;
}
// struct LDKEffectiveCapacity EffectiveCapacity_infinite(void);
const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_rgb(this_ptr, val);
// debug statements here
}
- // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
+ // struct LDKNodeAlias NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
/* @internal */
export function NodeAnnouncementInfo_get_alias(this_ptr: number): number {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_alias(this_ptr);
return nativeResponseValue;
}
- // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+ // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAlias val);
/* @internal */
export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: number): void {
if(!isWasmInitialized) {
const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
// debug statements here
}
- // 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);
+ // MUST_USE_RES struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_new(struct LDKNodeFeatures features_arg, uint32_t last_update_arg, struct LDKThreeBytes rgb_arg, struct LDKNodeAlias alias_arg, struct LDKCVec_NetAddressZ addresses_arg, struct LDKNodeAnnouncement announcement_message_arg);
/* @internal */
export function NodeAnnouncementInfo_new(features_arg: number, last_update_arg: number, rgb_arg: number, alias_arg: number, addresses_arg: number, announcement_message_arg: number): number {
if(!isWasmInitialized) {
}
const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_read(ser);
return nativeResponseValue;
+}
+ // void NodeAlias_free(struct LDKNodeAlias this_obj);
+/* @internal */
+export function NodeAlias_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAlias_free(this_obj);
+ // debug statements here
+}
+ // const uint8_t (*NodeAlias_get_a(const struct LDKNodeAlias *NONNULL_PTR this_ptr))[32];
+/* @internal */
+export function NodeAlias_get_a(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAlias_get_a(this_ptr);
+ return nativeResponseValue;
+}
+ // void NodeAlias_set_a(struct LDKNodeAlias *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+/* @internal */
+export function NodeAlias_set_a(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAlias_set_a(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKNodeAlias NodeAlias_new(struct LDKThirtyTwoBytes a_arg);
+/* @internal */
+export function NodeAlias_new(a_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAlias_new(a_arg);
+ return nativeResponseValue;
+}
+ // uintptr_t NodeAlias_clone_ptr(LDKNodeAlias *NONNULL_PTR arg);
+/* @internal */
+export function NodeAlias_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAlias_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKNodeAlias NodeAlias_clone(const struct LDKNodeAlias *NONNULL_PTR orig);
+/* @internal */
+export function NodeAlias_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAlias_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z NodeAlias_write(const struct LDKNodeAlias *NONNULL_PTR obj);
+/* @internal */
+export function NodeAlias_write(obj: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAlias_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_NodeAliasDecodeErrorZ NodeAlias_read(struct LDKu8slice ser);
+/* @internal */
+export function NodeAlias_read(ser: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_NodeAlias_read(ser);
+ return nativeResponseValue;
}
// void NodeInfo_free(struct LDKNodeInfo this_obj);
/* @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 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 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
}
- // 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 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_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_channel_saturation_power_of_half(this_ptr);
+ return nativeResponseValue;
+}
+ // void PaymentParameters_set_max_channel_saturation_power_of_half(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint8_t val);
+/* @internal */
+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_channel_saturation_power_of_half(this_ptr, val);
+ // debug statements here
+}
+ // void PaymentParameters_set_previously_failed_channels(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
/* @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): number {
+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_new(payee_pubkey_arg, features_arg, route_hints_arg, expiry_time_arg, max_total_cltv_expiry_delta_arg);
+ 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
}
- // MUST_USE_RES struct LDKProbabilisticScoringParameters ProbabilisticScoringParameters_new(uint64_t base_penalty_msat_arg, uint64_t liquidity_penalty_multiplier_msat_arg, uint64_t liquidity_offset_half_life_arg, uint64_t amount_penalty_multiplier_msat_arg);
+ // uint64_t ProbabilisticScoringParameters_get_anti_probing_penalty_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
/* @internal */
-export function ProbabilisticScoringParameters_new(base_penalty_msat_arg: bigint, liquidity_penalty_multiplier_msat_arg: bigint, liquidity_offset_half_life_arg: bigint, amount_penalty_multiplier_msat_arg: bigint): number {
+export function ProbabilisticScoringParameters_get_anti_probing_penalty_msat(this_ptr: number): bigint {
if(!isWasmInitialized) {
throw new Error("initializeWasm() must be awaited first!");
}
- const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_new(base_penalty_msat_arg, liquidity_penalty_multiplier_msat_arg, liquidity_offset_half_life_arg, amount_penalty_multiplier_msat_arg);
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_anti_probing_penalty_msat(this_ptr);
return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_anti_probing_penalty_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_anti_probing_penalty_msat(this_ptr: number, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ 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_debug_log_liquidity_stats(this_arg);
// debug statements here
+}
+ // MUST_USE_RES struct LDKCOption_C2Tuple_u64u64ZZ ProbabilisticScorer_estimated_channel_liquidity_range(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg, uint64_t scid, const struct LDKNodeId *NONNULL_PTR target);
+/* @internal */
+export function ProbabilisticScorer_estimated_channel_liquidity_range(this_arg: number, scid: bigint, target: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_estimated_channel_liquidity_range(this_arg, scid, target);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScorer_add_banned(struct LDKProbabilisticScorer *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+/* @internal */
+export function ProbabilisticScorer_add_banned(this_arg: number, node_id: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_add_banned(this_arg, node_id);
+ // debug statements here
+}
+ // void ProbabilisticScorer_remove_banned(struct LDKProbabilisticScorer *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+/* @internal */
+export function ProbabilisticScorer_remove_banned(this_arg: number, node_id: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_remove_banned(this_arg, node_id);
+ // debug statements here
+}
+ // 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_manual_penalties(this_arg: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ 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);
+/* @internal */
+export function ProbabilisticScoringParameters_add_banned_from_list(this_arg: number, node_ids: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_add_banned_from_list(this_arg, node_ids);
+ // debug statements here
}
// MUST_USE_RES struct LDKProbabilisticScoringParameters ProbabilisticScoringParameters_default(void);
/* @internal */
}
-js_invoke = function(obj_ptr: number, fn_id: number, arg1: number, arg2: number, arg3: number, arg4: number, arg5: number, arg6: number, arg7: number, arg8: number, arg9: number, arg10: number) {
+js_invoke = function(obj_ptr: number, fn_id: number, arg1: bigint|number, arg2: bigint|number, arg3: bigint|number, arg4: bigint|number, arg5: bigint|number, arg6: bigint|number, arg7: bigint|number, arg8: bigint|number, arg9: bigint|number, arg10: bigint|number) {
const weak: WeakRef<object> = js_objs[obj_ptr];
if (weak == null || weak == undefined) {
console.error("Got function call on unknown/free'd JS object!");
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!");
console.error("Got function call on incorrect JS object!");
throw new Error("Got function call on incorrect JS object!");
}
- return fn.value.bind(obj)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
+ const ret = fn.value.bind(obj)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
+ if (ret === undefined || ret === null) return BigInt(0);
+ return BigInt(ret);
}
\ No newline at end of file