import { type InitialAccountData } from '@aztec/accounts/testing';
import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
import { AztecAddress } from '@aztec/aztec.js/addresses';
import { type ContractMethod, type DeployInteractionWaitOptions, type DeployOptions } from '@aztec/aztec.js/contracts';
import { Fr } from '@aztec/aztec.js/fields';
import { type Logger } from '@aztec/aztec.js/log';
import type { AztecNode } from '@aztec/aztec.js/node';
import type { Wallet } from '@aztec/aztec.js/wallet';
import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec/testing';
import { type DeployAztecL1ContractsArgs, type DeployAztecL1ContractsReturnType, type Operator, type ZKPassportArgs } from '@aztec/ethereum/deploy-aztec-l1-contracts';
import type { Delayer } from '@aztec/ethereum/l1-tx-utils';
import { type Anvil, EthCheatCodes, startAnvil } from '@aztec/ethereum/test';
import { BlockNumber } from '@aztec/foundation/branded-types';
import { SecretValue } from '@aztec/foundation/config';
import { DateProvider, TestDateProvider } from '@aztec/foundation/timer';
import type { P2PClientDeps } from '@aztec/p2p';
import { MockGossipSubNetwork } from '@aztec/p2p/test-helpers';
import type { ProverNodeConfig } from '@aztec/prover-node';
import { type PXEConfig, type PXECreationOptions } from '@aztec/pxe/server';
import type { SequencerClient } from '@aztec/sequencer-client';
import { type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
import type { AztecNodeAdmin, AztecNodeDebug } from '@aztec/stdlib/interfaces/client';
import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
import { type TelemetryClient, type TelemetryClientConfig } from '@aztec/telemetry-client';
import { type Chain } from 'viem/chains';
import { TestWallet } from '../test-wallet/test_wallet.js';
import { getACVMConfig } from './get_acvm_config.js';
import { getBBConfig } from './get_bb_config.js';
export { startAnvil };
export declare const getPrivateKeyFromIndex: (index: number) => Buffer<ArrayBufferLike> | null;
/**
 * Sets up shared blob storage using FileStore in the data directory.
 */
export declare function setupSharedBlobStorage(config: {
    dataDirectory?: string;
} & Record<string, any>): Promise<void>;
/**
 * Sets up Private eXecution Environment (PXE) and returns the corresponding test wallet.
 * @param aztecNode - An instance of Aztec Node.
 * @param opts - Partial configuration for the PXE.
 * @param logger - The logger to be used.
 * @param actor - Actor label to include in log output (e.g., 'pxe-test').
 * @returns A test wallet, logger and teardown function.
 */
export declare function setupPXEAndGetWallet(aztecNode: AztecNode, opts?: Partial<PXEConfig>, logger?: Logger, actor?: string): Promise<{
    wallet: TestWallet;
    logger: Logger;
    teardown: () => Promise<void>;
}>;
/** Options for the e2e tests setup */
export type SetupOptions = {
    /** State load */
    stateLoad?: string;
    /** Whether to enable metrics collection, if undefined, metrics collection is disabled */
    metricsPort?: number | undefined;
    /** Previously deployed contracts on L1 */
    deployL1ContractsValues?: DeployAztecL1ContractsReturnType;
    /** Initial fee juice for default accounts */
    initialAccountFeeJuice?: Fr;
    /** Number of initial accounts funded with fee juice */
    numberOfInitialFundedAccounts?: number;
    /** Data of the initial funded accounts */
    initialFundedAccounts?: InitialAccountData[];
    /** An initial set of validators */
    initialValidators?: (Operator & {
        privateKey: `0x${string}`;
    })[];
    /** Anvil Start time */
    l1StartTime?: number;
    /** The anvil time where we should at the earliest be seeing L2 blocks */
    l2StartTime?: number;
    /** Whether to start a prover node */
    startProverNode?: boolean;
    /** Manual config for the telemetry client */
    telemetryConfig?: Partial<TelemetryClientConfig> & {
        benchmark?: boolean;
    };
    /** Public data that will be inserted in the tree in genesis */
    genesisPublicData?: PublicDataTreeLeaf[];
    /** Specific config for the prover node, if set. */
    proverNodeConfig?: Partial<ProverNodeConfig>;
    /** Whether to use a mock gossip sub network for p2p clients. */
    mockGossipSubNetwork?: boolean;
    /** Whether to disable the anvil test watcher (can still be manually started) */
    disableAnvilTestWatcher?: boolean;
    /** Whether to enable anvil automine during deployment of L1 contracts (consider defaulting this to true). */
    automineL1Setup?: boolean;
    /** How many accounts to seed and unlock in anvil. */
    anvilAccounts?: number;
    /** Port to start anvil (defaults to 8545) */
    anvilPort?: number;
    /**
     * Number of slots per epoch for Anvil's finality simulation.
     * Anvil reports `finalized = latest - slotsInAnEpoch * 2`.
     */
    anvilSlotsInAnEpoch?: number;
    /** Key to use for publishing L1 contracts */
    l1PublisherKey?: SecretValue<`0x${string}`>;
    /** ZkPassport configuration (domain, scope, mock verifier) */
    zkPassportArgs?: ZKPassportArgs;
    /** Whether to fund the sponsored FPC in genesis (defaults to false). */
    fundSponsoredFPC?: boolean;
    /** Whether to skip deploying accounts during setup (legacy behavior for tests using deployAccounts helper). */
    skipAccountDeployment?: boolean;
    /** L1 contracts deployment arguments. */
    l1ContractsArgs?: Partial<DeployAztecL1ContractsArgs>;
    /** Wallet minimum fee padding multiplier (defaults to 0.5, which is 50% padding). */
    walletMinFeePadding?: number;
    /** Options forwarded to PXE creation (e.g. execution hooks). */
    pxeCreationOptions?: PXECreationOptions;
} & Partial<AztecNodeConfig>;
/** Context for an end-to-end test as returned by the `setup` function */
export type EndToEndContext = {
    /** The Anvil instance (only set if anvil was started locally). */
    anvil: Anvil | undefined;
    /** The Aztec Node service or client a connected to it. */
    aztecNode: AztecNode & AztecNodeDebug;
    /** The Aztec Node as a service. */
    aztecNodeService: AztecNodeService;
    /** Client to the Aztec Node admin interface. */
    aztecNodeAdmin: AztecNodeAdmin;
    /** The aztec node running the prover node subsystem (only set if startProverNode is true). */
    proverNode: AztecNodeService | undefined;
    /** A client to the sequencer service. */
    sequencer: SequencerClient | undefined;
    /** Return values from deployAztecL1Contracts function. */
    deployL1ContractsValues: DeployAztecL1ContractsReturnType;
    /** The Aztec Node configuration. */
    config: AztecNodeConfig;
    /** The Aztec Node configuration (alias for config for backward compatibility). */
    aztecNodeConfig: AztecNodeConfig;
    /** The data for the initial funded accounts. */
    initialFundedAccounts: InitialAccountData[];
    /** The wallet to be used. */
    wallet: TestWallet;
    /** The wallets to be used. */
    accounts: AztecAddress[];
    /** Logger instance named as the current test. */
    logger: Logger;
    /** The cheat codes. */
    cheatCodes: CheatCodes;
    /** The cheat codes for L1 */
    ethCheatCodes: EthCheatCodes;
    /** The anvil test watcher. */
    watcher: AnvilTestWatcher;
    /** Allows tweaking current system time, used by the epoch cache only. */
    dateProvider: TestDateProvider;
    /** Telemetry client */
    telemetryClient: TelemetryClient;
    /** Mock gossip sub network used for gossipping messages (only if mockGossipSubNetwork was set to true in opts) */
    mockGossipSubNetwork: MockGossipSubNetwork | undefined;
    /** Delayer for sequencer L1 txs (only when enableDelayer is true). */
    sequencerDelayer: Delayer | undefined;
    /** Delayer for prover node L1 txs (only when enableDelayer and startProverNode are true). */
    proverDelayer: Delayer | undefined;
    /** Prefilled public data used for setting up nodes. */
    prefilledPublicData: PublicDataTreeLeaf[] | undefined;
    /** ACVM config (only set if running locally). */
    acvmConfig: Awaited<ReturnType<typeof getACVMConfig>>;
    /** BB config (only set if running locally). */
    bbConfig: Awaited<ReturnType<typeof getBBConfig>>;
    /** Directory to cleanup on teardown. */
    directoryToCleanup: string;
    /** Function to stop the started services. */
    teardown: () => Promise<void>;
};
/**
 * Sets up the environment for the end-to-end tests.
 * @param numberOfAccounts - The number of new accounts to be created once the PXE is initiated.
 * @param opts - Options to pass to the node initialization and to the setup script.
 * @param pxeOpts - Options to pass to the PXE initialization.
 */
export declare function setup(numberOfAccounts?: number, opts?: SetupOptions, pxeOpts?: Partial<PXEConfig>, chain?: Chain): Promise<EndToEndContext>;
/**
 * Returns a logger instance for the current test.
 */
export declare function getLogger(): Logger;
/**
 * Computes the address of the "canonical" SponsoredFPCContract.
 */
export declare function getSponsoredFPCInstance(): Promise<ContractInstanceWithAddress>;
/**
 * Computes the address of the "canonical" SponsoredFPCContract.
 */
export declare function getSponsoredFPCAddress(): Promise<AztecAddress>;
/**
 * Deploy a sponsored FPC contract to a running instance.
 */
export declare function setupSponsoredFPC(wallet: Wallet): Promise<ContractInstanceWithAddress>;
/**
 * Registers the SponsoredFPC in this PXE instance.
 */
export declare function registerSponsoredFPC(wallet: Wallet): Promise<void>;
export declare function waitForProvenChain(node: AztecNode, targetBlock?: BlockNumber, timeoutSec?: number, intervalSec?: number): Promise<void>;
/**
 * Creates an AztecNodeService with the prover node enabled as a subsystem.
 * Returns both the aztec node service (for lifecycle management) and the prover node (for test internals access).
 */
export declare function createAndSyncProverNode(proverNodePrivateKey: `0x${string}`, baseConfig: AztecNodeConfig, configOverrides: Pick<AztecNodeConfig, 'dataDirectory'>, deps: {
    telemetry?: TelemetryClient;
    dateProvider: DateProvider;
    p2pClientDeps?: P2PClientDeps;
}, options: {
    prefilledPublicData: PublicDataTreeLeaf[];
    dontStart?: boolean;
}): Promise<{
    proverNode: AztecNodeService;
}>;
export type BalancesFn = ReturnType<typeof getBalancesFn>;
export declare function getBalancesFn(symbol: string, method: ContractMethod, logger: any): (...addresses: (AztecAddress | {
    address: AztecAddress;
})[]) => Promise<bigint[]>;
export declare function expectMapping<K, V>(fn: (...k: K[]) => Promise<V[]>, inputs: K[], expectedOutputs: V[]): Promise<void>;
export declare function expectMappingDelta<K, V extends number | bigint>(initialValues: V[], fn: (...k: K[]) => Promise<V[]>, inputs: K[], expectedDiffs: V[]): Promise<void>;
/**
 * 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.
 */
export declare function ensureAccountContractsPublished(wallet: Wallet, accountsToDeploy: AztecAddress[]): Promise<void>;
/**
 * Helper function to deploy accounts.
 * Returns deployed account data that can be used by tests.
 */
export declare const deployAccounts: (numberOfAccounts: number, logger: Logger, deployOptions?: Partial<DeployOptions<DeployInteractionWaitOptions>> | undefined) => ({ wallet, initialFundedAccounts }: {
    wallet: TestWallet;
    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.
 */
export declare function publicDeployAccounts(wallet: Wallet, accountsToDeploy: AztecAddress[], waitUntilProven?: boolean, node?: AztecNode): Promise<void>;
/**
 * Destroys the current context.
 */
export declare function teardown(context: EndToEndContext | undefined): Promise<void>;
export { deployAndInitializeTokenAndBridgeContracts } from '../shared/cross_chain_test_harness.js';
//# sourceMappingURL=data:application/json;base64, 