UNPKG

@safe-global/safe-react-hooks

Version:

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

17 lines (16 loc) 872 B
import { Hash } from 'viem'; import { type UseQueryResult } from '@tanstack/react-query'; import { SafeMultisigTransactionResponse } from '@safe-global/types-kit'; import type { ConfigParam, SafeConfig } from '../types/index.js'; export type UseSafeTransactionParams = ConfigParam<SafeConfig> & { safeTxHash: Hash; }; export type UseSafeTransactionReturnType = UseQueryResult<SafeMultisigTransactionResponse>; /** * Hook to get the status of a specific Safe transaction. * @param params Parameters to customize the hook behavior. * @param params.config SafeConfig to use instead of the one provided by `SafeProvider`. * @param params.safeTxHash Hash of Safe transaction to be fetched. * @returns Query result object containing the transaction object. */ export declare function useSafeTransaction(params: UseSafeTransactionParams): UseSafeTransactionReturnType;