import type { IotaClient } from '@iota/iota-sdk/client'; import type { UndefinedInitialDataOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query'; import type { PartialBy } from '../types/utilityTypes.js'; export type IotaRpcMethodName = { [K in keyof IotaClient]: IotaClient[K] extends ((input: any) => Promise) | (() => Promise) ? K : never; }[keyof IotaClient]; export type IotaRpcMethods = { [K in IotaRpcMethodName]: IotaClient[K] extends (input: infer P) => Promise ? { name: K; result: R; params: P; } : IotaClient[K] extends () => Promise ? { name: K; result: R; params: undefined | object; } : never; }; export type UseIotaClientQueryOptions = PartialBy, 'queryFn'>, 'queryKey'>; export type GetIotaClientQueryOptions = { client: IotaClient; network: string; method: T; options?: PartialBy, 'queryFn'>, 'queryKey'>; } & (undefined extends IotaRpcMethods[T]['params'] ? { params?: IotaRpcMethods[T]['params']; } : { params: IotaRpcMethods[T]['params']; }); export declare function getIotaClientQuery({ client, network, method, params, options, }: GetIotaClientQueryOptions): UseQueryOptions & { initialData?: import("@tanstack/react-query").InitialDataFunction | undefined; } & { queryKey: import("@tanstack/react-query").DataTag; }; export declare function useIotaClientQuery(...args: undefined extends IotaRpcMethods[T]['params'] ? [ method: T, params?: IotaRpcMethods[T]['params'], options?: UseIotaClientQueryOptions ] : [ method: T, params: IotaRpcMethods[T]['params'], options?: UseIotaClientQueryOptions ]): UseQueryResult; export declare function useIotaClientSuspenseQuery(...args: undefined extends IotaRpcMethods[T]['params'] ? [ method: T, params?: IotaRpcMethods[T]['params'], options?: UndefinedInitialDataOptions ] : [ method: T, params: IotaRpcMethods[T]['params'], options?: UndefinedInitialDataOptions ]): import("@tanstack/react-query").UseSuspenseQueryResult; //# sourceMappingURL=useIotaClientQuery.d.ts.map