import { type InitialAccountData } from '@aztec/accounts/testing';
import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
import { type AztecAddress, type AztecNode, type CompleteAddress, type Logger, type PXE, type Wallet } from '@aztec/aztec.js';
import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec/testing';
import { type BlobSinkServer } from '@aztec/blob-sink/server';
import { type DeployL1ContractsArgs, type DeployL1ContractsReturnType } from '@aztec/ethereum';
import { TestDateProvider } from '@aztec/foundation/timer';
import type { ProverNode } from '@aztec/prover-node';
import { type PXEService } from '@aztec/pxe/server';
import type { SequencerClient } from '@aztec/sequencer-client';
import type { Anvil } from '@viem/anvil';
import { type SetupOptions } from './utils.js';
export type SubsystemsContext = {
    anvil: Anvil;
    acvmConfig: any;
    bbConfig: any;
    aztecNode: AztecNodeService;
    aztecNodeConfig: AztecNodeConfig;
    pxe: PXEService;
    deployL1ContractsValues: DeployL1ContractsReturnType;
    proverNode?: ProverNode;
    watcher: AnvilTestWatcher;
    cheatCodes: CheatCodes;
    sequencer: SequencerClient;
    dateProvider: TestDateProvider;
    blobSink: BlobSinkServer;
    initialFundedAccounts: InitialAccountData[];
    directoryToCleanup?: string;
};
export declare function createSnapshotManager(testName: string, dataPath?: string, config?: Partial<SetupOptions>, deployL1ContractsArgs?: Partial<DeployL1ContractsArgs>): SnapshotManager | MockSnapshotManager;
export interface ISnapshotManager {
    snapshot<T>(name: string, apply: (context: SubsystemsContext) => Promise<T>, restore?: (snapshotData: T, context: SubsystemsContext) => Promise<void>): Promise<void>;
    setup(): Promise<SubsystemsContext>;
    teardown(): Promise<void>;
}
/** Snapshot manager that does not perform snapshotting, it just applies transition and restoration functions as it receives them. */
declare class MockSnapshotManager implements ISnapshotManager {
    private config;
    private deployL1ContractsArgs;
    private context?;
    private logger;
    constructor(testName: string, config?: Partial<AztecNodeConfig>, deployL1ContractsArgs?: Partial<DeployL1ContractsArgs>);
    snapshot<T>(name: string, apply: (context: SubsystemsContext) => Promise<T>, restore?: (snapshotData: T, context: SubsystemsContext) => Promise<void>): Promise<void>;
    setup(): Promise<SubsystemsContext>;
    teardown(): Promise<void>;
}
/**
 * Snapshot engine for local e2e tests. Read more:
 * https://github.com/AztecProtocol/aztec-packages/pull/5526
 */
declare class SnapshotManager implements ISnapshotManager {
    private dataPath;
    private config;
    private deployL1ContractsArgs;
    private snapshotStack;
    private context?;
    private livePath;
    private logger;
    constructor(testName: string, dataPath: string, config?: Partial<SetupOptions>, deployL1ContractsArgs?: Partial<DeployL1ContractsArgs>);
    snapshot<T>(name: string, apply: (context: SubsystemsContext) => Promise<T>, restore?: (snapshotData: T, context: SubsystemsContext) => Promise<void>): Promise<void>;
    /**
     * Creates and returns the subsystem context based on the current snapshot stack.
     * If the subsystem context already exists, just return it.
     * If you want to be sure to get a clean snapshot, be sure to call teardown() before calling setup().
     */
    setup(): Promise<SubsystemsContext>;
    /**
     * Destroys the current subsystem context.
     */
    teardown(): Promise<void>;
}
/**
 * Snapshot 'apply' helper function to add accounts.
 * The 'restore' function is not provided, as it must be a closure within the test context to capture the results.
 */
export declare const deployAccounts: (numberOfAccounts: number, logger: Logger, waitUntilProven?: boolean) => ({ pxe, initialFundedAccounts }: {
    pxe: PXE;
    initialFundedAccounts: InitialAccountData[];
}) => Promise<{
    deployedAccounts: InitialAccountData[];
}>;
/**
 * Registers the contract class used for test accounts and publicly deploys the instances requested.
 * Use this when you need to make a public call to an account contract, such as for requesting a public authwit.
 * @param sender - Wallet to send the deployment tx.
 * @param accountsToDeploy - Which accounts to publicly deploy.
 * @param waitUntilProven - Whether to wait for the tx to be proven.
 * @param pxeOrNode - PXE or AztecNode to wait for proven.
 */
export declare function publicDeployAccounts(sender: Wallet, accountsToDeploy: (CompleteAddress | AztecAddress)[], waitUntilProven?: boolean, pxeOrNode?: PXE | AztecNode): Promise<void>;
export {};
//# sourceMappingURL=snapshot_manager.d.ts.map