import type { GetLatestBlockhashApi, Simplify } from "gill"; import type { GillUseRpcHook } from "./types.js"; type RpcConfig = Simplify>[0]; type UseLatestBlockhashResponse = ReturnType["value"]; type UseLatestBlockhashInput = GillUseRpcHook; /** * Get the latest blockhash using the Solana RPC method of * [`getLatestBlockhash`](https://solana.com/docs/rpc/http/getlatestblockhash) * * To auto refetch the latest blockhash, provide a `options.refetchInterval` value */ export declare function useLatestBlockhash({ options, config, abortSignal, }?: UseLatestBlockhashInput): { latestBlockhash: UseLatestBlockhashResponse; error: unknown; isError: true; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: true; isSuccess: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: unknown; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isPlaceholderData: boolean; isRefetching: boolean; isStale: boolean; refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise; } | { latestBlockhash: UseLatestBlockhashResponse; error: null; isError: false; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; status: "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: unknown; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isPlaceholderData: boolean; isRefetching: boolean; isStale: boolean; refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise; } | { latestBlockhash: UseLatestBlockhashResponse; error: unknown; isError: true; isPending: false; isLoading: false; isLoadingError: true; isRefetchError: false; isSuccess: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: unknown; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isPlaceholderData: boolean; isRefetching: boolean; isStale: boolean; refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise; } | { latestBlockhash: UseLatestBlockhashResponse; error: null; isError: false; isPending: true; isLoading: true; isLoadingError: false; isRefetchError: false; isSuccess: false; status: "pending"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: unknown; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isPlaceholderData: boolean; isRefetching: boolean; isStale: boolean; refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise; } | { latestBlockhash: UseLatestBlockhashResponse; error: null; isError: false; isPending: true; isLoadingError: false; isRefetchError: false; isSuccess: false; status: "pending"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: unknown; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isLoading: boolean; isInitialLoading: boolean; isPaused: boolean; isPlaceholderData: boolean; isRefetching: boolean; isStale: boolean; refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise; }; export {}; //# sourceMappingURL=latest-blockhash.d.ts.map