@lido-sdk/react
Version:
This project is being slowly deprecated and may not receive further updates. Check out [modern Lido SDK](https://github.com/lidofinance/lido-ethereum-sdk/pulls) to access latest functionality. It is actively maintained and is built for interacting with Li
11 lines (10 loc) • 646 B
TypeScript
import { Key, Fetcher, MutatorCallback } from 'swr/dist/types';
export declare type SWRResponse<Data, Error = unknown> = {
data?: Data;
error?: Error;
mutate: (data?: Data | Promise<Data> | MutatorCallback<Data>, shouldRevalidate?: boolean) => Promise<Data | undefined>;
update: () => Promise<Data | undefined>;
loading: boolean;
initialLoading: boolean;
};
export declare const useLidoSWR: <Data = unknown, Error_1 = unknown>(key: Key | null, fetcher: Fetcher<Data> | null, config?: Partial<import("swr/dist/types").PublicConfiguration<Data, Error_1, Fetcher<Data>>> | undefined) => SWRResponse<Data, Error_1>;