+ const nativeResponseValue = wasm.MessageSendEvent_send_short_ids_query(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
+ export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEvent_send_reply_channel_range(encodeArray(node_id), msg);
+ return nativeResponseValue;
+ }
+ // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
+ export function MessageSendEventsProvider_free(this_ptr: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
+ // debug statements here
+ }
+ // void EventsProvider_free(struct LDKEventsProvider this_ptr);
+ export function EventsProvider_free(this_ptr: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
+ // debug statements here
+ }
+ // void EventHandler_free(struct LDKEventHandler this_ptr);
+ export function EventHandler_free(this_ptr: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.EventHandler_free(this_ptr);
+ // debug statements here
+ }
+ // void APIError_free(struct LDKAPIError this_ptr);
+ export function APIError_free(this_ptr: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_free(this_ptr);
+ // debug statements here
+ }
+ // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
+ export function APIError_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
+ export function APIError_apimisuse_error(err: String): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_apimisuse_error(err);
+ return nativeResponseValue;
+ }
+ // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
+ export function APIError_fee_rate_too_high(err: String, feerate: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_fee_rate_too_high(err, feerate);
+ return nativeResponseValue;
+ }
+ // struct LDKAPIError APIError_route_error(struct LDKStr err);
+ export function APIError_route_error(err: String): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_route_error(err);
+ return nativeResponseValue;
+ }
+ // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
+ export function APIError_channel_unavailable(err: String): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_channel_unavailable(err);
+ return nativeResponseValue;
+ }
+ // struct LDKAPIError APIError_monitor_update_failed(void);
+ export function APIError_monitor_update_failed(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_monitor_update_failed();
+ return nativeResponseValue;
+ }
+ // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
+ export function APIError_incompatible_shutdown_script(script: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.APIError_incompatible_shutdown_script(script);
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
+ export function sign(msg: Uint8Array, sk: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
+ export function recover_pk(msg: Uint8Array, sig: String): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
+ return nativeResponseValue;
+ }
+ // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
+ export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
+ return nativeResponseValue;
+ }
+ // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
+ export function Level_clone(orig: number): Level {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_clone(orig);
+ return nativeResponseValue;
+ }
+ // enum LDKLevel Level_trace(void);
+ export function Level_trace(): Level {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_trace();
+ return nativeResponseValue;
+ }
+ // enum LDKLevel Level_debug(void);
+ export function Level_debug(): Level {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_debug();
+ return nativeResponseValue;
+ }
+ // enum LDKLevel Level_info(void);
+ export function Level_info(): Level {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_info();
+ return nativeResponseValue;
+ }
+ // enum LDKLevel Level_warn(void);
+ export function Level_warn(): Level {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_warn();
+ return nativeResponseValue;
+ }
+ // enum LDKLevel Level_error(void);
+ export function Level_error(): Level {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_error();
+ return nativeResponseValue;
+ }
+ // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
+ export function Level_eq(a: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_eq(a, b);
+ return nativeResponseValue;
+ }
+ // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
+ export function Level_hash(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_hash(o);
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES enum LDKLevel Level_max(void);
+ export function Level_max(): Level {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Level_max();
+ return nativeResponseValue;
+ }
+ // void Logger_free(struct LDKLogger this_ptr);
+ export function Logger_free(this_ptr: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Logger_free(this_ptr);
+ // debug statements here
+ }
+ // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
+ export function ChannelHandshakeConfig_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
+ // debug statements here
+ }
+ // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
+ export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
+ export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
+ // debug statements here
+ }
+ // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
+ export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
+ export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
+ // debug statements here
+ }
+ // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
+ export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
+ export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(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);
+ export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
+ return nativeResponseValue;
+ }
+ // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
+ export function ChannelHandshakeConfig_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
+ export function ChannelHandshakeConfig_default(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
+ return nativeResponseValue;
+ }
+ // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
+ export function ChannelHandshakeLimits_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
+ // debug statements here
+ }
+ // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
+ export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
+ export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
+ // debug statements here
+ }
+ // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
+ export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
+ export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
+ // debug statements here
+ }
+ // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
+ export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);