UNPKG

@safe-global/safe-react-hooks

Version:

A collection of React Hooks that facilitates the interaction of React apps with Safe Smart Accounts

13 lines (12 loc) 633 B
import { type UseQueryResult } from '@tanstack/react-query'; import type { Address } from 'viem'; import type { ConfigParam, SafeConfig } from '../../types/index.js'; export type UseAddressParams = ConfigParam<SafeConfig>; export type UseAddressReturnType = UseQueryResult<Address>; /** * Hook to get the connected Safe's address. * @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 address. */ export declare function useAddress(params?: UseAddressParams): UseAddressReturnType;