+ const nativeResponseValue = wasm.TS_KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, params);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_CVec_u8ZNoneZ KeysManager_sign_spendable_outputs_psbt(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_u8Z psbt);
+/* @internal */
+export function KeysManager_sign_spendable_outputs_psbt(this_arg: bigint, descriptors: number, psbt: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_KeysManager_sign_spendable_outputs_psbt(this_arg, descriptors, psbt);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_TransactionNoneZ KeysManager_spend_spendable_outputs(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime);
+/* @internal */
+export function KeysManager_spend_spendable_outputs(this_arg: bigint, descriptors: number, outputs: number, change_destination_script: number, feerate_sat_per_1000_weight: number, locktime: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, change_destination_script, feerate_sat_per_1000_weight, locktime);
+ return nativeResponseValue;
+}
+ // struct LDKEntropySource KeysManager_as_EntropySource(const struct LDKKeysManager *NONNULL_PTR this_arg);
+/* @internal */
+export function KeysManager_as_EntropySource(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_KeysManager_as_EntropySource(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKNodeSigner KeysManager_as_NodeSigner(const struct LDKKeysManager *NONNULL_PTR this_arg);
+/* @internal */
+export function KeysManager_as_NodeSigner(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_KeysManager_as_NodeSigner(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKSignerProvider KeysManager_as_SignerProvider(const struct LDKKeysManager *NONNULL_PTR this_arg);
+/* @internal */
+export function KeysManager_as_SignerProvider(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_KeysManager_as_SignerProvider(this_arg);
+ return nativeResponseValue;
+}
+ // void PhantomKeysManager_free(struct LDKPhantomKeysManager this_obj);
+/* @internal */
+export function PhantomKeysManager_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PhantomKeysManager_free(this_obj);
+ // debug statements here
+}
+ // struct LDKEntropySource PhantomKeysManager_as_EntropySource(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
+/* @internal */
+export function PhantomKeysManager_as_EntropySource(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PhantomKeysManager_as_EntropySource(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKNodeSigner PhantomKeysManager_as_NodeSigner(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
+/* @internal */
+export function PhantomKeysManager_as_NodeSigner(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PhantomKeysManager_as_NodeSigner(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKSignerProvider PhantomKeysManager_as_SignerProvider(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
+/* @internal */
+export function PhantomKeysManager_as_SignerProvider(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PhantomKeysManager_as_SignerProvider(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKPhantomKeysManager PhantomKeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos, const uint8_t (*cross_node_seed)[32]);
+/* @internal */
+export function PhantomKeysManager_new(seed: number, starting_time_secs: bigint, starting_time_nanos: number, cross_node_seed: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PhantomKeysManager_new(seed, starting_time_secs, starting_time_nanos, cross_node_seed);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_TransactionNoneZ PhantomKeysManager_spend_spendable_outputs(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime);
+/* @internal */
+export function PhantomKeysManager_spend_spendable_outputs(this_arg: bigint, descriptors: number, outputs: number, change_destination_script: number, feerate_sat_per_1000_weight: number, locktime: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PhantomKeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, change_destination_script, feerate_sat_per_1000_weight, locktime);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKInMemorySigner PhantomKeysManager_derive_channel_keys(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
+/* @internal */
+export function PhantomKeysManager_derive_channel_keys(this_arg: bigint, channel_value_satoshis: bigint, params: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PhantomKeysManager_derive_channel_keys(this_arg, channel_value_satoshis, params);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
+/* @internal */
+export function PhantomKeysManager_get_node_secret_key(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PhantomKeysManager_get_node_secret_key(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_phantom_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
+/* @internal */
+export function PhantomKeysManager_get_phantom_node_secret_key(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PhantomKeysManager_get_phantom_node_secret_key(this_arg);
+ return nativeResponseValue;
+}
+ // void EcdsaChannelSigner_free(struct LDKEcdsaChannelSigner this_ptr);
+/* @internal */
+export function EcdsaChannelSigner_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_EcdsaChannelSigner_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t WriteableEcdsaChannelSigner_clone_ptr(LDKWriteableEcdsaChannelSigner *NONNULL_PTR arg);
+/* @internal */
+export function WriteableEcdsaChannelSigner_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_WriteableEcdsaChannelSigner_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKWriteableEcdsaChannelSigner WriteableEcdsaChannelSigner_clone(const struct LDKWriteableEcdsaChannelSigner *NONNULL_PTR orig);
+/* @internal */
+export function WriteableEcdsaChannelSigner_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_WriteableEcdsaChannelSigner_clone(orig);
+ return nativeResponseValue;
+}
+ // void WriteableEcdsaChannelSigner_free(struct LDKWriteableEcdsaChannelSigner this_ptr);
+/* @internal */
+export function WriteableEcdsaChannelSigner_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_WriteableEcdsaChannelSigner_free(this_ptr);
+ // debug statements here
+}
+ // void OnionMessenger_free(struct LDKOnionMessenger this_obj);
+/* @internal */
+export function OnionMessenger_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessenger_free(this_obj);
+ // debug statements here
+}
+ // void MessageRouter_free(struct LDKMessageRouter this_ptr);
+/* @internal */
+export function MessageRouter_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageRouter_free(this_ptr);
+ // debug statements here
+}
+ // void DefaultMessageRouter_free(struct LDKDefaultMessageRouter this_obj);
+/* @internal */
+export function DefaultMessageRouter_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DefaultMessageRouter_free(this_obj);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKDefaultMessageRouter DefaultMessageRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKEntropySource entropy_source);
+/* @internal */
+export function DefaultMessageRouter_new(network_graph: bigint, entropy_source: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DefaultMessageRouter_new(network_graph, entropy_source);
+ return nativeResponseValue;
+}
+ // struct LDKMessageRouter DefaultMessageRouter_as_MessageRouter(const struct LDKDefaultMessageRouter *NONNULL_PTR this_arg);
+/* @internal */
+export function DefaultMessageRouter_as_MessageRouter(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DefaultMessageRouter_as_MessageRouter(this_arg);
+ return nativeResponseValue;
+}
+ // void OnionMessagePath_free(struct LDKOnionMessagePath this_obj);
+/* @internal */
+export function OnionMessagePath_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessagePath_free(this_obj);
+ // debug statements here
+}
+ // struct LDKCVec_PublicKeyZ OnionMessagePath_get_intermediate_nodes(const struct LDKOnionMessagePath *NONNULL_PTR this_ptr);
+/* @internal */
+export function OnionMessagePath_get_intermediate_nodes(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessagePath_get_intermediate_nodes(this_ptr);
+ return nativeResponseValue;
+}
+ // void OnionMessagePath_set_intermediate_nodes(struct LDKOnionMessagePath *NONNULL_PTR this_ptr, struct LDKCVec_PublicKeyZ val);
+/* @internal */
+export function OnionMessagePath_set_intermediate_nodes(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessagePath_set_intermediate_nodes(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKDestination OnionMessagePath_get_destination(const struct LDKOnionMessagePath *NONNULL_PTR this_ptr);
+/* @internal */
+export function OnionMessagePath_get_destination(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessagePath_get_destination(this_ptr);
+ return nativeResponseValue;
+}
+ // void OnionMessagePath_set_destination(struct LDKOnionMessagePath *NONNULL_PTR this_ptr, struct LDKDestination val);
+/* @internal */
+export function OnionMessagePath_set_destination(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessagePath_set_destination(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKCOption_CVec_SocketAddressZZ OnionMessagePath_get_first_node_addresses(const struct LDKOnionMessagePath *NONNULL_PTR this_ptr);
+/* @internal */
+export function OnionMessagePath_get_first_node_addresses(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessagePath_get_first_node_addresses(this_ptr);
+ return nativeResponseValue;
+}
+ // void OnionMessagePath_set_first_node_addresses(struct LDKOnionMessagePath *NONNULL_PTR this_ptr, struct LDKCOption_CVec_SocketAddressZZ val);
+/* @internal */
+export function OnionMessagePath_set_first_node_addresses(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessagePath_set_first_node_addresses(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKOnionMessagePath OnionMessagePath_new(struct LDKCVec_PublicKeyZ intermediate_nodes_arg, struct LDKDestination destination_arg, struct LDKCOption_CVec_SocketAddressZZ first_node_addresses_arg);
+/* @internal */
+export function OnionMessagePath_new(intermediate_nodes_arg: number, destination_arg: bigint, first_node_addresses_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessagePath_new(intermediate_nodes_arg, destination_arg, first_node_addresses_arg);
+ return nativeResponseValue;
+}
+ // uint64_t OnionMessagePath_clone_ptr(LDKOnionMessagePath *NONNULL_PTR arg);
+/* @internal */
+export function OnionMessagePath_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessagePath_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKOnionMessagePath OnionMessagePath_clone(const struct LDKOnionMessagePath *NONNULL_PTR orig);
+/* @internal */
+export function OnionMessagePath_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessagePath_clone(orig);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKPublicKey OnionMessagePath_first_node(const struct LDKOnionMessagePath *NONNULL_PTR this_arg);
+/* @internal */
+export function OnionMessagePath_first_node(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessagePath_first_node(this_arg);
+ return nativeResponseValue;
+}
+ // void Destination_free(struct LDKDestination this_ptr);
+/* @internal */
+export function Destination_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Destination_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t Destination_clone_ptr(LDKDestination *NONNULL_PTR arg);
+/* @internal */
+export function Destination_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Destination_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKDestination Destination_clone(const struct LDKDestination *NONNULL_PTR orig);
+/* @internal */
+export function Destination_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Destination_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKDestination Destination_node(struct LDKPublicKey a);
+/* @internal */
+export function Destination_node(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Destination_node(a);
+ return nativeResponseValue;
+}
+ // struct LDKDestination Destination_blinded_path(struct LDKBlindedPath a);
+/* @internal */
+export function Destination_blinded_path(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Destination_blinded_path(a);
+ return nativeResponseValue;
+}
+ // void SendSuccess_free(struct LDKSendSuccess this_ptr);
+/* @internal */
+export function SendSuccess_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendSuccess_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t SendSuccess_clone_ptr(LDKSendSuccess *NONNULL_PTR arg);
+/* @internal */
+export function SendSuccess_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendSuccess_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKSendSuccess SendSuccess_clone(const struct LDKSendSuccess *NONNULL_PTR orig);
+/* @internal */
+export function SendSuccess_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendSuccess_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKSendSuccess SendSuccess_buffered(void);
+/* @internal */
+export function SendSuccess_buffered(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendSuccess_buffered();
+ return nativeResponseValue;
+}
+ // struct LDKSendSuccess SendSuccess_buffered_awaiting_connection(struct LDKPublicKey a);
+/* @internal */
+export function SendSuccess_buffered_awaiting_connection(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendSuccess_buffered_awaiting_connection(a);
+ return nativeResponseValue;
+}
+ // bool SendSuccess_eq(const struct LDKSendSuccess *NONNULL_PTR a, const struct LDKSendSuccess *NONNULL_PTR b);
+/* @internal */
+export function SendSuccess_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendSuccess_eq(a, b);
+ return nativeResponseValue;
+}
+ // void SendError_free(struct LDKSendError this_ptr);
+/* @internal */
+export function SendError_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t SendError_clone_ptr(LDKSendError *NONNULL_PTR arg);
+/* @internal */
+export function SendError_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKSendError SendError_clone(const struct LDKSendError *NONNULL_PTR orig);
+/* @internal */
+export function SendError_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKSendError SendError_secp256k1(enum LDKSecp256k1Error a);
+/* @internal */
+export function SendError_secp256k1(a: Secp256k1Error): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_secp256k1(a);
+ return nativeResponseValue;
+}
+ // struct LDKSendError SendError_too_big_packet(void);
+/* @internal */
+export function SendError_too_big_packet(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_too_big_packet();
+ return nativeResponseValue;
+}
+ // struct LDKSendError SendError_too_few_blinded_hops(void);
+/* @internal */
+export function SendError_too_few_blinded_hops(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_too_few_blinded_hops();
+ return nativeResponseValue;
+}
+ // struct LDKSendError SendError_invalid_first_hop(struct LDKPublicKey a);
+/* @internal */
+export function SendError_invalid_first_hop(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_invalid_first_hop(a);
+ return nativeResponseValue;
+}
+ // struct LDKSendError SendError_path_not_found(void);
+/* @internal */
+export function SendError_path_not_found(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_path_not_found();
+ return nativeResponseValue;
+}
+ // struct LDKSendError SendError_invalid_message(void);
+/* @internal */
+export function SendError_invalid_message(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_invalid_message();
+ return nativeResponseValue;
+}
+ // struct LDKSendError SendError_buffer_full(void);
+/* @internal */
+export function SendError_buffer_full(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_buffer_full();
+ return nativeResponseValue;
+}
+ // struct LDKSendError SendError_get_node_id_failed(void);
+/* @internal */
+export function SendError_get_node_id_failed(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_get_node_id_failed();
+ return nativeResponseValue;
+}
+ // struct LDKSendError SendError_blinded_path_advance_failed(void);
+/* @internal */
+export function SendError_blinded_path_advance_failed(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_blinded_path_advance_failed();
+ return nativeResponseValue;
+}
+ // bool SendError_eq(const struct LDKSendError *NONNULL_PTR a, const struct LDKSendError *NONNULL_PTR b);
+/* @internal */
+export function SendError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_eq(a, b);
+ return nativeResponseValue;
+}
+ // void CustomOnionMessageHandler_free(struct LDKCustomOnionMessageHandler this_ptr);
+/* @internal */
+export function CustomOnionMessageHandler_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageHandler_free(this_ptr);
+ // debug statements here
+}
+ // void PeeledOnion_free(struct LDKPeeledOnion this_ptr);
+/* @internal */
+export function PeeledOnion_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PeeledOnion_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t PeeledOnion_clone_ptr(LDKPeeledOnion *NONNULL_PTR arg);
+/* @internal */
+export function PeeledOnion_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PeeledOnion_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKPeeledOnion PeeledOnion_clone(const struct LDKPeeledOnion *NONNULL_PTR orig);
+/* @internal */
+export function PeeledOnion_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PeeledOnion_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKPeeledOnion PeeledOnion_forward(struct LDKPublicKey a, struct LDKOnionMessage b);
+/* @internal */
+export function PeeledOnion_forward(a: number, b: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PeeledOnion_forward(a, b);
+ return nativeResponseValue;
+}
+ // struct LDKPeeledOnion PeeledOnion_receive(struct LDKParsedOnionMessageContents a, struct LDKThirtyTwoBytes b, struct LDKBlindedPath c);
+/* @internal */
+export function PeeledOnion_receive(a: bigint, b: number, c: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PeeledOnion_receive(a, b, c);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path);
+/* @internal */
+export function create_onion_message(entropy_source: bigint, node_signer: bigint, path: bigint, contents: bigint, reply_path: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_create_onion_message(entropy_source, node_signer, path, contents, reply_path);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_PeeledOnionNoneZ peel_onion_message(const struct LDKOnionMessage *NONNULL_PTR msg, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKCustomOnionMessageHandler custom_handler);
+/* @internal */
+export function peel_onion_message(msg: bigint, node_signer: bigint, logger: bigint, custom_handler: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_peel_onion_message(msg, node_signer, logger, custom_handler);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler);
+/* @internal */
+export function OnionMessenger_new(entropy_source: bigint, node_signer: bigint, logger: bigint, message_router: bigint, offers_handler: bigint, custom_handler: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessenger_new(entropy_source, node_signer, logger, message_router, offers_handler, custom_handler);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_SendSuccessSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKOnionMessageContents contents, struct LDKDestination destination, struct LDKBlindedPath reply_path);
+/* @internal */
+export function OnionMessenger_send_onion_message(this_arg: bigint, contents: bigint, destination: bigint, reply_path: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessenger_send_onion_message(this_arg, contents, destination, reply_path);
+ return nativeResponseValue;
+}
+ // struct LDKOnionMessageHandler OnionMessenger_as_OnionMessageHandler(const struct LDKOnionMessenger *NONNULL_PTR this_arg);
+/* @internal */
+export function OnionMessenger_as_OnionMessageHandler(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessenger_as_OnionMessageHandler(this_arg);
+ return nativeResponseValue;
+}
+ // void OffersMessageHandler_free(struct LDKOffersMessageHandler this_ptr);
+/* @internal */
+export function OffersMessageHandler_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OffersMessageHandler_free(this_ptr);
+ // debug statements here
+}
+ // void OffersMessage_free(struct LDKOffersMessage this_ptr);
+/* @internal */
+export function OffersMessage_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OffersMessage_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t OffersMessage_clone_ptr(LDKOffersMessage *NONNULL_PTR arg);
+/* @internal */
+export function OffersMessage_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OffersMessage_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKOffersMessage OffersMessage_clone(const struct LDKOffersMessage *NONNULL_PTR orig);
+/* @internal */
+export function OffersMessage_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OffersMessage_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKOffersMessage OffersMessage_invoice_request(struct LDKInvoiceRequest a);
+/* @internal */
+export function OffersMessage_invoice_request(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OffersMessage_invoice_request(a);
+ return nativeResponseValue;
+}
+ // struct LDKOffersMessage OffersMessage_invoice(struct LDKBolt12Invoice a);
+/* @internal */
+export function OffersMessage_invoice(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OffersMessage_invoice(a);
+ return nativeResponseValue;
+}
+ // struct LDKOffersMessage OffersMessage_invoice_error(struct LDKInvoiceError a);
+/* @internal */
+export function OffersMessage_invoice_error(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OffersMessage_invoice_error(a);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES bool OffersMessage_is_known_type(uint64_t tlv_type);
+/* @internal */
+export function OffersMessage_is_known_type(tlv_type: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OffersMessage_is_known_type(tlv_type);
+ return nativeResponseValue;
+}
+ // struct LDKOnionMessageContents OffersMessage_as_OnionMessageContents(const struct LDKOffersMessage *NONNULL_PTR this_arg);
+/* @internal */
+export function OffersMessage_as_OnionMessageContents(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OffersMessage_as_OnionMessageContents(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z OffersMessage_write(const struct LDKOffersMessage *NONNULL_PTR obj);
+/* @internal */
+export function OffersMessage_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OffersMessage_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_OffersMessageDecodeErrorZ OffersMessage_read(struct LDKu8slice ser, uint64_t arg_a, const struct LDKLogger *NONNULL_PTR arg_b);
+/* @internal */
+export function OffersMessage_read(ser: number, arg_a: bigint, arg_b: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OffersMessage_read(ser, arg_a, arg_b);
+ return nativeResponseValue;
+}
+ // void Packet_free(struct LDKPacket this_obj);
+/* @internal */
+export function Packet_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_free(this_obj);
+ // debug statements here
+}
+ // uint8_t Packet_get_version(const struct LDKPacket *NONNULL_PTR this_ptr);
+/* @internal */
+export function Packet_get_version(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_get_version(this_ptr);
+ return nativeResponseValue;
+}
+ // void Packet_set_version(struct LDKPacket *NONNULL_PTR this_ptr, uint8_t val);
+/* @internal */
+export function Packet_set_version(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_set_version(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKPublicKey Packet_get_public_key(const struct LDKPacket *NONNULL_PTR this_ptr);
+/* @internal */
+export function Packet_get_public_key(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_get_public_key(this_ptr);
+ return nativeResponseValue;
+}
+ // void Packet_set_public_key(struct LDKPacket *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+/* @internal */
+export function Packet_set_public_key(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_set_public_key(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKCVec_u8Z Packet_get_hop_data(const struct LDKPacket *NONNULL_PTR this_ptr);
+/* @internal */
+export function Packet_get_hop_data(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_get_hop_data(this_ptr);
+ return nativeResponseValue;
+}
+ // void Packet_set_hop_data(struct LDKPacket *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+/* @internal */
+export function Packet_set_hop_data(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_set_hop_data(this_ptr, val);
+ // debug statements here
+}
+ // const uint8_t (*Packet_get_hmac(const struct LDKPacket *NONNULL_PTR this_ptr))[32];
+/* @internal */
+export function Packet_get_hmac(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_get_hmac(this_ptr);
+ return nativeResponseValue;
+}
+ // void Packet_set_hmac(struct LDKPacket *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+/* @internal */
+export function Packet_set_hmac(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_set_hmac(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKPacket Packet_new(uint8_t version_arg, struct LDKPublicKey public_key_arg, struct LDKCVec_u8Z hop_data_arg, struct LDKThirtyTwoBytes hmac_arg);
+/* @internal */
+export function Packet_new(version_arg: number, public_key_arg: number, hop_data_arg: number, hmac_arg: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_new(version_arg, public_key_arg, hop_data_arg, hmac_arg);
+ return nativeResponseValue;
+}
+ // uint64_t Packet_clone_ptr(LDKPacket *NONNULL_PTR arg);
+/* @internal */
+export function Packet_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKPacket Packet_clone(const struct LDKPacket *NONNULL_PTR orig);
+/* @internal */
+export function Packet_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t Packet_hash(const struct LDKPacket *NONNULL_PTR o);
+/* @internal */
+export function Packet_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_hash(o);
+ return nativeResponseValue;
+}
+ // bool Packet_eq(const struct LDKPacket *NONNULL_PTR a, const struct LDKPacket *NONNULL_PTR b);
+/* @internal */
+export function Packet_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_eq(a, b);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z Packet_write(const struct LDKPacket *NONNULL_PTR obj);
+/* @internal */
+export function Packet_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Packet_write(obj);
+ return nativeResponseValue;
+}
+ // void ParsedOnionMessageContents_free(struct LDKParsedOnionMessageContents this_ptr);
+/* @internal */
+export function ParsedOnionMessageContents_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParsedOnionMessageContents_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t ParsedOnionMessageContents_clone_ptr(LDKParsedOnionMessageContents *NONNULL_PTR arg);
+/* @internal */
+export function ParsedOnionMessageContents_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParsedOnionMessageContents_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKParsedOnionMessageContents ParsedOnionMessageContents_clone(const struct LDKParsedOnionMessageContents *NONNULL_PTR orig);
+/* @internal */
+export function ParsedOnionMessageContents_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParsedOnionMessageContents_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKParsedOnionMessageContents ParsedOnionMessageContents_offers(struct LDKOffersMessage a);
+/* @internal */
+export function ParsedOnionMessageContents_offers(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParsedOnionMessageContents_offers(a);
+ return nativeResponseValue;
+}
+ // struct LDKParsedOnionMessageContents ParsedOnionMessageContents_custom(struct LDKOnionMessageContents a);
+/* @internal */
+export function ParsedOnionMessageContents_custom(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParsedOnionMessageContents_custom(a);
+ return nativeResponseValue;
+}
+ // struct LDKOnionMessageContents ParsedOnionMessageContents_as_OnionMessageContents(const struct LDKParsedOnionMessageContents *NONNULL_PTR this_arg);
+/* @internal */
+export function ParsedOnionMessageContents_as_OnionMessageContents(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParsedOnionMessageContents_as_OnionMessageContents(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z ParsedOnionMessageContents_write(const struct LDKParsedOnionMessageContents *NONNULL_PTR obj);
+/* @internal */
+export function ParsedOnionMessageContents_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParsedOnionMessageContents_write(obj);
+ return nativeResponseValue;
+}
+ // uint64_t OnionMessageContents_clone_ptr(LDKOnionMessageContents *NONNULL_PTR arg);
+/* @internal */
+export function OnionMessageContents_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessageContents_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKOnionMessageContents OnionMessageContents_clone(const struct LDKOnionMessageContents *NONNULL_PTR orig);
+/* @internal */
+export function OnionMessageContents_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessageContents_clone(orig);
+ return nativeResponseValue;
+}
+ // void OnionMessageContents_free(struct LDKOnionMessageContents this_ptr);
+/* @internal */
+export function OnionMessageContents_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessageContents_free(this_ptr);
+ // debug statements here
+}
+ // void BlindedPath_free(struct LDKBlindedPath this_obj);
+/* @internal */
+export function BlindedPath_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_free(this_obj);
+ // debug statements here
+}
+ // struct LDKPublicKey BlindedPath_get_introduction_node_id(const struct LDKBlindedPath *NONNULL_PTR this_ptr);
+/* @internal */
+export function BlindedPath_get_introduction_node_id(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_get_introduction_node_id(this_ptr);
+ return nativeResponseValue;
+}
+ // void BlindedPath_set_introduction_node_id(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+/* @internal */
+export function BlindedPath_set_introduction_node_id(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_set_introduction_node_id(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKPublicKey BlindedPath_get_blinding_point(const struct LDKBlindedPath *NONNULL_PTR this_ptr);
+/* @internal */
+export function BlindedPath_get_blinding_point(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_get_blinding_point(this_ptr);
+ return nativeResponseValue;
+}
+ // void BlindedPath_set_blinding_point(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+/* @internal */
+export function BlindedPath_set_blinding_point(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_set_blinding_point(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKCVec_BlindedHopZ BlindedPath_get_blinded_hops(const struct LDKBlindedPath *NONNULL_PTR this_ptr);
+/* @internal */
+export function BlindedPath_get_blinded_hops(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_get_blinded_hops(this_ptr);
+ return nativeResponseValue;
+}
+ // void BlindedPath_set_blinded_hops(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKCVec_BlindedHopZ val);
+/* @internal */
+export function BlindedPath_set_blinded_hops(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_set_blinded_hops(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKBlindedPath BlindedPath_new(struct LDKPublicKey introduction_node_id_arg, struct LDKPublicKey blinding_point_arg, struct LDKCVec_BlindedHopZ blinded_hops_arg);
+/* @internal */
+export function BlindedPath_new(introduction_node_id_arg: number, blinding_point_arg: number, blinded_hops_arg: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_new(introduction_node_id_arg, blinding_point_arg, blinded_hops_arg);
+ return nativeResponseValue;
+}
+ // uint64_t BlindedPath_clone_ptr(LDKBlindedPath *NONNULL_PTR arg);
+/* @internal */
+export function BlindedPath_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKBlindedPath BlindedPath_clone(const struct LDKBlindedPath *NONNULL_PTR orig);
+/* @internal */
+export function BlindedPath_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t BlindedPath_hash(const struct LDKBlindedPath *NONNULL_PTR o);
+/* @internal */
+export function BlindedPath_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_hash(o);
+ return nativeResponseValue;
+}
+ // bool BlindedPath_eq(const struct LDKBlindedPath *NONNULL_PTR a, const struct LDKBlindedPath *NONNULL_PTR b);
+/* @internal */
+export function BlindedPath_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_eq(a, b);
+ return nativeResponseValue;
+}
+ // void BlindedHop_free(struct LDKBlindedHop this_obj);
+/* @internal */
+export function BlindedHop_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedHop_free(this_obj);
+ // debug statements here
+}
+ // struct LDKPublicKey BlindedHop_get_blinded_node_id(const struct LDKBlindedHop *NONNULL_PTR this_ptr);
+/* @internal */
+export function BlindedHop_get_blinded_node_id(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedHop_get_blinded_node_id(this_ptr);
+ return nativeResponseValue;
+}
+ // void BlindedHop_set_blinded_node_id(struct LDKBlindedHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+/* @internal */
+export function BlindedHop_set_blinded_node_id(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedHop_set_blinded_node_id(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKCVec_u8Z BlindedHop_get_encrypted_payload(const struct LDKBlindedHop *NONNULL_PTR this_ptr);
+/* @internal */
+export function BlindedHop_get_encrypted_payload(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedHop_get_encrypted_payload(this_ptr);
+ return nativeResponseValue;
+}
+ // void BlindedHop_set_encrypted_payload(struct LDKBlindedHop *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+/* @internal */
+export function BlindedHop_set_encrypted_payload(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedHop_set_encrypted_payload(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKBlindedHop BlindedHop_new(struct LDKPublicKey blinded_node_id_arg, struct LDKCVec_u8Z encrypted_payload_arg);
+/* @internal */
+export function BlindedHop_new(blinded_node_id_arg: number, encrypted_payload_arg: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedHop_new(blinded_node_id_arg, encrypted_payload_arg);
+ return nativeResponseValue;
+}
+ // uint64_t BlindedHop_clone_ptr(LDKBlindedHop *NONNULL_PTR arg);
+/* @internal */
+export function BlindedHop_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedHop_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKBlindedHop BlindedHop_clone(const struct LDKBlindedHop *NONNULL_PTR orig);
+/* @internal */
+export function BlindedHop_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedHop_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t BlindedHop_hash(const struct LDKBlindedHop *NONNULL_PTR o);
+/* @internal */
+export function BlindedHop_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedHop_hash(o);
+ return nativeResponseValue;
+}
+ // bool BlindedHop_eq(const struct LDKBlindedHop *NONNULL_PTR a, const struct LDKBlindedHop *NONNULL_PTR b);
+/* @internal */
+export function BlindedHop_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedHop_eq(a, b);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_one_hop_for_message(struct LDKPublicKey recipient_node_id, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+/* @internal */
+export function BlindedPath_one_hop_for_message(recipient_node_id: number, entropy_source: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_one_hop_for_message(recipient_node_id, entropy_source);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+/* @internal */
+export function BlindedPath_new_for_message(node_pks: number, entropy_source: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_new_for_message(node_pks, entropy_source);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+/* @internal */
+export function BlindedPath_one_hop_for_payment(payee_node_id: number, payee_tlvs: bigint, entropy_source: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_one_hop_for_payment(payee_node_id, payee_tlvs, entropy_source);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(struct LDKCVec_ForwardNodeZ intermediate_nodes, struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint64_t htlc_maximum_msat, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+/* @internal */
+export function BlindedPath_new_for_payment(intermediate_nodes: number, payee_node_id: number, payee_tlvs: bigint, htlc_maximum_msat: bigint, entropy_source: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_new_for_payment(intermediate_nodes, payee_node_id, payee_tlvs, htlc_maximum_msat, entropy_source);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z BlindedPath_write(const struct LDKBlindedPath *NONNULL_PTR obj);
+/* @internal */
+export function BlindedPath_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_BlindedPathDecodeErrorZ BlindedPath_read(struct LDKu8slice ser);
+/* @internal */
+export function BlindedPath_read(ser: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_read(ser);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z BlindedHop_write(const struct LDKBlindedHop *NONNULL_PTR obj);
+/* @internal */
+export function BlindedHop_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedHop_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_BlindedHopDecodeErrorZ BlindedHop_read(struct LDKu8slice ser);
+/* @internal */
+export function BlindedHop_read(ser: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedHop_read(ser);
+ return nativeResponseValue;
+}
+ // void ForwardNode_free(struct LDKForwardNode this_obj);
+/* @internal */
+export function ForwardNode_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardNode_free(this_obj);
+ // debug statements here
+}
+ // struct LDKForwardTlvs ForwardNode_get_tlvs(const struct LDKForwardNode *NONNULL_PTR this_ptr);
+/* @internal */
+export function ForwardNode_get_tlvs(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardNode_get_tlvs(this_ptr);
+ return nativeResponseValue;
+}
+ // void ForwardNode_set_tlvs(struct LDKForwardNode *NONNULL_PTR this_ptr, struct LDKForwardTlvs val);
+/* @internal */
+export function ForwardNode_set_tlvs(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardNode_set_tlvs(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKPublicKey ForwardNode_get_node_id(const struct LDKForwardNode *NONNULL_PTR this_ptr);
+/* @internal */
+export function ForwardNode_get_node_id(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardNode_get_node_id(this_ptr);
+ return nativeResponseValue;
+}
+ // void ForwardNode_set_node_id(struct LDKForwardNode *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+/* @internal */
+export function ForwardNode_set_node_id(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardNode_set_node_id(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ForwardNode_get_htlc_maximum_msat(const struct LDKForwardNode *NONNULL_PTR this_ptr);
+/* @internal */
+export function ForwardNode_get_htlc_maximum_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardNode_get_htlc_maximum_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ForwardNode_set_htlc_maximum_msat(struct LDKForwardNode *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ForwardNode_set_htlc_maximum_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardNode_set_htlc_maximum_msat(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKForwardNode ForwardNode_new(struct LDKForwardTlvs tlvs_arg, struct LDKPublicKey node_id_arg, uint64_t htlc_maximum_msat_arg);
+/* @internal */
+export function ForwardNode_new(tlvs_arg: bigint, node_id_arg: number, htlc_maximum_msat_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardNode_new(tlvs_arg, node_id_arg, htlc_maximum_msat_arg);
+ return nativeResponseValue;
+}
+ // uint64_t ForwardNode_clone_ptr(LDKForwardNode *NONNULL_PTR arg);
+/* @internal */
+export function ForwardNode_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardNode_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKForwardNode ForwardNode_clone(const struct LDKForwardNode *NONNULL_PTR orig);
+/* @internal */
+export function ForwardNode_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardNode_clone(orig);
+ return nativeResponseValue;
+}
+ // void ForwardTlvs_free(struct LDKForwardTlvs this_obj);
+/* @internal */
+export function ForwardTlvs_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_free(this_obj);
+ // debug statements here
+}
+ // uint64_t ForwardTlvs_get_short_channel_id(const struct LDKForwardTlvs *NONNULL_PTR this_ptr);
+/* @internal */
+export function ForwardTlvs_get_short_channel_id(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_get_short_channel_id(this_ptr);
+ return nativeResponseValue;
+}
+ // void ForwardTlvs_set_short_channel_id(struct LDKForwardTlvs *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ForwardTlvs_set_short_channel_id(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_set_short_channel_id(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKPaymentRelay ForwardTlvs_get_payment_relay(const struct LDKForwardTlvs *NONNULL_PTR this_ptr);
+/* @internal */
+export function ForwardTlvs_get_payment_relay(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_get_payment_relay(this_ptr);
+ return nativeResponseValue;
+}
+ // void ForwardTlvs_set_payment_relay(struct LDKForwardTlvs *NONNULL_PTR this_ptr, struct LDKPaymentRelay val);
+/* @internal */
+export function ForwardTlvs_set_payment_relay(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_set_payment_relay(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKPaymentConstraints ForwardTlvs_get_payment_constraints(const struct LDKForwardTlvs *NONNULL_PTR this_ptr);
+/* @internal */
+export function ForwardTlvs_get_payment_constraints(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_get_payment_constraints(this_ptr);
+ return nativeResponseValue;
+}
+ // void ForwardTlvs_set_payment_constraints(struct LDKForwardTlvs *NONNULL_PTR this_ptr, struct LDKPaymentConstraints val);
+/* @internal */
+export function ForwardTlvs_set_payment_constraints(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_set_payment_constraints(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKBlindedHopFeatures ForwardTlvs_get_features(const struct LDKForwardTlvs *NONNULL_PTR this_ptr);
+/* @internal */
+export function ForwardTlvs_get_features(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_get_features(this_ptr);
+ return nativeResponseValue;
+}
+ // void ForwardTlvs_set_features(struct LDKForwardTlvs *NONNULL_PTR this_ptr, struct LDKBlindedHopFeatures val);
+/* @internal */
+export function ForwardTlvs_set_features(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_set_features(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKForwardTlvs ForwardTlvs_new(uint64_t short_channel_id_arg, struct LDKPaymentRelay payment_relay_arg, struct LDKPaymentConstraints payment_constraints_arg, struct LDKBlindedHopFeatures features_arg);
+/* @internal */
+export function ForwardTlvs_new(short_channel_id_arg: bigint, payment_relay_arg: bigint, payment_constraints_arg: bigint, features_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_new(short_channel_id_arg, payment_relay_arg, payment_constraints_arg, features_arg);
+ return nativeResponseValue;
+}
+ // uint64_t ForwardTlvs_clone_ptr(LDKForwardTlvs *NONNULL_PTR arg);
+/* @internal */
+export function ForwardTlvs_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKForwardTlvs ForwardTlvs_clone(const struct LDKForwardTlvs *NONNULL_PTR orig);
+/* @internal */
+export function ForwardTlvs_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_clone(orig);
+ return nativeResponseValue;
+}
+ // void ReceiveTlvs_free(struct LDKReceiveTlvs this_obj);
+/* @internal */
+export function ReceiveTlvs_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReceiveTlvs_free(this_obj);
+ // debug statements here
+}
+ // const uint8_t (*ReceiveTlvs_get_payment_secret(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr))[32];
+/* @internal */
+export function ReceiveTlvs_get_payment_secret(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReceiveTlvs_get_payment_secret(this_ptr);
+ return nativeResponseValue;
+}
+ // void ReceiveTlvs_set_payment_secret(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+/* @internal */
+export function ReceiveTlvs_set_payment_secret(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReceiveTlvs_set_payment_secret(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKPaymentConstraints ReceiveTlvs_get_payment_constraints(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr);
+/* @internal */
+export function ReceiveTlvs_get_payment_constraints(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReceiveTlvs_get_payment_constraints(this_ptr);
+ return nativeResponseValue;
+}
+ // void ReceiveTlvs_set_payment_constraints(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentConstraints val);
+/* @internal */
+export function ReceiveTlvs_set_payment_constraints(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReceiveTlvs_set_payment_constraints(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKReceiveTlvs ReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg);
+/* @internal */
+export function ReceiveTlvs_new(payment_secret_arg: number, payment_constraints_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReceiveTlvs_new(payment_secret_arg, payment_constraints_arg);
+ return nativeResponseValue;
+}
+ // uint64_t ReceiveTlvs_clone_ptr(LDKReceiveTlvs *NONNULL_PTR arg);
+/* @internal */
+export function ReceiveTlvs_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReceiveTlvs_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKReceiveTlvs ReceiveTlvs_clone(const struct LDKReceiveTlvs *NONNULL_PTR orig);
+/* @internal */
+export function ReceiveTlvs_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReceiveTlvs_clone(orig);
+ return nativeResponseValue;
+}
+ // void PaymentRelay_free(struct LDKPaymentRelay this_obj);
+/* @internal */
+export function PaymentRelay_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentRelay_free(this_obj);
+ // debug statements here
+}
+ // uint16_t PaymentRelay_get_cltv_expiry_delta(const struct LDKPaymentRelay *NONNULL_PTR this_ptr);
+/* @internal */
+export function PaymentRelay_get_cltv_expiry_delta(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentRelay_get_cltv_expiry_delta(this_ptr);
+ return nativeResponseValue;
+}
+ // void PaymentRelay_set_cltv_expiry_delta(struct LDKPaymentRelay *NONNULL_PTR this_ptr, uint16_t val);
+/* @internal */
+export function PaymentRelay_set_cltv_expiry_delta(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentRelay_set_cltv_expiry_delta(this_ptr, val);
+ // debug statements here
+}
+ // uint32_t PaymentRelay_get_fee_proportional_millionths(const struct LDKPaymentRelay *NONNULL_PTR this_ptr);
+/* @internal */
+export function PaymentRelay_get_fee_proportional_millionths(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentRelay_get_fee_proportional_millionths(this_ptr);
+ return nativeResponseValue;
+}
+ // void PaymentRelay_set_fee_proportional_millionths(struct LDKPaymentRelay *NONNULL_PTR this_ptr, uint32_t val);
+/* @internal */
+export function PaymentRelay_set_fee_proportional_millionths(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentRelay_set_fee_proportional_millionths(this_ptr, val);
+ // debug statements here
+}
+ // uint32_t PaymentRelay_get_fee_base_msat(const struct LDKPaymentRelay *NONNULL_PTR this_ptr);
+/* @internal */
+export function PaymentRelay_get_fee_base_msat(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentRelay_get_fee_base_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void PaymentRelay_set_fee_base_msat(struct LDKPaymentRelay *NONNULL_PTR this_ptr, uint32_t val);
+/* @internal */
+export function PaymentRelay_set_fee_base_msat(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentRelay_set_fee_base_msat(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKPaymentRelay PaymentRelay_new(uint16_t cltv_expiry_delta_arg, uint32_t fee_proportional_millionths_arg, uint32_t fee_base_msat_arg);
+/* @internal */
+export function PaymentRelay_new(cltv_expiry_delta_arg: number, fee_proportional_millionths_arg: number, fee_base_msat_arg: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentRelay_new(cltv_expiry_delta_arg, fee_proportional_millionths_arg, fee_base_msat_arg);
+ return nativeResponseValue;
+}
+ // uint64_t PaymentRelay_clone_ptr(LDKPaymentRelay *NONNULL_PTR arg);
+/* @internal */
+export function PaymentRelay_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentRelay_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKPaymentRelay PaymentRelay_clone(const struct LDKPaymentRelay *NONNULL_PTR orig);
+/* @internal */
+export function PaymentRelay_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentRelay_clone(orig);
+ return nativeResponseValue;
+}
+ // void PaymentConstraints_free(struct LDKPaymentConstraints this_obj);
+/* @internal */
+export function PaymentConstraints_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentConstraints_free(this_obj);
+ // debug statements here
+}
+ // uint32_t PaymentConstraints_get_max_cltv_expiry(const struct LDKPaymentConstraints *NONNULL_PTR this_ptr);
+/* @internal */
+export function PaymentConstraints_get_max_cltv_expiry(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentConstraints_get_max_cltv_expiry(this_ptr);
+ return nativeResponseValue;
+}
+ // void PaymentConstraints_set_max_cltv_expiry(struct LDKPaymentConstraints *NONNULL_PTR this_ptr, uint32_t val);
+/* @internal */
+export function PaymentConstraints_set_max_cltv_expiry(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentConstraints_set_max_cltv_expiry(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t PaymentConstraints_get_htlc_minimum_msat(const struct LDKPaymentConstraints *NONNULL_PTR this_ptr);
+/* @internal */
+export function PaymentConstraints_get_htlc_minimum_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentConstraints_get_htlc_minimum_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void PaymentConstraints_set_htlc_minimum_msat(struct LDKPaymentConstraints *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function PaymentConstraints_set_htlc_minimum_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentConstraints_set_htlc_minimum_msat(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKPaymentConstraints PaymentConstraints_new(uint32_t max_cltv_expiry_arg, uint64_t htlc_minimum_msat_arg);
+/* @internal */
+export function PaymentConstraints_new(max_cltv_expiry_arg: number, htlc_minimum_msat_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentConstraints_new(max_cltv_expiry_arg, htlc_minimum_msat_arg);
+ return nativeResponseValue;
+}
+ // uint64_t PaymentConstraints_clone_ptr(LDKPaymentConstraints *NONNULL_PTR arg);
+/* @internal */
+export function PaymentConstraints_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentConstraints_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKPaymentConstraints PaymentConstraints_clone(const struct LDKPaymentConstraints *NONNULL_PTR orig);
+/* @internal */
+export function PaymentConstraints_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentConstraints_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z ForwardTlvs_write(const struct LDKForwardTlvs *NONNULL_PTR obj);
+/* @internal */
+export function ForwardTlvs_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ForwardTlvs_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z ReceiveTlvs_write(const struct LDKReceiveTlvs *NONNULL_PTR obj);
+/* @internal */
+export function ReceiveTlvs_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ReceiveTlvs_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z PaymentRelay_write(const struct LDKPaymentRelay *NONNULL_PTR obj);
+/* @internal */
+export function PaymentRelay_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentRelay_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_PaymentRelayDecodeErrorZ PaymentRelay_read(struct LDKu8slice ser);
+/* @internal */
+export function PaymentRelay_read(ser: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentRelay_read(ser);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z PaymentConstraints_write(const struct LDKPaymentConstraints *NONNULL_PTR obj);
+/* @internal */
+export function PaymentConstraints_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentConstraints_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_PaymentConstraintsDecodeErrorZ PaymentConstraints_read(struct LDKu8slice ser);
+/* @internal */
+export function PaymentConstraints_read(ser: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentConstraints_read(ser);
+ return nativeResponseValue;
+}
+ // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
+/* @internal */
+export function PaymentPurpose_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentPurpose_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t PaymentPurpose_clone_ptr(LDKPaymentPurpose *NONNULL_PTR arg);
+/* @internal */
+export function PaymentPurpose_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentPurpose_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
+/* @internal */
+export function PaymentPurpose_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentPurpose_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret);
+/* @internal */
+export function PaymentPurpose_invoice_payment(payment_preimage: bigint, payment_secret: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentPurpose_invoice_payment(payment_preimage, payment_secret);
+ return nativeResponseValue;
+}
+ // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
+/* @internal */
+export function PaymentPurpose_spontaneous_payment(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentPurpose_spontaneous_payment(a);
+ return nativeResponseValue;
+}
+ // bool PaymentPurpose_eq(const struct LDKPaymentPurpose *NONNULL_PTR a, const struct LDKPaymentPurpose *NONNULL_PTR b);
+/* @internal */
+export function PaymentPurpose_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentPurpose_eq(a, b);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCOption_ThirtyTwoBytesZ PaymentPurpose_preimage(const struct LDKPaymentPurpose *NONNULL_PTR this_arg);
+/* @internal */
+export function PaymentPurpose_preimage(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentPurpose_preimage(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z PaymentPurpose_write(const struct LDKPaymentPurpose *NONNULL_PTR obj);
+/* @internal */
+export function PaymentPurpose_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentPurpose_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_PaymentPurposeDecodeErrorZ PaymentPurpose_read(struct LDKu8slice ser);
+/* @internal */
+export function PaymentPurpose_read(ser: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentPurpose_read(ser);
+ return nativeResponseValue;
+}
+ // void ClaimedHTLC_free(struct LDKClaimedHTLC this_obj);
+/* @internal */
+export function ClaimedHTLC_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_free(this_obj);
+ // debug statements here
+}
+ // const uint8_t (*ClaimedHTLC_get_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr))[32];
+/* @internal */
+export function ClaimedHTLC_get_channel_id(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_get_channel_id(this_ptr);
+ return nativeResponseValue;
+}
+ // void ClaimedHTLC_set_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+/* @internal */
+export function ClaimedHTLC_set_channel_id(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_set_channel_id(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKU128 ClaimedHTLC_get_user_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
+/* @internal */
+export function ClaimedHTLC_get_user_channel_id(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_get_user_channel_id(this_ptr);
+ return nativeResponseValue;
+}
+ // void ClaimedHTLC_set_user_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKU128 val);
+/* @internal */
+export function ClaimedHTLC_set_user_channel_id(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_set_user_channel_id(this_ptr, val);
+ // debug statements here
+}
+ // uint32_t ClaimedHTLC_get_cltv_expiry(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
+/* @internal */
+export function ClaimedHTLC_get_cltv_expiry(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_get_cltv_expiry(this_ptr);
+ return nativeResponseValue;
+}
+ // void ClaimedHTLC_set_cltv_expiry(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, uint32_t val);
+/* @internal */
+export function ClaimedHTLC_set_cltv_expiry(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_set_cltv_expiry(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ClaimedHTLC_get_value_msat(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
+/* @internal */
+export function ClaimedHTLC_get_value_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_get_value_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ClaimedHTLC_set_value_msat(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ClaimedHTLC_set_value_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_set_value_msat(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ClaimedHTLC_get_counterparty_skimmed_fee_msat(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
+/* @internal */
+export function ClaimedHTLC_get_counterparty_skimmed_fee_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_get_counterparty_skimmed_fee_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ClaimedHTLC_set_counterparty_skimmed_fee_msat(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ClaimedHTLC_set_counterparty_skimmed_fee_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_set_counterparty_skimmed_fee_msat(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKClaimedHTLC ClaimedHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKU128 user_channel_id_arg, uint32_t cltv_expiry_arg, uint64_t value_msat_arg, uint64_t counterparty_skimmed_fee_msat_arg);
+/* @internal */
+export function ClaimedHTLC_new(channel_id_arg: number, user_channel_id_arg: number, cltv_expiry_arg: number, value_msat_arg: bigint, counterparty_skimmed_fee_msat_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_new(channel_id_arg, user_channel_id_arg, cltv_expiry_arg, value_msat_arg, counterparty_skimmed_fee_msat_arg);
+ return nativeResponseValue;
+}
+ // uint64_t ClaimedHTLC_clone_ptr(LDKClaimedHTLC *NONNULL_PTR arg);
+/* @internal */
+export function ClaimedHTLC_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKClaimedHTLC ClaimedHTLC_clone(const struct LDKClaimedHTLC *NONNULL_PTR orig);
+/* @internal */
+export function ClaimedHTLC_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_clone(orig);
+ return nativeResponseValue;
+}
+ // bool ClaimedHTLC_eq(const struct LDKClaimedHTLC *NONNULL_PTR a, const struct LDKClaimedHTLC *NONNULL_PTR b);
+/* @internal */
+export function ClaimedHTLC_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_eq(a, b);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z ClaimedHTLC_write(const struct LDKClaimedHTLC *NONNULL_PTR obj);
+/* @internal */
+export function ClaimedHTLC_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_ClaimedHTLCDecodeErrorZ ClaimedHTLC_read(struct LDKu8slice ser);
+/* @internal */
+export function ClaimedHTLC_read(ser: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClaimedHTLC_read(ser);
+ return nativeResponseValue;
+}
+ // void PathFailure_free(struct LDKPathFailure this_ptr);
+/* @internal */
+export function PathFailure_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PathFailure_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t PathFailure_clone_ptr(LDKPathFailure *NONNULL_PTR arg);
+/* @internal */
+export function PathFailure_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PathFailure_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKPathFailure PathFailure_clone(const struct LDKPathFailure *NONNULL_PTR orig);
+/* @internal */
+export function PathFailure_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PathFailure_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKPathFailure PathFailure_initial_send(struct LDKAPIError err);
+/* @internal */
+export function PathFailure_initial_send(err: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PathFailure_initial_send(err);
+ return nativeResponseValue;
+}
+ // struct LDKPathFailure PathFailure_on_path(struct LDKCOption_NetworkUpdateZ network_update);
+/* @internal */
+export function PathFailure_on_path(network_update: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PathFailure_on_path(network_update);
+ return nativeResponseValue;
+}
+ // bool PathFailure_eq(const struct LDKPathFailure *NONNULL_PTR a, const struct LDKPathFailure *NONNULL_PTR b);
+/* @internal */
+export function PathFailure_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PathFailure_eq(a, b);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z PathFailure_write(const struct LDKPathFailure *NONNULL_PTR obj);
+/* @internal */
+export function PathFailure_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PathFailure_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_COption_PathFailureZDecodeErrorZ PathFailure_read(struct LDKu8slice ser);
+/* @internal */
+export function PathFailure_read(ser: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PathFailure_read(ser);
+ return nativeResponseValue;
+}
+ // void ClosureReason_free(struct LDKClosureReason this_ptr);
+/* @internal */
+export function ClosureReason_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t ClosureReason_clone_ptr(LDKClosureReason *NONNULL_PTR arg);
+/* @internal */
+export function ClosureReason_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
+/* @internal */
+export function ClosureReason_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKUntrustedString peer_msg);
+/* @internal */
+export function ClosureReason_counterparty_force_closed(peer_msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_counterparty_force_closed(peer_msg);
+ return nativeResponseValue;
+}
+ // struct LDKClosureReason ClosureReason_holder_force_closed(void);
+/* @internal */
+export function ClosureReason_holder_force_closed(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_holder_force_closed();
+ return nativeResponseValue;
+}
+ // struct LDKClosureReason ClosureReason_cooperative_closure(void);
+/* @internal */
+export function ClosureReason_cooperative_closure(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_cooperative_closure();
+ return nativeResponseValue;
+}
+ // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
+/* @internal */
+export function ClosureReason_commitment_tx_confirmed(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_commitment_tx_confirmed();
+ return nativeResponseValue;
+}
+ // struct LDKClosureReason ClosureReason_funding_timed_out(void);
+/* @internal */
+export function ClosureReason_funding_timed_out(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_funding_timed_out();
+ return nativeResponseValue;
+}
+ // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
+/* @internal */
+export function ClosureReason_processing_error(err: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_processing_error(err);
+ return nativeResponseValue;
+}
+ // struct LDKClosureReason ClosureReason_disconnected_peer(void);
+/* @internal */
+export function ClosureReason_disconnected_peer(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_disconnected_peer();
+ return nativeResponseValue;
+}
+ // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
+/* @internal */
+export function ClosureReason_outdated_channel_manager(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_outdated_channel_manager();
+ return nativeResponseValue;
+}
+ // struct LDKClosureReason ClosureReason_counterparty_coop_closed_unfunded_channel(void);
+/* @internal */
+export function ClosureReason_counterparty_coop_closed_unfunded_channel(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_counterparty_coop_closed_unfunded_channel();
+ return nativeResponseValue;
+}
+ // struct LDKClosureReason ClosureReason_funding_batch_closure(void);
+/* @internal */
+export function ClosureReason_funding_batch_closure(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_funding_batch_closure();
+ return nativeResponseValue;
+}
+ // bool ClosureReason_eq(const struct LDKClosureReason *NONNULL_PTR a, const struct LDKClosureReason *NONNULL_PTR b);
+/* @internal */
+export function ClosureReason_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_eq(a, b);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
+/* @internal */
+export function ClosureReason_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ ClosureReason_read(struct LDKu8slice ser);
+/* @internal */
+export function ClosureReason_read(ser: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ClosureReason_read(ser);
+ return nativeResponseValue;
+}
+ // void HTLCDestination_free(struct LDKHTLCDestination this_ptr);
+/* @internal */
+export function HTLCDestination_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t HTLCDestination_clone_ptr(LDKHTLCDestination *NONNULL_PTR arg);
+/* @internal */
+export function HTLCDestination_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKHTLCDestination HTLCDestination_clone(const struct LDKHTLCDestination *NONNULL_PTR orig);
+/* @internal */
+export function HTLCDestination_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKThirtyTwoBytes channel_id);
+/* @internal */
+export function HTLCDestination_next_hop_channel(node_id: number, channel_id: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_next_hop_channel(node_id, channel_id);
+ return nativeResponseValue;
+}
+ // struct LDKHTLCDestination HTLCDestination_unknown_next_hop(uint64_t requested_forward_scid);
+/* @internal */
+export function HTLCDestination_unknown_next_hop(requested_forward_scid: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_unknown_next_hop(requested_forward_scid);
+ return nativeResponseValue;
+}
+ // struct LDKHTLCDestination HTLCDestination_invalid_forward(uint64_t requested_forward_scid);
+/* @internal */
+export function HTLCDestination_invalid_forward(requested_forward_scid: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_invalid_forward(requested_forward_scid);
+ return nativeResponseValue;
+}
+ // struct LDKHTLCDestination HTLCDestination_failed_payment(struct LDKThirtyTwoBytes payment_hash);
+/* @internal */
+export function HTLCDestination_failed_payment(payment_hash: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_failed_payment(payment_hash);
+ return nativeResponseValue;
+}
+ // bool HTLCDestination_eq(const struct LDKHTLCDestination *NONNULL_PTR a, const struct LDKHTLCDestination *NONNULL_PTR b);
+/* @internal */
+export function HTLCDestination_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_eq(a, b);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z HTLCDestination_write(const struct LDKHTLCDestination *NONNULL_PTR obj);
+/* @internal */
+export function HTLCDestination_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ HTLCDestination_read(struct LDKu8slice ser);
+/* @internal */
+export function HTLCDestination_read(ser: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_HTLCDestination_read(ser);
+ return nativeResponseValue;
+}
+ // enum LDKPaymentFailureReason PaymentFailureReason_clone(const enum LDKPaymentFailureReason *NONNULL_PTR orig);
+/* @internal */
+export function PaymentFailureReason_clone(orig: bigint): PaymentFailureReason {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentFailureReason_clone(orig);
+ return nativeResponseValue;
+}
+ // enum LDKPaymentFailureReason PaymentFailureReason_recipient_rejected(void);
+/* @internal */
+export function PaymentFailureReason_recipient_rejected(): PaymentFailureReason {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentFailureReason_recipient_rejected();
+ return nativeResponseValue;
+}
+ // enum LDKPaymentFailureReason PaymentFailureReason_user_abandoned(void);
+/* @internal */
+export function PaymentFailureReason_user_abandoned(): PaymentFailureReason {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentFailureReason_user_abandoned();
+ return nativeResponseValue;
+}
+ // enum LDKPaymentFailureReason PaymentFailureReason_retries_exhausted(void);
+/* @internal */
+export function PaymentFailureReason_retries_exhausted(): PaymentFailureReason {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentFailureReason_retries_exhausted();
+ return nativeResponseValue;
+}
+ // enum LDKPaymentFailureReason PaymentFailureReason_payment_expired(void);
+/* @internal */
+export function PaymentFailureReason_payment_expired(): PaymentFailureReason {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentFailureReason_payment_expired();
+ return nativeResponseValue;
+}
+ // enum LDKPaymentFailureReason PaymentFailureReason_route_not_found(void);
+/* @internal */
+export function PaymentFailureReason_route_not_found(): PaymentFailureReason {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentFailureReason_route_not_found();
+ return nativeResponseValue;
+}
+ // enum LDKPaymentFailureReason PaymentFailureReason_unexpected_error(void);
+/* @internal */
+export function PaymentFailureReason_unexpected_error(): PaymentFailureReason {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentFailureReason_unexpected_error();
+ return nativeResponseValue;
+}
+ // bool PaymentFailureReason_eq(const enum LDKPaymentFailureReason *NONNULL_PTR a, const enum LDKPaymentFailureReason *NONNULL_PTR b);
+/* @internal */
+export function PaymentFailureReason_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentFailureReason_eq(a, b);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z PaymentFailureReason_write(const enum LDKPaymentFailureReason *NONNULL_PTR obj);
+/* @internal */
+export function PaymentFailureReason_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentFailureReason_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_PaymentFailureReasonDecodeErrorZ PaymentFailureReason_read(struct LDKu8slice ser);
+/* @internal */
+export function PaymentFailureReason_read(ser: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentFailureReason_read(ser);
+ return nativeResponseValue;
+}
+ // void Event_free(struct LDKEvent this_ptr);
+/* @internal */
+export function Event_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t Event_clone_ptr(LDKEvent *NONNULL_PTR arg);
+/* @internal */
+export function Event_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
+/* @internal */
+export function Event_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id);
+/* @internal */
+export function Event_funding_generation_ready(temporary_channel_id: number, counterparty_node_id: number, channel_value_satoshis: bigint, output_script: number, user_channel_id: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_funding_generation_ready(temporary_channel_id, counterparty_node_id, channel_value_satoshis, output_script, user_channel_id);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKCOption_ThirtyTwoBytesZ via_channel_id, struct LDKCOption_U128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline);
+/* @internal */
+export function Event_payment_claimable(receiver_node_id: number, payment_hash: number, onion_fields: bigint, amount_msat: bigint, counterparty_skimmed_fee_msat: bigint, purpose: bigint, via_channel_id: bigint, via_user_channel_id: bigint, claim_deadline: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_payment_claimable(receiver_node_id, payment_hash, onion_fields, amount_msat, counterparty_skimmed_fee_msat, purpose, via_channel_id, via_user_channel_id, claim_deadline);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_payment_claimed(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, uint64_t amount_msat, struct LDKPaymentPurpose purpose, struct LDKCVec_ClaimedHTLCZ htlcs, struct LDKCOption_u64Z sender_intended_total_msat);
+/* @internal */
+export function Event_payment_claimed(receiver_node_id: number, payment_hash: number, amount_msat: bigint, purpose: bigint, htlcs: number, sender_intended_total_msat: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_payment_claimed(receiver_node_id, payment_hash, amount_msat, purpose, htlcs, sender_intended_total_msat);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_connection_needed(struct LDKPublicKey node_id, struct LDKCVec_SocketAddressZ addresses);
+/* @internal */
+export function Event_connection_needed(node_id: number, addresses: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_connection_needed(node_id, addresses);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_invoice_request_failed(struct LDKThirtyTwoBytes payment_id);
+/* @internal */
+export function Event_invoice_request_failed(payment_id: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_invoice_request_failed(payment_id);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_payment_sent(struct LDKCOption_ThirtyTwoBytesZ payment_id, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z fee_paid_msat);
+/* @internal */
+export function Event_payment_sent(payment_id: bigint, payment_preimage: number, payment_hash: number, fee_paid_msat: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_payment_sent(payment_id, payment_preimage, payment_hash, fee_paid_msat);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_payment_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_PaymentFailureReasonZ reason);
+/* @internal */
+export function Event_payment_failed(payment_id: number, payment_hash: number, reason: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_payment_failed(payment_id, payment_hash, reason);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_payment_path_successful(struct LDKThirtyTwoBytes payment_id, struct LDKCOption_ThirtyTwoBytesZ payment_hash, struct LDKPath path);
+/* @internal */
+export function Event_payment_path_successful(payment_id: number, payment_hash: bigint, path: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_payment_path_successful(payment_id, payment_hash, path);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_payment_path_failed(struct LDKCOption_ThirtyTwoBytesZ payment_id, struct LDKThirtyTwoBytes payment_hash, bool payment_failed_permanently, struct LDKPathFailure failure, struct LDKPath path, struct LDKCOption_u64Z short_channel_id);
+/* @internal */
+export function Event_payment_path_failed(payment_id: bigint, payment_hash: number, payment_failed_permanently: boolean, failure: bigint, path: bigint, short_channel_id: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_payment_path_failed(payment_id, payment_hash, payment_failed_permanently, failure, path, short_channel_id);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_probe_successful(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKPath path);
+/* @internal */
+export function Event_probe_successful(payment_id: number, payment_hash: number, path: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_probe_successful(payment_id, payment_hash, path);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_probe_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKPath path, struct LDKCOption_u64Z short_channel_id);
+/* @internal */
+export function Event_probe_failed(payment_id: number, payment_hash: number, path: bigint, short_channel_id: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_probe_failed(payment_id, payment_hash, path, short_channel_id);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
+/* @internal */
+export function Event_pending_htlcs_forwardable(time_forwardable: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_pending_htlcs_forwardable(time_forwardable);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_htlcintercepted(struct LDKThirtyTwoBytes intercept_id, uint64_t requested_next_hop_scid, struct LDKThirtyTwoBytes payment_hash, uint64_t inbound_amount_msat, uint64_t expected_outbound_amount_msat);
+/* @internal */
+export function Event_htlcintercepted(intercept_id: number, requested_next_hop_scid: bigint, payment_hash: number, inbound_amount_msat: bigint, expected_outbound_amount_msat: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_htlcintercepted(intercept_id, requested_next_hop_scid, payment_hash, inbound_amount_msat, expected_outbound_amount_msat);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKCOption_ThirtyTwoBytesZ channel_id);
+/* @internal */
+export function Event_spendable_outputs(outputs: number, channel_id: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_spendable_outputs(outputs, channel_id);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_payment_forwarded(struct LDKCOption_ThirtyTwoBytesZ prev_channel_id, struct LDKCOption_ThirtyTwoBytesZ next_channel_id, struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat);
+/* @internal */
+export function Event_payment_forwarded(prev_channel_id: bigint, next_channel_id: bigint, fee_earned_msat: bigint, claim_from_onchain_tx: boolean, outbound_amount_forwarded_msat: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_payment_forwarded(prev_channel_id, next_channel_id, fee_earned_msat, claim_from_onchain_tx, outbound_amount_forwarded_msat);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_channel_pending(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKCOption_ThirtyTwoBytesZ former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo);
+/* @internal */
+export function Event_channel_pending(channel_id: number, user_channel_id: number, former_temporary_channel_id: bigint, counterparty_node_id: number, funding_txo: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_channel_pending(channel_id, user_channel_id, former_temporary_channel_id, counterparty_node_id, funding_txo);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_channel_ready(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type);
+/* @internal */
+export function Event_channel_ready(channel_id: number, user_channel_id: number, counterparty_node_id: number, channel_type: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_channel_ready(channel_id, user_channel_id, counterparty_node_id, channel_type);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u64Z channel_capacity_sats, struct LDKOutPoint channel_funding_txo);
+/* @internal */
+export function Event_channel_closed(channel_id: number, user_channel_id: number, reason: bigint, counterparty_node_id: number, channel_capacity_sats: bigint, channel_funding_txo: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_channel_closed(channel_id, user_channel_id, reason, counterparty_node_id, channel_capacity_sats, channel_funding_txo);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
+/* @internal */
+export function Event_discard_funding(channel_id: number, transaction: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_discard_funding(channel_id, transaction);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_open_channel_request(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type);
+/* @internal */
+export function Event_open_channel_request(temporary_channel_id: number, counterparty_node_id: number, funding_satoshis: bigint, push_msat: bigint, channel_type: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_open_channel_request(temporary_channel_id, counterparty_node_id, funding_satoshis, push_msat, channel_type);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_htlchandling_failed(struct LDKThirtyTwoBytes prev_channel_id, struct LDKHTLCDestination failed_next_destination);
+/* @internal */
+export function Event_htlchandling_failed(prev_channel_id: number, failed_next_destination: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_htlchandling_failed(prev_channel_id, failed_next_destination);
+ return nativeResponseValue;
+}
+ // struct LDKEvent Event_bump_transaction(struct LDKBumpTransactionEvent a);
+/* @internal */
+export function Event_bump_transaction(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_bump_transaction(a);
+ return nativeResponseValue;
+}
+ // bool Event_eq(const struct LDKEvent *NONNULL_PTR a, const struct LDKEvent *NONNULL_PTR b);
+/* @internal */
+export function Event_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_eq(a, b);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
+/* @internal */
+export function Event_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_COption_EventZDecodeErrorZ Event_read(struct LDKu8slice ser);
+/* @internal */
+export function Event_read(ser: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Event_read(ser);
+ return nativeResponseValue;
+}
+ // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
+/* @internal */
+export function MessageSendEvent_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t MessageSendEvent_clone_ptr(LDKMessageSendEvent *NONNULL_PTR arg);
+/* @internal */
+export function MessageSendEvent_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
+/* @internal */
+export function MessageSendEvent_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
+/* @internal */
+export function MessageSendEvent_send_accept_channel(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_accept_channel(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel_v2(struct LDKPublicKey node_id, struct LDKAcceptChannelV2 msg);
+/* @internal */
+export function MessageSendEvent_send_accept_channel_v2(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_accept_channel_v2(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
+/* @internal */
+export function MessageSendEvent_send_open_channel(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_open_channel(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_open_channel_v2(struct LDKPublicKey node_id, struct LDKOpenChannelV2 msg);
+/* @internal */
+export function MessageSendEvent_send_open_channel_v2(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_open_channel_v2(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
+/* @internal */
+export function MessageSendEvent_send_funding_created(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_created(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
+/* @internal */
+export function MessageSendEvent_send_funding_signed(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_signed(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_stfu(struct LDKPublicKey node_id, struct LDKStfu msg);
+/* @internal */
+export function MessageSendEvent_send_stfu(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_stfu(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_splice(struct LDKPublicKey node_id, struct LDKSplice msg);
+/* @internal */
+export function MessageSendEvent_send_splice(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_splice(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_splice_ack(struct LDKPublicKey node_id, struct LDKSpliceAck msg);
+/* @internal */
+export function MessageSendEvent_send_splice_ack(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_splice_ack(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_splice_locked(struct LDKPublicKey node_id, struct LDKSpliceLocked msg);
+/* @internal */
+export function MessageSendEvent_send_splice_locked(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_splice_locked(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_tx_add_input(struct LDKPublicKey node_id, struct LDKTxAddInput msg);
+/* @internal */
+export function MessageSendEvent_send_tx_add_input(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_tx_add_input(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_tx_add_output(struct LDKPublicKey node_id, struct LDKTxAddOutput msg);
+/* @internal */
+export function MessageSendEvent_send_tx_add_output(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_tx_add_output(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_tx_remove_input(struct LDKPublicKey node_id, struct LDKTxRemoveInput msg);
+/* @internal */
+export function MessageSendEvent_send_tx_remove_input(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_tx_remove_input(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_tx_remove_output(struct LDKPublicKey node_id, struct LDKTxRemoveOutput msg);
+/* @internal */
+export function MessageSendEvent_send_tx_remove_output(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_tx_remove_output(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_tx_complete(struct LDKPublicKey node_id, struct LDKTxComplete msg);
+/* @internal */
+export function MessageSendEvent_send_tx_complete(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_tx_complete(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_tx_signatures(struct LDKPublicKey node_id, struct LDKTxSignatures msg);
+/* @internal */
+export function MessageSendEvent_send_tx_signatures(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_tx_signatures(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_tx_init_rbf(struct LDKPublicKey node_id, struct LDKTxInitRbf msg);
+/* @internal */
+export function MessageSendEvent_send_tx_init_rbf(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_tx_init_rbf(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_tx_ack_rbf(struct LDKPublicKey node_id, struct LDKTxAckRbf msg);
+/* @internal */
+export function MessageSendEvent_send_tx_ack_rbf(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_tx_ack_rbf(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_tx_abort(struct LDKPublicKey node_id, struct LDKTxAbort msg);
+/* @internal */
+export function MessageSendEvent_send_tx_abort(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_tx_abort(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_channel_ready(struct LDKPublicKey node_id, struct LDKChannelReady msg);
+/* @internal */
+export function MessageSendEvent_send_channel_ready(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_ready(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
+/* @internal */
+export function MessageSendEvent_send_announcement_signatures(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_announcement_signatures(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
+/* @internal */
+export function MessageSendEvent_update_htlcs(node_id: number, updates: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_update_htlcs(node_id, updates);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
+/* @internal */
+export function MessageSendEvent_send_revoke_and_ack(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_revoke_and_ack(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
+/* @internal */
+export function MessageSendEvent_send_closing_signed(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_closing_signed(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
+/* @internal */
+export function MessageSendEvent_send_shutdown(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_shutdown(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
+/* @internal */
+export function MessageSendEvent_send_channel_reestablish(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_reestablish(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_channel_announcement(struct LDKPublicKey node_id, struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
+/* @internal */
+export function MessageSendEvent_send_channel_announcement(node_id: number, msg: bigint, update_msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_announcement(node_id, msg, update_msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
+/* @internal */
+export function MessageSendEvent_broadcast_channel_announcement(msg: bigint, update_msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
+/* @internal */
+export function MessageSendEvent_broadcast_channel_update(msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_channel_update(msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
+/* @internal */
+export function MessageSendEvent_broadcast_node_announcement(msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_node_announcement(msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
+/* @internal */
+export function MessageSendEvent_send_channel_update(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_update(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
+/* @internal */
+export function MessageSendEvent_handle_error(node_id: number, action: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_handle_error(node_id, action);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
+/* @internal */
+export function MessageSendEvent_send_channel_range_query(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_range_query(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
+/* @internal */
+export function MessageSendEvent_send_short_ids_query(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_short_ids_query(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
+/* @internal */
+export function MessageSendEvent_send_reply_channel_range(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_reply_channel_range(node_id, msg);
+ return nativeResponseValue;
+}
+ // struct LDKMessageSendEvent MessageSendEvent_send_gossip_timestamp_filter(struct LDKPublicKey node_id, struct LDKGossipTimestampFilter msg);
+/* @internal */
+export function MessageSendEvent_send_gossip_timestamp_filter(node_id: number, msg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEvent_send_gossip_timestamp_filter(node_id, msg);
+ return nativeResponseValue;
+}
+ // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
+/* @internal */
+export function MessageSendEventsProvider_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MessageSendEventsProvider_free(this_ptr);
+ // debug statements here
+}
+ // void EventsProvider_free(struct LDKEventsProvider this_ptr);
+/* @internal */
+export function EventsProvider_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_EventsProvider_free(this_ptr);
+ // debug statements here
+}
+ // void EventHandler_free(struct LDKEventHandler this_ptr);
+/* @internal */
+export function EventHandler_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_EventHandler_free(this_ptr);
+ // debug statements here
+}
+ // void AnchorDescriptor_free(struct LDKAnchorDescriptor this_obj);
+/* @internal */
+export function AnchorDescriptor_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_free(this_obj);
+ // debug statements here
+}
+ // struct LDKChannelDerivationParameters AnchorDescriptor_get_channel_derivation_parameters(const struct LDKAnchorDescriptor *NONNULL_PTR this_ptr);
+/* @internal */
+export function AnchorDescriptor_get_channel_derivation_parameters(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_get_channel_derivation_parameters(this_ptr);
+ return nativeResponseValue;
+}
+ // void AnchorDescriptor_set_channel_derivation_parameters(struct LDKAnchorDescriptor *NONNULL_PTR this_ptr, struct LDKChannelDerivationParameters val);
+/* @internal */
+export function AnchorDescriptor_set_channel_derivation_parameters(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_set_channel_derivation_parameters(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKOutPoint AnchorDescriptor_get_outpoint(const struct LDKAnchorDescriptor *NONNULL_PTR this_ptr);
+/* @internal */
+export function AnchorDescriptor_get_outpoint(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_get_outpoint(this_ptr);
+ return nativeResponseValue;
+}
+ // void AnchorDescriptor_set_outpoint(struct LDKAnchorDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+/* @internal */
+export function AnchorDescriptor_set_outpoint(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_set_outpoint(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKAnchorDescriptor AnchorDescriptor_new(struct LDKChannelDerivationParameters channel_derivation_parameters_arg, struct LDKOutPoint outpoint_arg);
+/* @internal */
+export function AnchorDescriptor_new(channel_derivation_parameters_arg: bigint, outpoint_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_new(channel_derivation_parameters_arg, outpoint_arg);
+ return nativeResponseValue;
+}
+ // uint64_t AnchorDescriptor_clone_ptr(LDKAnchorDescriptor *NONNULL_PTR arg);
+/* @internal */
+export function AnchorDescriptor_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKAnchorDescriptor AnchorDescriptor_clone(const struct LDKAnchorDescriptor *NONNULL_PTR orig);
+/* @internal */
+export function AnchorDescriptor_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_clone(orig);
+ return nativeResponseValue;
+}
+ // bool AnchorDescriptor_eq(const struct LDKAnchorDescriptor *NONNULL_PTR a, const struct LDKAnchorDescriptor *NONNULL_PTR b);
+/* @internal */
+export function AnchorDescriptor_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_eq(a, b);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKTxOut AnchorDescriptor_previous_utxo(const struct LDKAnchorDescriptor *NONNULL_PTR this_arg);
+/* @internal */
+export function AnchorDescriptor_previous_utxo(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_previous_utxo(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKTxIn AnchorDescriptor_unsigned_tx_input(const struct LDKAnchorDescriptor *NONNULL_PTR this_arg);
+/* @internal */
+export function AnchorDescriptor_unsigned_tx_input(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_unsigned_tx_input(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCVec_u8Z AnchorDescriptor_witness_script(const struct LDKAnchorDescriptor *NONNULL_PTR this_arg);
+/* @internal */
+export function AnchorDescriptor_witness_script(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_witness_script(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKWitness AnchorDescriptor_tx_input_witness(const struct LDKAnchorDescriptor *NONNULL_PTR this_arg, struct LDKECDSASignature signature);
+/* @internal */
+export function AnchorDescriptor_tx_input_witness(this_arg: bigint, signature: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_tx_input_witness(this_arg, signature);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKWriteableEcdsaChannelSigner AnchorDescriptor_derive_channel_signer(const struct LDKAnchorDescriptor *NONNULL_PTR this_arg, const struct LDKSignerProvider *NONNULL_PTR signer_provider);
+/* @internal */
+export function AnchorDescriptor_derive_channel_signer(this_arg: bigint, signer_provider: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_AnchorDescriptor_derive_channel_signer(this_arg, signer_provider);
+ return nativeResponseValue;
+}
+ // void BumpTransactionEvent_free(struct LDKBumpTransactionEvent this_ptr);
+/* @internal */
+export function BumpTransactionEvent_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BumpTransactionEvent_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t BumpTransactionEvent_clone_ptr(LDKBumpTransactionEvent *NONNULL_PTR arg);
+/* @internal */
+export function BumpTransactionEvent_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BumpTransactionEvent_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKBumpTransactionEvent BumpTransactionEvent_clone(const struct LDKBumpTransactionEvent *NONNULL_PTR orig);
+/* @internal */
+export function BumpTransactionEvent_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BumpTransactionEvent_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs);
+/* @internal */
+export function BumpTransactionEvent_channel_close(claim_id: number, package_target_feerate_sat_per_1000_weight: number, commitment_tx: number, commitment_tx_fee_satoshis: bigint, anchor_descriptor: bigint, pending_htlcs: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BumpTransactionEvent_channel_close(claim_id, package_target_feerate_sat_per_1000_weight, commitment_tx, commitment_tx_fee_satoshis, anchor_descriptor, pending_htlcs);
+ return nativeResponseValue;
+}
+ // struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time);
+/* @internal */
+export function BumpTransactionEvent_htlcresolution(claim_id: number, target_feerate_sat_per_1000_weight: number, htlc_descriptors: number, tx_lock_time: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BumpTransactionEvent_htlcresolution(claim_id, target_feerate_sat_per_1000_weight, htlc_descriptors, tx_lock_time);
+ return nativeResponseValue;
+}
+ // bool BumpTransactionEvent_eq(const struct LDKBumpTransactionEvent *NONNULL_PTR a, const struct LDKBumpTransactionEvent *NONNULL_PTR b);
+/* @internal */
+export function BumpTransactionEvent_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BumpTransactionEvent_eq(a, b);
+ return nativeResponseValue;
+}
+ // void Input_free(struct LDKInput this_obj);
+/* @internal */
+export function Input_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Input_free(this_obj);
+ // debug statements here
+}
+ // struct LDKOutPoint Input_get_outpoint(const struct LDKInput *NONNULL_PTR this_ptr);
+/* @internal */
+export function Input_get_outpoint(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Input_get_outpoint(this_ptr);
+ return nativeResponseValue;
+}
+ // void Input_set_outpoint(struct LDKInput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+/* @internal */
+export function Input_set_outpoint(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Input_set_outpoint(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKTxOut Input_get_previous_utxo(const struct LDKInput *NONNULL_PTR this_ptr);
+/* @internal */
+export function Input_get_previous_utxo(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Input_get_previous_utxo(this_ptr);
+ return nativeResponseValue;
+}
+ // void Input_set_previous_utxo(struct LDKInput *NONNULL_PTR this_ptr, struct LDKTxOut val);
+/* @internal */
+export function Input_set_previous_utxo(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Input_set_previous_utxo(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t Input_get_satisfaction_weight(const struct LDKInput *NONNULL_PTR this_ptr);
+/* @internal */
+export function Input_get_satisfaction_weight(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Input_get_satisfaction_weight(this_ptr);
+ return nativeResponseValue;
+}
+ // void Input_set_satisfaction_weight(struct LDKInput *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function Input_set_satisfaction_weight(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Input_set_satisfaction_weight(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKInput Input_new(struct LDKOutPoint outpoint_arg, struct LDKTxOut previous_utxo_arg, uint64_t satisfaction_weight_arg);
+/* @internal */
+export function Input_new(outpoint_arg: bigint, previous_utxo_arg: bigint, satisfaction_weight_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Input_new(outpoint_arg, previous_utxo_arg, satisfaction_weight_arg);
+ return nativeResponseValue;
+}
+ // uint64_t Input_clone_ptr(LDKInput *NONNULL_PTR arg);
+/* @internal */
+export function Input_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Input_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKInput Input_clone(const struct LDKInput *NONNULL_PTR orig);
+/* @internal */
+export function Input_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Input_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t Input_hash(const struct LDKInput *NONNULL_PTR o);
+/* @internal */
+export function Input_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Input_hash(o);
+ return nativeResponseValue;
+}
+ // bool Input_eq(const struct LDKInput *NONNULL_PTR a, const struct LDKInput *NONNULL_PTR b);
+/* @internal */
+export function Input_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Input_eq(a, b);
+ return nativeResponseValue;
+}
+ // void Utxo_free(struct LDKUtxo this_obj);
+/* @internal */
+export function Utxo_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_free(this_obj);
+ // debug statements here
+}
+ // struct LDKOutPoint Utxo_get_outpoint(const struct LDKUtxo *NONNULL_PTR this_ptr);
+/* @internal */
+export function Utxo_get_outpoint(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_get_outpoint(this_ptr);
+ return nativeResponseValue;
+}
+ // void Utxo_set_outpoint(struct LDKUtxo *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+/* @internal */
+export function Utxo_set_outpoint(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_set_outpoint(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKTxOut Utxo_get_output(const struct LDKUtxo *NONNULL_PTR this_ptr);
+/* @internal */
+export function Utxo_get_output(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_get_output(this_ptr);
+ return nativeResponseValue;
+}
+ // void Utxo_set_output(struct LDKUtxo *NONNULL_PTR this_ptr, struct LDKTxOut val);
+/* @internal */
+export function Utxo_set_output(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_set_output(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t Utxo_get_satisfaction_weight(const struct LDKUtxo *NONNULL_PTR this_ptr);
+/* @internal */
+export function Utxo_get_satisfaction_weight(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_get_satisfaction_weight(this_ptr);
+ return nativeResponseValue;
+}
+ // void Utxo_set_satisfaction_weight(struct LDKUtxo *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function Utxo_set_satisfaction_weight(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_set_satisfaction_weight(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKUtxo Utxo_new(struct LDKOutPoint outpoint_arg, struct LDKTxOut output_arg, uint64_t satisfaction_weight_arg);
+/* @internal */
+export function Utxo_new(outpoint_arg: bigint, output_arg: bigint, satisfaction_weight_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_new(outpoint_arg, output_arg, satisfaction_weight_arg);
+ return nativeResponseValue;
+}
+ // uint64_t Utxo_clone_ptr(LDKUtxo *NONNULL_PTR arg);
+/* @internal */
+export function Utxo_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKUtxo Utxo_clone(const struct LDKUtxo *NONNULL_PTR orig);
+/* @internal */
+export function Utxo_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t Utxo_hash(const struct LDKUtxo *NONNULL_PTR o);
+/* @internal */
+export function Utxo_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_hash(o);
+ return nativeResponseValue;
+}
+ // bool Utxo_eq(const struct LDKUtxo *NONNULL_PTR a, const struct LDKUtxo *NONNULL_PTR b);
+/* @internal */
+export function Utxo_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_eq(a, b);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKUtxo Utxo_new_p2pkh(struct LDKOutPoint outpoint, uint64_t value, const uint8_t (*pubkey_hash)[20]);
+/* @internal */
+export function Utxo_new_p2pkh(outpoint: bigint, value: bigint, pubkey_hash: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Utxo_new_p2pkh(outpoint, value, pubkey_hash);
+ return nativeResponseValue;
+}
+ // void CoinSelection_free(struct LDKCoinSelection this_obj);
+/* @internal */
+export function CoinSelection_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CoinSelection_free(this_obj);
+ // debug statements here
+}
+ // struct LDKCVec_UtxoZ CoinSelection_get_confirmed_utxos(const struct LDKCoinSelection *NONNULL_PTR this_ptr);
+/* @internal */
+export function CoinSelection_get_confirmed_utxos(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CoinSelection_get_confirmed_utxos(this_ptr);
+ return nativeResponseValue;
+}
+ // void CoinSelection_set_confirmed_utxos(struct LDKCoinSelection *NONNULL_PTR this_ptr, struct LDKCVec_UtxoZ val);
+/* @internal */
+export function CoinSelection_set_confirmed_utxos(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CoinSelection_set_confirmed_utxos(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKCOption_TxOutZ CoinSelection_get_change_output(const struct LDKCoinSelection *NONNULL_PTR this_ptr);
+/* @internal */
+export function CoinSelection_get_change_output(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CoinSelection_get_change_output(this_ptr);
+ return nativeResponseValue;
+}
+ // void CoinSelection_set_change_output(struct LDKCoinSelection *NONNULL_PTR this_ptr, struct LDKCOption_TxOutZ val);
+/* @internal */
+export function CoinSelection_set_change_output(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CoinSelection_set_change_output(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKCoinSelection CoinSelection_new(struct LDKCVec_UtxoZ confirmed_utxos_arg, struct LDKCOption_TxOutZ change_output_arg);
+/* @internal */
+export function CoinSelection_new(confirmed_utxos_arg: number, change_output_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CoinSelection_new(confirmed_utxos_arg, change_output_arg);
+ return nativeResponseValue;
+}
+ // uint64_t CoinSelection_clone_ptr(LDKCoinSelection *NONNULL_PTR arg);
+/* @internal */
+export function CoinSelection_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CoinSelection_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCoinSelection CoinSelection_clone(const struct LDKCoinSelection *NONNULL_PTR orig);
+/* @internal */
+export function CoinSelection_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CoinSelection_clone(orig);
+ return nativeResponseValue;
+}
+ // void CoinSelectionSource_free(struct LDKCoinSelectionSource this_ptr);
+/* @internal */
+export function CoinSelectionSource_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CoinSelectionSource_free(this_ptr);
+ // debug statements here
+}
+ // void WalletSource_free(struct LDKWalletSource this_ptr);
+/* @internal */
+export function WalletSource_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_WalletSource_free(this_ptr);
+ // debug statements here
+}
+ // void Wallet_free(struct LDKWallet this_obj);
+/* @internal */
+export function Wallet_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Wallet_free(this_obj);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKWallet Wallet_new(struct LDKWalletSource source, struct LDKLogger logger);
+/* @internal */
+export function Wallet_new(source: bigint, logger: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Wallet_new(source, logger);
+ return nativeResponseValue;
+}
+ // struct LDKCoinSelectionSource Wallet_as_CoinSelectionSource(const struct LDKWallet *NONNULL_PTR this_arg);
+/* @internal */
+export function Wallet_as_CoinSelectionSource(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Wallet_as_CoinSelectionSource(this_arg);
+ return nativeResponseValue;
+}
+ // void BumpTransactionEventHandler_free(struct LDKBumpTransactionEventHandler this_obj);
+/* @internal */
+export function BumpTransactionEventHandler_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BumpTransactionEventHandler_free(this_obj);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKBumpTransactionEventHandler BumpTransactionEventHandler_new(struct LDKBroadcasterInterface broadcaster, struct LDKCoinSelectionSource utxo_source, struct LDKSignerProvider signer_provider, struct LDKLogger logger);
+/* @internal */
+export function BumpTransactionEventHandler_new(broadcaster: bigint, utxo_source: bigint, signer_provider: bigint, logger: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BumpTransactionEventHandler_new(broadcaster, utxo_source, signer_provider, logger);
+ return nativeResponseValue;
+}
+ // void BumpTransactionEventHandler_handle_event(const struct LDKBumpTransactionEventHandler *NONNULL_PTR this_arg, const struct LDKBumpTransactionEvent *NONNULL_PTR event);
+/* @internal */
+export function BumpTransactionEventHandler_handle_event(this_arg: bigint, event: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BumpTransactionEventHandler_handle_event(this_arg, event);
+ // debug statements here
+}
+ // void GossipSync_free(struct LDKGossipSync this_ptr);
+/* @internal */
+export function GossipSync_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_GossipSync_free(this_ptr);
+ // debug statements here
+}
+ // struct LDKGossipSync GossipSync_p2_p(const struct LDKP2PGossipSync *NONNULL_PTR a);
+/* @internal */
+export function GossipSync_p2_p(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_GossipSync_p2_p(a);
+ return nativeResponseValue;
+}
+ // struct LDKGossipSync GossipSync_rapid(const struct LDKRapidGossipSync *NONNULL_PTR a);
+/* @internal */
+export function GossipSync_rapid(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_GossipSync_rapid(a);
+ return nativeResponseValue;
+}
+ // struct LDKGossipSync GossipSync_none(void);
+/* @internal */
+export function GossipSync_none(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_GossipSync_none();
+ return nativeResponseValue;
+}
+ // void GraphSyncError_free(struct LDKGraphSyncError this_ptr);
+/* @internal */
+export function GraphSyncError_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_GraphSyncError_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t GraphSyncError_clone_ptr(LDKGraphSyncError *NONNULL_PTR arg);
+/* @internal */
+export function GraphSyncError_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_GraphSyncError_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKGraphSyncError GraphSyncError_clone(const struct LDKGraphSyncError *NONNULL_PTR orig);
+/* @internal */
+export function GraphSyncError_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_GraphSyncError_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKGraphSyncError GraphSyncError_decode_error(struct LDKDecodeError a);
+/* @internal */
+export function GraphSyncError_decode_error(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_GraphSyncError_decode_error(a);
+ return nativeResponseValue;
+}
+ // struct LDKGraphSyncError GraphSyncError_lightning_error(struct LDKLightningError a);
+/* @internal */
+export function GraphSyncError_lightning_error(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_GraphSyncError_lightning_error(a);
+ return nativeResponseValue;
+}
+ // void RapidGossipSync_free(struct LDKRapidGossipSync this_obj);
+/* @internal */
+export function RapidGossipSync_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RapidGossipSync_free(this_obj);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKRapidGossipSync RapidGossipSync_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger);
+/* @internal */
+export function RapidGossipSync_new(network_graph: bigint, logger: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RapidGossipSync_new(network_graph, logger);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_u32GraphSyncErrorZ RapidGossipSync_update_network_graph_no_std(const struct LDKRapidGossipSync *NONNULL_PTR this_arg, struct LDKu8slice update_data, struct LDKCOption_u64Z current_time_unix);
+/* @internal */
+export function RapidGossipSync_update_network_graph_no_std(this_arg: bigint, update_data: number, current_time_unix: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RapidGossipSync_update_network_graph_no_std(this_arg, update_data, current_time_unix);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES bool RapidGossipSync_is_initial_sync_complete(const struct LDKRapidGossipSync *NONNULL_PTR this_arg);
+/* @internal */
+export function RapidGossipSync_is_initial_sync_complete(this_arg: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RapidGossipSync_is_initial_sync_complete(this_arg);
+ return nativeResponseValue;
+}
+ // void Bolt11ParseError_free(struct LDKBolt11ParseError this_ptr);
+/* @internal */
+export function Bolt11ParseError_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t Bolt11ParseError_clone_ptr(LDKBolt11ParseError *NONNULL_PTR arg);
+/* @internal */
+export function Bolt11ParseError_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_clone(const struct LDKBolt11ParseError *NONNULL_PTR orig);
+/* @internal */
+export function Bolt11ParseError_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_bech32_error(struct LDKBech32Error a);
+/* @internal */
+export function Bolt11ParseError_bech32_error(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_bech32_error(a);
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_parse_amount_error(struct LDKError a);
+/* @internal */
+export function Bolt11ParseError_parse_amount_error(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_parse_amount_error(a);
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_malformed_signature(enum LDKSecp256k1Error a);
+/* @internal */
+export function Bolt11ParseError_malformed_signature(a: Secp256k1Error): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_malformed_signature(a);
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_bad_prefix(void);
+/* @internal */
+export function Bolt11ParseError_bad_prefix(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_bad_prefix();
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_unknown_currency(void);
+/* @internal */
+export function Bolt11ParseError_unknown_currency(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_unknown_currency();
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_unknown_si_prefix(void);
+/* @internal */
+export function Bolt11ParseError_unknown_si_prefix(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_unknown_si_prefix();
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_malformed_hrp(void);
+/* @internal */
+export function Bolt11ParseError_malformed_hrp(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_malformed_hrp();
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_too_short_data_part(void);
+/* @internal */
+export function Bolt11ParseError_too_short_data_part(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_too_short_data_part();
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_unexpected_end_of_tagged_fields(void);
+/* @internal */
+export function Bolt11ParseError_unexpected_end_of_tagged_fields(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_unexpected_end_of_tagged_fields();
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_description_decode_error(struct LDKError a);
+/* @internal */
+export function Bolt11ParseError_description_decode_error(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_description_decode_error(a);
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_padding_error(void);
+/* @internal */
+export function Bolt11ParseError_padding_error(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_padding_error();
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_integer_overflow_error(void);
+/* @internal */
+export function Bolt11ParseError_integer_overflow_error(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_integer_overflow_error();
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_invalid_seg_wit_program_length(void);
+/* @internal */
+export function Bolt11ParseError_invalid_seg_wit_program_length(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_invalid_seg_wit_program_length();
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_invalid_pub_key_hash_length(void);
+/* @internal */
+export function Bolt11ParseError_invalid_pub_key_hash_length(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_invalid_pub_key_hash_length();
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_invalid_script_hash_length(void);
+/* @internal */
+export function Bolt11ParseError_invalid_script_hash_length(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_invalid_script_hash_length();
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_invalid_recovery_id(void);
+/* @internal */
+export function Bolt11ParseError_invalid_recovery_id(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_invalid_recovery_id();
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_invalid_slice_length(struct LDKStr a);
+/* @internal */
+export function Bolt11ParseError_invalid_slice_length(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_invalid_slice_length(a);
+ return nativeResponseValue;
+}
+ // struct LDKBolt11ParseError Bolt11ParseError_skip(void);
+/* @internal */
+export function Bolt11ParseError_skip(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_skip();
+ return nativeResponseValue;
+}
+ // bool Bolt11ParseError_eq(const struct LDKBolt11ParseError *NONNULL_PTR a, const struct LDKBolt11ParseError *NONNULL_PTR b);
+/* @internal */
+export function Bolt11ParseError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_eq(a, b);
+ return nativeResponseValue;
+}
+ // void ParseOrSemanticError_free(struct LDKParseOrSemanticError this_ptr);
+/* @internal */
+export function ParseOrSemanticError_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseOrSemanticError_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t ParseOrSemanticError_clone_ptr(LDKParseOrSemanticError *NONNULL_PTR arg);
+/* @internal */
+export function ParseOrSemanticError_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseOrSemanticError_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKParseOrSemanticError ParseOrSemanticError_clone(const struct LDKParseOrSemanticError *NONNULL_PTR orig);
+/* @internal */
+export function ParseOrSemanticError_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseOrSemanticError_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKParseOrSemanticError ParseOrSemanticError_parse_error(struct LDKBolt11ParseError a);
+/* @internal */
+export function ParseOrSemanticError_parse_error(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseOrSemanticError_parse_error(a);
+ return nativeResponseValue;
+}
+ // struct LDKParseOrSemanticError ParseOrSemanticError_semantic_error(enum LDKBolt11SemanticError a);
+/* @internal */
+export function ParseOrSemanticError_semantic_error(a: Bolt11SemanticError): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseOrSemanticError_semantic_error(a);
+ return nativeResponseValue;
+}
+ // bool ParseOrSemanticError_eq(const struct LDKParseOrSemanticError *NONNULL_PTR a, const struct LDKParseOrSemanticError *NONNULL_PTR b);
+/* @internal */
+export function ParseOrSemanticError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseOrSemanticError_eq(a, b);
+ return nativeResponseValue;
+}
+ // void Bolt11Invoice_free(struct LDKBolt11Invoice this_obj);
+/* @internal */
+export function Bolt11Invoice_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_free(this_obj);
+ // debug statements here
+}
+ // bool Bolt11Invoice_eq(const struct LDKBolt11Invoice *NONNULL_PTR a, const struct LDKBolt11Invoice *NONNULL_PTR b);
+/* @internal */
+export function Bolt11Invoice_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_eq(a, b);
+ return nativeResponseValue;
+}
+ // uint64_t Bolt11Invoice_clone_ptr(LDKBolt11Invoice *NONNULL_PTR arg);
+/* @internal */
+export function Bolt11Invoice_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKBolt11Invoice Bolt11Invoice_clone(const struct LDKBolt11Invoice *NONNULL_PTR orig);
+/* @internal */
+export function Bolt11Invoice_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t Bolt11Invoice_hash(const struct LDKBolt11Invoice *NONNULL_PTR o);
+/* @internal */
+export function Bolt11Invoice_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_hash(o);
+ return nativeResponseValue;
+}
+ // void SignedRawBolt11Invoice_free(struct LDKSignedRawBolt11Invoice this_obj);
+/* @internal */
+export function SignedRawBolt11Invoice_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_free(this_obj);
+ // debug statements here
+}
+ // bool SignedRawBolt11Invoice_eq(const struct LDKSignedRawBolt11Invoice *NONNULL_PTR a, const struct LDKSignedRawBolt11Invoice *NONNULL_PTR b);
+/* @internal */
+export function SignedRawBolt11Invoice_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_eq(a, b);
+ return nativeResponseValue;
+}
+ // uint64_t SignedRawBolt11Invoice_clone_ptr(LDKSignedRawBolt11Invoice *NONNULL_PTR arg);
+/* @internal */
+export function SignedRawBolt11Invoice_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKSignedRawBolt11Invoice SignedRawBolt11Invoice_clone(const struct LDKSignedRawBolt11Invoice *NONNULL_PTR orig);
+/* @internal */
+export function SignedRawBolt11Invoice_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t SignedRawBolt11Invoice_hash(const struct LDKSignedRawBolt11Invoice *NONNULL_PTR o);
+/* @internal */
+export function SignedRawBolt11Invoice_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_hash(o);
+ return nativeResponseValue;
+}
+ // void RawBolt11Invoice_free(struct LDKRawBolt11Invoice this_obj);
+/* @internal */
+export function RawBolt11Invoice_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_free(this_obj);
+ // debug statements here
+}
+ // struct LDKRawDataPart RawBolt11Invoice_get_data(const struct LDKRawBolt11Invoice *NONNULL_PTR this_ptr);
+/* @internal */
+export function RawBolt11Invoice_get_data(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_get_data(this_ptr);
+ return nativeResponseValue;
+}
+ // void RawBolt11Invoice_set_data(struct LDKRawBolt11Invoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
+/* @internal */
+export function RawBolt11Invoice_set_data(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_set_data(this_ptr, val);
+ // debug statements here
+}
+ // bool RawBolt11Invoice_eq(const struct LDKRawBolt11Invoice *NONNULL_PTR a, const struct LDKRawBolt11Invoice *NONNULL_PTR b);
+/* @internal */
+export function RawBolt11Invoice_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_eq(a, b);
+ return nativeResponseValue;
+}
+ // uint64_t RawBolt11Invoice_clone_ptr(LDKRawBolt11Invoice *NONNULL_PTR arg);
+/* @internal */
+export function RawBolt11Invoice_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKRawBolt11Invoice RawBolt11Invoice_clone(const struct LDKRawBolt11Invoice *NONNULL_PTR orig);
+/* @internal */
+export function RawBolt11Invoice_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t RawBolt11Invoice_hash(const struct LDKRawBolt11Invoice *NONNULL_PTR o);
+/* @internal */
+export function RawBolt11Invoice_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_hash(o);
+ return nativeResponseValue;
+}
+ // void RawDataPart_free(struct LDKRawDataPart this_obj);
+/* @internal */
+export function RawDataPart_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawDataPart_free(this_obj);
+ // debug statements here
+}
+ // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
+/* @internal */
+export function RawDataPart_get_timestamp(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawDataPart_get_timestamp(this_ptr);
+ return nativeResponseValue;
+}
+ // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
+/* @internal */
+export function RawDataPart_set_timestamp(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawDataPart_set_timestamp(this_ptr, val);
+ // debug statements here
+}
+ // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
+/* @internal */
+export function RawDataPart_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawDataPart_eq(a, b);
+ return nativeResponseValue;
+}
+ // uint64_t RawDataPart_clone_ptr(LDKRawDataPart *NONNULL_PTR arg);
+/* @internal */
+export function RawDataPart_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawDataPart_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
+/* @internal */
+export function RawDataPart_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawDataPart_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t RawDataPart_hash(const struct LDKRawDataPart *NONNULL_PTR o);
+/* @internal */
+export function RawDataPart_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawDataPart_hash(o);
+ return nativeResponseValue;
+}
+ // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
+/* @internal */
+export function PositiveTimestamp_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PositiveTimestamp_free(this_obj);
+ // debug statements here
+}
+ // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
+/* @internal */
+export function PositiveTimestamp_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PositiveTimestamp_eq(a, b);
+ return nativeResponseValue;
+}
+ // uint64_t PositiveTimestamp_clone_ptr(LDKPositiveTimestamp *NONNULL_PTR arg);
+/* @internal */
+export function PositiveTimestamp_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PositiveTimestamp_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
+/* @internal */
+export function PositiveTimestamp_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PositiveTimestamp_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t PositiveTimestamp_hash(const struct LDKPositiveTimestamp *NONNULL_PTR o);
+/* @internal */
+export function PositiveTimestamp_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PositiveTimestamp_hash(o);
+ return nativeResponseValue;
+}
+ // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
+/* @internal */
+export function SiPrefix_clone(orig: bigint): SiPrefix {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SiPrefix_clone(orig);
+ return nativeResponseValue;
+}
+ // enum LDKSiPrefix SiPrefix_milli(void);
+/* @internal */
+export function SiPrefix_milli(): SiPrefix {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SiPrefix_milli();
+ return nativeResponseValue;
+}
+ // enum LDKSiPrefix SiPrefix_micro(void);
+/* @internal */
+export function SiPrefix_micro(): SiPrefix {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SiPrefix_micro();
+ return nativeResponseValue;
+}
+ // enum LDKSiPrefix SiPrefix_nano(void);
+/* @internal */
+export function SiPrefix_nano(): SiPrefix {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SiPrefix_nano();
+ return nativeResponseValue;
+}
+ // enum LDKSiPrefix SiPrefix_pico(void);
+/* @internal */
+export function SiPrefix_pico(): SiPrefix {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SiPrefix_pico();
+ return nativeResponseValue;
+}
+ // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
+/* @internal */
+export function SiPrefix_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SiPrefix_eq(a, b);
+ return nativeResponseValue;
+}
+ // uint64_t SiPrefix_hash(const enum LDKSiPrefix *NONNULL_PTR o);
+/* @internal */
+export function SiPrefix_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SiPrefix_hash(o);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
+/* @internal */
+export function SiPrefix_multiplier(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SiPrefix_multiplier(this_arg);
+ return nativeResponseValue;
+}
+ // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
+/* @internal */
+export function Currency_clone(orig: bigint): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Currency_clone(orig);
+ return nativeResponseValue;
+}
+ // enum LDKCurrency Currency_bitcoin(void);
+/* @internal */
+export function Currency_bitcoin(): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Currency_bitcoin();
+ return nativeResponseValue;
+}
+ // enum LDKCurrency Currency_bitcoin_testnet(void);
+/* @internal */
+export function Currency_bitcoin_testnet(): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Currency_bitcoin_testnet();
+ return nativeResponseValue;
+}
+ // enum LDKCurrency Currency_regtest(void);
+/* @internal */
+export function Currency_regtest(): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Currency_regtest();
+ return nativeResponseValue;
+}
+ // enum LDKCurrency Currency_simnet(void);
+/* @internal */
+export function Currency_simnet(): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Currency_simnet();
+ return nativeResponseValue;
+}
+ // enum LDKCurrency Currency_signet(void);
+/* @internal */
+export function Currency_signet(): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Currency_signet();
+ return nativeResponseValue;
+}
+ // uint64_t Currency_hash(const enum LDKCurrency *NONNULL_PTR o);
+/* @internal */
+export function Currency_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Currency_hash(o);
+ return nativeResponseValue;
+}
+ // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
+/* @internal */
+export function Currency_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Currency_eq(a, b);
+ return nativeResponseValue;
+}
+ // void Sha256_free(struct LDKSha256 this_obj);
+/* @internal */
+export function Sha256_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Sha256_free(this_obj);
+ // debug statements here
+}
+ // uint64_t Sha256_clone_ptr(LDKSha256 *NONNULL_PTR arg);
+/* @internal */
+export function Sha256_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Sha256_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
+/* @internal */
+export function Sha256_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Sha256_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t Sha256_hash(const struct LDKSha256 *NONNULL_PTR o);
+/* @internal */
+export function Sha256_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Sha256_hash(o);
+ return nativeResponseValue;
+}
+ // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
+/* @internal */
+export function Sha256_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Sha256_eq(a, b);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKSha256 Sha256_from_bytes(const uint8_t (*bytes)[32]);
+/* @internal */
+export function Sha256_from_bytes(bytes: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Sha256_from_bytes(bytes);
+ return nativeResponseValue;
+}
+ // void Description_free(struct LDKDescription this_obj);
+/* @internal */
+export function Description_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Description_free(this_obj);
+ // debug statements here
+}
+ // uint64_t Description_clone_ptr(LDKDescription *NONNULL_PTR arg);
+/* @internal */
+export function Description_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Description_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
+/* @internal */
+export function Description_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Description_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t Description_hash(const struct LDKDescription *NONNULL_PTR o);
+/* @internal */
+export function Description_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Description_hash(o);
+ return nativeResponseValue;
+}
+ // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
+/* @internal */
+export function Description_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Description_eq(a, b);
+ return nativeResponseValue;
+}
+ // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
+/* @internal */
+export function PayeePubKey_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PayeePubKey_free(this_obj);
+ // debug statements here
+}
+ // struct LDKPublicKey PayeePubKey_get_a(const struct LDKPayeePubKey *NONNULL_PTR this_ptr);
+/* @internal */
+export function PayeePubKey_get_a(this_ptr: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PayeePubKey_get_a(this_ptr);
+ return nativeResponseValue;
+}
+ // void PayeePubKey_set_a(struct LDKPayeePubKey *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+/* @internal */
+export function PayeePubKey_set_a(this_ptr: bigint, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PayeePubKey_set_a(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKPayeePubKey PayeePubKey_new(struct LDKPublicKey a_arg);
+/* @internal */
+export function PayeePubKey_new(a_arg: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PayeePubKey_new(a_arg);
+ return nativeResponseValue;
+}
+ // uint64_t PayeePubKey_clone_ptr(LDKPayeePubKey *NONNULL_PTR arg);
+/* @internal */
+export function PayeePubKey_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PayeePubKey_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
+/* @internal */
+export function PayeePubKey_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PayeePubKey_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t PayeePubKey_hash(const struct LDKPayeePubKey *NONNULL_PTR o);
+/* @internal */
+export function PayeePubKey_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PayeePubKey_hash(o);
+ return nativeResponseValue;
+}
+ // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
+/* @internal */
+export function PayeePubKey_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PayeePubKey_eq(a, b);
+ return nativeResponseValue;
+}
+ // void ExpiryTime_free(struct LDKExpiryTime this_obj);
+/* @internal */
+export function ExpiryTime_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ExpiryTime_free(this_obj);
+ // debug statements here
+}
+ // uint64_t ExpiryTime_clone_ptr(LDKExpiryTime *NONNULL_PTR arg);
+/* @internal */
+export function ExpiryTime_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ExpiryTime_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
+/* @internal */
+export function ExpiryTime_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ExpiryTime_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t ExpiryTime_hash(const struct LDKExpiryTime *NONNULL_PTR o);
+/* @internal */
+export function ExpiryTime_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ExpiryTime_hash(o);
+ return nativeResponseValue;
+}
+ // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
+/* @internal */
+export function ExpiryTime_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ExpiryTime_eq(a, b);
+ return nativeResponseValue;
+}
+ // void MinFinalCltvExpiryDelta_free(struct LDKMinFinalCltvExpiryDelta this_obj);
+/* @internal */
+export function MinFinalCltvExpiryDelta_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiryDelta_free(this_obj);
+ // debug statements here
+}
+ // uint64_t MinFinalCltvExpiryDelta_get_a(const struct LDKMinFinalCltvExpiryDelta *NONNULL_PTR this_ptr);
+/* @internal */
+export function MinFinalCltvExpiryDelta_get_a(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiryDelta_get_a(this_ptr);
+ return nativeResponseValue;
+}
+ // void MinFinalCltvExpiryDelta_set_a(struct LDKMinFinalCltvExpiryDelta *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function MinFinalCltvExpiryDelta_set_a(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiryDelta_set_a(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKMinFinalCltvExpiryDelta MinFinalCltvExpiryDelta_new(uint64_t a_arg);
+/* @internal */
+export function MinFinalCltvExpiryDelta_new(a_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiryDelta_new(a_arg);
+ return nativeResponseValue;
+}
+ // uint64_t MinFinalCltvExpiryDelta_clone_ptr(LDKMinFinalCltvExpiryDelta *NONNULL_PTR arg);
+/* @internal */
+export function MinFinalCltvExpiryDelta_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiryDelta_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKMinFinalCltvExpiryDelta MinFinalCltvExpiryDelta_clone(const struct LDKMinFinalCltvExpiryDelta *NONNULL_PTR orig);
+/* @internal */
+export function MinFinalCltvExpiryDelta_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiryDelta_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t MinFinalCltvExpiryDelta_hash(const struct LDKMinFinalCltvExpiryDelta *NONNULL_PTR o);
+/* @internal */
+export function MinFinalCltvExpiryDelta_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiryDelta_hash(o);
+ return nativeResponseValue;
+}
+ // bool MinFinalCltvExpiryDelta_eq(const struct LDKMinFinalCltvExpiryDelta *NONNULL_PTR a, const struct LDKMinFinalCltvExpiryDelta *NONNULL_PTR b);
+/* @internal */
+export function MinFinalCltvExpiryDelta_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiryDelta_eq(a, b);
+ return nativeResponseValue;
+}
+ // void Fallback_free(struct LDKFallback this_ptr);
+/* @internal */
+export function Fallback_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Fallback_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t Fallback_clone_ptr(LDKFallback *NONNULL_PTR arg);
+/* @internal */
+export function Fallback_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Fallback_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
+/* @internal */
+export function Fallback_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Fallback_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKFallback Fallback_seg_wit_program(struct LDKWitnessVersion version, struct LDKCVec_u8Z program);
+/* @internal */
+export function Fallback_seg_wit_program(version: number, program: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Fallback_seg_wit_program(version, program);
+ return nativeResponseValue;
+}
+ // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
+/* @internal */
+export function Fallback_pub_key_hash(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Fallback_pub_key_hash(a);
+ return nativeResponseValue;
+}
+ // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
+/* @internal */
+export function Fallback_script_hash(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Fallback_script_hash(a);
+ return nativeResponseValue;
+}
+ // uint64_t Fallback_hash(const struct LDKFallback *NONNULL_PTR o);
+/* @internal */
+export function Fallback_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Fallback_hash(o);
+ return nativeResponseValue;
+}
+ // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
+/* @internal */
+export function Fallback_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Fallback_eq(a, b);
+ return nativeResponseValue;
+}
+ // void Bolt11InvoiceSignature_free(struct LDKBolt11InvoiceSignature this_obj);
+/* @internal */
+export function Bolt11InvoiceSignature_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11InvoiceSignature_free(this_obj);
+ // debug statements here
+}
+ // uint64_t Bolt11InvoiceSignature_clone_ptr(LDKBolt11InvoiceSignature *NONNULL_PTR arg);
+/* @internal */
+export function Bolt11InvoiceSignature_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11InvoiceSignature_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKBolt11InvoiceSignature Bolt11InvoiceSignature_clone(const struct LDKBolt11InvoiceSignature *NONNULL_PTR orig);
+/* @internal */
+export function Bolt11InvoiceSignature_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11InvoiceSignature_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t Bolt11InvoiceSignature_hash(const struct LDKBolt11InvoiceSignature *NONNULL_PTR o);
+/* @internal */
+export function Bolt11InvoiceSignature_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11InvoiceSignature_hash(o);
+ return nativeResponseValue;
+}
+ // bool Bolt11InvoiceSignature_eq(const struct LDKBolt11InvoiceSignature *NONNULL_PTR a, const struct LDKBolt11InvoiceSignature *NONNULL_PTR b);
+/* @internal */
+export function Bolt11InvoiceSignature_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11InvoiceSignature_eq(a, b);
+ return nativeResponseValue;
+}
+ // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
+/* @internal */
+export function PrivateRoute_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PrivateRoute_free(this_obj);
+ // debug statements here
+}
+ // uint64_t PrivateRoute_clone_ptr(LDKPrivateRoute *NONNULL_PTR arg);
+/* @internal */
+export function PrivateRoute_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PrivateRoute_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
+/* @internal */
+export function PrivateRoute_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PrivateRoute_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t PrivateRoute_hash(const struct LDKPrivateRoute *NONNULL_PTR o);
+/* @internal */
+export function PrivateRoute_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PrivateRoute_hash(o);
+ return nativeResponseValue;
+}
+ // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
+/* @internal */
+export function PrivateRoute_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PrivateRoute_eq(a, b);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKC3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ SignedRawBolt11Invoice_into_parts(struct LDKSignedRawBolt11Invoice this_arg);
+/* @internal */
+export function SignedRawBolt11Invoice_into_parts(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_into_parts(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKRawBolt11Invoice SignedRawBolt11Invoice_raw_invoice(const struct LDKSignedRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function SignedRawBolt11Invoice_raw_invoice(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_raw_invoice(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES const uint8_t (*SignedRawBolt11Invoice_signable_hash(const struct LDKSignedRawBolt11Invoice *NONNULL_PTR this_arg))[32];
+/* @internal */
+export function SignedRawBolt11Invoice_signable_hash(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_signable_hash(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKBolt11InvoiceSignature SignedRawBolt11Invoice_signature(const struct LDKSignedRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function SignedRawBolt11Invoice_signature(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_signature(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_PayeePubKeySecp256k1ErrorZ SignedRawBolt11Invoice_recover_payee_pub_key(const struct LDKSignedRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function SignedRawBolt11Invoice_recover_payee_pub_key(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_recover_payee_pub_key(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES bool SignedRawBolt11Invoice_check_signature(const struct LDKSignedRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function SignedRawBolt11Invoice_check_signature(this_arg: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_check_signature(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKThirtyTwoBytes RawBolt11Invoice_signable_hash(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_signable_hash(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_signable_hash(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKSha256 RawBolt11Invoice_payment_hash(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_payment_hash(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_payment_hash(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKDescription RawBolt11Invoice_description(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_description(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_description(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKPayeePubKey RawBolt11Invoice_payee_pub_key(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_payee_pub_key(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_payee_pub_key(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKSha256 RawBolt11Invoice_description_hash(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_description_hash(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_description_hash(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKExpiryTime RawBolt11Invoice_expiry_time(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_expiry_time(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_expiry_time(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKMinFinalCltvExpiryDelta RawBolt11Invoice_min_final_cltv_expiry_delta(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_min_final_cltv_expiry_delta(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_min_final_cltv_expiry_delta(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCOption_ThirtyTwoBytesZ RawBolt11Invoice_payment_secret(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_payment_secret(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_payment_secret(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCOption_CVec_u8ZZ RawBolt11Invoice_payment_metadata(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_payment_metadata(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_payment_metadata(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKBolt11InvoiceFeatures RawBolt11Invoice_features(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_features(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_features(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawBolt11Invoice_private_routes(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_private_routes(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_private_routes(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCOption_u64Z RawBolt11Invoice_amount_pico_btc(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_amount_pico_btc(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_amount_pico_btc(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES enum LDKCurrency RawBolt11Invoice_currency(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawBolt11Invoice_currency(this_arg: bigint): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawBolt11Invoice_currency(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
+/* @internal */
+export function PositiveTimestamp_from_unix_timestamp(unix_seconds: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PositiveTimestamp_from_unix_timestamp(unix_seconds);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_duration_since_epoch(uint64_t duration);
+/* @internal */
+export function PositiveTimestamp_from_duration_since_epoch(duration: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PositiveTimestamp_from_duration_since_epoch(duration);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
+/* @internal */
+export function PositiveTimestamp_as_unix_timestamp(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PositiveTimestamp_as_unix_timestamp(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t PositiveTimestamp_as_duration_since_epoch(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
+/* @internal */
+export function PositiveTimestamp_as_duration_since_epoch(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PositiveTimestamp_as_duration_since_epoch(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKThirtyTwoBytes Bolt11Invoice_signable_hash(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_signable_hash(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_signable_hash(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKSignedRawBolt11Invoice Bolt11Invoice_into_signed_raw(struct LDKBolt11Invoice this_arg);
+/* @internal */
+export function Bolt11Invoice_into_signed_raw(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_into_signed_raw(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_NoneBolt11SemanticErrorZ Bolt11Invoice_check_signature(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_check_signature(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_check_signature(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_Bolt11InvoiceBolt11SemanticErrorZ Bolt11Invoice_from_signed(struct LDKSignedRawBolt11Invoice signed_invoice);
+/* @internal */
+export function Bolt11Invoice_from_signed(signed_invoice: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_from_signed(signed_invoice);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t Bolt11Invoice_duration_since_epoch(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_duration_since_epoch(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_duration_since_epoch(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES const uint8_t (*Bolt11Invoice_payment_hash(const struct LDKBolt11Invoice *NONNULL_PTR this_arg))[32];
+/* @internal */
+export function Bolt11Invoice_payment_hash(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_payment_hash(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKPublicKey Bolt11Invoice_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_payee_pub_key(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_payee_pub_key(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES const uint8_t (*Bolt11Invoice_payment_secret(const struct LDKBolt11Invoice *NONNULL_PTR this_arg))[32];
+/* @internal */
+export function Bolt11Invoice_payment_secret(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_payment_secret(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCOption_CVec_u8ZZ Bolt11Invoice_payment_metadata(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_payment_metadata(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_payment_metadata(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKBolt11InvoiceFeatures Bolt11Invoice_features(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_features(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_features(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKPublicKey Bolt11Invoice_recover_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_recover_payee_pub_key(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_recover_payee_pub_key(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCOption_u64Z Bolt11Invoice_expires_at(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_expires_at(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_expires_at(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t Bolt11Invoice_expiry_time(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_expiry_time(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_expiry_time(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t Bolt11Invoice_expiration_remaining_from_epoch(const struct LDKBolt11Invoice *NONNULL_PTR this_arg, uint64_t time);
+/* @internal */
+export function Bolt11Invoice_expiration_remaining_from_epoch(this_arg: bigint, time: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_expiration_remaining_from_epoch(this_arg, time);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES bool Bolt11Invoice_would_expire(const struct LDKBolt11Invoice *NONNULL_PTR this_arg, uint64_t at_time);
+/* @internal */
+export function Bolt11Invoice_would_expire(this_arg: bigint, at_time: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_would_expire(this_arg, at_time);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t Bolt11Invoice_min_final_cltv_expiry_delta(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_min_final_cltv_expiry_delta(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_min_final_cltv_expiry_delta(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCVec_StrZ Bolt11Invoice_fallback_addresses(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_fallback_addresses(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_fallback_addresses(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCVec_PrivateRouteZ Bolt11Invoice_private_routes(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_private_routes(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_private_routes(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCVec_RouteHintZ Bolt11Invoice_route_hints(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_route_hints(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_route_hints(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES enum LDKCurrency Bolt11Invoice_currency(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_currency(this_arg: bigint): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_currency(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCOption_u64Z Bolt11Invoice_amount_milli_satoshis(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Bolt11Invoice_amount_milli_satoshis(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_amount_milli_satoshis(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
+/* @internal */
+export function Description_new(description: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Description_new(description);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKUntrustedString Description_into_inner(struct LDKDescription this_arg);
+/* @internal */
+export function Description_into_inner(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Description_into_inner(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKStr Description_to_str(const struct LDKDescription *NONNULL_PTR o);
+/* @internal */
+export function Description_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Description_to_str(o);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKExpiryTime ExpiryTime_from_seconds(uint64_t seconds);
+/* @internal */
+export function ExpiryTime_from_seconds(seconds: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ExpiryTime_from_seconds(seconds);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKExpiryTime ExpiryTime_from_duration(uint64_t duration);
+/* @internal */
+export function ExpiryTime_from_duration(duration: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ExpiryTime_from_duration(duration);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
+/* @internal */
+export function ExpiryTime_as_seconds(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ExpiryTime_as_seconds(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
+/* @internal */
+export function ExpiryTime_as_duration(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ExpiryTime_as_duration(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
+/* @internal */
+export function PrivateRoute_new(hops: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PrivateRoute_new(hops);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
+/* @internal */
+export function PrivateRoute_into_inner(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PrivateRoute_into_inner(this_arg);
+ return nativeResponseValue;
+}
+ // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
+/* @internal */
+export function CreationError_clone(orig: bigint): CreationError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CreationError_clone(orig);
+ return nativeResponseValue;
+}
+ // enum LDKCreationError CreationError_description_too_long(void);
+/* @internal */
+export function CreationError_description_too_long(): CreationError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CreationError_description_too_long();
+ return nativeResponseValue;
+}
+ // enum LDKCreationError CreationError_route_too_long(void);
+/* @internal */
+export function CreationError_route_too_long(): CreationError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CreationError_route_too_long();
+ return nativeResponseValue;
+}
+ // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
+/* @internal */
+export function CreationError_timestamp_out_of_bounds(): CreationError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CreationError_timestamp_out_of_bounds();
+ return nativeResponseValue;
+}
+ // enum LDKCreationError CreationError_invalid_amount(void);
+/* @internal */
+export function CreationError_invalid_amount(): CreationError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CreationError_invalid_amount();
+ return nativeResponseValue;
+}
+ // enum LDKCreationError CreationError_missing_route_hints(void);
+/* @internal */
+export function CreationError_missing_route_hints(): CreationError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CreationError_missing_route_hints();
+ return nativeResponseValue;
+}
+ // enum LDKCreationError CreationError_min_final_cltv_expiry_delta_too_short(void);
+/* @internal */
+export function CreationError_min_final_cltv_expiry_delta_too_short(): CreationError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CreationError_min_final_cltv_expiry_delta_too_short();
+ return nativeResponseValue;
+}
+ // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
+/* @internal */
+export function CreationError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CreationError_eq(a, b);
+ return nativeResponseValue;
+}
+ // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
+/* @internal */
+export function CreationError_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CreationError_to_str(o);
+ return nativeResponseValue;
+}
+ // enum LDKBolt11SemanticError Bolt11SemanticError_clone(const enum LDKBolt11SemanticError *NONNULL_PTR orig);
+/* @internal */
+export function Bolt11SemanticError_clone(orig: bigint): Bolt11SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_clone(orig);
+ return nativeResponseValue;
+}
+ // enum LDKBolt11SemanticError Bolt11SemanticError_no_payment_hash(void);
+/* @internal */
+export function Bolt11SemanticError_no_payment_hash(): Bolt11SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_no_payment_hash();
+ return nativeResponseValue;
+}
+ // enum LDKBolt11SemanticError Bolt11SemanticError_multiple_payment_hashes(void);
+/* @internal */
+export function Bolt11SemanticError_multiple_payment_hashes(): Bolt11SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_multiple_payment_hashes();
+ return nativeResponseValue;
+}
+ // enum LDKBolt11SemanticError Bolt11SemanticError_no_description(void);
+/* @internal */
+export function Bolt11SemanticError_no_description(): Bolt11SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_no_description();
+ return nativeResponseValue;
+}
+ // enum LDKBolt11SemanticError Bolt11SemanticError_multiple_descriptions(void);
+/* @internal */
+export function Bolt11SemanticError_multiple_descriptions(): Bolt11SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_multiple_descriptions();
+ return nativeResponseValue;
+}
+ // enum LDKBolt11SemanticError Bolt11SemanticError_no_payment_secret(void);
+/* @internal */
+export function Bolt11SemanticError_no_payment_secret(): Bolt11SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_no_payment_secret();
+ return nativeResponseValue;
+}
+ // enum LDKBolt11SemanticError Bolt11SemanticError_multiple_payment_secrets(void);
+/* @internal */
+export function Bolt11SemanticError_multiple_payment_secrets(): Bolt11SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_multiple_payment_secrets();
+ return nativeResponseValue;
+}
+ // enum LDKBolt11SemanticError Bolt11SemanticError_invalid_features(void);
+/* @internal */
+export function Bolt11SemanticError_invalid_features(): Bolt11SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_invalid_features();
+ return nativeResponseValue;
+}
+ // enum LDKBolt11SemanticError Bolt11SemanticError_invalid_recovery_id(void);
+/* @internal */
+export function Bolt11SemanticError_invalid_recovery_id(): Bolt11SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_invalid_recovery_id();
+ return nativeResponseValue;
+}
+ // enum LDKBolt11SemanticError Bolt11SemanticError_invalid_signature(void);
+/* @internal */
+export function Bolt11SemanticError_invalid_signature(): Bolt11SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_invalid_signature();
+ return nativeResponseValue;
+}
+ // enum LDKBolt11SemanticError Bolt11SemanticError_imprecise_amount(void);
+/* @internal */
+export function Bolt11SemanticError_imprecise_amount(): Bolt11SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_imprecise_amount();
+ return nativeResponseValue;
+}
+ // bool Bolt11SemanticError_eq(const enum LDKBolt11SemanticError *NONNULL_PTR a, const enum LDKBolt11SemanticError *NONNULL_PTR b);
+/* @internal */
+export function Bolt11SemanticError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_eq(a, b);
+ return nativeResponseValue;
+}
+ // struct LDKStr Bolt11SemanticError_to_str(const enum LDKBolt11SemanticError *NONNULL_PTR o);
+/* @internal */
+export function Bolt11SemanticError_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11SemanticError_to_str(o);
+ return nativeResponseValue;
+}
+ // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
+/* @internal */
+export function SignOrCreationError_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignOrCreationError_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t SignOrCreationError_clone_ptr(LDKSignOrCreationError *NONNULL_PTR arg);
+/* @internal */
+export function SignOrCreationError_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignOrCreationError_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
+/* @internal */
+export function SignOrCreationError_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignOrCreationError_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
+/* @internal */
+export function SignOrCreationError_sign_error(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignOrCreationError_sign_error();
+ return nativeResponseValue;
+}
+ // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
+/* @internal */
+export function SignOrCreationError_creation_error(a: CreationError): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignOrCreationError_creation_error(a);
+ return nativeResponseValue;
+}
+ // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
+/* @internal */
+export function SignOrCreationError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignOrCreationError_eq(a, b);
+ return nativeResponseValue;
+}
+ // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
+/* @internal */
+export function SignOrCreationError_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignOrCreationError_to_str(o);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_zero_amount_invoice(const struct LDKBolt11Invoice *NONNULL_PTR invoice, uint64_t amount_msat);
+/* @internal */
+export function payment_parameters_from_zero_amount_invoice(invoice: bigint, amount_msat: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_payment_parameters_from_zero_amount_invoice(invoice, amount_msat);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_invoice(const struct LDKBolt11Invoice *NONNULL_PTR invoice);
+/* @internal */
+export function payment_parameters_from_invoice(invoice: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_payment_parameters_from_invoice(invoice);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice(struct LDKCOption_u64Z amt_msat, struct LDKCOption_ThirtyTwoBytesZ payment_hash, struct LDKStr description, uint32_t invoice_expiry_delta_secs, struct LDKCVec_PhantomRouteHintsZ phantom_route_hints, struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u16Z min_final_cltv_expiry_delta, uint64_t duration_since_epoch);
+/* @internal */
+export function create_phantom_invoice(amt_msat: bigint, payment_hash: bigint, description: number, invoice_expiry_delta_secs: number, phantom_route_hints: number, entropy_source: bigint, node_signer: bigint, logger: bigint, network: Currency, min_final_cltv_expiry_delta: bigint, duration_since_epoch: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_create_phantom_invoice(amt_msat, payment_hash, description, invoice_expiry_delta_secs, phantom_route_hints, entropy_source, node_signer, logger, network, min_final_cltv_expiry_delta, duration_since_epoch);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(struct LDKCOption_u64Z amt_msat, struct LDKCOption_ThirtyTwoBytesZ payment_hash, uint32_t invoice_expiry_delta_secs, struct LDKSha256 description_hash, struct LDKCVec_PhantomRouteHintsZ phantom_route_hints, struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u16Z min_final_cltv_expiry_delta, uint64_t duration_since_epoch);
+/* @internal */
+export function create_phantom_invoice_with_description_hash(amt_msat: bigint, payment_hash: bigint, invoice_expiry_delta_secs: number, description_hash: bigint, phantom_route_hints: number, entropy_source: bigint, node_signer: bigint, logger: bigint, network: Currency, min_final_cltv_expiry_delta: bigint, duration_since_epoch: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_create_phantom_invoice_with_description_hash(amt_msat, payment_hash, invoice_expiry_delta_secs, description_hash, phantom_route_hints, entropy_source, node_signer, logger, network, min_final_cltv_expiry_delta, duration_since_epoch);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
+/* @internal */
+export function create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager: bigint, node_signer: bigint, logger: bigint, network: Currency, amt_msat: bigint, description_hash: bigint, duration_since_epoch: bigint, invoice_expiry_delta_secs: number, min_final_cltv_expiry_delta: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager, node_signer, logger, network, amt_msat, description_hash, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
+/* @internal */
+export function create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager: bigint, node_signer: bigint, logger: bigint, network: Currency, amt_msat: bigint, description: number, duration_since_epoch: bigint, invoice_expiry_delta_secs: number, min_final_cltv_expiry_delta: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager, node_signer, logger, network, amt_msat, description, duration_since_epoch, invoice_expiry_delta_secs, min_final_cltv_expiry_delta);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint64_t duration_since_epoch, uint32_t invoice_expiry_delta_secs, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
+/* @internal */
+export function create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager: bigint, node_signer: bigint, logger: bigint, network: Currency, amt_msat: bigint, description: number, duration_since_epoch: bigint, invoice_expiry_delta_secs: number, payment_hash: number, min_final_cltv_expiry_delta: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_create_invoice_from_channelmanager_and_duration_since_epoch_with_payment_hash(channelmanager, node_signer, logger, network, amt_msat, description, duration_since_epoch, invoice_expiry_delta_secs, payment_hash, min_final_cltv_expiry_delta);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_SiPrefixBolt11ParseErrorZ SiPrefix_from_str(struct LDKStr s);
+/* @internal */
+export function SiPrefix_from_str(s: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SiPrefix_from_str(s);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_Bolt11InvoiceParseOrSemanticErrorZ Bolt11Invoice_from_str(struct LDKStr s);
+/* @internal */
+export function Bolt11Invoice_from_str(s: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_from_str(s);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_SignedRawBolt11InvoiceBolt11ParseErrorZ SignedRawBolt11Invoice_from_str(struct LDKStr s);
+/* @internal */
+export function SignedRawBolt11Invoice_from_str(s: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_from_str(s);
+ return nativeResponseValue;
+}
+ // struct LDKStr Bolt11ParseError_to_str(const struct LDKBolt11ParseError *NONNULL_PTR o);
+/* @internal */
+export function Bolt11ParseError_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11ParseError_to_str(o);
+ return nativeResponseValue;
+}
+ // struct LDKStr ParseOrSemanticError_to_str(const struct LDKParseOrSemanticError *NONNULL_PTR o);
+/* @internal */
+export function ParseOrSemanticError_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseOrSemanticError_to_str(o);
+ return nativeResponseValue;
+}
+ // struct LDKStr Bolt11Invoice_to_str(const struct LDKBolt11Invoice *NONNULL_PTR o);
+/* @internal */
+export function Bolt11Invoice_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Bolt11Invoice_to_str(o);
+ return nativeResponseValue;
+}
+ // struct LDKStr SignedRawBolt11Invoice_to_str(const struct LDKSignedRawBolt11Invoice *NONNULL_PTR o);
+/* @internal */
+export function SignedRawBolt11Invoice_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawBolt11Invoice_to_str(o);
+ return nativeResponseValue;
+}
+ // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
+/* @internal */
+export function Currency_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Currency_to_str(o);
+ return nativeResponseValue;
+}
+ // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
+/* @internal */
+export function SiPrefix_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SiPrefix_to_str(o);
+ return nativeResponseValue;
+}
+
+
+js_invoke = function(obj_ptr: number, fn_id: number, arg1: bigint|number, arg2: bigint|number, arg3: bigint|number, arg4: bigint|number, arg5: bigint|number, arg6: bigint|number, arg7: bigint|number, arg8: bigint|number, arg9: bigint|number, arg10: bigint|number) {
+ const weak: WeakRef<object>|undefined = js_objs[obj_ptr];
+ if (weak == null || weak == undefined) {
+ console.error("Got function call on unknown/free'd JS object!");
+ throw new Error("Got function call on unknown/free'd JS object!");
+ }
+ const obj = weak.deref();
+ if (obj == null || obj == undefined) {
+ console.error("Got function call on GC'd JS object!");
+ throw new Error("Got function call on GC'd JS object!");
+ }
+ var fn;
+ switch (fn_id) {
+ case 0: fn = Object.getOwnPropertyDescriptor(obj, "get_per_commitment_point"); break;
+ case 1: fn = Object.getOwnPropertyDescriptor(obj, "release_commitment_secret"); break;
+ case 2: fn = Object.getOwnPropertyDescriptor(obj, "validate_holder_commitment"); break;
+ case 3: fn = Object.getOwnPropertyDescriptor(obj, "validate_counterparty_revocation"); break;
+ case 4: fn = Object.getOwnPropertyDescriptor(obj, "channel_keys_id"); break;
+ case 5: fn = Object.getOwnPropertyDescriptor(obj, "provide_channel_parameters"); break;
+ case 6: fn = Object.getOwnPropertyDescriptor(obj, "sign_counterparty_commitment"); break;
+ case 7: fn = Object.getOwnPropertyDescriptor(obj, "sign_holder_commitment"); break;
+ case 8: fn = Object.getOwnPropertyDescriptor(obj, "sign_justice_revoked_output"); break;
+ case 9: fn = Object.getOwnPropertyDescriptor(obj, "sign_justice_revoked_htlc"); break;
+ case 10: fn = Object.getOwnPropertyDescriptor(obj, "sign_holder_htlc_transaction"); break;
+ case 11: fn = Object.getOwnPropertyDescriptor(obj, "sign_counterparty_htlc_transaction"); break;
+ case 12: fn = Object.getOwnPropertyDescriptor(obj, "sign_closing_transaction"); break;
+ case 13: fn = Object.getOwnPropertyDescriptor(obj, "sign_holder_anchor_input"); break;
+ case 14: fn = Object.getOwnPropertyDescriptor(obj, "sign_channel_announcement_with_funding_key"); break;
+ case 15: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 16: fn = Object.getOwnPropertyDescriptor(obj, "log"); break;
+ case 17: fn = Object.getOwnPropertyDescriptor(obj, "get_utxo"); break;
+ case 18: fn = Object.getOwnPropertyDescriptor(obj, "watch_channel"); break;
+ case 19: fn = Object.getOwnPropertyDescriptor(obj, "update_channel"); break;
+ case 20: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_monitor_events"); break;
+ case 21: fn = Object.getOwnPropertyDescriptor(obj, "broadcast_transactions"); break;
+ case 22: fn = Object.getOwnPropertyDescriptor(obj, "get_secure_random_bytes"); break;
+ case 23: fn = Object.getOwnPropertyDescriptor(obj, "get_inbound_payment_key_material"); break;
+ case 24: fn = Object.getOwnPropertyDescriptor(obj, "get_node_id"); break;
+ case 25: fn = Object.getOwnPropertyDescriptor(obj, "ecdh"); break;
+ case 26: fn = Object.getOwnPropertyDescriptor(obj, "sign_invoice"); break;
+ case 27: fn = Object.getOwnPropertyDescriptor(obj, "sign_bolt12_invoice_request"); break;
+ case 28: fn = Object.getOwnPropertyDescriptor(obj, "sign_bolt12_invoice"); break;
+ case 29: fn = Object.getOwnPropertyDescriptor(obj, "sign_gossip_message"); break;
+ case 30: fn = Object.getOwnPropertyDescriptor(obj, "generate_channel_keys_id"); break;
+ case 31: fn = Object.getOwnPropertyDescriptor(obj, "derive_channel_signer"); break;
+ case 32: fn = Object.getOwnPropertyDescriptor(obj, "read_chan_signer"); break;
+ case 33: fn = Object.getOwnPropertyDescriptor(obj, "get_destination_script"); break;
+ case 34: fn = Object.getOwnPropertyDescriptor(obj, "get_shutdown_scriptpubkey"); break;
+ case 35: fn = Object.getOwnPropertyDescriptor(obj, "get_est_sat_per_1000_weight"); break;
+ case 36: fn = Object.getOwnPropertyDescriptor(obj, "find_path"); break;
+ case 37: fn = Object.getOwnPropertyDescriptor(obj, "create_blinded_paths"); break;
+ case 38: fn = Object.getOwnPropertyDescriptor(obj, "find_route"); break;
+ case 39: fn = Object.getOwnPropertyDescriptor(obj, "find_route_with_id"); break;
+ case 40: fn = Object.getOwnPropertyDescriptor(obj, "create_blinded_payment_paths"); break;
+ case 41: fn = Object.getOwnPropertyDescriptor(obj, "type_id"); break;
+ case 42: fn = Object.getOwnPropertyDescriptor(obj, "debug_str"); break;
+ case 43: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 44: fn = Object.getOwnPropertyDescriptor(obj, "tlv_type"); break;
+ case 45: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 46: fn = Object.getOwnPropertyDescriptor(obj, "debug_str"); break;
+ case 47: fn = Object.getOwnPropertyDescriptor(obj, "register_tx"); break;
+ case 48: fn = Object.getOwnPropertyDescriptor(obj, "register_output"); break;
+ case 49: fn = Object.getOwnPropertyDescriptor(obj, "read"); break;
+ case 50: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 51: fn = Object.getOwnPropertyDescriptor(obj, "remove"); break;
+ case 52: fn = Object.getOwnPropertyDescriptor(obj, "list"); break;
+ case 53: fn = Object.getOwnPropertyDescriptor(obj, "channel_penalty_msat"); break;
+ case 54: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_failed"); break;
+ case 55: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_successful"); break;
+ case 56: fn = Object.getOwnPropertyDescriptor(obj, "probe_failed"); break;
+ case 57: fn = Object.getOwnPropertyDescriptor(obj, "probe_successful"); break;
+ case 58: fn = Object.getOwnPropertyDescriptor(obj, "time_passed"); break;
+ case 59: fn = Object.getOwnPropertyDescriptor(obj, "read_lock"); break;
+ case 60: fn = Object.getOwnPropertyDescriptor(obj, "write_lock"); break;
+ case 61: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 62: fn = Object.getOwnPropertyDescriptor(obj, "persist_manager"); break;
+ case 63: fn = Object.getOwnPropertyDescriptor(obj, "persist_graph"); break;
+ case 64: fn = Object.getOwnPropertyDescriptor(obj, "persist_scorer"); break;
+ case 65: fn = Object.getOwnPropertyDescriptor(obj, "persist_new_channel"); break;
+ case 66: fn = Object.getOwnPropertyDescriptor(obj, "update_persisted_channel"); break;
+ case 67: fn = Object.getOwnPropertyDescriptor(obj, "call"); break;
+ case 68: fn = Object.getOwnPropertyDescriptor(obj, "filtered_block_connected"); break;
+ case 69: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break;
+ case 70: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break;
+ case 71: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break;
+ case 72: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break;
+ case 73: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break;
+ case 74: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); break;
+ case 75: fn = Object.getOwnPropertyDescriptor(obj, "handle_event"); break;
+ case 76: fn = Object.getOwnPropertyDescriptor(obj, "process_pending_events"); break;
+ case 77: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg_events"); break;
+ case 78: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel"); break;
+ case 79: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel_v2"); break;
+ case 80: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break;
+ case 81: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel_v2"); break;
+ case 82: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break;
+ case 83: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break;
+ case 84: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_ready"); break;
+ case 85: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break;
+ case 86: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break;
+ case 87: fn = Object.getOwnPropertyDescriptor(obj, "handle_stfu"); break;
+ case 88: fn = Object.getOwnPropertyDescriptor(obj, "handle_splice"); break;
+ case 89: fn = Object.getOwnPropertyDescriptor(obj, "handle_splice_ack"); break;
+ case 90: fn = Object.getOwnPropertyDescriptor(obj, "handle_splice_locked"); break;
+ case 91: fn = Object.getOwnPropertyDescriptor(obj, "handle_tx_add_input"); break;
+ case 92: fn = Object.getOwnPropertyDescriptor(obj, "handle_tx_add_output"); break;
+ case 93: fn = Object.getOwnPropertyDescriptor(obj, "handle_tx_remove_input"); break;
+ case 94: fn = Object.getOwnPropertyDescriptor(obj, "handle_tx_remove_output"); break;
+ case 95: fn = Object.getOwnPropertyDescriptor(obj, "handle_tx_complete"); break;
+ case 96: fn = Object.getOwnPropertyDescriptor(obj, "handle_tx_signatures"); break;
+ case 97: fn = Object.getOwnPropertyDescriptor(obj, "handle_tx_init_rbf"); break;
+ case 98: fn = Object.getOwnPropertyDescriptor(obj, "handle_tx_ack_rbf"); break;
+ case 99: fn = Object.getOwnPropertyDescriptor(obj, "handle_tx_abort"); break;
+ case 100: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_add_htlc"); break;
+ case 101: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fulfill_htlc"); break;
+ case 102: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_htlc"); break;
+ case 103: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_malformed_htlc"); break;
+ case 104: fn = Object.getOwnPropertyDescriptor(obj, "handle_commitment_signed"); break;
+ case 105: fn = Object.getOwnPropertyDescriptor(obj, "handle_revoke_and_ack"); break;
+ case 106: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fee"); break;
+ case 107: fn = Object.getOwnPropertyDescriptor(obj, "handle_announcement_signatures"); break;
+ case 108: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
+ case 109: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 110: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_reestablish"); break;
+ case 111: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
+ case 112: fn = Object.getOwnPropertyDescriptor(obj, "handle_error"); break;
+ case 113: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+ case 114: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+ case 115: fn = Object.getOwnPropertyDescriptor(obj, "get_chain_hashes"); break;
+ case 116: fn = Object.getOwnPropertyDescriptor(obj, "handle_message"); break;
+ case 117: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_messages"); break;
+ case 118: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break;
+ case 119: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break;
+ case 120: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
+ case 121: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcement"); break;
+ case 122: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcement"); break;
+ case 123: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 124: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break;
+ case 125: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break;
+ case 126: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break;
+ case 127: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break;
+ case 128: fn = Object.getOwnPropertyDescriptor(obj, "processing_queue_high"); break;
+ case 129: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+ case 130: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+ case 131: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_connections_needed"); break;
+ case 132: fn = Object.getOwnPropertyDescriptor(obj, "handle_onion_message"); break;
+ case 133: fn = Object.getOwnPropertyDescriptor(obj, "next_onion_message_for_peer"); break;
+ case 134: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 135: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
+ case 136: fn = Object.getOwnPropertyDescriptor(obj, "timer_tick_occurred"); break;
+ case 137: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+ case 138: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+ case 139: fn = Object.getOwnPropertyDescriptor(obj, "read"); break;
+ case 140: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
+ case 141: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break;
+ case 142: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+ case 143: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+ case 144: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
+ case 145: fn = Object.getOwnPropertyDescriptor(obj, "read_custom_message"); break;
+ case 146: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_custom_messages"); break;
+ case 147: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break;
+ case 148: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break;
+ case 149: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break;
+ case 150: fn = Object.getOwnPropertyDescriptor(obj, "hash"); break;
+ case 151: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 152: fn = Object.getOwnPropertyDescriptor(obj, "select_confirmed_utxos"); break;
+ case 153: fn = Object.getOwnPropertyDescriptor(obj, "sign_psbt"); break;
+ case 154: fn = Object.getOwnPropertyDescriptor(obj, "list_confirmed_utxos"); break;
+ case 155: fn = Object.getOwnPropertyDescriptor(obj, "get_change_script"); break;
+ case 156: fn = Object.getOwnPropertyDescriptor(obj, "sign_psbt"); break;
+ default:
+ console.error("Got unknown function call with id " + fn_id + " from C!");
+ throw new Error("Got unknown function call with id " + fn_id + " from C!");
+ }
+ if (fn == null || fn == undefined) {
+ console.error("Got function call with id " + fn_id + " on incorrect JS object: " + obj);
+ throw new Error("Got function call with id " + fn_id + " on incorrect JS object: " + obj);
+ }
+ var ret;
+ try {
+ ret = fn.value.bind(obj)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
+ } catch (e) {
+ console.error("Got an exception calling function with id " + fn_id + "! This is fatal.");
+ console.error(e);
+ throw e;
+ }
+ if (ret === undefined || ret === null) return BigInt(0);
+ return BigInt(ret);
+}
\ No newline at end of file