+ // 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 {