UNPKG

@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) 592 B
import { type UseQueryResult } from '@tanstack/react-query'; import type { ConfigParam, SafeConfig } from '../../types/index.js'; export type UseNonceParams = ConfigParam<SafeConfig>; export type UseNonceReturnType = UseQueryResult<number>; /** * Hook to get the connected Safe's next nonce value. * @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 nonce. */ export declare function useNonce(params?: UseNonceParams): UseNonceReturnType;