+ const nativeResponseValue = wasm.TS_ScoringParameters_default();
+ return nativeResponseValue;
+}
+ // struct LDKScore Scorer_as_Score(const struct LDKScorer *NONNULL_PTR this_arg);
+/* @internal */
+export function Scorer_as_Score(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Scorer_as_Score(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKCVec_u8Z Scorer_write(const struct LDKScorer *NONNULL_PTR obj);
+/* @internal */
+export function Scorer_write(obj: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Scorer_write(obj);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_ScorerDecodeErrorZ Scorer_read(struct LDKu8slice ser);
+/* @internal */
+export function Scorer_read(ser: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Scorer_read(ser);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScorer_free(struct LDKProbabilisticScorer this_obj);
+/* @internal */
+export function ProbabilisticScorer_free(this_obj: number): 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: number): 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: number): 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: number, 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_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_liquidity_penalty_multiplier_msat(this_ptr: number): 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: number, 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: number): 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: number, 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_amount_penalty_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+/* @internal */
+export function ProbabilisticScoringParameters_get_amount_penalty_multiplier_msat(this_ptr: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_get_amount_penalty_multiplier_msat(this_ptr);
+ return nativeResponseValue;
+}
+ // void ProbabilisticScoringParameters_set_amount_penalty_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function ProbabilisticScoringParameters_set_amount_penalty_multiplier_msat(this_ptr: number, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_set_amount_penalty_multiplier_msat(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKProbabilisticScoringParameters ProbabilisticScoringParameters_new(uint64_t base_penalty_msat_arg, uint64_t liquidity_penalty_multiplier_msat_arg, uint64_t liquidity_offset_half_life_arg, uint64_t amount_penalty_multiplier_msat_arg);
+/* @internal */
+export function ProbabilisticScoringParameters_new(base_penalty_msat_arg: bigint, liquidity_penalty_multiplier_msat_arg: bigint, liquidity_offset_half_life_arg: bigint, amount_penalty_multiplier_msat_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScoringParameters_new(base_penalty_msat_arg, liquidity_penalty_multiplier_msat_arg, liquidity_offset_half_life_arg, amount_penalty_multiplier_msat_arg);
+ return nativeResponseValue;
+}
+ // uintptr_t ProbabilisticScoringParameters_clone_ptr(LDKProbabilisticScoringParameters *NONNULL_PTR arg);
+/* @internal */
+export function ProbabilisticScoringParameters_clone_ptr(arg: number): number {
+ 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: number): number {
+ 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);
+/* @internal */
+export function ProbabilisticScorer_new(params: number, network_graph: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_new(params, network_graph);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKProbabilisticScoringParameters ProbabilisticScoringParameters_default(void);
+/* @internal */
+export function ProbabilisticScoringParameters_default(): number {
+ 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: number): number {
+ 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: number): 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);
+/* @internal */
+export function ProbabilisticScorer_read(ser: number, arg_a: number, arg_b: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ProbabilisticScorer_read(ser, arg_a, arg_b);
+ return nativeResponseValue;
+}
+ // void ParseError_free(struct LDKParseError this_ptr);
+/* @internal */
+export function ParseError_free(this_ptr: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_free(this_ptr);
+ // debug statements here
+}
+ // uintptr_t ParseError_clone_ptr(LDKParseError *NONNULL_PTR arg);
+/* @internal */
+export function ParseError_clone_ptr(arg: number): number {
+ 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: number): number {
+ 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: number): number {
+ 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): number {
+ 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): number {
+ 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(): number {
+ 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(): number {
+ 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(): number {
+ 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(): number {
+ 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(): number {
+ 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(): number {
+ 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): number {
+ 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(): number {
+ 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(): number {
+ 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(): number {
+ 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(): number {
+ 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(): number {
+ 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(): number {
+ 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): number {
+ 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(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseError_skip();
+ return nativeResponseValue;
+}
+ // void ParseOrSemanticError_free(struct LDKParseOrSemanticError this_ptr);
+/* @internal */
+export function ParseOrSemanticError_free(this_ptr: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseOrSemanticError_free(this_ptr);
+ // debug statements here
+}
+ // uintptr_t ParseOrSemanticError_clone_ptr(LDKParseOrSemanticError *NONNULL_PTR arg);
+/* @internal */
+export function ParseOrSemanticError_clone_ptr(arg: number): number {
+ 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: number): number {
+ 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: number): number {
+ 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): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ParseOrSemanticError_semantic_error(a);
+ return nativeResponseValue;
+}
+ // void Invoice_free(struct LDKInvoice this_obj);
+/* @internal */
+export function Invoice_free(this_obj: number): 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: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_eq(a, b);
+ return nativeResponseValue;
+}
+ // uintptr_t Invoice_clone_ptr(LDKInvoice *NONNULL_PTR arg);
+/* @internal */
+export function Invoice_clone_ptr(arg: number): number {
+ 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: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_clone(orig);
+ return nativeResponseValue;
+}
+ // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
+/* @internal */
+export function SignedRawInvoice_free(this_obj: number): 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: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_eq(a, b);
+ return nativeResponseValue;
+}
+ // uintptr_t SignedRawInvoice_clone_ptr(LDKSignedRawInvoice *NONNULL_PTR arg);
+/* @internal */
+export function SignedRawInvoice_clone_ptr(arg: number): number {
+ 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: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_clone(orig);
+ return nativeResponseValue;
+}
+ // void RawInvoice_free(struct LDKRawInvoice this_obj);
+/* @internal */
+export function RawInvoice_free(this_obj: number): 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: number): number {
+ 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: number, val: number): 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: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_eq(a, b);
+ return nativeResponseValue;
+}
+ // uintptr_t RawInvoice_clone_ptr(LDKRawInvoice *NONNULL_PTR arg);
+/* @internal */
+export function RawInvoice_clone_ptr(arg: number): number {
+ 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: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_clone(orig);
+ return nativeResponseValue;
+}
+ // void RawDataPart_free(struct LDKRawDataPart this_obj);
+/* @internal */
+export function RawDataPart_free(this_obj: number): 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: number): number {
+ 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: number, val: number): 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: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawDataPart_eq(a, b);
+ return nativeResponseValue;
+}
+ // uintptr_t RawDataPart_clone_ptr(LDKRawDataPart *NONNULL_PTR arg);
+/* @internal */
+export function RawDataPart_clone_ptr(arg: number): number {
+ 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: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawDataPart_clone(orig);
+ return nativeResponseValue;
+}
+ // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
+/* @internal */
+export function PositiveTimestamp_free(this_obj: number): 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: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PositiveTimestamp_eq(a, b);
+ return nativeResponseValue;
+}
+ // uintptr_t PositiveTimestamp_clone_ptr(LDKPositiveTimestamp *NONNULL_PTR arg);
+/* @internal */
+export function PositiveTimestamp_clone_ptr(arg: number): number {
+ 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: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PositiveTimestamp_clone(orig);
+ return nativeResponseValue;
+}
+ // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
+/* @internal */
+export function SiPrefix_clone(orig: number): 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: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SiPrefix_eq(a, b);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
+/* @internal */
+export function SiPrefix_multiplier(this_arg: number): 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: number): 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: number): 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: number, b: number): 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: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Sha256_free(this_obj);
+ // debug statements here
+}
+ // uintptr_t Sha256_clone_ptr(LDKSha256 *NONNULL_PTR arg);
+/* @internal */
+export function Sha256_clone_ptr(arg: number): number {
+ 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: number): number {
+ 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: number): 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: number, b: number): 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: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Description_free(this_obj);
+ // debug statements here
+}
+ // uintptr_t Description_clone_ptr(LDKDescription *NONNULL_PTR arg);
+/* @internal */
+export function Description_clone_ptr(arg: number): number {
+ 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: number): number {
+ 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: number): 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: number, b: number): 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: number): 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: number): 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: number, 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): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PayeePubKey_new(a_arg);
+ return nativeResponseValue;
+}
+ // uintptr_t PayeePubKey_clone_ptr(LDKPayeePubKey *NONNULL_PTR arg);
+/* @internal */
+export function PayeePubKey_clone_ptr(arg: number): number {
+ 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: number): number {
+ 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: number): 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: number, b: number): 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: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ExpiryTime_free(this_obj);
+ // debug statements here
+}
+ // uintptr_t ExpiryTime_clone_ptr(LDKExpiryTime *NONNULL_PTR arg);
+/* @internal */
+export function ExpiryTime_clone_ptr(arg: number): number {
+ 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: number): number {
+ 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: number): 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: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ExpiryTime_eq(a, b);
+ return nativeResponseValue;
+}
+ // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
+/* @internal */
+export function MinFinalCltvExpiry_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiry_free(this_obj);
+ // debug statements here
+}
+ // uint64_t MinFinalCltvExpiry_get_a(const struct LDKMinFinalCltvExpiry *NONNULL_PTR this_ptr);
+/* @internal */
+export function MinFinalCltvExpiry_get_a(this_ptr: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiry_get_a(this_ptr);
+ return nativeResponseValue;
+}
+ // void MinFinalCltvExpiry_set_a(struct LDKMinFinalCltvExpiry *NONNULL_PTR this_ptr, uint64_t val);
+/* @internal */
+export function MinFinalCltvExpiry_set_a(this_ptr: number, val: bigint): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiry_set_a(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_new(uint64_t a_arg);
+/* @internal */
+export function MinFinalCltvExpiry_new(a_arg: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiry_new(a_arg);
+ return nativeResponseValue;
+}
+ // uintptr_t MinFinalCltvExpiry_clone_ptr(LDKMinFinalCltvExpiry *NONNULL_PTR arg);
+/* @internal */
+export function MinFinalCltvExpiry_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiry_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
+/* @internal */
+export function MinFinalCltvExpiry_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiry_clone(orig);
+ return nativeResponseValue;
+}
+ // uint64_t MinFinalCltvExpiry_hash(const struct LDKMinFinalCltvExpiry *NONNULL_PTR o);
+/* @internal */
+export function MinFinalCltvExpiry_hash(o: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiry_hash(o);
+ return nativeResponseValue;
+}
+ // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
+/* @internal */
+export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_MinFinalCltvExpiry_eq(a, b);
+ return nativeResponseValue;
+}
+ // void Fallback_free(struct LDKFallback this_ptr);
+/* @internal */
+export function Fallback_free(this_ptr: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Fallback_free(this_ptr);
+ // debug statements here
+}
+ // uintptr_t Fallback_clone_ptr(LDKFallback *NONNULL_PTR arg);
+/* @internal */
+export function Fallback_clone_ptr(arg: number): number {
+ 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: number): number {
+ 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): number {
+ 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): number {
+ 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): number {
+ 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: number): 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: number, b: number): 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: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoiceSignature_free(this_obj);
+ // debug statements here
+}
+ // uintptr_t InvoiceSignature_clone_ptr(LDKInvoiceSignature *NONNULL_PTR arg);
+/* @internal */
+export function InvoiceSignature_clone_ptr(arg: number): number {
+ 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: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoiceSignature_clone(orig);
+ return nativeResponseValue;
+}
+ // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
+/* @internal */
+export function InvoiceSignature_eq(a: number, b: number): 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: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PrivateRoute_free(this_obj);
+ // debug statements here
+}
+ // uintptr_t PrivateRoute_clone_ptr(LDKPrivateRoute *NONNULL_PTR arg);
+/* @internal */
+export function PrivateRoute_clone_ptr(arg: number): number {
+ 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: number): number {
+ 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: number): 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: number, b: number): 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: number): number {
+ 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: number): number {
+ 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_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
+/* @internal */
+export function SignedRawInvoice_hash(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignedRawInvoice_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: number): number {
+ 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: number): number {
+ 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: number): 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_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_hash(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_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: number): number {
+ 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: number): number {
+ 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: number): number {
+ 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: number): number {
+ 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: number): number {
+ 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 LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RawInvoice_min_final_cltv_expiry(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: number): 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: number): number {
+ 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: number): 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: number): number {
+ 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: number): 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): number {
+ 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): number {
+ 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: number): 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: number): 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: number): number {
+ 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: number): number {
+ 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: number): number {
+ 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: number): 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: number): 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: number): 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: number): 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: number): number {
+ 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: number): 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: number): 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: number, 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(const struct LDKInvoice *NONNULL_PTR this_arg);
+/* @internal */
+export function Invoice_min_final_cltv_expiry(this_arg: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Invoice_min_final_cltv_expiry(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: number): 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: number): 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: number): 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: number): number {
+ 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): number {
+ 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: number): 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): number {
+ 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): number {
+ 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: number): 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: number): 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: number): number {
+ 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: number): number {
+ 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: number): 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;
+}
+ // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
+/* @internal */
+export function CreationError_eq(a: number, b: number): 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: number): 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: number): 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: number, b: number): 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: number): 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: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignOrCreationError_free(this_ptr);
+ // debug statements here
+}
+ // uintptr_t SignOrCreationError_clone_ptr(LDKSignOrCreationError *NONNULL_PTR arg);
+/* @internal */
+export function SignOrCreationError_clone_ptr(arg: number): number {
+ 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: number): number {
+ 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(): number {
+ 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): number {
+ 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: number, b: number): 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: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_SignOrCreationError_to_str(o);
+ return nativeResponseValue;
+}
+ // void InvoicePayer_free(struct LDKInvoicePayer this_obj);
+/* @internal */
+export function InvoicePayer_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoicePayer_free(this_obj);
+ // debug statements here
+}
+ // void Payer_free(struct LDKPayer this_ptr);
+/* @internal */
+export function Payer_free(this_ptr: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Payer_free(this_ptr);
+ // debug statements here
+}
+ // void Router_free(struct LDKRouter this_ptr);
+/* @internal */
+export function Router_free(this_ptr: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_Router_free(this_ptr);
+ // debug statements here
+}
+ // void RetryAttempts_free(struct LDKRetryAttempts this_obj);
+/* @internal */
+export function RetryAttempts_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RetryAttempts_free(this_obj);
+ // debug statements here
+}
+ // uintptr_t RetryAttempts_get_a(const struct LDKRetryAttempts *NONNULL_PTR this_ptr);
+/* @internal */
+export function RetryAttempts_get_a(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RetryAttempts_get_a(this_ptr);
+ return nativeResponseValue;
+}
+ // void RetryAttempts_set_a(struct LDKRetryAttempts *NONNULL_PTR this_ptr, uintptr_t val);
+/* @internal */
+export function RetryAttempts_set_a(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RetryAttempts_set_a(this_ptr, val);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKRetryAttempts RetryAttempts_new(uintptr_t a_arg);
+/* @internal */
+export function RetryAttempts_new(a_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RetryAttempts_new(a_arg);
+ return nativeResponseValue;
+}
+ // uintptr_t RetryAttempts_clone_ptr(LDKRetryAttempts *NONNULL_PTR arg);
+/* @internal */
+export function RetryAttempts_clone_ptr(arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RetryAttempts_clone_ptr(arg);
+ return nativeResponseValue;
+}
+ // struct LDKRetryAttempts RetryAttempts_clone(const struct LDKRetryAttempts *NONNULL_PTR orig);
+/* @internal */
+export function RetryAttempts_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RetryAttempts_clone(orig);
+ return nativeResponseValue;
+}
+ // bool RetryAttempts_eq(const struct LDKRetryAttempts *NONNULL_PTR a, const struct LDKRetryAttempts *NONNULL_PTR b);
+/* @internal */
+export function RetryAttempts_eq(a: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RetryAttempts_eq(a, b);
+ return nativeResponseValue;
+}
+ // uint64_t RetryAttempts_hash(const struct LDKRetryAttempts *NONNULL_PTR o);
+/* @internal */
+export function RetryAttempts_hash(o: number): bigint {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_RetryAttempts_hash(o);
+ return nativeResponseValue;
+}
+ // void PaymentError_free(struct LDKPaymentError this_ptr);
+/* @internal */
+export function PaymentError_free(this_ptr: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentError_free(this_ptr);
+ // debug statements here
+}
+ // uintptr_t PaymentError_clone_ptr(LDKPaymentError *NONNULL_PTR arg);
+/* @internal */
+export function PaymentError_clone_ptr(arg: number): number {
+ 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: number): number {
+ 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): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentError_invoice(a);
+ return nativeResponseValue;
+}
+ // struct LDKPaymentError PaymentError_routing(struct LDKLightningError a);
+/* @internal */
+export function PaymentError_routing(a: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentError_routing(a);
+ return nativeResponseValue;
+}
+ // struct LDKPaymentError PaymentError_sending(struct LDKPaymentSendFailure a);
+/* @internal */
+export function PaymentError_sending(a: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_PaymentError_sending(a);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKInvoicePayer InvoicePayer_new(struct LDKPayer payer, struct LDKRouter router, const struct LDKMultiThreadedLockableScore *NONNULL_PTR scorer, struct LDKLogger logger, struct LDKEventHandler event_handler, struct LDKRetryAttempts retry_attempts);
+/* @internal */
+export function InvoicePayer_new(payer: number, router: number, scorer: number, logger: number, event_handler: number, retry_attempts: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoicePayer_new(payer, router, scorer, logger, event_handler, retry_attempts);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_invoice(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const struct LDKInvoice *NONNULL_PTR invoice);
+/* @internal */
+export function InvoicePayer_pay_invoice(this_arg: number, invoice: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoicePayer_pay_invoice(this_arg, invoice);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_zero_value_invoice(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const struct LDKInvoice *NONNULL_PTR invoice, uint64_t amount_msats);
+/* @internal */
+export function InvoicePayer_pay_zero_value_invoice(this_arg: number, invoice: number, amount_msats: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoicePayer_pay_zero_value_invoice(this_arg, invoice, amount_msats);
+ return nativeResponseValue;
+}
+ // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_pubkey(const struct LDKInvoicePayer *NONNULL_PTR this_arg, struct LDKPublicKey pubkey, struct LDKThirtyTwoBytes payment_preimage, uint64_t amount_msats, uint32_t final_cltv_expiry_delta);
+/* @internal */
+export function InvoicePayer_pay_pubkey(this_arg: number, pubkey: number, payment_preimage: number, amount_msats: bigint, final_cltv_expiry_delta: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoicePayer_pay_pubkey(this_arg, pubkey, payment_preimage, amount_msats, final_cltv_expiry_delta);
+ return nativeResponseValue;
+}
+ // void InvoicePayer_remove_cached_payment(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
+/* @internal */
+export function InvoicePayer_remove_cached_payment(this_arg: number, payment_hash: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoicePayer_remove_cached_payment(this_arg, payment_hash);
+ // debug statements here
+}
+ // struct LDKEventHandler InvoicePayer_as_EventHandler(const struct LDKInvoicePayer *NONNULL_PTR this_arg);
+/* @internal */
+export function InvoicePayer_as_EventHandler(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_InvoicePayer_as_EventHandler(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKSha256 description_hash, uint64_t duration_since_epoch);
+/* @internal */
+export function create_invoice_from_channelmanager_with_description_hash_and_duration_since_epoch(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description_hash: number, duration_since_epoch: bigint): number {
+ 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, keys_manager, network, amt_msat, description_hash, duration_since_epoch);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager_and_duration_since_epoch(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description, uint64_t duration_since_epoch);
+/* @internal */
+export function create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: number, duration_since_epoch: bigint): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_create_invoice_from_channelmanager_and_duration_since_epoch(channelmanager, keys_manager, network, amt_msat, description, duration_since_epoch);
+ return nativeResponseValue;
+}
+ // void DefaultRouter_free(struct LDKDefaultRouter this_obj);
+/* @internal */
+export function DefaultRouter_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DefaultRouter_free(this_obj);
+ // debug statements here
+}
+ // MUST_USE_RES struct LDKDefaultRouter DefaultRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger, struct LDKThirtyTwoBytes random_seed_bytes);
+/* @internal */
+export function DefaultRouter_new(network_graph: number, logger: number, random_seed_bytes: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DefaultRouter_new(network_graph, logger, random_seed_bytes);
+ return nativeResponseValue;
+}
+ // struct LDKRouter DefaultRouter_as_Router(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
+/* @internal */
+export function DefaultRouter_as_Router(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_DefaultRouter_as_Router(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKPayer ChannelManager_as_Payer(const struct LDKChannelManager *NONNULL_PTR this_arg);
+/* @internal */
+export function ChannelManager_as_Payer(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.TS_ChannelManager_as_Payer(this_arg);
+ return nativeResponseValue;
+}
+ // struct LDKCResult_SiPrefixParseErrorZ SiPrefix_from_str(struct LDKStr s);
+/* @internal */
+export function SiPrefix_from_str(s: number): number {
+ 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): number {
+ 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): number {
+ 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: number): 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: number): 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: number): 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: number): 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: number): 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: number): 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: number, arg2: number, arg3: number, arg4: number, arg5: number, arg6: number, arg7: number, arg8: number, arg9: number, arg10: number) {
+ const weak: WeakRef<object> = js_objs[obj_ptr];
+ if (weak == null || weak == undefined) {
+ console.error("Got function call on unknown/free'd JS object!");
+ throw new Error("Got function call on unknown/free'd JS object!");
+ }
+ const obj: object = weak.deref();
+ if (obj == null || obj == undefined) {
+ console.error("Got function call on GC'd JS object!");
+ throw new Error("Got function call on GC'd JS object!");
+ }
+ var fn;
+ switch (fn_id) {
+ case 0: fn = Object.getOwnPropertyDescriptor(obj, "get_per_commitment_point"); break;
+ case 1: fn = Object.getOwnPropertyDescriptor(obj, "release_commitment_secret"); break;
+ case 2: fn = Object.getOwnPropertyDescriptor(obj, "validate_holder_commitment"); break;
+ case 3: fn = Object.getOwnPropertyDescriptor(obj, "channel_keys_id"); break;
+ case 4: fn = Object.getOwnPropertyDescriptor(obj, "sign_counterparty_commitment"); break;
+ case 5: fn = Object.getOwnPropertyDescriptor(obj, "validate_counterparty_revocation"); break;
+ case 6: fn = Object.getOwnPropertyDescriptor(obj, "sign_holder_commitment_and_htlcs"); break;
+ case 7: fn = Object.getOwnPropertyDescriptor(obj, "sign_justice_revoked_output"); break;
+ case 8: fn = Object.getOwnPropertyDescriptor(obj, "sign_justice_revoked_htlc"); break;
+ case 9: fn = Object.getOwnPropertyDescriptor(obj, "sign_counterparty_htlc_transaction"); break;
+ case 10: fn = Object.getOwnPropertyDescriptor(obj, "sign_closing_transaction"); break;
+ case 11: fn = Object.getOwnPropertyDescriptor(obj, "sign_channel_announcement"); break;
+ case 12: fn = Object.getOwnPropertyDescriptor(obj, "ready_channel"); break;
+ case 13: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 14: fn = Object.getOwnPropertyDescriptor(obj, "watch_channel"); break;
+ case 15: fn = Object.getOwnPropertyDescriptor(obj, "update_channel"); break;
+ case 16: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_monitor_events"); break;
+ case 17: fn = Object.getOwnPropertyDescriptor(obj, "broadcast_transaction"); break;
+ case 18: fn = Object.getOwnPropertyDescriptor(obj, "get_node_secret"); break;
+ case 19: fn = Object.getOwnPropertyDescriptor(obj, "get_destination_script"); break;
+ case 20: fn = Object.getOwnPropertyDescriptor(obj, "get_shutdown_scriptpubkey"); break;
+ case 21: fn = Object.getOwnPropertyDescriptor(obj, "get_channel_signer"); break;
+ case 22: fn = Object.getOwnPropertyDescriptor(obj, "get_secure_random_bytes"); break;
+ case 23: fn = Object.getOwnPropertyDescriptor(obj, "read_chan_signer"); break;
+ case 24: fn = Object.getOwnPropertyDescriptor(obj, "sign_invoice"); break;
+ case 25: fn = Object.getOwnPropertyDescriptor(obj, "get_inbound_payment_key_material"); break;
+ case 26: fn = Object.getOwnPropertyDescriptor(obj, "get_est_sat_per_1000_weight"); break;
+ case 27: fn = Object.getOwnPropertyDescriptor(obj, "log"); break;
+ case 28: fn = Object.getOwnPropertyDescriptor(obj, "type_id"); break;
+ case 29: fn = Object.getOwnPropertyDescriptor(obj, "debug_str"); break;
+ case 30: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 31: fn = Object.getOwnPropertyDescriptor(obj, "get_utxo"); break;
+ case 32: fn = Object.getOwnPropertyDescriptor(obj, "register_tx"); break;
+ case 33: fn = Object.getOwnPropertyDescriptor(obj, "register_output"); break;
+ case 34: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg_events"); break;
+ case 35: fn = Object.getOwnPropertyDescriptor(obj, "handle_event"); break;
+ case 36: fn = Object.getOwnPropertyDescriptor(obj, "process_pending_events"); break;
+ case 37: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break;
+ case 38: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break;
+ case 39: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break;
+ case 40: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break;
+ case 41: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break;
+ case 42: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); break;
+ case 43: fn = Object.getOwnPropertyDescriptor(obj, "persist_new_channel"); break;
+ case 44: fn = Object.getOwnPropertyDescriptor(obj, "update_persisted_channel"); break;
+ case 45: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel"); break;
+ case 46: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break;
+ case 47: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break;
+ case 48: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break;
+ case 49: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_locked"); break;
+ case 50: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break;
+ case 51: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break;
+ case 52: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_add_htlc"); break;
+ case 53: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fulfill_htlc"); break;
+ case 54: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_htlc"); break;
+ case 55: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_malformed_htlc"); break;
+ case 56: fn = Object.getOwnPropertyDescriptor(obj, "handle_commitment_signed"); break;
+ case 57: fn = Object.getOwnPropertyDescriptor(obj, "handle_revoke_and_ack"); break;
+ case 58: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fee"); break;
+ case 59: fn = Object.getOwnPropertyDescriptor(obj, "handle_announcement_signatures"); break;
+ case 60: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
+ case 61: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 62: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_reestablish"); break;
+ case 63: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
+ case 64: fn = Object.getOwnPropertyDescriptor(obj, "handle_error"); break;
+ case 65: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break;
+ case 66: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break;
+ case 67: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
+ case 68: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcements"); break;
+ case 69: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcements"); break;
+ case 70: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
+ case 71: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break;
+ case 72: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break;
+ case 73: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break;
+ case 74: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break;
+ case 75: fn = Object.getOwnPropertyDescriptor(obj, "read"); break;
+ case 76: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
+ case 77: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break;
+ case 78: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break;
+ case 79: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break;
+ case 80: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break;
+ case 81: fn = Object.getOwnPropertyDescriptor(obj, "hash"); break;
+ case 82: fn = Object.getOwnPropertyDescriptor(obj, "channel_penalty_msat"); break;
+ case 83: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_failed"); break;
+ case 84: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_successful"); break;
+ case 85: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
+ case 86: fn = Object.getOwnPropertyDescriptor(obj, "lock"); break;
+ case 87: fn = Object.getOwnPropertyDescriptor(obj, "node_id"); break;
+ case 88: fn = Object.getOwnPropertyDescriptor(obj, "first_hops"); break;
+ case 89: fn = Object.getOwnPropertyDescriptor(obj, "send_payment"); break;
+ case 90: fn = Object.getOwnPropertyDescriptor(obj, "send_spontaneous_payment"); break;
+ case 91: fn = Object.getOwnPropertyDescriptor(obj, "retry_payment"); break;
+ case 92: fn = Object.getOwnPropertyDescriptor(obj, "abandon_payment"); break;
+ case 93: fn = Object.getOwnPropertyDescriptor(obj, "find_route"); break;
+ default:
+ console.error("Got unknown function call from C!");
+ throw new Error("Got unknown function call from C!");
+ }
+ if (fn == null || fn == undefined) {
+ console.error("Got function call on incorrect JS object!");
+ throw new Error("Got function call on incorrect JS object!");
+ }
+ return fn.value.bind(obj)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
+}
\ No newline at end of file