/// <reference types="node" />
import type { NetworkConnectionManager, MempoolConnectionManager } from './managers';
import type { NetworkConfig, MempoolTxMetadata, Hash } from './providers/interfaces';
import type { Block, Trace } from './components/block.interfaces';
import type { TransactionReceipt } from './components/transaction.interfaces';
/**
 * A Subscription is a Promise that resolves once unsubscribed,
 * and also provides an `unsubscribe()` method.
 */
type Subscription = Promise<void> & {
    unsubscribe: () => void;
};
/**
 * BlockchainProviderService — main EVM blockchain operations interface.
 *
 * Architecture:
 * - NetworkConnectionManager: block/tx fetching with auto-failover
 * - MempoolConnectionManager: pending tx stream (optional, WS-based)
 * - Unified API for ethersjs/web3js providers
 */
export declare class BlockchainProviderService {
    private readonly networkManager;
    private readonly mempoolManager;
    private readonly networkConfig;
    private readonly log;
    private readonly normalizer;
    constructor(networkManager: NetworkConnectionManager, mempoolManager: MempoolConnectionManager, networkConfig: NetworkConfig);
    get config(): NetworkConfig;
    get connectionManager(): NetworkConnectionManager;
    /** @returns true if mempool providers are configured and connected */
    get isMempoolAvailable(): boolean;
    private execNetwork;
    /** Get current block height from network */
    getCurrentBlockHeight(): Promise<number>;
    /** Alias used by crawler for consistency with bitcoin package */
    getCurrentBlockHeightFromMempool(): Promise<number>;
    getCurrentBlockHeightFromNetwork(): Promise<number>;
    getOneBlockByHeight(height: string | number, fullTransactions?: boolean, verifyTrie?: boolean): Promise<Block | null>;
    getManyBlocksByHeights(heights: string[] | number[], fullTransactions?: boolean, verifyTrie?: boolean): Promise<Block[]>;
    getOneBlockByHash(hash: string | Hash, fullTransactions?: boolean): Promise<Block | null>;
    getManyBlocksByHashes(hashes: string[] | Hash[], fullTransactions?: boolean): Promise<Block[]>;
    getOneBlockWithReceipts(height: string | number, fullTransactions?: boolean, verifyTrie?: boolean): Promise<Block | null>;
    getManyBlocksWithReceipts(heights: string[] | number[], fullTransactions?: boolean, verifyTrie?: boolean): Promise<Block[]>;
    getManyBlocksStatsByHeights(heights: string[] | number[]): Promise<any[]>;
    mergeReceiptsIntoBlocks(blocks: Block[], receipts: TransactionReceipt[]): Promise<Block[]>;
    /**
     * Subscribes to new blocks via WebSocket.
     * Returns Subscription (Promise<void> & { unsubscribe() }).
     */
    subscribeToNewBlocks(callback: (block: Block) => void, fullTransactions?: boolean, verifyTrie?: boolean): Subscription;
    /**
     * Parse raw bytes back into a Block object.
     * EVM path: MessagePack bytes → Block, with JSON fallback for tests/browser compatibility.
     * If verifyTrie is true, validates transactionsRoot after parse.
     * Called by the queue iterator after getBatchUpToSize.
     */
    parseBlock(bytes: Buffer, _height: number, verifyTrie?: boolean): Promise<Block>;
    assertTraceSupport(): Promise<void>;
    /**
     * Loads traces for a block by height.
     * Tries debug_traceBlockByNumber (Geth) then trace_block (Erigon/OE).
     * Fails fast if traces are disabled or unsupported.
     * Should only be called when tracesEnabled=true in config.
     */
    getTracesByBlockHeight(height: number): Promise<Trace[]>;
    /**
     * Loads traces for a single transaction.
     */
    getTracesByTransactionHash(hash: string): Promise<Trace[]>;
    /**
     * Subscribe to pending transaction hashes via WebSocket.
     * Uses MempoolConnectionManager provider.
     * Returns Subscription object.
     */
    subscribeToPendingTransactions(callback: (txHash: string) => void): Subscription;
    /**
     * Fetch pending tx metadata by hash.
     * Returns null if not found (already confirmed or dropped).
     */
    getPendingTransactionByHash(hash: string): Promise<MempoolTxMetadata | null>;
    /**
     * Fetch entire txpool_content (Geth/Erigon).
     * Returns per-provider raw mempool. May return empty if not supported.
     */
    getRawMempoolFromAll(): Promise<Array<{
        providerName: string;
        value: Record<string, MempoolTxMetadata>;
    }>>;
    isFeatureSupported(feature: 'eip1559' | 'withdrawals' | 'blobTransactions' | 'traces'): boolean;
    getNativeCurrencySymbol(): string;
    getNativeCurrencyDecimals(): number;
    getChainId(): number;
}
export {};
