import type { Logger } from '@nestjs/common';
import { AggregateRoot } from '@easylayer/common/cqrs';
import type { BlockchainProviderService } from '../../../blockchain-provider/blockchain-provider.service';
import type { LightBlock } from '../../../blockchain-provider/components/block.interfaces';
import { Blockchain } from './blockchain.structure';
/**
 * Network aggregate for EVM blockchain storage.
 *
 * Memory Strategy: circular buffer with O(1) height lookups.
 * Stores LightBlock (hashes only) — no transaction bodies, no receipts.
 *
 * lastBlockHeight is intentionally NOT overridden here.
 * It is managed exclusively by AggregateRoot (via events blockHeight field),
 * which is the same pattern as the Bitcoin Network aggregate.
 */
export declare class Network extends AggregateRoot {
    private __maxSize;
    chain: Blockchain;
    constructor({ maxSize, aggregateId, blockHeight, options, }: {
        maxSize: number;
        aggregateId: string;
        blockHeight: number;
        options?: {
            snapshotsEnabled?: boolean;
            allowPruning?: boolean;
            snapshotInterval?: number;
        };
    });
    getLastBlock(): LightBlock | undefined;
    getBlockByHeight(height: number): LightBlock | null;
    getLastNBlocks(count: number): LightBlock[];
    getAllBlocks(): LightBlock[];
    protected serializeUserState(): Record<string, any>;
    protected restoreUserState(state: any): void;
    init({ requestId, startHeight, currentNetworkHeight, logger, }: {
        requestId: string;
        startHeight: number;
        currentNetworkHeight: number;
        logger?: Logger;
    }): Promise<void>;
    clearChain({ requestId }: {
        requestId: string;
    }): Promise<void>;
    addBlocks({ blocks, requestId, logger, }: {
        blocks: LightBlock[];
        requestId: string;
        logger?: Logger;
    }): Promise<void>;
    reorganisation({ reorgHeight, requestId, service, blocks, logger, }: {
        reorgHeight: number;
        requestId: string;
        service: BlockchainProviderService;
        blocks: LightBlock[];
        logger?: Logger;
    }): Promise<void>;
    private onEvmNetworkInitializedEvent;
    private onEvmNetworkBlocksAddedEvent;
    private onEvmNetworkReorganizedEvent;
    private onEvmNetworkClearedEvent;
}
