import type { AztecNodeService } from '@aztec/aztec-node'; import type { AztecNodeConfig } from '@aztec/aztec-node/config'; import type { Fr } from '@aztec/aztec.js/fields'; import type { AztecAddress } from '@aztec/stdlib/aztec-address'; /** A running in-process local network: an inline Aztec node backed by its own anvil L1. */ export interface LocalNetwork extends AsyncDisposable { /** Fully-synced Aztec node, ready to serve client requests. */ node: AztecNodeService; /** RPC URL of the spawned anvil instance. */ l1RpcUrl: string; /** Chain id used on L1 (foundry's default 31337). */ l1ChainId: number; /** Stops every process started by the fixture: node and anvil. Also invoked by `await using`. */ stop: () => Promise; } /** Options for {@link setupLocalNetwork}. */ export interface LocalNetworkOptions { /** * Addresses that should hold fee juice at genesis. Saves each of these the round-trip of bridging * + claiming fee juice before they can pay for gas. */ fundedAddresses?: AztecAddress[]; /** Override the default per-address genesis fee juice granted to {@link fundedAddresses}. */ initialAccountFeeJuice?: Fr; /** Node config overrides, e.g. `realProofs`, `aztecEpochDuration`, `p2pEnabled`. */ config?: Partial; } /** * Spin up an in-process local network with the given addresses pre-funded. * * Each call spawns its own anvil on an OS-assigned random port and runs the Aztec node inline via * the same {@link createLocalNetwork} codepath that backs `aztec start --local-network` (with the * sandbox account/FPC/token setup skipped). Distinct ports let independent suites run in parallel. * The caller must `await result.stop()` in its teardown (or hold the result with `await using`). * * Requires a Foundry toolchain (`anvil`/`forge`), installed via `aztec-up` or `foundryup`. Binaries * are located in the standard install directories or on `PATH`; set `$ANVIL_BIN` / `$FORGE_BIN` to * pin specific ones. */ export declare function setupLocalNetwork(opts?: LocalNetworkOptions): Promise; /** * Min-fee padding multiplier for test wallets whose txs may mine well after their fee estimate. * The automine sequencer builds one block per tx and advances L1 time in big jumps, and proposer * pipelining evolves the fee-asset price across the build/publish gap (~20x observed in CI), so the * network's congestion base fee can swing sharply between the wallet's fee estimate and the block * the tx actually lands in. The default wallet padding isn't enough and trips * `maxFeesPerGas.feePerL2Gas must be >= gasFees.feePerL2Gas`. Apply via * `wallet.setMinFeePadding(TEST_FEE_PADDING)` on every test wallet that sends txs. */ export declare const TEST_FEE_PADDING = 30; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWwtbmV0d29yay5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Rlc3RpbmcvbG9jYWwtbmV0d29yay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQzFELE9BQU8sS0FBSyxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLEVBQUUsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRWpELE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBTWhFLDJGQUEyRjtBQUMzRixNQUFNLFdBQVcsWUFBYSxTQUFRLGVBQWU7SUFDbkQsK0RBQStEO0lBQy9ELElBQUksRUFBRSxnQkFBZ0IsQ0FBQztJQUN2Qiw2Q0FBNkM7SUFDN0MsUUFBUSxFQUFFLE1BQU0sQ0FBQztJQUNqQixxREFBcUQ7SUFDckQsU0FBUyxFQUFFLE1BQU0sQ0FBQztJQUNsQixpR0FBaUc7SUFDakcsSUFBSSxFQUFFLE1BQU0sT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0NBQzNCO0FBRUQsNkNBQTZDO0FBQzdDLE1BQU0sV0FBVyxtQkFBbUI7SUFDbEM7OztPQUdHO0lBQ0gsZUFBZSxDQUFDLEVBQUUsWUFBWSxFQUFFLENBQUM7SUFDakMsNkZBQTZGO0lBQzdGLHNCQUFzQixDQUFDLEVBQUUsRUFBRSxDQUFDO0lBQzVCLG9GQUFvRjtJQUNwRixNQUFNLENBQUMsRUFBRSxPQUFPLENBQUMsZUFBZSxDQUFDLENBQUM7Q0FDbkM7QUFFRDs7Ozs7Ozs7Ozs7R0FXRztBQUNILHdCQUFzQixpQkFBaUIsQ0FBQyxJQUFJLEdBQUUsbUJBQXdCLEdBQUcsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQXNDN0Y7QUFFRDs7Ozs7Ozs7R0FRRztBQUNILGVBQU8sTUFBTSxnQkFBZ0IsS0FBSyxDQUFDIn0=