@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) • 633 B
TypeScript
import type { ConfigParam, SafeConfigWithSigner, SafeClient } from '../types/index.js';
export type UseSignerClientParams = ConfigParam<SafeConfigWithSigner>;
export type UseSignerClientReturnType = SafeClient | undefined;
/**
* Hook to get a SafeClient instance with signing capabilities.
* @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 useSignerClient(params?: UseSignerClientParams): UseSignerClientReturnType;