import type { TransactionDescription } from '@ethersproject/abi'; import type { NetworkClientId } from '@metamask/network-controller'; import type { TransactionControllerMessenger } from '../TransactionController.js'; import type { InferTransactionTypeResult, TransactionMeta, TransactionParams } from '../types.js'; import { TransactionType } from '../types.js'; export declare const ESTIMATE_GAS_ERROR = "eth_estimateGas rpc method error"; /** * Determines the type of the transaction by analyzing the txParams. * It will never return TRANSACTION_TYPE_CANCEL or TRANSACTION_TYPE_RETRY as these * represent specific events that we specify manually at transaction creation. * * @param txParams - Parameters for the transaction. * @param options - Optional messenger and network client ID to query the network. * @param options.messenger - The TransactionController messenger. * @param options.networkClientId - The network client ID to use. * @returns A object with the transaction type and the contract code response in Hex. */ export declare function determineTransactionType(txParams: TransactionParams, options?: { messenger: TransactionControllerMessenger; networkClientId: NetworkClientId; }): Promise; /** * Parses transaction data using ABIs for three different token standards: ERC20, ERC721, ERC1155 and USDC. * The data will decode correctly if the transaction is an interaction with a contract that matches one of these * contract standards * * @param data - Encoded transaction data. * @param options - Options bag. * @param options.getMethodName - Whether to get the method name. * @returns A representation of an ethereum contract call. */ export declare function decodeTransactionData(data: string, options?: { getMethodName?: boolean; }): undefined | TransactionDescription | string; /** * Check whether a transaction (or any of its nested transactions) has one of * the given types. * * @param transactionMeta - Transaction metadata. * @param types - Transaction types to match against. * @returns `true` when the transaction or a nested transaction has one of the given types. */ export declare function hasTransactionType(transactionMeta: TransactionMeta | undefined, types: readonly TransactionType[]): boolean; //# sourceMappingURL=transaction-type.d.ts.map