+ const nativeResponseValue = wasm.TS_MultiThreadedLockableScore_new(score);
+ return nativeResponseValue;
+}
+ // void ChannelUsage_free(struct LDKChannelUsage this_obj);
+/* @internal */
+export function ChannelUsage_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelUsage_free(this_obj);
+ // debug statements here
+}
+ // uint64_t ChannelUsage_get_amount_msat(const struct LDKChannelUsage *NONNULL_PTR this_ptr);
+/* @internal */
+export function ChannelUsage_get_amount_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelUsage_get_amount_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ChannelUsage_set_amount_msat(struct LDKChannelUsage *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ChannelUsage_set_amount_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelUsage_set_amount_msat(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ChannelUsage_get_inflight_htlc_msat(const struct LDKChannelUsage *NONNULL_PTR this_ptr);
+/* @internal */
+export function ChannelUsage_get_inflight_htlc_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelUsage_get_inflight_htlc_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ChannelUsage_set_inflight_htlc_msat(struct LDKChannelUsage *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ChannelUsage_set_inflight_htlc_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelUsage_set_inflight_htlc_msat(this_ptr, val);
+ // debug statements here
+}
+ // struct LDKEffectiveCapacity ChannelUsage_get_effective_capacity(const struct LDKChannelUsage *NONNULL_PTR this_ptr);
+/* @internal */
+export function ChannelUsage_get_effective_capacity(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelUsage_get_effective_capacity(this_ptr);
+ return nativeResponseValue;
+}
+ // void ChannelUsage_set_effective_capacity(struct LDKChannelUsage *NONNULL_PTR this_ptr, struct LDKEffectiveCapacity val);
+/* @internal */
+export function ChannelUsage_set_effective_capacity(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelUsage_set_effective_capacity(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKChannelUsage ChannelUsage_new(uint64_t amount_msat_arg, uint64_t inflight_htlc_msat_arg, struct LDKEffectiveCapacity effective_capacity_arg);
+/* @internal */
+export function ChannelUsage_new(amount_msat_arg: bigint, inflight_htlc_msat_arg: bigint, effective_capacity_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelUsage_new(amount_msat_arg, inflight_htlc_msat_arg, effective_capacity_arg);
+ return nativeResponseValue;
+}
+ // uint64_t ChannelUsage_clone_ptr(LDKChannelUsage *NONNULL_PTR arg);
+/* @internal */
+export function ChannelUsage_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelUsage_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKChannelUsage ChannelUsage_clone(const struct LDKChannelUsage *NONNULL_PTR orig);
+/* @internal */
+export function ChannelUsage_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelUsage_clone(orig);
+ return nativeResponseValue;
+}
+ // void FixedPenaltyScorer_free(struct LDKFixedPenaltyScorer this_obj);
+/* @internal */
+export function FixedPenaltyScorer_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_FixedPenaltyScorer_free(this_obj);
+ // debug statements here
+}
+ // uint64_t FixedPenaltyScorer_clone_ptr(LDKFixedPenaltyScorer *NONNULL_PTR arg);
+/* @internal */
+export function FixedPenaltyScorer_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_FixedPenaltyScorer_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKFixedPenaltyScorer FixedPenaltyScorer_clone(const struct LDKFixedPenaltyScorer *NONNULL_PTR orig);
+/* @internal */
+export function FixedPenaltyScorer_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_FixedPenaltyScorer_clone(orig);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKFixedPenaltyScorer FixedPenaltyScorer_with_penalty(uint64_t penalty_msat);
+/* @internal */
+export function FixedPenaltyScorer_with_penalty(penalty_msat: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_FixedPenaltyScorer_with_penalty(penalty_msat);
+ return nativeResponseValue;
+}
+ // struct LDKScore FixedPenaltyScorer_as_Score(const struct LDKFixedPenaltyScorer *NONNULL_PTR this_arg);
+/* @internal */
+export function FixedPenaltyScorer_as_Score(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_FixedPenaltyScorer_as_Score(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z FixedPenaltyScorer_write(const struct LDKFixedPenaltyScorer *NONNULL_PTR obj);
+/* @internal */
+export function FixedPenaltyScorer_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_FixedPenaltyScorer_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_FixedPenaltyScorerDecodeErrorZ FixedPenaltyScorer_read(struct LDKu8slice ser, uint64_t arg);
+/* @internal */
+export function FixedPenaltyScorer_read(ser: number, arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_FixedPenaltyScorer_read(ser, arg);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScorer_free(struct LDKProbabilisticScorer this_obj);
+/* @internal */
+export function ProbabilisticScorer_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_free(this_obj);
+ // debug statements here
+}
+ // void ProbabilisticScoringParameters_free(struct LDKProbabilisticScoringParameters this_obj);
+/* @internal */
+export function ProbabilisticScoringParameters_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_free(this_obj);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_base_penalty_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_base_penalty_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_base_penalty_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_base_penalty_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_base_penalty_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_base_penalty_msat(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_base_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_base_penalty_amount_multiplier_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_base_penalty_amount_multiplier_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_base_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_base_penalty_amount_multiplier_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_base_penalty_amount_multiplier_msat(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_liquidity_penalty_multiplier_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_liquidity_penalty_multiplier_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_liquidity_penalty_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_liquidity_penalty_multiplier_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_liquidity_penalty_multiplier_msat(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_liquidity_offset_half_life(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_liquidity_offset_half_life(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_liquidity_offset_half_life(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_liquidity_offset_half_life(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_liquidity_offset_half_life(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_liquidity_offset_half_life(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_liquidity_penalty_amount_multiplier_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_liquidity_penalty_amount_multiplier_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_multiplier_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_multiplier_msat(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_historical_liquidity_penalty_amount_multiplier_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_historical_liquidity_penalty_amount_multiplier_msat(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_historical_no_updates_half_life(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_historical_no_updates_half_life(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_historical_no_updates_half_life(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_historical_no_updates_half_life(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_historical_no_updates_half_life(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_historical_no_updates_half_life(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_anti_probing_penalty_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_anti_probing_penalty_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_anti_probing_penalty_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_anti_probing_penalty_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_anti_probing_penalty_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_anti_probing_penalty_msat(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_get_considered_impossible_penalty_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_considered_impossible_penalty_msat(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_considered_impossible_penalty_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_considered_impossible_penalty_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_considered_impossible_penalty_msat(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_considered_impossible_penalty_msat(this_ptr, val);
+ // debug statements here
+}
+ // uint64_t ProbabilisticScoringParameters_clone_ptr(LDKProbabilisticScoringParameters *NONNULL_PTR arg);
+/* @internal */
+export function ProbabilisticScoringParameters_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKProbabilisticScoringParameters ProbabilisticScoringParameters_clone(const struct LDKProbabilisticScoringParameters *NONNULL_PTR orig);
+/* @internal */
+export function ProbabilisticScoringParameters_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_clone(orig);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKProbabilisticScorer ProbabilisticScorer_new(struct LDKProbabilisticScoringParameters params, const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger);
+/* @internal */
+export function ProbabilisticScorer_new(params: bigint, network_graph: bigint, logger: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_new(params, network_graph, logger);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScorer_debug_log_liquidity_stats(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
+/* @internal */
+export function ProbabilisticScorer_debug_log_liquidity_stats(this_arg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_debug_log_liquidity_stats(this_arg);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKCOption_C2Tuple_u64u64ZZ ProbabilisticScorer_estimated_channel_liquidity_range(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg, uint64_t scid, const struct LDKNodeId *NONNULL_PTR target);
+/* @internal */
+export function ProbabilisticScorer_estimated_channel_liquidity_range(this_arg: bigint, scid: bigint, target: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_estimated_channel_liquidity_range(this_arg, scid, target);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCOption_C2Tuple_EightU16sEightU16sZZ ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg, uint64_t scid, const struct LDKNodeId *NONNULL_PTR target);
+/* @internal */
+export function ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(this_arg: bigint, scid: bigint, target: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(this_arg, scid, target);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScorer_add_banned(struct LDKProbabilisticScorer *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+/* @internal */
+export function ProbabilisticScorer_add_banned(this_arg: bigint, node_id: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_add_banned(this_arg, node_id);
+ // debug statements here
+}
+ // void ProbabilisticScorer_remove_banned(struct LDKProbabilisticScorer *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+/* @internal */
+export function ProbabilisticScorer_remove_banned(this_arg: bigint, node_id: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_remove_banned(this_arg, node_id);
+ // debug statements here
+}
+ // void ProbabilisticScorer_set_manual_penalty(struct LDKProbabilisticScorer *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id, uint64_t penalty);
+/* @internal */
+export function ProbabilisticScorer_set_manual_penalty(this_arg: bigint, node_id: bigint, penalty: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_set_manual_penalty(this_arg, node_id, penalty);
+ // debug statements here
+}
+ // void ProbabilisticScorer_remove_manual_penalty(struct LDKProbabilisticScorer *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+/* @internal */
+export function ProbabilisticScorer_remove_manual_penalty(this_arg: bigint, node_id: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_remove_manual_penalty(this_arg, node_id);
+ // debug statements here
+}
+ // void ProbabilisticScorer_clear_manual_penalties(struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
+/* @internal */
+export function ProbabilisticScorer_clear_manual_penalties(this_arg: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_clear_manual_penalties(this_arg);
+ // debug statements here
+}
+ // void ProbabilisticScoringParameters_add_banned_from_list(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_arg, struct LDKCVec_NodeIdZ node_ids);
+/* @internal */
+export function ProbabilisticScoringParameters_add_banned_from_list(this_arg: bigint, node_ids: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_add_banned_from_list(this_arg, node_ids);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKProbabilisticScoringParameters ProbabilisticScoringParameters_default(void);
+/* @internal */
+export function ProbabilisticScoringParameters_default(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_default();
+ return nativeResponseValue;
+}
+ // struct LDKScore ProbabilisticScorer_as_Score(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
+/* @internal */
+export function ProbabilisticScorer_as_Score(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_as_Score(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z ProbabilisticScorer_write(const struct LDKProbabilisticScorer *NONNULL_PTR obj);
+/* @internal */
+export function ProbabilisticScorer_write(obj: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_ProbabilisticScorerDecodeErrorZ ProbabilisticScorer_read(struct LDKu8slice ser, struct LDKProbabilisticScoringParameters arg_a, const struct LDKNetworkGraph *NONNULL_PTR arg_b, struct LDKLogger arg_c);
+/* @internal */
+export function ProbabilisticScorer_read(ser: number, arg_a: bigint, arg_b: bigint, arg_c: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_read(ser, arg_a, arg_b, arg_c);
+ return nativeResponseValue;
+}
+ // 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
+}
+ // 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;
+}
+ // 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
+}
+ // 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;
+}
+ // MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new(struct LDKCVec_PublicKeyZ node_pks, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+/* @internal */
+export function BlindedPath_new(node_pks: number, entropy_source: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_BlindedPath_new(node_pks, 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 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 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 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(void);
+/* @internal */
+export function SendError_invalid_first_hop(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SendError_invalid_first_hop();
+ 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
+}
+ // MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKCustomOnionMessageHandler custom_handler);
+/* @internal */
+export function OnionMessenger_new(entropy_source: bigint, node_signer: bigint, logger: 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, custom_handler);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_NoneSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKCVec_PublicKeyZ intermediate_nodes, struct LDKDestination destination, struct LDKOnionMessageContents message, struct LDKBlindedPath reply_path);
+/* @internal */
+export function OnionMessenger_send_onion_message(this_arg: bigint, intermediate_nodes: number, destination: bigint, message: 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, intermediate_nodes, destination, message, 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;
+}
+ // struct LDKOnionMessageProvider OnionMessenger_as_OnionMessageProvider(const struct LDKOnionMessenger *NONNULL_PTR this_arg);
+/* @internal */
+export function OnionMessenger_as_OnionMessageProvider(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessenger_as_OnionMessageProvider(this_arg);
+ 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
+}
+ // 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;
+}
+ // struct LDKOnionMessageContents OnionMessageContents_custom(struct LDKCustomOnionMessageContents a);
+/* @internal */
+export function OnionMessageContents_custom(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_OnionMessageContents_custom(a);
+ return nativeResponseValue;
+}
+ // uint64_t CustomOnionMessageContents_clone_ptr(LDKCustomOnionMessageContents *NONNULL_PTR arg);
+/* @internal */
+export function CustomOnionMessageContents_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageContents_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKCustomOnionMessageContents CustomOnionMessageContents_clone(const struct LDKCustomOnionMessageContents *NONNULL_PTR orig);
+/* @internal */
+export function CustomOnionMessageContents_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageContents_clone(orig);
+ return nativeResponseValue;
+}
+ // void CustomOnionMessageContents_free(struct LDKCustomOnionMessageContents this_ptr);
+/* @internal */
+export function CustomOnionMessageContents_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_CustomOnionMessageContents_free(this_ptr);
+ // 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 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(const struct LDKRapidGossipSync *NONNULL_PTR this_arg, struct LDKu8slice update_data);
+/* @internal */
+export function RapidGossipSync_update_network_graph(this_arg: bigint, update_data: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RapidGossipSync_update_network_graph(this_arg, update_data);
+ 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 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 ParseError_free(struct LDKParseError this_ptr);
+/* @internal */
+export function ParseError_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t ParseError_clone_ptr(LDKParseError *NONNULL_PTR arg);
+/* @internal */
+export function ParseError_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_clone(const struct LDKParseError *NONNULL_PTR orig);
+/* @internal */
+export function ParseError_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_bech32_error(struct LDKBech32Error a);
+/* @internal */
+export function ParseError_bech32_error(a: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_bech32_error(a);
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_parse_amount_error(struct LDKError a);
+/* @internal */
+export function ParseError_parse_amount_error(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_parse_amount_error(a);
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_malformed_signature(enum LDKSecp256k1Error a);
+/* @internal */
+export function ParseError_malformed_signature(a: Secp256k1Error): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_malformed_signature(a);
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_bad_prefix(void);
+/* @internal */
+export function ParseError_bad_prefix(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_bad_prefix();
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_unknown_currency(void);
+/* @internal */
+export function ParseError_unknown_currency(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_unknown_currency();
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_unknown_si_prefix(void);
+/* @internal */
+export function ParseError_unknown_si_prefix(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_unknown_si_prefix();
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_malformed_hrp(void);
+/* @internal */
+export function ParseError_malformed_hrp(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_malformed_hrp();
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_too_short_data_part(void);
+/* @internal */
+export function ParseError_too_short_data_part(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_too_short_data_part();
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_unexpected_end_of_tagged_fields(void);
+/* @internal */
+export function ParseError_unexpected_end_of_tagged_fields(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_unexpected_end_of_tagged_fields();
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_description_decode_error(struct LDKError a);
+/* @internal */
+export function ParseError_description_decode_error(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_description_decode_error(a);
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_padding_error(void);
+/* @internal */
+export function ParseError_padding_error(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_padding_error();
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_integer_overflow_error(void);
+/* @internal */
+export function ParseError_integer_overflow_error(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_integer_overflow_error();
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_invalid_seg_wit_program_length(void);
+/* @internal */
+export function ParseError_invalid_seg_wit_program_length(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_invalid_seg_wit_program_length();
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_invalid_pub_key_hash_length(void);
+/* @internal */
+export function ParseError_invalid_pub_key_hash_length(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_invalid_pub_key_hash_length();
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_invalid_script_hash_length(void);
+/* @internal */
+export function ParseError_invalid_script_hash_length(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_invalid_script_hash_length();
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_invalid_recovery_id(void);
+/* @internal */
+export function ParseError_invalid_recovery_id(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_invalid_recovery_id();
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_invalid_slice_length(struct LDKStr a);
+/* @internal */
+export function ParseError_invalid_slice_length(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_invalid_slice_length(a);
+ return nativeResponseValue;
+}
+ // struct LDKParseError ParseError_skip(void);
+/* @internal */
+export function ParseError_skip(): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_skip();
+ return nativeResponseValue;
+}
+ // bool ParseError_eq(const struct LDKParseError *NONNULL_PTR a, const struct LDKParseError *NONNULL_PTR b);
+/* @internal */
+export function ParseError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_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 LDKParseError 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 LDKSemanticError a);
+/* @internal */
+export function ParseOrSemanticError_semantic_error(a: SemanticError): 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 Invoice_free(struct LDKInvoice this_obj);
+/* @internal */
+export function Invoice_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_free(this_obj);
+ // debug statements here
+}
+ // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
+/* @internal */
+export function Invoice_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_eq(a, b);
+ return nativeResponseValue;
+}
+ // uint64_t Invoice_clone_ptr(LDKInvoice *NONNULL_PTR arg);
+/* @internal */
+export function Invoice_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
+/* @internal */
+export function Invoice_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t Invoice_hash(const struct LDKInvoice *NONNULL_PTR o);
+/* @internal */
+export function Invoice_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_hash(o);
+ return nativeResponseValue;
+}
+ // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
+/* @internal */
+export function SignedRawInvoice_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_free(this_obj);
+ // debug statements here
+}
+ // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
+/* @internal */
+export function SignedRawInvoice_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_eq(a, b);
+ return nativeResponseValue;
+}
+ // uint64_t SignedRawInvoice_clone_ptr(LDKSignedRawInvoice *NONNULL_PTR arg);
+/* @internal */
+export function SignedRawInvoice_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
+/* @internal */
+export function SignedRawInvoice_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR o);
+/* @internal */
+export function SignedRawInvoice_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_hash(o);
+ return nativeResponseValue;
+}
+ // void RawInvoice_free(struct LDKRawInvoice this_obj);
+/* @internal */
+export function RawInvoice_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_free(this_obj);
+ // debug statements here
+}
+ // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
+/* @internal */
+export function RawInvoice_get_data(this_ptr: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_get_data(this_ptr);
+ return nativeResponseValue;
+}
+ // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
+/* @internal */
+export function RawInvoice_set_data(this_ptr: bigint, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_set_data(this_ptr, val);
+ // debug statements here
+}
+ // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
+/* @internal */
+export function RawInvoice_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_eq(a, b);
+ return nativeResponseValue;
+}
+ // uint64_t RawInvoice_clone_ptr(LDKRawInvoice *NONNULL_PTR arg);
+/* @internal */
+export function RawInvoice_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
+/* @internal */
+export function RawInvoice_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR o);
+/* @internal */
+export function RawInvoice_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_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;
+}
+ // 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 LDKU5 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 InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
+/* @internal */
+export function InvoiceSignature_free(this_obj: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoiceSignature_free(this_obj);
+ // debug statements here
+}
+ // uint64_t InvoiceSignature_clone_ptr(LDKInvoiceSignature *NONNULL_PTR arg);
+/* @internal */
+export function InvoiceSignature_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoiceSignature_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
+/* @internal */
+export function InvoiceSignature_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoiceSignature_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t InvoiceSignature_hash(const struct LDKInvoiceSignature *NONNULL_PTR o);
+/* @internal */
+export function InvoiceSignature_hash(o: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoiceSignature_hash(o);
+ return nativeResponseValue;
+}
+ // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
+/* @internal */
+export function InvoiceSignature_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoiceSignature_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_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
+/* @internal */
+export function SignedRawInvoice_into_parts(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_into_parts(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function SignedRawInvoice_raw_invoice(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_raw_invoice(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES const uint8_t (*SignedRawInvoice_signable_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
+/* @internal */
+export function SignedRawInvoice_signable_hash(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_signable_hash(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function SignedRawInvoice_signature(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_signature(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function SignedRawInvoice_recover_payee_pub_key(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_recover_payee_pub_key(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function SignedRawInvoice_check_signature(this_arg: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_check_signature(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_signable_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_signable_hash(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_signable_hash(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_payment_hash(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_payment_hash(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_description(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_description(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_payee_pub_key(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_payee_pub_key(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_description_hash(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_description_hash(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_expiry_time(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_expiry_time(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKMinFinalCltvExpiryDelta RawInvoice_min_final_cltv_expiry_delta(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_min_final_cltv_expiry_delta(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_min_final_cltv_expiry_delta(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_payment_secret(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_payment_secret(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_features(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_features(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_private_routes(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_private_routes(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_amount_pico_btc(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_amount_pico_btc(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_currency(this_arg: bigint): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_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 LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
+/* @internal */
+export function Invoice_into_signed_raw(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_into_signed_raw(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Invoice_check_signature(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_check_signature(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
+/* @internal */
+export function Invoice_from_signed(signed_invoice: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_from_signed(signed_invoice);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t Invoice_duration_since_epoch(const struct LDKInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Invoice_duration_since_epoch(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_duration_since_epoch(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
+/* @internal */
+export function Invoice_payment_hash(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_payment_hash(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Invoice_payee_pub_key(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_payee_pub_key(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES const uint8_t (*Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
+/* @internal */
+export function Invoice_payment_secret(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_payment_secret(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Invoice_features(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_features(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Invoice_recover_payee_pub_key(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_recover_payee_pub_key(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Invoice_expiry_time(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_expiry_time(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES bool Invoice_would_expire(const struct LDKInvoice *NONNULL_PTR this_arg, uint64_t at_time);
+/* @internal */
+export function Invoice_would_expire(this_arg: bigint, at_time: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_would_expire(this_arg, at_time);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry_delta(const struct LDKInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Invoice_min_final_cltv_expiry_delta(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_min_final_cltv_expiry_delta(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Invoice_private_routes(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_private_routes(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Invoice_route_hints(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_route_hints(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Invoice_currency(this_arg: bigint): Currency {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_currency(this_arg);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_milli_satoshis(const struct LDKInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Invoice_amount_milli_satoshis(this_arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_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 LDKStr Description_into_inner(struct LDKDescription this_arg);
+/* @internal */
+export function Description_into_inner(this_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Description_into_inner(this_arg);
+ 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 LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
+/* @internal */
+export function SemanticError_clone(orig: bigint): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_clone(orig);
+ return nativeResponseValue;
+}
+ // enum LDKSemanticError SemanticError_no_payment_hash(void);
+/* @internal */
+export function SemanticError_no_payment_hash(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_no_payment_hash();
+ return nativeResponseValue;
+}
+ // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
+/* @internal */
+export function SemanticError_multiple_payment_hashes(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_multiple_payment_hashes();
+ return nativeResponseValue;
+}
+ // enum LDKSemanticError SemanticError_no_description(void);
+/* @internal */
+export function SemanticError_no_description(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_no_description();
+ return nativeResponseValue;
+}
+ // enum LDKSemanticError SemanticError_multiple_descriptions(void);
+/* @internal */
+export function SemanticError_multiple_descriptions(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_multiple_descriptions();
+ return nativeResponseValue;
+}
+ // enum LDKSemanticError SemanticError_no_payment_secret(void);
+/* @internal */
+export function SemanticError_no_payment_secret(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_no_payment_secret();
+ return nativeResponseValue;
+}
+ // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
+/* @internal */
+export function SemanticError_multiple_payment_secrets(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_multiple_payment_secrets();
+ return nativeResponseValue;
+}
+ // enum LDKSemanticError SemanticError_invalid_features(void);
+/* @internal */
+export function SemanticError_invalid_features(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_invalid_features();
+ return nativeResponseValue;
+}
+ // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
+/* @internal */
+export function SemanticError_invalid_recovery_id(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_invalid_recovery_id();
+ return nativeResponseValue;
+}
+ // enum LDKSemanticError SemanticError_invalid_signature(void);
+/* @internal */
+export function SemanticError_invalid_signature(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_invalid_signature();
+ return nativeResponseValue;
+}
+ // enum LDKSemanticError SemanticError_imprecise_amount(void);
+/* @internal */
+export function SemanticError_imprecise_amount(): SemanticError {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_imprecise_amount();
+ return nativeResponseValue;
+}
+ // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
+/* @internal */
+export function SemanticError_eq(a: bigint, b: bigint): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_eq(a, b);
+ return nativeResponseValue;
+}
+ // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
+/* @internal */
+export function SemanticError_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SemanticError_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_PaymentIdPaymentErrorZ pay_invoice(const struct LDKInvoice *NONNULL_PTR invoice, struct LDKRetry retry_strategy, const struct LDKChannelManager *NONNULL_PTR channelmanager);
+/* @internal */
+export function pay_invoice(invoice: bigint, retry_strategy: bigint, channelmanager: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_pay_invoice(invoice, retry_strategy, channelmanager);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_NonePaymentErrorZ pay_invoice_with_id(const struct LDKInvoice *NONNULL_PTR invoice, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, const struct LDKChannelManager *NONNULL_PTR channelmanager);
+/* @internal */
+export function pay_invoice_with_id(invoice: bigint, payment_id: number, retry_strategy: bigint, channelmanager: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_pay_invoice_with_id(invoice, payment_id, retry_strategy, channelmanager);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_PaymentIdPaymentErrorZ pay_zero_value_invoice(const struct LDKInvoice *NONNULL_PTR invoice, uint64_t amount_msats, struct LDKRetry retry_strategy, const struct LDKChannelManager *NONNULL_PTR channelmanager);
+/* @internal */
+export function pay_zero_value_invoice(invoice: bigint, amount_msats: bigint, retry_strategy: bigint, channelmanager: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_pay_zero_value_invoice(invoice, amount_msats, retry_strategy, channelmanager);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_NonePaymentErrorZ pay_zero_value_invoice_with_id(const struct LDKInvoice *NONNULL_PTR invoice, uint64_t amount_msats, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, const struct LDKChannelManager *NONNULL_PTR channelmanager);
+/* @internal */
+export function pay_zero_value_invoice_with_id(invoice: bigint, amount_msats: bigint, payment_id: number, retry_strategy: bigint, channelmanager: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_pay_zero_value_invoice_with_id(invoice, amount_msats, payment_id, retry_strategy, channelmanager);
+ return nativeResponseValue;
+}
+ // void PaymentError_free(struct LDKPaymentError this_ptr);
+/* @internal */
+export function PaymentError_free(this_ptr: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentError_free(this_ptr);
+ // debug statements here
+}
+ // uint64_t PaymentError_clone_ptr(LDKPaymentError *NONNULL_PTR arg);
+/* @internal */
+export function PaymentError_clone_ptr(arg: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentError_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKPaymentError PaymentError_clone(const struct LDKPaymentError *NONNULL_PTR orig);
+/* @internal */
+export function PaymentError_clone(orig: bigint): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentError_clone(orig);
+ return nativeResponseValue;
+}
+ // struct LDKPaymentError PaymentError_invoice(struct LDKStr a);
+/* @internal */
+export function PaymentError_invoice(a: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentError_invoice(a);
+ return nativeResponseValue;
+}
+ // struct LDKPaymentError PaymentError_sending(enum LDKRetryableSendFailure a);
+/* @internal */
+export function PaymentError_sending(a: RetryableSendFailure): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentError_sending(a);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_InvoiceSignOrCreationErrorZ create_phantom_invoice(struct LDKCOption_u64Z amt_msat, struct LDKThirtyTwoBytes 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: number, 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_InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(struct LDKCOption_u64Z amt_msat, struct LDKThirtyTwoBytes 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: number, 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_InvoiceSignOrCreationErrorZ 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_InvoiceSignOrCreationErrorZ 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_InvoiceSignOrCreationErrorZ 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_SiPrefixParseErrorZ 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_InvoiceParseOrSemanticErrorZ Invoice_from_str(struct LDKStr s);
+/* @internal */
+export function Invoice_from_str(s: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_from_str(s);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_SignedRawInvoiceParseErrorZ SignedRawInvoice_from_str(struct LDKStr s);
+/* @internal */
+export function SignedRawInvoice_from_str(s: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_from_str(s);
+ return nativeResponseValue;
+}
+ // struct LDKStr ParseError_to_str(const struct LDKParseError *NONNULL_PTR o);
+/* @internal */
+export function ParseError_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_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 Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
+/* @internal */
+export function Invoice_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_to_str(o);
+ return nativeResponseValue;
+}
+ // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
+/* @internal */
+export function SignedRawInvoice_to_str(o: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_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, "log"); break;
+ case 1: fn = Object.getOwnPropertyDescriptor(obj, "get_utxo"); break;
+ case 2: fn = Object.getOwnPropertyDescriptor(obj, "get_per_commitment_point"); break;
+ case 3: fn = Object.getOwnPropertyDescriptor(obj, "release_commitment_secret"); break;
+ case 4: fn = Object.getOwnPropertyDescriptor(obj, "validate_holder_commitment"); break;
+ case 5: fn = Object.getOwnPropertyDescriptor(obj, "channel_keys_id"); break;
+ case 6: fn = Object.getOwnPropertyDescriptor(obj, "provide_channel_parameters"); break;
+ case 7: fn = Object.getOwnPropertyDescriptor(obj, "sign_counterparty_commitment"); break;
+ case 8: fn = Object.getOwnPropertyDescriptor(obj, "validate_counterparty_revocation"); break;
+ case 9: fn = Object.getOwnPropertyDescriptor(obj, "sign_holder_commitment_and_htlcs"); break;
+ case 10: fn = Object.getOwnPropertyDescriptor(obj, "sign_justice_revoked_output"); break;
+ case 11: fn = Object.getOwnPropertyDescriptor(obj, "sign_justice_revoked_htlc"); break;
+ case 12: fn = Object.getOwnPropertyDescriptor(obj, "sign_counterparty_htlc_transaction"); break;
+ case 13: fn = Object.getOwnPropertyDescriptor(obj, "sign_closing_transaction"); break;
+ case 14: fn = Object.getOwnPropertyDescriptor(obj, "sign_holder_anchor_input"); break;
+ case 15: fn = Object.getOwnPropertyDescriptor(obj, "sign_channel_announcement_with_funding_key"); break;
+ case 16: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 17: fn = Object.getOwnPropertyDescriptor(obj, "watch_channel"); break;
+ case 18: fn = Object.getOwnPropertyDescriptor(obj, "update_channel"); break;
+ case 19: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_monitor_events"); break;
+ case 20: fn = Object.getOwnPropertyDescriptor(obj, "broadcast_transaction"); break;
+ case 21: fn = Object.getOwnPropertyDescriptor(obj, "get_secure_random_bytes"); break;
+ case 22: fn = Object.getOwnPropertyDescriptor(obj, "get_inbound_payment_key_material"); break;
+ case 23: fn = Object.getOwnPropertyDescriptor(obj, "get_node_id"); break;
+ case 24: fn = Object.getOwnPropertyDescriptor(obj, "ecdh"); break;
+ case 25: fn = Object.getOwnPropertyDescriptor(obj, "sign_invoice"); break;
+ case 26: fn = Object.getOwnPropertyDescriptor(obj, "sign_gossip_message"); break;
+ case 27: fn = Object.getOwnPropertyDescriptor(obj, "generate_channel_keys_id"); break;
+ case 28: fn = Object.getOwnPropertyDescriptor(obj, "derive_channel_signer"); break;
+ case 29: fn = Object.getOwnPropertyDescriptor(obj, "read_chan_signer"); break;
+ case 30: fn = Object.getOwnPropertyDescriptor(obj, "get_destination_script"); break;
+ case 31: fn = Object.getOwnPropertyDescriptor(obj, "get_shutdown_scriptpubkey"); break;
+ case 32: fn = Object.getOwnPropertyDescriptor(obj, "get_est_sat_per_1000_weight"); break;
+ case 33: fn = Object.getOwnPropertyDescriptor(obj, "find_route"); break;
+ case 34: fn = Object.getOwnPropertyDescriptor(obj, "find_route_with_id"); break;
+ case 35: fn = Object.getOwnPropertyDescriptor(obj, "type_id"); break;
+ case 36: fn = Object.getOwnPropertyDescriptor(obj, "debug_str"); break;
+ case 37: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 38: fn = Object.getOwnPropertyDescriptor(obj, "tlv_type"); break;
+ case 39: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 40: fn = Object.getOwnPropertyDescriptor(obj, "register_tx"); break;
+ case 41: fn = Object.getOwnPropertyDescriptor(obj, "register_output"); break;
+ case 42: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg_events"); break;
+ case 43: fn = Object.getOwnPropertyDescriptor(obj, "next_onion_message_for_peer"); break;
+ case 44: fn = Object.getOwnPropertyDescriptor(obj, "handle_event"); break;
+ case 45: fn = Object.getOwnPropertyDescriptor(obj, "process_pending_events"); break;
+ case 46: fn = Object.getOwnPropertyDescriptor(obj, "channel_penalty_msat"); break;
+ case 47: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_failed"); break;
+ case 48: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_successful"); break;
+ case 49: fn = Object.getOwnPropertyDescriptor(obj, "probe_failed"); break;
+ case 50: fn = Object.getOwnPropertyDescriptor(obj, "probe_successful"); break;
+ case 51: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 52: fn = Object.getOwnPropertyDescriptor(obj, "lock"); break;
+ case 53: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 54: fn = Object.getOwnPropertyDescriptor(obj, "persist_manager"); break;
+ case 55: fn = Object.getOwnPropertyDescriptor(obj, "persist_graph"); break;
+ case 56: fn = Object.getOwnPropertyDescriptor(obj, "persist_scorer"); break;
+ case 57: fn = Object.getOwnPropertyDescriptor(obj, "call"); break;
+ case 58: fn = Object.getOwnPropertyDescriptor(obj, "filtered_block_connected"); break;
+ case 59: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break;
+ case 60: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break;
+ case 61: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break;
+ case 62: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break;
+ case 63: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break;
+ case 64: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); 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, "handle_open_channel"); break;
+ case 68: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break;
+ case 69: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break;
+ case 70: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break;
+ case 71: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_ready"); break;
+ case 72: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break;
+ case 73: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break;
+ case 74: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_add_htlc"); break;
+ case 75: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fulfill_htlc"); break;
+ case 76: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_htlc"); break;
+ case 77: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_malformed_htlc"); break;
+ case 78: fn = Object.getOwnPropertyDescriptor(obj, "handle_commitment_signed"); break;
+ case 79: fn = Object.getOwnPropertyDescriptor(obj, "handle_revoke_and_ack"); break;
+ case 80: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fee"); break;
+ case 81: fn = Object.getOwnPropertyDescriptor(obj, "handle_announcement_signatures"); break;
+ case 82: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
+ case 83: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 84: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_reestablish"); break;
+ case 85: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
+ case 86: fn = Object.getOwnPropertyDescriptor(obj, "handle_error"); break;
+ case 87: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+ case 88: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+ case 89: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break;
+ case 90: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break;
+ case 91: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
+ case 92: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcement"); break;
+ case 93: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcement"); break;
+ case 94: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 95: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break;
+ case 96: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break;
+ case 97: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break;
+ case 98: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break;
+ case 99: fn = Object.getOwnPropertyDescriptor(obj, "processing_queue_high"); break;
+ case 100: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+ case 101: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+ case 102: fn = Object.getOwnPropertyDescriptor(obj, "handle_onion_message"); break;
+ case 103: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 104: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
+ case 105: fn = Object.getOwnPropertyDescriptor(obj, "provided_node_features"); break;
+ case 106: fn = Object.getOwnPropertyDescriptor(obj, "provided_init_features"); break;
+ case 107: fn = Object.getOwnPropertyDescriptor(obj, "read"); break;
+ case 108: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
+ case 109: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break;
+ case 110: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
+ case 111: fn = Object.getOwnPropertyDescriptor(obj, "read_custom_message"); break;
+ case 112: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break;
+ case 113: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break;
+ case 114: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break;
+ case 115: fn = Object.getOwnPropertyDescriptor(obj, "hash"); 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);
+ }
+ const ret = fn.value.bind(obj)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
+ if (ret === undefined || ret === null) return BigInt(0);
+ return BigInt(ret);
+}
\ No newline at end of file