import { getEpoch } from '@rss3/api-core';
import { useQuery } from '@tanstack/react-query';

function useGetEpoch(params, options) {
  const queryKey = ["useGetEpoch", params];
  const query = useQuery({
    queryKey,
    queryFn: () => {
      const args = Array.isArray(params) ? params : [params];
      return getEpoch(...args);
    },
    ...options
  });
  return {
    ...query,
    queryKey
  };
}

export { useGetEpoch };
//# sourceMappingURL=use-get-epoch.js.map
//# sourceMappingURL=use-get-epoch.js.map