import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
import { Fr, type Logger, type Wallet } from '@aztec/aztec.js';
import { EpochCache } from '@aztec/epoch-cache';
import { type ExtendedViemWalletClient } from '@aztec/ethereum';
import { RollupContract } from '@aztec/ethereum/contracts';
import { ChainMonitor, type Delayer } from '@aztec/ethereum/test';
import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
import { ProverNode, type ProverNodeConfig } from '@aztec/prover-node';
import { type SequencerClient, type SequencerEvents } from '@aztec/sequencer-client';
import { EthAddress, type L2BlockNumber } from '@aztec/stdlib/block';
import { type L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
import { type EndToEndContext, type SetupOptions } from '../fixtures/utils.js';
export declare const WORLD_STATE_BLOCK_HISTORY = 2;
export declare const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
export declare const ARCHIVER_POLL_INTERVAL = 50;
export declare const DEFAULT_L1_BLOCK_TIME: number;
export type EpochsTestOpts = Partial<SetupOptions> & {
    numberOfAccounts?: number;
};
export type TrackedSequencerEvent = {
    [K in keyof SequencerEvents]: Parameters<SequencerEvents[K]>[0] & {
        type: K;
        sequencerIndex: number;
        validator: EthAddress;
    };
}[keyof SequencerEvents];
/**
 * Tests building of epochs using fast block times and short epochs.
 * Spawns an aztec node and a prover node with fake proofs.
 * Sequencer is allowed to build empty blocks.
 */
export declare class EpochsTestContext {
    context: EndToEndContext;
    l1Client: ExtendedViemWalletClient;
    rollup: RollupContract;
    constants: L1RollupConstants;
    logger: Logger;
    monitor: ChainMonitor;
    epochCache: EpochCache;
    proverDelayer: Delayer;
    sequencerDelayer: Delayer;
    proverNodes: ProverNode[];
    nodes: AztecNodeService[];
    epochDuration: number;
    L1_BLOCK_TIME_IN_S: number;
    L2_SLOT_DURATION_IN_S: number;
    static setup(opts?: EpochsTestOpts): Promise<EpochsTestContext>;
    static getSlotDurations(opts?: EpochsTestOpts): {
        ethereumSlotDuration: number;
        aztecSlotDuration: number;
        aztecEpochDuration: number;
        aztecProofSubmissionEpochs: number;
    };
    setup(opts?: EpochsTestOpts): Promise<void>;
    teardown(): Promise<void>;
    createProverNode(opts?: {
        dontStart?: boolean;
    } & Partial<ProverNodeConfig>): Promise<ProverNode>;
    createNonValidatorNode(opts?: Partial<AztecNodeConfig>): Promise<AztecNodeService>;
    createValidatorNode(privateKeys: `0x${string}`[], opts?: Partial<AztecNodeConfig> & {
        txDelayerMaxInclusionTimeIntoSlot?: number;
        dontStartSequencer?: boolean;
    }): Promise<AztecNodeService>;
    private createNode;
    private getNextPrivateKey;
    /** Waits until the epoch begins (ie until the immediately previous L1 block is mined). */
    waitUntilEpochStarts(epoch: number): Promise<bigint>;
    /** Waits until the given L2 block number is mined. */
    waitUntilL2BlockNumber(target: number, timeout?: number): Promise<void>;
    /** Waits until the given L2 block number is marked as proven. */
    waitUntilProvenL2BlockNumber(t: number, timeout?: number): Promise<number>;
    /** Waits until the last slot of the proof submission window for a given epoch. */
    waitUntilLastSlotOfProofSubmissionWindow(epochNumber: number | bigint): Promise<void>;
    /** Waits for the aztec node to sync to the target block number. */
    waitForNodeToSync(blockNumber: number, type: 'proven' | 'finalized' | 'historic'): Promise<void>;
    /** Registers the SpamContract on the given wallet. */
    registerSpamContract(wallet: Wallet, salt?: Fr): Promise<SpamContract>;
    /** Creates an L1 client using a fresh account with funds from anvil, with a tx delayer already set up. */
    createL1Client(): Promise<{
        client: ExtendedViemWalletClient;
        delayer: Delayer;
    }>;
    /** Verifies whether the given block number is found on the aztec node. */
    verifyHistoricBlock(blockNumber: L2BlockNumber, expectedSuccess: boolean): Promise<void>;
    watchSequencerEvents(sequencers: SequencerClient[], getMetadata?: (i: number) => Record<string, any>): {
        failEvents: TrackedSequencerEvent[];
        stateChanges: TrackedSequencerEvent[];
    };
}
//# sourceMappingURL=epochs_test.d.ts.map