+ const nativeResponseValue = wasm.TS_ScoreUpdate_payment_path_failed(this_arg, path, short_channel_id);
+ // debug statements here
+}
+ // void ScoreUpdate_payment_path_successful LDKScoreUpdate *NONNULL_PTR this_arg, const struct LDKPath *NONNULL_PTR path
+/* @internal */
+export function ScoreUpdate_payment_path_successful(this_arg: bigint, path: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ScoreUpdate_payment_path_successful(this_arg, path);
+ // debug statements here
+}
+ // void ScoreUpdate_probe_failed LDKScoreUpdate *NONNULL_PTR this_arg, const struct LDKPath *NONNULL_PTR path, uint64_t short_channel_id
+/* @internal */
+export function ScoreUpdate_probe_failed(this_arg: bigint, path: bigint, short_channel_id: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ScoreUpdate_probe_failed(this_arg, path, short_channel_id);
+ // debug statements here
+}
+ // void ScoreUpdate_probe_successful LDKScoreUpdate *NONNULL_PTR this_arg, const struct LDKPath *NONNULL_PTR path
+/* @internal */
+export function ScoreUpdate_probe_successful(this_arg: bigint, path: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ScoreUpdate_probe_successful(this_arg, path);
+ // debug statements here
+}
+/* @internal */
+export interface LDKLockableScore {
+ read_lock (): bigint;
+ write_lock (): bigint;
+}
+
+/* @internal */
+export function LDKLockableScore_new(impl: LDKLockableScore): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKLockableScore_new(i), i];
+}
+ // LDKScoreLookUp LockableScore_read_lock LDKLockableScore *NONNULL_PTR this_arg
+/* @internal */
+export function LockableScore_read_lock(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LockableScore_read_lock(this_arg);
+ return nativeResponseValue;
+}
+ // LDKScoreUpdate LockableScore_write_lock LDKLockableScore *NONNULL_PTR this_arg
+/* @internal */
+export function LockableScore_write_lock(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LockableScore_write_lock(this_arg);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKWriteableScore {
+ write (): number;
+}
+
+/* @internal */
+export function LDKWriteableScore_new(impl: LDKWriteableScore, LockableScore: number): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKWriteableScore_new(i, LockableScore), i];
+}
+ // LDKCVec_u8Z WriteableScore_write LDKWriteableScore *NONNULL_PTR this_arg
+/* @internal */
+export function WriteableScore_write(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_WriteableScore_write(this_arg);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKPersister {
+ persist_manager (channel_manager: bigint): bigint;
+ persist_graph (network_graph: bigint): bigint;
+ persist_scorer (scorer: bigint): bigint;
+}
+
+/* @internal */
+export function LDKPersister_new(impl: LDKPersister): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKPersister_new(i), i];
+}
+ // LDKCResult_NoneIOErrorZ Persister_persist_manager LDKPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
+/* @internal */
+export function Persister_persist_manager(this_arg: bigint, channel_manager: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Persister_persist_manager(this_arg, channel_manager);
+ return nativeResponseValue;
+}
+ // LDKCResult_NoneIOErrorZ Persister_persist_graph LDKPersister *NONNULL_PTR this_arg, const struct LDKNetworkGraph *NONNULL_PTR network_graph
+/* @internal */
+export function Persister_persist_graph(this_arg: bigint, network_graph: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Persister_persist_graph(this_arg, network_graph);
+ return nativeResponseValue;
+}
+ // LDKCResult_NoneIOErrorZ Persister_persist_scorer LDKPersister *NONNULL_PTR this_arg, const struct LDKWriteableScore *NONNULL_PTR scorer
+/* @internal */
+export function Persister_persist_scorer(this_arg: bigint, scorer: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Persister_persist_scorer(this_arg, scorer);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKPersist {
+ persist_new_channel (channel_id: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus;
+ update_persisted_channel (channel_id: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus;
+}
+
+/* @internal */
+export function LDKPersist_new(impl: LDKPersist): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKPersist_new(i), i];
+}
+ // LDKChannelMonitorUpdateStatus Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+/* @internal */
+export function Persist_persist_new_channel(this_arg: bigint, channel_id: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Persist_persist_new_channel(this_arg, channel_id, data, update_id);
+ return nativeResponseValue;
+}
+ // LDKChannelMonitorUpdateStatus Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
+/* @internal */
+export function Persist_update_persisted_channel(this_arg: bigint, channel_id: bigint, update: bigint, data: bigint, update_id: bigint): ChannelMonitorUpdateStatus {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Persist_update_persisted_channel(this_arg, channel_id, update, data, update_id);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKFutureCallback {
+ call (): void;
+}
+
+/* @internal */
+export function LDKFutureCallback_new(impl: LDKFutureCallback): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKFutureCallback_new(i), i];
+}
+ // void FutureCallback_call LDKFutureCallback *NONNULL_PTR this_arg
+/* @internal */
+export function FutureCallback_call(this_arg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_FutureCallback_call(this_arg);
+ // debug statements here
+}
+/* @internal */
+export interface LDKListen {
+ filtered_block_connected (header: number, txdata: number, height: number): void;
+ block_connected (block: number, height: number): void;
+ block_disconnected (header: number, height: number): void;
+}
+
+/* @internal */
+export function LDKListen_new(impl: LDKListen): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKListen_new(i), i];
+}
+ // void Listen_filtered_block_connected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
+/* @internal */
+export function Listen_filtered_block_connected(this_arg: bigint, header: number, txdata: number, height: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Listen_filtered_block_connected(this_arg, header, txdata, height);
+ // debug statements here
+}
+ // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
+/* @internal */
+export function Listen_block_connected(this_arg: bigint, block: number, height: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Listen_block_connected(this_arg, block, height);
+ // debug statements here
+}
+ // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
+/* @internal */
+export function Listen_block_disconnected(this_arg: bigint, header: number, height: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Listen_block_disconnected(this_arg, header, height);
+ // debug statements here
+}
+/* @internal */
+export interface LDKConfirm {
+ transactions_confirmed (header: number, txdata: number, height: number): void;
+ transaction_unconfirmed (txid: number): void;
+ best_block_updated (header: number, height: number): void;
+ get_relevant_txids (): number;
+}
+
+/* @internal */
+export function LDKConfirm_new(impl: LDKConfirm): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKConfirm_new(i), i];
+}
+ // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
+/* @internal */
+export function Confirm_transactions_confirmed(this_arg: bigint, header: number, txdata: number, height: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Confirm_transactions_confirmed(this_arg, header, txdata, height);
+ // debug statements here
+}
+ // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
+/* @internal */
+export function Confirm_transaction_unconfirmed(this_arg: bigint, txid: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Confirm_transaction_unconfirmed(this_arg, txid);
+ // debug statements here
+}
+ // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
+/* @internal */
+export function Confirm_best_block_updated(this_arg: bigint, header: number, height: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Confirm_best_block_updated(this_arg, header, height);
+ // debug statements here
+}
+ // LDKCVec_C2Tuple_ThirtyTwoBytesCOption_ThirtyTwoBytesZZZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
+/* @internal */
+export function Confirm_get_relevant_txids(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Confirm_get_relevant_txids(this_arg);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKEventHandler {
+ handle_event (event: bigint): void;
+}
+
+/* @internal */
+export function LDKEventHandler_new(impl: LDKEventHandler): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKEventHandler_new(i), i];
+}
+ // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, struct LDKEvent event
+/* @internal */
+export function EventHandler_handle_event(this_arg: bigint, event: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_EventHandler_handle_event(this_arg, event);
+ // debug statements here
+}
+/* @internal */
+export interface LDKEventsProvider {
+ process_pending_events (handler: bigint): void;
+}
+
+/* @internal */
+export function LDKEventsProvider_new(impl: LDKEventsProvider): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKEventsProvider_new(i), i];
+}
+ // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
+/* @internal */
+export function EventsProvider_process_pending_events(this_arg: bigint, handler: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_EventsProvider_process_pending_events(this_arg, handler);
+ // debug statements here
+}
+/* @internal */
+export class LDKFailureCode {
+ protected constructor() {}
+}
+/* @internal */
+export function LDKFailureCode_ty_from_ptr(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKFailureCode_ty_from_ptr(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKFailureCode_InvalidOnionPayload_get_invalid_onion_payload(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKFailureCode_InvalidOnionPayload_get_invalid_onion_payload(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKMessageSendEventsProvider {
+ get_and_clear_pending_msg_events (): number;
+}
+
+/* @internal */
+export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKMessageSendEventsProvider_new(i), i];
+}
+ // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
+/* @internal */
+export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKChannelMessageHandler {
+ handle_open_channel (their_node_id: number, msg: bigint): void;
+ handle_open_channel_v2 (their_node_id: number, msg: bigint): void;
+ handle_accept_channel (their_node_id: number, msg: bigint): void;
+ handle_accept_channel_v2 (their_node_id: number, msg: bigint): void;
+ handle_funding_created (their_node_id: number, msg: bigint): void;
+ handle_funding_signed (their_node_id: number, msg: bigint): void;
+ handle_channel_ready (their_node_id: number, msg: bigint): void;
+ handle_shutdown (their_node_id: number, msg: bigint): void;
+ handle_closing_signed (their_node_id: number, msg: bigint): void;
+ handle_tx_add_input (their_node_id: number, msg: bigint): void;
+ handle_tx_add_output (their_node_id: number, msg: bigint): void;
+ handle_tx_remove_input (their_node_id: number, msg: bigint): void;
+ handle_tx_remove_output (their_node_id: number, msg: bigint): void;
+ handle_tx_complete (their_node_id: number, msg: bigint): void;
+ handle_tx_signatures (their_node_id: number, msg: bigint): void;
+ handle_tx_init_rbf (their_node_id: number, msg: bigint): void;
+ handle_tx_ack_rbf (their_node_id: number, msg: bigint): void;
+ handle_tx_abort (their_node_id: number, msg: bigint): void;
+ handle_update_add_htlc (their_node_id: number, msg: bigint): void;
+ handle_update_fulfill_htlc (their_node_id: number, msg: bigint): void;
+ handle_update_fail_htlc (their_node_id: number, msg: bigint): void;
+ handle_update_fail_malformed_htlc (their_node_id: number, msg: bigint): void;
+ handle_commitment_signed (their_node_id: number, msg: bigint): void;
+ handle_revoke_and_ack (their_node_id: number, msg: bigint): void;
+ handle_update_fee (their_node_id: number, msg: bigint): void;
+ handle_announcement_signatures (their_node_id: number, msg: bigint): void;
+ peer_disconnected (their_node_id: number): void;
+ peer_connected (their_node_id: number, msg: bigint, inbound: boolean): bigint;
+ handle_channel_reestablish (their_node_id: number, msg: bigint): void;
+ handle_channel_update (their_node_id: number, msg: bigint): void;
+ handle_error (their_node_id: number, msg: bigint): void;
+ provided_node_features (): bigint;
+ provided_init_features (their_node_id: number): bigint;
+ get_genesis_hashes (): bigint;
+}
+
+/* @internal */
+export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: number): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKChannelMessageHandler_new(i, MessageSendEventsProvider), i];
+}
+ // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKOpenChannel *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_open_channel(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_open_channel(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_open_channel_v2 LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKOpenChannelV2 *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_open_channel_v2(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_open_channel_v2(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAcceptChannel *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_accept_channel(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_accept_channel(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_accept_channel_v2 LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAcceptChannelV2 *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_accept_channel_v2(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_accept_channel_v2(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_funding_created(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_created(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_funding_signed(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_signed(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_channel_ready LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReady *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_channel_ready(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_channel_ready(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKShutdown *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_shutdown(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_shutdown(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_closing_signed(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_closing_signed(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_tx_add_input LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAddInput *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_tx_add_input(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_tx_add_input(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_tx_add_output LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAddOutput *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_tx_add_output(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_tx_add_output(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_tx_remove_input LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxRemoveInput *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_tx_remove_input(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_tx_remove_input(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_tx_remove_output LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxRemoveOutput *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_tx_remove_output(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_tx_remove_output(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_tx_complete LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxComplete *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_tx_complete(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_tx_complete(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_tx_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxSignatures *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_tx_signatures(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_tx_signatures(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_tx_init_rbf LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxInitRbf *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_tx_init_rbf(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_tx_init_rbf(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_tx_ack_rbf LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAckRbf *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_tx_ack_rbf(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_tx_ack_rbf(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_tx_abort LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKTxAbort *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_tx_abort(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_tx_abort(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_update_add_htlc(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_add_htlc(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fail_htlc(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_commitment_signed(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_commitment_signed(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_revoke_and_ack(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_update_fee(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fee(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_announcement_signatures(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_announcement_signatures(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id
+/* @internal */
+export function ChannelMessageHandler_peer_disconnected(this_arg: bigint, their_node_id: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_disconnected(this_arg, their_node_id);
+ // debug statements here
+}
+ // LDKCResult_NoneNoneZ ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg, bool inbound
+/* @internal */
+export function ChannelMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, msg: bigint, inbound: boolean): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_connected(this_arg, their_node_id, msg, inbound);
+ return nativeResponseValue;
+}
+ // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_channel_reestablish(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_channel_reestablish(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_channel_update(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_channel_update(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
+/* @internal */
+export function ChannelMessageHandler_handle_error(this_arg: bigint, their_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_error(this_arg, their_node_id, msg);
+ // debug statements here
+}
+ // LDKNodeFeatures ChannelMessageHandler_provided_node_features LDKChannelMessageHandler *NONNULL_PTR this_arg
+/* @internal */
+export function ChannelMessageHandler_provided_node_features(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_provided_node_features(this_arg);
+ return nativeResponseValue;
+}
+ // LDKInitFeatures ChannelMessageHandler_provided_init_features LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id
+/* @internal */
+export function ChannelMessageHandler_provided_init_features(this_arg: bigint, their_node_id: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_provided_init_features(this_arg, their_node_id);
+ return nativeResponseValue;
+}
+ // LDKCOption_CVec_ThirtyTwoBytesZZ ChannelMessageHandler_get_genesis_hashes LDKChannelMessageHandler *NONNULL_PTR this_arg
+/* @internal */
+export function ChannelMessageHandler_get_genesis_hashes(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelMessageHandler_get_genesis_hashes(this_arg);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKRoutingMessageHandler {
+ handle_node_announcement (msg: bigint): bigint;
+ handle_channel_announcement (msg: bigint): bigint;
+ handle_channel_update (msg: bigint): bigint;
+ get_next_channel_announcement (starting_point: bigint): bigint;
+ get_next_node_announcement (starting_point: bigint): bigint;
+ peer_connected (their_node_id: number, init: bigint, inbound: boolean): bigint;
+ handle_reply_channel_range (their_node_id: number, msg: bigint): bigint;
+ handle_reply_short_channel_ids_end (their_node_id: number, msg: bigint): bigint;
+ handle_query_channel_range (their_node_id: number, msg: bigint): bigint;
+ handle_query_short_channel_ids (their_node_id: number, msg: bigint): bigint;
+ processing_queue_high (): boolean;
+ provided_node_features (): bigint;
+ provided_init_features (their_node_id: number): bigint;
+}
+
+/* @internal */
+export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: number): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKRoutingMessageHandler_new(i, MessageSendEventsProvider), i];
+}
+ // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
+/* @internal */
+export function RoutingMessageHandler_handle_node_announcement(this_arg: bigint, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_node_announcement(this_arg, msg);
+ return nativeResponseValue;
+}
+ // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
+/* @internal */
+export function RoutingMessageHandler_handle_channel_announcement(this_arg: bigint, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
+ return nativeResponseValue;
+}
+ // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
+/* @internal */
+export function RoutingMessageHandler_handle_channel_update(this_arg: bigint, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_channel_update(this_arg, msg);
+ return nativeResponseValue;
+}
+ // LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point
+/* @internal */
+export function RoutingMessageHandler_get_next_channel_announcement(this_arg: bigint, starting_point: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_get_next_channel_announcement(this_arg, starting_point);
+ return nativeResponseValue;
+}
+ // LDKNodeAnnouncement RoutingMessageHandler_get_next_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKNodeId starting_point
+/* @internal */
+export function RoutingMessageHandler_get_next_node_announcement(this_arg: bigint, starting_point: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_get_next_node_announcement(this_arg, starting_point);
+ return nativeResponseValue;
+}
+ // LDKCResult_NoneNoneZ RoutingMessageHandler_peer_connected LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init, bool inbound
+/* @internal */
+export function RoutingMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, init: bigint, inbound: boolean): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_peer_connected(this_arg, their_node_id, init, inbound);
+ return nativeResponseValue;
+}
+ // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
+/* @internal */
+export function RoutingMessageHandler_handle_reply_channel_range(this_arg: bigint, their_node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_reply_channel_range(this_arg, their_node_id, msg);
+ return nativeResponseValue;
+}
+ // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
+/* @internal */
+export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: bigint, their_node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, their_node_id, msg);
+ return nativeResponseValue;
+}
+ // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
+/* @internal */
+export function RoutingMessageHandler_handle_query_channel_range(this_arg: bigint, their_node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_query_channel_range(this_arg, their_node_id, msg);
+ return nativeResponseValue;
+}
+ // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
+/* @internal */
+export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: bigint, their_node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_query_short_channel_ids(this_arg, their_node_id, msg);
+ return nativeResponseValue;
+}
+ // bool RoutingMessageHandler_processing_queue_high LDKRoutingMessageHandler *NONNULL_PTR this_arg
+/* @internal */
+export function RoutingMessageHandler_processing_queue_high(this_arg: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_processing_queue_high(this_arg);
+ return nativeResponseValue;
+}
+ // LDKNodeFeatures RoutingMessageHandler_provided_node_features LDKRoutingMessageHandler *NONNULL_PTR this_arg
+/* @internal */
+export function RoutingMessageHandler_provided_node_features(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_provided_node_features(this_arg);
+ return nativeResponseValue;
+}
+ // LDKInitFeatures RoutingMessageHandler_provided_init_features LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id
+/* @internal */
+export function RoutingMessageHandler_provided_init_features(this_arg: bigint, their_node_id: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RoutingMessageHandler_provided_init_features(this_arg, their_node_id);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKOnionMessageProvider {
+ next_onion_message_for_peer (peer_node_id: number): bigint;
+}
+
+/* @internal */
+export function LDKOnionMessageProvider_new(impl: LDKOnionMessageProvider): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKOnionMessageProvider_new(i), i];
+}
+ // LDKOnionMessage OnionMessageProvider_next_onion_message_for_peer LDKOnionMessageProvider *NONNULL_PTR this_arg, struct LDKPublicKey peer_node_id
+/* @internal */
+export function OnionMessageProvider_next_onion_message_for_peer(this_arg: bigint, peer_node_id: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessageProvider_next_onion_message_for_peer(this_arg, peer_node_id);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKOnionMessageHandler {
+ handle_onion_message (peer_node_id: number, msg: bigint): void;
+ peer_connected (their_node_id: number, init: bigint, inbound: boolean): bigint;
+ peer_disconnected (their_node_id: number): void;
+ provided_node_features (): bigint;
+ provided_init_features (their_node_id: number): bigint;
+}
+
+/* @internal */
+export function LDKOnionMessageHandler_new(impl: LDKOnionMessageHandler, OnionMessageProvider: number): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKOnionMessageHandler_new(i, OnionMessageProvider), i];
+}
+ // void OnionMessageHandler_handle_onion_message LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey peer_node_id, const struct LDKOnionMessage *NONNULL_PTR msg
+/* @internal */
+export function OnionMessageHandler_handle_onion_message(this_arg: bigint, peer_node_id: number, msg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessageHandler_handle_onion_message(this_arg, peer_node_id, msg);
+ // debug statements here
+}
+ // LDKCResult_NoneNoneZ OnionMessageHandler_peer_connected LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init, bool inbound
+/* @internal */
+export function OnionMessageHandler_peer_connected(this_arg: bigint, their_node_id: number, init: bigint, inbound: boolean): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessageHandler_peer_connected(this_arg, their_node_id, init, inbound);
+ return nativeResponseValue;
+}
+ // void OnionMessageHandler_peer_disconnected LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id
+/* @internal */
+export function OnionMessageHandler_peer_disconnected(this_arg: bigint, their_node_id: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessageHandler_peer_disconnected(this_arg, their_node_id);
+ // debug statements here
+}
+ // LDKNodeFeatures OnionMessageHandler_provided_node_features LDKOnionMessageHandler *NONNULL_PTR this_arg
+/* @internal */
+export function OnionMessageHandler_provided_node_features(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessageHandler_provided_node_features(this_arg);
+ return nativeResponseValue;
+}
+ // LDKInitFeatures OnionMessageHandler_provided_init_features LDKOnionMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id
+/* @internal */
+export function OnionMessageHandler_provided_init_features(this_arg: bigint, their_node_id: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessageHandler_provided_init_features(this_arg, their_node_id);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKCustomMessageReader {
+ read (message_type: number, buffer: number): bigint;
+}
+
+/* @internal */
+export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKCustomMessageReader_new(i), i];
+}
+ // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
+/* @internal */
+export function CustomMessageReader_read(this_arg: bigint, message_type: number, buffer: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomMessageReader_read(this_arg, message_type, buffer);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKCustomMessageHandler {
+ handle_custom_message (msg: bigint, sender_node_id: number): bigint;
+ get_and_clear_pending_msg (): number;
+ provided_node_features (): bigint;
+ provided_init_features (their_node_id: number): bigint;
+}
+
+/* @internal */
+export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: number): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKCustomMessageHandler_new(i, CustomMessageReader), i];
+}
+ // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
+/* @internal */
+export function CustomMessageHandler_handle_custom_message(this_arg: bigint, msg: bigint, sender_node_id: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomMessageHandler_handle_custom_message(this_arg, msg, sender_node_id);
+ return nativeResponseValue;
+}
+ // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
+/* @internal */
+export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomMessageHandler_get_and_clear_pending_msg(this_arg);
+ return nativeResponseValue;
+}
+ // LDKNodeFeatures CustomMessageHandler_provided_node_features LDKCustomMessageHandler *NONNULL_PTR this_arg
+/* @internal */
+export function CustomMessageHandler_provided_node_features(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomMessageHandler_provided_node_features(this_arg);
+ return nativeResponseValue;
+}
+ // LDKInitFeatures CustomMessageHandler_provided_init_features LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id
+/* @internal */
+export function CustomMessageHandler_provided_init_features(this_arg: bigint, their_node_id: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomMessageHandler_provided_init_features(this_arg, their_node_id);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKOffersMessageHandler {
+ handle_message (message: bigint): bigint;
+}
+
+/* @internal */
+export function LDKOffersMessageHandler_new(impl: LDKOffersMessageHandler): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKOffersMessageHandler_new(i), i];
+}
+ // LDKCOption_OffersMessageZ OffersMessageHandler_handle_message LDKOffersMessageHandler *NONNULL_PTR this_arg, struct LDKOffersMessage message
+/* @internal */
+export function OffersMessageHandler_handle_message(this_arg: bigint, message: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OffersMessageHandler_handle_message(this_arg, message);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKCustomOnionMessageHandler {
+ handle_custom_message (msg: bigint): bigint;
+ read_custom_message (message_type: bigint, buffer: number): bigint;
+}
+
+/* @internal */
+export function LDKCustomOnionMessageHandler_new(impl: LDKCustomOnionMessageHandler): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKCustomOnionMessageHandler_new(i), i];
+}
+ // LDKCOption_CustomOnionMessageContentsZ CustomOnionMessageHandler_handle_custom_message LDKCustomOnionMessageHandler *NONNULL_PTR this_arg, struct LDKCustomOnionMessageContents msg
+/* @internal */
+export function CustomOnionMessageHandler_handle_custom_message(this_arg: bigint, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageHandler_handle_custom_message(this_arg, msg);
+ return nativeResponseValue;
+}
+ // LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CustomOnionMessageHandler_read_custom_message LDKCustomOnionMessageHandler *NONNULL_PTR this_arg, uint64_t message_type, struct LDKu8slice buffer
+/* @internal */
+export function CustomOnionMessageHandler_read_custom_message(this_arg: bigint, message_type: bigint, buffer: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageHandler_read_custom_message(this_arg, message_type, buffer);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKSocketDescriptor {
+ send_data (data: number, resume_read: boolean): number;
+ disconnect_socket (): void;
+ eq (other_arg: bigint): boolean;
+ hash (): bigint;
+}
+
+/* @internal */
+export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKSocketDescriptor_new(i), i];
+}
+ // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
+/* @internal */
+export function SocketDescriptor_send_data(this_arg: bigint, data: number, resume_read: boolean): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SocketDescriptor_send_data(this_arg, data, resume_read);
+ return nativeResponseValue;
+}
+ // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
+/* @internal */
+export function SocketDescriptor_disconnect_socket(this_arg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SocketDescriptor_disconnect_socket(this_arg);
+ // debug statements here
+}
+ // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
+/* @internal */
+export function SocketDescriptor_hash(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SocketDescriptor_hash(this_arg);
+ return nativeResponseValue;
+}
+/* @internal */
+export class LDKEffectiveCapacity {
+ protected constructor() {}
+}
+/* @internal */
+export function LDKEffectiveCapacity_ty_from_ptr(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEffectiveCapacity_ty_from_ptr(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKEffectiveCapacity_ExactLiquidity_get_liquidity_msat(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEffectiveCapacity_ExactLiquidity_get_liquidity_msat(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKEffectiveCapacity_AdvertisedMaxHTLC_get_amount_msat(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEffectiveCapacity_AdvertisedMaxHTLC_get_amount_msat(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKEffectiveCapacity_Total_get_capacity_msat(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEffectiveCapacity_Total_get_capacity_msat(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKEffectiveCapacity_Total_get_htlc_maximum_msat(ptr: bigint): bigint {
+ 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 function LDKEffectiveCapacity_HintMaxHTLC_get_amount_msat(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKEffectiveCapacity_HintMaxHTLC_get_amount_msat(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export class LDKPayee {
+ protected constructor() {}
+}
+/* @internal */
+export function LDKPayee_ty_from_ptr(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKPayee_ty_from_ptr(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKPayee_Blinded_get_route_hints(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKPayee_Blinded_get_route_hints(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKPayee_Blinded_get_features(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKPayee_Blinded_get_features(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKPayee_Clear_get_node_id(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKPayee_Clear_get_node_id(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKPayee_Clear_get_route_hints(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKPayee_Clear_get_route_hints(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKPayee_Clear_get_features(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKPayee_Clear_get_features(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKPayee_Clear_get_final_cltv_expiry_delta(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKPayee_Clear_get_final_cltv_expiry_delta(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKScore {
+ write (): number;
+}
+
+/* @internal */
+export function LDKScore_new(impl: LDKScore, ScoreLookUp: number, ScoreUpdate: number): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKScore_new(i, ScoreLookUp, ScoreUpdate), i];
+}
+ // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
+/* @internal */
+export function Score_write(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Score_write(this_arg);
+ return nativeResponseValue;
+}
+/* @internal */
+export class LDKDestination {
+ protected constructor() {}
+}
+/* @internal */
+export function LDKDestination_ty_from_ptr(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKDestination_ty_from_ptr(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKDestination_Node_get_node(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKDestination_Node_get_node(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKDestination_BlindedPath_get_blinded_path(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKDestination_BlindedPath_get_blinded_path(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKMessageRouter {
+ find_path (sender: number, peers: number, destination: bigint): bigint;
+}
+
+/* @internal */
+export function LDKMessageRouter_new(impl: LDKMessageRouter): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKMessageRouter_new(i), i];
+}
+ // LDKCResult_OnionMessagePathNoneZ MessageRouter_find_path LDKMessageRouter *NONNULL_PTR this_arg, struct LDKPublicKey sender, struct LDKCVec_PublicKeyZ peers, struct LDKDestination destination
+/* @internal */
+export function MessageRouter_find_path(this_arg: bigint, sender: number, peers: number, destination: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageRouter_find_path(this_arg, sender, peers, destination);
+ return nativeResponseValue;
+}
+/* @internal */
+export class LDKOnionMessageContents {
+ protected constructor() {}
+}
+/* @internal */
+export function LDKOnionMessageContents_ty_from_ptr(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKOnionMessageContents_ty_from_ptr(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKOnionMessageContents_Offers_get_offers(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKOnionMessageContents_Offers_get_offers(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKOnionMessageContents_Custom_get_custom(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKOnionMessageContents_Custom_get_custom(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKCoinSelectionSource {
+ select_confirmed_utxos (claim_id: number, must_spend: number, must_pay_to: number, target_feerate_sat_per_1000_weight: number): bigint;
+ sign_tx (tx: number): bigint;
+}
+
+/* @internal */
+export function LDKCoinSelectionSource_new(impl: LDKCoinSelectionSource): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKCoinSelectionSource_new(i), i];
+}
+ // LDKCResult_CoinSelectionNoneZ CoinSelectionSource_select_confirmed_utxos LDKCoinSelectionSource *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes claim_id, struct LDKCVec_InputZ must_spend, struct LDKCVec_TxOutZ must_pay_to, uint32_t target_feerate_sat_per_1000_weight
+/* @internal */
+export function CoinSelectionSource_select_confirmed_utxos(this_arg: bigint, claim_id: number, must_spend: number, must_pay_to: number, target_feerate_sat_per_1000_weight: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CoinSelectionSource_select_confirmed_utxos(this_arg, claim_id, must_spend, must_pay_to, target_feerate_sat_per_1000_weight);
+ return nativeResponseValue;
+}
+ // LDKCResult_TransactionNoneZ CoinSelectionSource_sign_tx LDKCoinSelectionSource *NONNULL_PTR this_arg, struct LDKTransaction tx
+/* @internal */
+export function CoinSelectionSource_sign_tx(this_arg: bigint, tx: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CoinSelectionSource_sign_tx(this_arg, tx);
+ return nativeResponseValue;
+}
+/* @internal */
+export interface LDKWalletSource {
+ list_confirmed_utxos (): bigint;
+ get_change_script (): bigint;
+ sign_tx (tx: number): bigint;
+}
+
+/* @internal */
+export function LDKWalletSource_new(impl: LDKWalletSource): [bigint, number] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ var new_obj_idx = js_objs.length;
+ for (var i = 0; i < js_objs.length; i++) {
+ if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
+ }
+ js_objs[i] = new WeakRef(impl);
+ return [wasm.TS_LDKWalletSource_new(i), i];
+}
+ // LDKCResult_CVec_UtxoZNoneZ WalletSource_list_confirmed_utxos LDKWalletSource *NONNULL_PTR this_arg
+/* @internal */
+export function WalletSource_list_confirmed_utxos(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_WalletSource_list_confirmed_utxos(this_arg);
+ return nativeResponseValue;
+}
+ // LDKCResult_CVec_u8ZNoneZ WalletSource_get_change_script LDKWalletSource *NONNULL_PTR this_arg
+/* @internal */
+export function WalletSource_get_change_script(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_WalletSource_get_change_script(this_arg);
+ return nativeResponseValue;
+}
+ // LDKCResult_TransactionNoneZ WalletSource_sign_tx LDKWalletSource *NONNULL_PTR this_arg, struct LDKTransaction tx
+/* @internal */
+export function WalletSource_sign_tx(this_arg: bigint, tx: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_WalletSource_sign_tx(this_arg, tx);
+ return nativeResponseValue;
+}
+/* @internal */
+export class LDKGossipSync {
+ protected constructor() {}
+}
+/* @internal */
+export function LDKGossipSync_ty_from_ptr(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKGossipSync_ty_from_ptr(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKGossipSync_P2P_get_p2p(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKGossipSync_P2P_get_p2p(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKGossipSync_Rapid_get_rapid(ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKGossipSync_Rapid_get_rapid(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export class LDKFallback {
+ protected constructor() {}
+}
+/* @internal */
+export function LDKFallback_ty_from_ptr(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKFallback_ty_from_ptr(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKFallback_SegWitProgram_get_version(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKFallback_SegWitProgram_get_version(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKFallback_SegWitProgram_get_program(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKFallback_SegWitProgram_get_program(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKFallback_PubKeyHash_get_pub_key_hash(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKFallback_PubKeyHash_get_pub_key_hash(ptr);
+ return nativeResponseValue;
+}
+/* @internal */
+export function LDKFallback_ScriptHash_get_script_hash(ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_LDKFallback_ScriptHash_get_script_hash(ptr);
+ return nativeResponseValue;
+}
+ // struct LDKStr _ldk_get_compiled_version(void);
+/* @internal */
+export function _ldk_get_compiled_version(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS__ldk_get_compiled_version();
+ return nativeResponseValue;
+}
+ // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
+/* @internal */
+export function _ldk_c_bindings_get_compiled_version(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS__ldk_c_bindings_get_compiled_version();
+ return nativeResponseValue;
+}
+ // struct LDKSixteenBytes U128_le_bytes(struct LDKU128 val);
+/* @internal */
+export function U128_le_bytes(val: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_U128_le_bytes(val);
+ return nativeResponseValue;
+}
+ // struct LDKU128 U128_new(struct LDKSixteenBytes le_bytes);
+/* @internal */
+export function U128_new(le_bytes: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_U128_new(le_bytes);
+ return nativeResponseValue;
+}
+ // struct LDKBigEndianScalar BigEndianScalar_new(struct LDKThirtyTwoBytes big_endian_bytes);
+/* @internal */
+export function BigEndianScalar_new(big_endian_bytes: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BigEndianScalar_new(big_endian_bytes);
+ return nativeResponseValue;
+}
+ // uint64_t Bech32Error_clone_ptr(LDKBech32Error *NONNULL_PTR arg);
+/* @internal */
+export function Bech32Error_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bech32Error_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKBech32Error Bech32Error_clone(const struct LDKBech32Error *NONNULL_PTR orig);
+/* @internal */
+export function Bech32Error_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bech32Error_clone(orig);
+ return nativeResponseValue;
+}
+ // void Bech32Error_free(struct LDKBech32Error o);
+/* @internal */
+export function Bech32Error_free(o: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bech32Error_free(o);
+ // debug statements here
+}
+ // void Transaction_free(struct LDKTransaction _res);
+/* @internal */
+export function Transaction_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Transaction_free(_res);
+ // debug statements here
+}
+ // void Witness_free(struct LDKWitness _res);
+/* @internal */
+export function Witness_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Witness_free(_res);
+ // debug statements here
+}
+ // void TxIn_free(struct LDKTxIn _res);
+/* @internal */
+export function TxIn_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_TxIn_free(_res);
+ // debug statements here
+}
+ // struct LDKTxIn TxIn_new(struct LDKWitness witness, struct LDKCVec_u8Z script_sig, uint32_t sequence, struct LDKThirtyTwoBytes previous_txid, uint32_t previous_vout);
+/* @internal */
+export function TxIn_new(witness: number, script_sig: number, sequence: number, previous_txid: number, previous_vout: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_TxIn_new(witness, script_sig, sequence, previous_txid, previous_vout);
+ return nativeResponseValue;
+}
+ // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
+/* @internal */
+export function TxOut_new(script_pubkey: number, value: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_TxOut_new(script_pubkey, value);
+ return nativeResponseValue;
+}
+ // void TxOut_free(struct LDKTxOut _res);
+/* @internal */
+export function TxOut_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_TxOut_free(_res);
+ // debug statements here
+}
+ // uint64_t TxOut_clone_ptr(LDKTxOut *NONNULL_PTR arg);
+/* @internal */
+export function TxOut_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_TxOut_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
+/* @internal */
+export function TxOut_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_TxOut_clone(orig);
+ return nativeResponseValue;
+}
+ // void Str_free(struct LDKStr _res);
+/* @internal */
+export function Str_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Str_free(_res);
+ // debug statements here
+}
+ // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
+/* @internal */
+export function COption_u64Z_some(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_u64Z_some(o);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_u64Z COption_u64Z_none(void);
+/* @internal */
+export function COption_u64Z_none(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_u64Z_none();
+ return nativeResponseValue;
+}
+ // void COption_u64Z_free(struct LDKCOption_u64Z _res);
+/* @internal */
+export function COption_u64Z_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_u64Z_free(_res);
+ // debug statements here
+}
+ // uint64_t COption_u64Z_clone_ptr(LDKCOption_u64Z *NONNULL_PTR arg);
+/* @internal */
+export function COption_u64Z_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_u64Z_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
+/* @internal */
+export function COption_u64Z_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_u64Z_clone(orig);
+ return nativeResponseValue;
+}
+ // void CVec_BlindedPathZ_free(struct LDKCVec_BlindedPathZ _res);
+/* @internal */
+export function CVec_BlindedPathZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CVec_BlindedPathZ_free(_res);
+ // debug statements here
+}
+ // struct LDKCResult_RefundBolt12ParseErrorZ CResult_RefundBolt12ParseErrorZ_ok(struct LDKRefund o);
+/* @internal */
+export function CResult_RefundBolt12ParseErrorZ_ok(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RefundBolt12ParseErrorZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_RefundBolt12ParseErrorZ CResult_RefundBolt12ParseErrorZ_err(struct LDKBolt12ParseError e);
+/* @internal */
+export function CResult_RefundBolt12ParseErrorZ_err(e: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RefundBolt12ParseErrorZ_err(e);
+ return nativeResponseValue;
+}
+ // bool CResult_RefundBolt12ParseErrorZ_is_ok(const struct LDKCResult_RefundBolt12ParseErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_RefundBolt12ParseErrorZ_is_ok(o: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RefundBolt12ParseErrorZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_RefundBolt12ParseErrorZ_free(struct LDKCResult_RefundBolt12ParseErrorZ _res);
+/* @internal */
+export function CResult_RefundBolt12ParseErrorZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RefundBolt12ParseErrorZ_free(_res);
+ // debug statements here
+}
+ // uint64_t CResult_RefundBolt12ParseErrorZ_clone_ptr(LDKCResult_RefundBolt12ParseErrorZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_RefundBolt12ParseErrorZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RefundBolt12ParseErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_RefundBolt12ParseErrorZ CResult_RefundBolt12ParseErrorZ_clone(const struct LDKCResult_RefundBolt12ParseErrorZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_RefundBolt12ParseErrorZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RefundBolt12ParseErrorZ_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_RetryDecodeErrorZ CResult_RetryDecodeErrorZ_ok(struct LDKRetry o);
+/* @internal */
+export function CResult_RetryDecodeErrorZ_ok(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RetryDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_RetryDecodeErrorZ CResult_RetryDecodeErrorZ_err(struct LDKDecodeError e);
+/* @internal */
+export function CResult_RetryDecodeErrorZ_err(e: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RetryDecodeErrorZ_err(e);
+ return nativeResponseValue;
+}
+ // bool CResult_RetryDecodeErrorZ_is_ok(const struct LDKCResult_RetryDecodeErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_RetryDecodeErrorZ_is_ok(o: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RetryDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_RetryDecodeErrorZ_free(struct LDKCResult_RetryDecodeErrorZ _res);
+/* @internal */
+export function CResult_RetryDecodeErrorZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RetryDecodeErrorZ_free(_res);
+ // debug statements here
+}
+ // uint64_t CResult_RetryDecodeErrorZ_clone_ptr(LDKCResult_RetryDecodeErrorZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_RetryDecodeErrorZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RetryDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_RetryDecodeErrorZ CResult_RetryDecodeErrorZ_clone(const struct LDKCResult_RetryDecodeErrorZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_RetryDecodeErrorZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RetryDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
+/* @internal */
+export function CResult_NoneAPIErrorZ_ok(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_ok();
+ return nativeResponseValue;
+}
+ // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
+/* @internal */
+export function CResult_NoneAPIErrorZ_err(e: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_err(e);
+ return nativeResponseValue;
+}
+ // bool CResult_NoneAPIErrorZ_is_ok(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_NoneAPIErrorZ_is_ok(o: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
+/* @internal */
+export function CResult_NoneAPIErrorZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_free(_res);
+ // debug statements here
+}
+ // uint64_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_NoneAPIErrorZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_NoneAPIErrorZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_clone(orig);
+ return nativeResponseValue;
+}
+ // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
+/* @internal */
+export function CVec_CResult_NoneAPIErrorZZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CVec_CResult_NoneAPIErrorZZ_free(_res);
+ // debug statements here
+}
+ // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
+/* @internal */
+export function CVec_APIErrorZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CVec_APIErrorZ_free(_res);
+ // debug statements here
+}
+ // struct LDKCOption_ThirtyTwoBytesZ COption_ThirtyTwoBytesZ_some(struct LDKThirtyTwoBytes o);
+/* @internal */
+export function COption_ThirtyTwoBytesZ_some(o: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_ThirtyTwoBytesZ_some(o);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_ThirtyTwoBytesZ COption_ThirtyTwoBytesZ_none(void);
+/* @internal */
+export function COption_ThirtyTwoBytesZ_none(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_ThirtyTwoBytesZ_none();
+ return nativeResponseValue;
+}
+ // void COption_ThirtyTwoBytesZ_free(struct LDKCOption_ThirtyTwoBytesZ _res);
+/* @internal */
+export function COption_ThirtyTwoBytesZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_ThirtyTwoBytesZ_free(_res);
+ // debug statements here
+}
+ // uint64_t COption_ThirtyTwoBytesZ_clone_ptr(LDKCOption_ThirtyTwoBytesZ *NONNULL_PTR arg);
+/* @internal */
+export function COption_ThirtyTwoBytesZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_ThirtyTwoBytesZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_ThirtyTwoBytesZ COption_ThirtyTwoBytesZ_clone(const struct LDKCOption_ThirtyTwoBytesZ *NONNULL_PTR orig);
+/* @internal */
+export function COption_ThirtyTwoBytesZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_ThirtyTwoBytesZ_clone(orig);
+ return nativeResponseValue;
+}
+ // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
+/* @internal */
+export function CVec_u8Z_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CVec_u8Z_free(_res);
+ // debug statements here
+}
+ // struct LDKCOption_CVec_u8ZZ COption_CVec_u8ZZ_some(struct LDKCVec_u8Z o);
+/* @internal */
+export function COption_CVec_u8ZZ_some(o: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CVec_u8ZZ_some(o);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_CVec_u8ZZ COption_CVec_u8ZZ_none(void);
+/* @internal */
+export function COption_CVec_u8ZZ_none(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CVec_u8ZZ_none();
+ return nativeResponseValue;
+}
+ // void COption_CVec_u8ZZ_free(struct LDKCOption_CVec_u8ZZ _res);
+/* @internal */
+export function COption_CVec_u8ZZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CVec_u8ZZ_free(_res);
+ // debug statements here
+}
+ // uint64_t COption_CVec_u8ZZ_clone_ptr(LDKCOption_CVec_u8ZZ *NONNULL_PTR arg);
+/* @internal */
+export function COption_CVec_u8ZZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CVec_u8ZZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_CVec_u8ZZ COption_CVec_u8ZZ_clone(const struct LDKCOption_CVec_u8ZZ *NONNULL_PTR orig);
+/* @internal */
+export function COption_CVec_u8ZZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CVec_u8ZZ_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_RecipientOnionFieldsDecodeErrorZ CResult_RecipientOnionFieldsDecodeErrorZ_ok(struct LDKRecipientOnionFields o);
+/* @internal */
+export function CResult_RecipientOnionFieldsDecodeErrorZ_ok(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_RecipientOnionFieldsDecodeErrorZ CResult_RecipientOnionFieldsDecodeErrorZ_err(struct LDKDecodeError e);
+/* @internal */
+export function CResult_RecipientOnionFieldsDecodeErrorZ_err(e: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsDecodeErrorZ_err(e);
+ return nativeResponseValue;
+}
+ // bool CResult_RecipientOnionFieldsDecodeErrorZ_is_ok(const struct LDKCResult_RecipientOnionFieldsDecodeErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_RecipientOnionFieldsDecodeErrorZ_is_ok(o: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_RecipientOnionFieldsDecodeErrorZ_free(struct LDKCResult_RecipientOnionFieldsDecodeErrorZ _res);
+/* @internal */
+export function CResult_RecipientOnionFieldsDecodeErrorZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsDecodeErrorZ_free(_res);
+ // debug statements here
+}
+ // uint64_t CResult_RecipientOnionFieldsDecodeErrorZ_clone_ptr(LDKCResult_RecipientOnionFieldsDecodeErrorZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_RecipientOnionFieldsDecodeErrorZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_RecipientOnionFieldsDecodeErrorZ CResult_RecipientOnionFieldsDecodeErrorZ_clone(const struct LDKCResult_RecipientOnionFieldsDecodeErrorZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_RecipientOnionFieldsDecodeErrorZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t C2Tuple_u64CVec_u8ZZ_clone_ptr(LDKC2Tuple_u64CVec_u8ZZ *NONNULL_PTR arg);
+/* @internal */
+export function C2Tuple_u64CVec_u8ZZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_C2Tuple_u64CVec_u8ZZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKC2Tuple_u64CVec_u8ZZ C2Tuple_u64CVec_u8ZZ_clone(const struct LDKC2Tuple_u64CVec_u8ZZ *NONNULL_PTR orig);
+/* @internal */
+export function C2Tuple_u64CVec_u8ZZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_C2Tuple_u64CVec_u8ZZ_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKC2Tuple_u64CVec_u8ZZ C2Tuple_u64CVec_u8ZZ_new(uint64_t a, struct LDKCVec_u8Z b);
+/* @internal */
+export function C2Tuple_u64CVec_u8ZZ_new(a: bigint, b: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_C2Tuple_u64CVec_u8ZZ_new(a, b);
+ return nativeResponseValue;
+}
+ // void C2Tuple_u64CVec_u8ZZ_free(struct LDKC2Tuple_u64CVec_u8ZZ _res);
+/* @internal */
+export function C2Tuple_u64CVec_u8ZZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_C2Tuple_u64CVec_u8ZZ_free(_res);
+ // debug statements here
+}
+ // void CVec_C2Tuple_u64CVec_u8ZZZ_free(struct LDKCVec_C2Tuple_u64CVec_u8ZZZ _res);
+/* @internal */
+export function CVec_C2Tuple_u64CVec_u8ZZZ_free(_res: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CVec_C2Tuple_u64CVec_u8ZZZ_free(_res);
+ // debug statements here
+}
+ // struct LDKCResult_RecipientOnionFieldsNoneZ CResult_RecipientOnionFieldsNoneZ_ok(struct LDKRecipientOnionFields o);
+/* @internal */
+export function CResult_RecipientOnionFieldsNoneZ_ok(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsNoneZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_RecipientOnionFieldsNoneZ CResult_RecipientOnionFieldsNoneZ_err(void);
+/* @internal */
+export function CResult_RecipientOnionFieldsNoneZ_err(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsNoneZ_err();
+ return nativeResponseValue;
+}
+ // bool CResult_RecipientOnionFieldsNoneZ_is_ok(const struct LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_RecipientOnionFieldsNoneZ_is_ok(o: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsNoneZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_RecipientOnionFieldsNoneZ_free(struct LDKCResult_RecipientOnionFieldsNoneZ _res);
+/* @internal */
+export function CResult_RecipientOnionFieldsNoneZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsNoneZ_free(_res);
+ // debug statements here
+}
+ // uint64_t CResult_RecipientOnionFieldsNoneZ_clone_ptr(LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_RecipientOnionFieldsNoneZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsNoneZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_RecipientOnionFieldsNoneZ CResult_RecipientOnionFieldsNoneZ_clone(const struct LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_RecipientOnionFieldsNoneZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_RecipientOnionFieldsNoneZ_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
+}
+ // struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_some(struct LDKCVec_ThirtyTwoBytesZ o);
+/* @internal */
+export function COption_CVec_ThirtyTwoBytesZZ_some(o: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CVec_ThirtyTwoBytesZZ_some(o);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_none(void);
+/* @internal */
+export function COption_CVec_ThirtyTwoBytesZZ_none(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CVec_ThirtyTwoBytesZZ_none();
+ return nativeResponseValue;
+}
+ // void COption_CVec_ThirtyTwoBytesZZ_free(struct LDKCOption_CVec_ThirtyTwoBytesZZ _res);
+/* @internal */
+export function COption_CVec_ThirtyTwoBytesZZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CVec_ThirtyTwoBytesZZ_free(_res);
+ // debug statements here
+}
+ // uint64_t COption_CVec_ThirtyTwoBytesZZ_clone_ptr(LDKCOption_CVec_ThirtyTwoBytesZZ *NONNULL_PTR arg);
+/* @internal */
+export function COption_CVec_ThirtyTwoBytesZZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CVec_ThirtyTwoBytesZZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_clone(const struct LDKCOption_CVec_ThirtyTwoBytesZZ *NONNULL_PTR orig);
+/* @internal */
+export function COption_CVec_ThirtyTwoBytesZZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_COption_CVec_ThirtyTwoBytesZZ_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_ok(struct LDKThirtyTwoBytes o);
+/* @internal */
+export function CResult_ThirtyTwoBytesNoneZ_ok(o: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesNoneZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_err(void);
+/* @internal */
+export function CResult_ThirtyTwoBytesNoneZ_err(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesNoneZ_err();
+ return nativeResponseValue;
+}
+ // bool CResult_ThirtyTwoBytesNoneZ_is_ok(const struct LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_ThirtyTwoBytesNoneZ_is_ok(o: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesNoneZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_ThirtyTwoBytesNoneZ_free(struct LDKCResult_ThirtyTwoBytesNoneZ _res);
+/* @internal */
+export function CResult_ThirtyTwoBytesNoneZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesNoneZ_free(_res);
+ // debug statements here
+}
+ // uint64_t CResult_ThirtyTwoBytesNoneZ_clone_ptr(LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_ThirtyTwoBytesNoneZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesNoneZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_clone(const struct LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_ThirtyTwoBytesNoneZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_ThirtyTwoBytesNoneZ_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_BlindedPayInfoDecodeErrorZ CResult_BlindedPayInfoDecodeErrorZ_ok(struct LDKBlindedPayInfo o);
+/* @internal */
+export function CResult_BlindedPayInfoDecodeErrorZ_ok(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_BlindedPayInfoDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_BlindedPayInfoDecodeErrorZ CResult_BlindedPayInfoDecodeErrorZ_err(struct LDKDecodeError e);
+/* @internal */
+export function CResult_BlindedPayInfoDecodeErrorZ_err(e: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_BlindedPayInfoDecodeErrorZ_err(e);
+ return nativeResponseValue;
+}
+ // bool CResult_BlindedPayInfoDecodeErrorZ_is_ok(const struct LDKCResult_BlindedPayInfoDecodeErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_BlindedPayInfoDecodeErrorZ_is_ok(o: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_BlindedPayInfoDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_BlindedPayInfoDecodeErrorZ_free(struct LDKCResult_BlindedPayInfoDecodeErrorZ _res);
+/* @internal */
+export function CResult_BlindedPayInfoDecodeErrorZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_BlindedPayInfoDecodeErrorZ_free(_res);
+ // debug statements here
+}
+ // uint64_t CResult_BlindedPayInfoDecodeErrorZ_clone_ptr(LDKCResult_BlindedPayInfoDecodeErrorZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_BlindedPayInfoDecodeErrorZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_BlindedPayInfoDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_BlindedPayInfoDecodeErrorZ CResult_BlindedPayInfoDecodeErrorZ_clone(const struct LDKCResult_BlindedPayInfoDecodeErrorZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_BlindedPayInfoDecodeErrorZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_BlindedPayInfoDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
+/* @internal */
+export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+/* @internal */
+export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
+ return nativeResponseValue;
+}
+ // bool CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
+/* @internal */
+export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
+ // debug statements here
+}
+ // uint64_t CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
+/* @internal */
+export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+/* @internal */
+export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
+ return nativeResponseValue;
+}
+ // bool CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
+/* @internal */
+export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
+ // debug statements here
+}
+ // uint64_t CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
+/* @internal */
+export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+/* @internal */
+export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
+/* @internal */
+export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+/* @internal */
+export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
+ return nativeResponseValue;
+}
+ // bool CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
+/* @internal */
+export function CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o);
+ return nativeResponseValue;
+}
+ // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
+/* @internal */
+export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);