@safe-global/safe-react-hooks
Version:
A collection of React Hooks that facilitates the interaction of React apps with Safe Smart Accounts
12 lines (11 loc) • 646 B
TypeScript
import type { ConfigParam, SafeConfig, SafeInfo } from '../../types/index.js';
import type { UseQueryResult } from '@tanstack/react-query';
export type UseSafeInfoParams = ConfigParam<SafeConfig>;
export type UseSafeInfoReturnType = Omit<UseQueryResult<Partial<SafeInfo>>, 'refetch'>;
/**
* Hook to get the connected Safe's information.
* @param params Parameters to customize the hook behavior.
* @param params.config SafeConfig to use instead of the one provided by `SafeProvider`.
* @returns Query result object containing the Safe's information.
*/
export declare function useSafeInfo(params?: UseSafeInfoParams): UseSafeInfoReturnType;