import { GetTransactionResponse } from 'starknet'; /** Arguments for the `useTransaction` hook. */ export interface UseTransactionProps { /** The transaction hash. */ hash?: string; } /** Value returned from `useTransaction`. */ export interface UseTransactionResult { /** The transaction data. */ data?: GetTransactionResponse; /** True if fetching data. */ loading: boolean; /** Error while fetching the transaction. */ error?: unknown; } /** * Hook to fetch a single transaction. * * @remarks * * This hook keeps a cache of transactions by chain and transaction hash * so that you can use the hook freely in your application without worrying * about sending duplicate network requests. * * @example * This hook shows how to fetch a transaction. * ```tsx * function Component() { * const { data, loading, error } = useTransaction({ hash: txHash }) * * if (loading) return Loading... * if (error) return Error: {JSON.stringify(error)} * return {data.transaction_hash} * } */ export declare function useTransaction({ hash }: UseTransactionProps): UseTransactionResult; /** Arguments for the `useTransactions` hook. */ export interface UseTransactionsProps { /** The transactions hashes. */ hashes: string[]; } /** * Hook to fetch a list of transactions in parallel. * * @remarks * * This hook fetches a dynamic list of transactions without * violating the rules of hooks. * * @example * This example shows how to fetch a list of transactions. * ```tsx * function Component() { * const results = useTransactions({ * hashes: [txHash, txHash2] * }) * * return ( *