import { Contract, providers } from 'ethers';
export type UseContractQueryResult<TData = unknown> = {
    data: TData | null;
    error: Error | undefined;
    loading: boolean;
    refetch: () => void;
};
export declare function useContractQuery<TData = unknown>(contract: Contract, method: string, ...args: any[]): UseContractQueryResult<TData>;
export type UseContractLazyQueryResult<TData = unknown> = {
    fetch: (...args: any[]) => void;
} & Omit<UseContractQueryResult<TData>, 'refetch'>;
export declare function useContractLazyQuery<TData = unknown>(contract: Contract, method: string, optimisticResponse?: TData | null): UseContractLazyQueryResult<TData>;
export type ContractMutationFunction = (...args: any[]) => Promise<providers.TransactionResponse>;
export type UseContractMutateFn = (...args: any[]) => void;
export type UseContractMutationOptions = {
    /**
     * the number of block confirmations to wait for before the receipt returns and is considered complete.
     * @see https://docs.ethers.io/v5/api/providers/types/#providers-TransactionResponse
     */
    txReceiptWaitConfirmations?: number;
    onSuccess?: (txReceipt: providers.TransactionReceipt, ...args: any[]) => void | Promise<void>;
    onError?: (error: Error, ...args: any[]) => void | Promise<void>;
};
export type UseContractMutationResult = {
    txResponse: providers.TransactionResponse | null;
    txReceipt: providers.TransactionReceipt | null;
    error: Error | undefined;
    loading: boolean;
    mutate: UseContractMutateFn;
};
export declare function useContractMutation(mutationFn: ContractMutationFunction, options: UseContractMutationOptions): UseContractMutationResult;
//# sourceMappingURL=contract.hooks.d.ts.map