UNPKG

@safe-global/safe-react-hooks

Version:

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

16 lines 635 B
import { usePublicClientQuery } from '../../hooks/usePublicClientQuery.js'; import { QueryKey } from '../../constants.js'; /** * 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 function useNonce(params = {}) { return usePublicClientQuery({ ...params, querySafeClientFn: (safeClient) => safeClient.getNonce(), queryKey: [QueryKey.Nonce] }); } //# sourceMappingURL=useNonce.js.map