@safe-global/safe-react-hooks
Version:
A collection of React Hooks that facilitates the interaction of React apps with Safe Smart Accounts
11 lines (10 loc) • 640 B
TypeScript
import type { ConfigParam, SafeClient, SafeConfig } from '../types/index.js';
export type UsePubicClientParams = ConfigParam<SafeConfig>;
export type UsePublicClientReturnType = SafeClient | undefined;
/**
* Hook to get a SafeClient instance with public capabilities which do not require a signer.
* @param params Parameters to customize the hook behavior.
* @param params.config SafeConfig to use instead of the one provided by `SafeProvider`.
* @returns SafeClient instance or `undefined` if the SafeClient is not initialized yet.
*/
export declare function usePublicClient(params?: UsePubicClientParams): UsePublicClientReturnType;