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 (15 loc) 853 B
import { type UseQueryResult } from '@tanstack/react-query'; import { ListOptions } from '@safe-global/api-kit'; import type { ConfigParam, SafeConfig } from '../types/index.js'; import { ListResponse, SafeOperationResponse } from '@safe-global/types-kit'; export type UseSafeOperationsParams = ConfigParam<SafeConfig> & ListOptions & { ordering?: string; }; export type UseSafeOperationsReturnType = UseQueryResult<ListResponse<SafeOperationResponse>>; /**s * Hook to get all Safe Operations for the connected Safe. * @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 list of Safe Operations. */ export declare function useSafeOperations(params?: UseSafeOperationsParams): UseSafeOperationsReturnType;