import type { Block } from '../components/block.interfaces';
import type { Transaction, TransactionReceipt } from '../components/transaction.interfaces';
/**
 * Utility class for calculating block and transaction sizes
 * Supports both hex-based and RLP-based calculations
 * Automatically assigns size to blocks if not present
 */
export declare class BlockSizeCalculator {
    /**
     * Calculate block size using the most accurate method available
     * If size is not present in block, it will be calculated and assigned
     * @param block - Block to calculate size for (will be mutated to include size)
     * @returns Size in bytes
     */
    static calculateBlockSize(block: Block): number;
    /**
     * Calculate block size using decoded transaction data (standard approach)
     * @param block - Block to calculate size for
     * @returns Size in bytes
     */
    static calculateBlockSizeFromDecodedTransactions(block: Block): number;
    /**
     * Calculate individual transaction size
     * @param transaction - Transaction to calculate size for
     * @returns Size in bytes
     */
    static calculateTransactionSize(transaction: Transaction): number;
    /**
     * Efficiently calculates the total size of receipts in bytes
     * Uses approximation based on receipt structure to avoid expensive JSON.stringify
     * @param receipts - Array of transaction receipts
     * @returns Total size in bytes
     */
    static calculateReceiptsSize(receipts: TransactionReceipt[]): number;
    /**
     * Alternative precise method for calculating receipts size (slower but accurate)
     * Use this for debugging or when you need exact measurements
     * @param receipts - Array of transaction receipts
     * @returns Precise size in bytes
     */
    static calculateReceiptsSizePrecise(receipts: TransactionReceipt[]): number;
    /**
     * Get transaction size from hex data (most accurate)
     * @param hex - Hex string of transaction data
     * @returns Size in bytes
     * @deprecated Providers don't include hex data, use estimateTransactionSizeFromFields instead
     */
    static getTransactionSizeFromHex(hex: string): number;
    /**
     * Estimate transaction size from its fields when hex is not available
     * @param transaction - Transaction object
     * @returns Estimated size in bytes
     */
    static estimateTransactionSizeFromFields(transaction: Transaction): number;
    /**
     * Estimate block header size
     * @param block - Block object
     * @returns Estimated header size in bytes
     */
    static estimateBlockHeaderSize(block: Block): number;
    /**
     * Get block size breakdown for analysis
     * @param block - Block to analyze
     * @returns Detailed size breakdown
     */
    static getBlockSizeBreakdown(block: Block): {
        total: number;
        header: number;
        transactions: {
            total: number;
            count: number;
            estimated: number;
            hashOnly: number;
            details: {
                hash: string;
                size: number;
                method: 'estimated' | 'hash-only';
            }[];
        };
    };
    /**
     * Check if block size calculation is accurate
     * @param block - Block to check
     * @returns Accuracy information
     */
    static getCalculationAccuracy(block: Block): {
        isAccurate: boolean;
        hasProvidedSize: boolean;
        totalTransactions: number;
        method: 'provided' | 'estimated';
    };
    /**
     * Ensures a block has a size field, calculating it if necessary
     * @param block - Block to ensure has size
     * @returns The same block with guaranteed size field
     */
    static ensureBlockSize(block: Block): Block;
}
