import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
import { Fr } from '@aztec/aztec.js/fields';
import type { Logger } from '@aztec/aztec.js/log';
import type { Wallet } from '@aztec/aztec.js/wallet';
import { EpochCache } from '@aztec/epoch-cache';
import { RollupContract } from '@aztec/ethereum/contracts';
import { Delayer } from '@aztec/ethereum/l1-tx-utils';
import { ChainMonitor } from '@aztec/ethereum/test';
import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
import { TestContract } from '@aztec/noir-test-contracts.js/Test';
import type { ProverNodeConfig } from '@aztec/prover-node';
import type { PXEConfig } from '@aztec/pxe/config';
import { type SequencerClient, type SequencerEvents } from '@aztec/sequencer-client';
import { type BlockParameter, EthAddress } from '@aztec/stdlib/block';
import { type L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
import type { SlashingProtectionDatabase } from '@aztec/validator-ha-signer/types';
import { type EndToEndContext, type SetupOptions } from '../fixtures/utils.js';
export declare const WORLD_STATE_CHECKPOINT_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;
    pxeOpts?: Partial<PXEConfig>;
    aztecSlotDurationInL1Slots?: 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: AztecNodeService[];
    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): {
        l1PublishingTime: number;
        ethereumSlotDuration: number;
        aztecSlotDuration: number;
        aztecEpochDuration: number;
        aztecProofSubmissionEpochs: number;
    };
    setup(opts?: EpochsTestOpts): Promise<void>;
    teardown(): Promise<void>;
    createProverNode(opts?: {
        dontStart?: boolean;
    } & Partial<ProverNodeConfig>): Promise<AztecNodeService>;
    createNonValidatorNode(opts?: Partial<AztecNodeConfig>): Promise<AztecNodeService>;
    createValidatorNode(privateKeys: `0x${string}`[], opts?: Partial<AztecNodeConfig> & {
        dontStartSequencer?: boolean;
        slashingProtectionDb?: SlashingProtectionDatabase;
    }): 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 checkpoint number is mined. */
    waitUntilCheckpointNumber(target: CheckpointNumber, timeout?: number): Promise<void>;
    /** Waits until the given checkpoint number is marked as proven. */
    waitUntilProvenCheckpointNumber(target: CheckpointNumber, timeout?: number): Promise<CheckpointNumber>;
    /** 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: BlockNumber, type: 'proven' | 'finalized' | 'historic'): Promise<void>;
    /** Registers the SpamContract on the given wallet. */
    registerSpamContract(wallet: Wallet, salt?: Fr): Promise<SpamContract>;
    /** Registers the TestContract on the given wallet. */
    registerTestContract(wallet: Wallet, salt?: Fr): Promise<TestContract>;
    /** 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: BlockParameter, expectedSuccess: boolean): Promise<void>;
    /** Verifies at least one checkpoint has the target number of blocks (for MBPS validation). */
    assertMultipleBlocksPerSlot(targetBlockCount: number): Promise<void>;
    watchSequencerEvents(sequencers: SequencerClient[], getMetadata?: (i: number) => Record<string, any>): {
        failEvents: TrackedSequencerEvent[];
        stateChanges: TrackedSequencerEvent[];
    };
}
//# sourceMappingURL=data:application/json;base64, 