UNPKG

@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) 543 B
import type { ConfigParam, SafeConfig } from '../types/index.js'; export type UseChainParams = ConfigParam; export type UseChainReturnType = SafeConfig['chain']; /** * Hook to get the configured chain depending on the config from the nearest `SafeProvider`. * @param params Parameters to customize the hook behavior. * @param params.config SafeConfig to use instead of the one provided by `SafeProvider`. * @returns Object describing the configured chain. */ export declare function useChain(params?: UseChainParams): UseChainReturnType;