+ const nativeResponseValue = wasm.ReadOnlyNetworkGraph_get_addresses(this_arg, encodeArray(pubkey));
+ return nativeResponseValue;
+ }
+ // void RouteHop_free(struct LDKRouteHop this_obj);
+ export function RouteHop_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_free(this_obj);
+ // debug statements here
+ }
+ // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+ export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
+ return decodeArray(nativeResponseValue);
+ }
+ // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
+ // debug statements here
+ }
+ // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+ export function RouteHop_get_node_features(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
+ export function RouteHop_set_node_features(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
+ // debug statements here
+ }
+ // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+ export function RouteHop_get_short_channel_id(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
+ export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
+ // debug statements here
+ }
+ // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+ export function RouteHop_get_channel_features(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
+ export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
+ // debug statements here
+ }
+ // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+ export function RouteHop_get_fee_msat(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
+ export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
+ // debug statements here
+ }
+ // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+ export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
+ export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
+ // debug statements here
+ }
+ // MUST_USE_RES struct LDKRouteHop RouteHop_new(struct LDKPublicKey pubkey_arg, struct LDKNodeFeatures node_features_arg, uint64_t short_channel_id_arg, struct LDKChannelFeatures channel_features_arg, uint64_t fee_msat_arg, uint32_t cltv_expiry_delta_arg);
+ export function RouteHop_new(pubkey_arg: Uint8Array, node_features_arg: number, short_channel_id_arg: number, channel_features_arg: number, fee_msat_arg: number, cltv_expiry_delta_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_new(encodeArray(pubkey_arg), node_features_arg, short_channel_id_arg, channel_features_arg, fee_msat_arg, cltv_expiry_delta_arg);
+ return nativeResponseValue;
+ }
+ // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
+ export function RouteHop_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_clone(orig);
+ return nativeResponseValue;
+ }
+ // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
+ export function RouteHop_hash(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_hash(o);
+ return nativeResponseValue;
+ }
+ // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
+ export function RouteHop_eq(a: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_eq(a, b);
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
+ export function RouteHop_write(obj: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_write(obj);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
+ export function RouteHop_read(ser: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
+ return nativeResponseValue;
+ }
+ // void Route_free(struct LDKRoute this_obj);
+ export function Route_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_free(this_obj);
+ // debug statements here
+ }
+ // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
+ export function Route_get_paths(this_ptr: number): number[][] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_get_paths(this_ptr);
+ return nativeResponseValue;
+ }
+ // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
+ export function Route_set_paths(this_ptr: number, val: number[][]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
+ // debug statements here
+ }
+ // struct LDKPayee Route_get_payee(const struct LDKRoute *NONNULL_PTR this_ptr);
+ export function Route_get_payee(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_get_payee(this_ptr);
+ return nativeResponseValue;
+ }
+ // void Route_set_payee(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKPayee val);
+ export function Route_set_payee(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_set_payee(this_ptr, val);
+ // debug statements here
+ }
+ // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg, struct LDKPayee payee_arg);
+ export function Route_new(paths_arg: number[][], payee_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_new(paths_arg, payee_arg);
+ return nativeResponseValue;
+ }
+ // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
+ export function Route_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_clone(orig);
+ return nativeResponseValue;
+ }
+ // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
+ export function Route_hash(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_hash(o);
+ return nativeResponseValue;
+ }
+ // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
+ export function Route_eq(a: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_eq(a, b);
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
+ export function Route_get_total_fees(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_get_total_fees(this_arg);
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
+ export function Route_get_total_amount(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_get_total_amount(this_arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
+ export function Route_write(obj: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_write(obj);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
+ export function Route_read(ser: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Route_read(encodeArray(ser));
+ return nativeResponseValue;
+ }
+ // void RouteParameters_free(struct LDKRouteParameters this_obj);
+ export function RouteParameters_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteParameters_free(this_obj);
+ // debug statements here
+ }
+ // struct LDKPayee RouteParameters_get_payee(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+ export function RouteParameters_get_payee(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteParameters_get_payee(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteParameters_set_payee(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
+ export function RouteParameters_set_payee(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteParameters_set_payee(this_ptr, val);
+ // debug statements here
+ }
+ // uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+ export function RouteParameters_get_final_value_msat(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteParameters_get_final_value_msat(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
+ export function RouteParameters_set_final_value_msat(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteParameters_set_final_value_msat(this_ptr, val);
+ // debug statements here
+ }
+ // uint32_t RouteParameters_get_final_cltv_expiry_delta(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+ export function RouteParameters_get_final_cltv_expiry_delta(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteParameters_get_final_cltv_expiry_delta(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteParameters_set_final_cltv_expiry_delta(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint32_t val);
+ export function RouteParameters_set_final_cltv_expiry_delta(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteParameters_set_final_cltv_expiry_delta(this_ptr, val);
+ // debug statements here
+ }
+ // MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPayee payee_arg, uint64_t final_value_msat_arg, uint32_t final_cltv_expiry_delta_arg);
+ export function RouteParameters_new(payee_arg: number, final_value_msat_arg: number, final_cltv_expiry_delta_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteParameters_new(payee_arg, final_value_msat_arg, final_cltv_expiry_delta_arg);
+ return nativeResponseValue;
+ }
+ // struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
+ export function RouteParameters_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteParameters_clone(orig);
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
+ export function RouteParameters_write(obj: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteParameters_write(obj);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
+ export function RouteParameters_read(ser: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteParameters_read(encodeArray(ser));
+ return nativeResponseValue;
+ }
+ // void Payee_free(struct LDKPayee this_obj);
+ export function Payee_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_free(this_obj);
+ // debug statements here
+ }
+ // struct LDKPublicKey Payee_get_pubkey(const struct LDKPayee *NONNULL_PTR this_ptr);
+ export function Payee_get_pubkey(this_ptr: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_get_pubkey(this_ptr);
+ return decodeArray(nativeResponseValue);
+ }
+ // void Payee_set_pubkey(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ export function Payee_set_pubkey(this_ptr: number, val: Uint8Array): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_set_pubkey(this_ptr, encodeArray(val));
+ // debug statements here
+ }
+ // struct LDKInvoiceFeatures Payee_get_features(const struct LDKPayee *NONNULL_PTR this_ptr);
+ export function Payee_get_features(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_get_features(this_ptr);
+ return nativeResponseValue;
+ }
+ // void Payee_set_features(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKInvoiceFeatures val);
+ export function Payee_set_features(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_set_features(this_ptr, val);
+ // debug statements here
+ }
+ // struct LDKCVec_RouteHintZ Payee_get_route_hints(const struct LDKPayee *NONNULL_PTR this_ptr);
+ export function Payee_get_route_hints(this_ptr: number): number[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_get_route_hints(this_ptr);
+ return nativeResponseValue;
+ }
+ // void Payee_set_route_hints(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintZ val);
+ export function Payee_set_route_hints(this_ptr: number, val: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_set_route_hints(this_ptr, val);
+ // debug statements here
+ }
+ // struct LDKCOption_u64Z Payee_get_expiry_time(const struct LDKPayee *NONNULL_PTR this_ptr);
+ export function Payee_get_expiry_time(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_get_expiry_time(this_ptr);
+ return nativeResponseValue;
+ }
+ // void Payee_set_expiry_time(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ export function Payee_set_expiry_time(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_set_expiry_time(this_ptr, val);
+ // debug statements here
+ }
+ // MUST_USE_RES struct LDKPayee Payee_new(struct LDKPublicKey pubkey_arg, struct LDKInvoiceFeatures features_arg, struct LDKCVec_RouteHintZ route_hints_arg, struct LDKCOption_u64Z expiry_time_arg);
+ export function Payee_new(pubkey_arg: Uint8Array, features_arg: number, route_hints_arg: number[], expiry_time_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_new(encodeArray(pubkey_arg), features_arg, route_hints_arg, expiry_time_arg);
+ return nativeResponseValue;
+ }
+ // struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
+ export function Payee_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_clone(orig);
+ return nativeResponseValue;
+ }
+ // uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
+ export function Payee_hash(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_hash(o);
+ return nativeResponseValue;
+ }
+ // bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
+ export function Payee_eq(a: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_eq(a, b);
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z Payee_write(const struct LDKPayee *NONNULL_PTR obj);
+ export function Payee_write(obj: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_write(obj);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCResult_PayeeDecodeErrorZ Payee_read(struct LDKu8slice ser);
+ export function Payee_read(ser: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_read(encodeArray(ser));
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKPayee Payee_from_node_id(struct LDKPublicKey pubkey);
+ export function Payee_from_node_id(pubkey: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_from_node_id(encodeArray(pubkey));
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKPayee Payee_for_keysend(struct LDKPublicKey pubkey);
+ export function Payee_for_keysend(pubkey: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Payee_for_keysend(encodeArray(pubkey));
+ return nativeResponseValue;
+ }
+ // void RouteHint_free(struct LDKRouteHint this_obj);
+ export function RouteHint_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_free(this_obj);
+ // debug statements here
+ }
+ // struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+ export function RouteHint_get_a(this_ptr: number): number[] {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_get_a(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
+ export function RouteHint_set_a(this_ptr: number, val: number[]): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_set_a(this_ptr, val);
+ // debug statements here
+ }
+ // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
+ export function RouteHint_new(a_arg: number[]): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_new(a_arg);
+ return nativeResponseValue;
+ }
+ // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
+ export function RouteHint_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_clone(orig);
+ return nativeResponseValue;
+ }
+ // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
+ export function RouteHint_hash(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_hash(o);
+ return nativeResponseValue;
+ }
+ // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
+ export function RouteHint_eq(a: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_eq(a, b);
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
+ export function RouteHint_write(obj: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_write(obj);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
+ export function RouteHint_read(ser: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHint_read(encodeArray(ser));
+ return nativeResponseValue;
+ }
+ // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
+ export function RouteHintHop_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
+ // debug statements here
+ }
+ // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+ export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
+ return decodeArray(nativeResponseValue);
+ }
+ // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+ export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
+ // debug statements here
+ }
+ // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+ export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
+ export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
+ // debug statements here
+ }
+ // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+ export function RouteHintHop_get_fees(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
+ export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
+ // debug statements here
+ }
+ // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+ export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
+ export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
+ // debug statements here
+ }
+ // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+ export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
+ // debug statements here
+ }
+ // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+ export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
+ return nativeResponseValue;
+ }
+ // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+ export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
+ // debug statements here
+ }
+ // MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
+ export function RouteHintHop_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
+ return nativeResponseValue;
+ }
+ // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
+ export function RouteHintHop_clone(orig: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_clone(orig);
+ return nativeResponseValue;
+ }
+ // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
+ export function RouteHintHop_hash(o: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_hash(o);
+ return nativeResponseValue;
+ }
+ // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
+ export function RouteHintHop_eq(a: number, b: number): boolean {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
+ export function RouteHintHop_write(obj: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_write(obj);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
+ export function RouteHintHop_read(ser: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.RouteHintHop_read(encodeArray(ser));
+ return nativeResponseValue;
+ }
+ // struct LDKCResult_RouteLightningErrorZ find_route(struct LDKPublicKey our_node_pubkey, const struct LDKRouteParameters *NONNULL_PTR params, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKLogger logger, const struct LDKScore *NONNULL_PTR scorer);
+ export function find_route(our_node_pubkey: Uint8Array, params: number, network: number, first_hops: number[], logger: number, scorer: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.find_route(encodeArray(our_node_pubkey), params, network, first_hops, logger, scorer);
+ return nativeResponseValue;
+ }
+ // void Scorer_free(struct LDKScorer this_obj);
+ export function Scorer_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Scorer_free(this_obj);
+ // debug statements here
+ }
+ // void ScoringParameters_free(struct LDKScoringParameters this_obj);
+ export function ScoringParameters_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ScoringParameters_free(this_obj);
+ // debug statements here
+ }
+ // uint64_t ScoringParameters_get_base_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
+ export function ScoringParameters_get_base_penalty_msat(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ScoringParameters_get_base_penalty_msat(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ScoringParameters_set_base_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+ export function ScoringParameters_set_base_penalty_msat(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ScoringParameters_set_base_penalty_msat(this_ptr, val);
+ // debug statements here
+ }
+ // uint64_t ScoringParameters_get_failure_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
+ export function ScoringParameters_get_failure_penalty_msat(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ScoringParameters_get_failure_penalty_msat(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ScoringParameters_set_failure_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+ export function ScoringParameters_set_failure_penalty_msat(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ScoringParameters_set_failure_penalty_msat(this_ptr, val);
+ // debug statements here
+ }
+ // uint64_t ScoringParameters_get_failure_penalty_half_life(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
+ export function ScoringParameters_get_failure_penalty_half_life(this_ptr: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ScoringParameters_get_failure_penalty_half_life(this_ptr);
+ return nativeResponseValue;
+ }
+ // void ScoringParameters_set_failure_penalty_half_life(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+ export function ScoringParameters_set_failure_penalty_half_life(this_ptr: number, val: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ScoringParameters_set_failure_penalty_half_life(this_ptr, val);
+ // debug statements here
+ }
+ // MUST_USE_RES struct LDKScoringParameters ScoringParameters_new(uint64_t base_penalty_msat_arg, uint64_t failure_penalty_msat_arg, uint64_t failure_penalty_half_life_arg);
+ export function ScoringParameters_new(base_penalty_msat_arg: number, failure_penalty_msat_arg: number, failure_penalty_half_life_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ScoringParameters_new(base_penalty_msat_arg, failure_penalty_msat_arg, failure_penalty_half_life_arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z ScoringParameters_write(const struct LDKScoringParameters *NONNULL_PTR obj);
+ export function ScoringParameters_write(obj: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ScoringParameters_write(obj);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCResult_ScoringParametersDecodeErrorZ ScoringParameters_read(struct LDKu8slice ser);
+ export function ScoringParameters_read(ser: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ScoringParameters_read(encodeArray(ser));
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKScorer Scorer_new(struct LDKScoringParameters params);
+ export function Scorer_new(params: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Scorer_new(params);
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKScorer Scorer_default(void);
+ export function Scorer_default(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Scorer_default();
+ return nativeResponseValue;
+ }
+ // MUST_USE_RES struct LDKScoringParameters ScoringParameters_default(void);
+ export function ScoringParameters_default(): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.ScoringParameters_default();
+ return nativeResponseValue;
+ }
+ // struct LDKScore Scorer_as_Score(const struct LDKScorer *NONNULL_PTR this_arg);
+ export function Scorer_as_Score(this_arg: number): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Scorer_as_Score(this_arg);
+ return nativeResponseValue;
+ }
+ // struct LDKCVec_u8Z Scorer_write(const struct LDKScorer *NONNULL_PTR obj);
+ export function Scorer_write(obj: number): Uint8Array {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Scorer_write(obj);
+ return decodeArray(nativeResponseValue);
+ }
+ // struct LDKCResult_ScorerDecodeErrorZ Scorer_read(struct LDKu8slice ser);
+ export function Scorer_read(ser: Uint8Array): number {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.Scorer_read(encodeArray(ser));
+ return nativeResponseValue;
+ }
+ // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
+ export function FilesystemPersister_free(this_obj: number): void {
+ if(!isWasmInitialized) {
+ throw new Error("initializeWasm() must be awaited first!");
+ }
+ const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
+ // debug statements here