@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
TypeScript
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 UseSafeOperationParams = ConfigParam<SafeConfig> & {
safeOperationHash: Hash;
};
export type UseSafeOperationReturnType = UseQueryResult<SafeMultisigTransactionResponse>;
/**
* Hook to get the status of a specific Safe Operation.
* @param params Parameters to customize the hook behavior.
* @param params.config SafeConfig to use instead of the one provided by `SafeProvider`.
* @param params.safeOperationHash Hash of Safe Operation to be fetched.
* @returns Query result object containing the transaction object.
*/
export declare function useSafeOperation(params: UseSafeOperationParams): UseSafeOperationReturnType;