import { ContractInfo } from './abi/contract';
import { DecodedFunctionCall } from './abi/decode';
import { TransactionLog } from './abi/repo';
import { Config, DeepPartial } from './config';
import { EthereumClient } from './eth/client';
import { FeeHistoryResponse, RawBlock, RawBlockResponse, RawBlockSlim, RawLogResponse, RawTransaction, RawTransactionReceipt, RawTransactionResponse } from './eth/responses';
import { DecodedTransactionTrace, DecodedTransactionTraceItem, FormattedBlock, FormattedLogEvent, FormattedPendingTransaction, FormattedTransaction, FormattedTransactionTrace, FormattedTransactionTraceItem } from './msgs';
import { Classification } from './utils/classification';
export interface RawFullBlock {
    block: RawBlockSlim;
    transactions: RawFullTransaction[];
}
export interface RawFullTransaction {
    transaction: RawTransaction;
    receipt: RawTransactionReceipt;
}
export interface FullBlockResponse {
    block: FormattedBlock;
    transactions: FormattedTransactionResponse[];
}
export interface FormattedTransactionResponse {
    transaction: FormattedTransaction;
    logEvents: FormattedLogEvent[];
}
export declare class EvmDecoder {
    private config;
    private abortHandle;
    private abiRepo;
    private blockTimestampCache;
    private contractInfoCache;
    private resources;
    private waitAfterFailure;
    classification: Classification;
    ethClient: EthereumClient;
    private contractResources;
    constructor(config: DeepPartial<Config>);
    initialize(): Promise<void>;
    private _decodeFunctionCall;
    decodeFunctionCall({ input, address }: {
        input: string;
        address?: string;
    }): Promise<DecodedFunctionCall | undefined>;
    decodeFunctionCallV2({ input, address }: {
        input: string;
        address?: string;
    }): Promise<{
        decoded: DecodedFunctionCall | undefined;
        contractInfo: ContractInfo | undefined;
    }>;
    contractInfo({ address }: {
        address: string;
    }): Promise<ContractInfo | undefined>;
    getBlock<T extends boolean>(blockNumber: number, decode?: T): Promise<T extends true ? FullBlockResponse : RawBlock>;
    getSlimBlock<T extends boolean>(blockNumber: number, raw?: T): Promise<T extends true ? RawBlockSlim : FormattedBlock>;
    getSlimBlockByHash<T extends boolean>(hash: string, raw?: T): Promise<T extends true ? RawBlockSlim : FormattedBlock>;
    getFullBlock<T extends boolean>(blockNumber: number, decode?: T): Promise<T extends true ? FullBlockResponse : RawFullBlock>;
    private processRawFullBlock;
    getBlocks<T extends boolean>(blockNumbers: number[], decode?: T): Promise<T extends true ? Array<FullBlockResponse> : Array<RawBlock>>;
    getSlimBlocks(blockNumbers: number[]): Promise<Array<RawBlockSlim>>;
    getSlimBlocksByHash(blockHashes: string[]): Promise<Array<RawBlockSlim>>;
    getFullBlocks<T extends boolean>(blockNumbers: number[], decode?: T): Promise<T extends true ? Array<FullBlockResponse> : Array<RawFullBlock>>;
    getPendingTransactions<T extends boolean>(decode?: T): Promise<T extends true ? Array<FormattedPendingTransaction> : Array<RawTransactionResponse>>;
    getPendingTransaction(hash: string, decode?: boolean): Promise<RawTransactionResponse | FormattedPendingTransaction | undefined>;
    getTransaction(hash: string, decode?: boolean): Promise<RawTransaction | FormattedTransactionResponse>;
    getTransactionReceipt(hash: string, decode?: boolean): Promise<RawTransactionReceipt | FormattedLogEvent[]>;
    private processRawBlock;
    processRawFullTransaction(txn: RawFullTransaction): Promise<FormattedTransactionResponse>;
    private processRawBlockWithTransactions;
    processBlock(rawBlock: RawBlockResponse | RawFullBlock): Promise<FullBlockResponse>;
    processTransaction(rawTx: RawTransactionResponse | RawTransaction | string, fetchReceipts: boolean, rawReceipt?: RawTransactionReceipt | undefined): Promise<FormattedTransactionResponse>;
    private getLogs;
    processPendingTransaction(rawTx: RawTransactionResponse | string): Promise<FormattedPendingTransaction>;
    decodeLogEvent(evt: TransactionLog): Promise<{
        eventContractInfo: ContractInfo | undefined;
        decodedEventData: DecodedFunctionCall | undefined;
    }>;
    processTransactionLog(evt: RawLogResponse | FormattedLogEvent, timestamp: number): Promise<FormattedLogEvent>;
    getInternalTransaction<T extends boolean>(hash: string, decode?: T): Promise<T extends true ? DecodedTransactionTrace : FormattedTransactionTrace>;
    getInternalTransactionsByBlock<T extends boolean>(blockNumber: number, decode?: T): Promise<T extends true ? Array<DecodedTransactionTrace> : Array<FormattedTransactionTrace>>;
    private tryDecodeTraceFunctionCall;
    decodeTransactionTrace<T extends DecodedTransactionTrace | DecodedTransactionTraceItem>(traceInput: FormattedTransactionTrace | FormattedTransactionTraceItem): Promise<T>;
    getFeeHistory(blockCount: number, blockTarget: number): Promise<FeeHistoryResponse>;
    getLatestBlockNumber(): Promise<number>;
    private addResource;
}
