import type { Signer } from "ethers";
import type { E3RefundManager } from "../../types/contracts/E3RefundManager";
import type { IInterfold, Interfold } from "../../types/contracts/Interfold";
import type { BondingRegistry } from "../../types/contracts/registry/BondingRegistry";
import type { CiphernodeRegistryOwnable } from "../../types/contracts/registry/CiphernodeRegistryOwnable";
import type { SlashingManager } from "../../types/contracts/slashing/SlashingManager";
import type { MockCiphernodeRegistry } from "../../types/contracts/test/MockCiphernodeRegistry.sol/MockCiphernodeRegistry";
import type { MockComputeProvider } from "../../types/contracts/test/MockComputeProvider";
import type { MockDecryptionVerifier } from "../../types/contracts/test/MockDecryptionVerifier";
import type { MockE3Program } from "../../types/contracts/test/MockE3Program";
import type { MockPkVerifier } from "../../types/contracts/test/MockPkVerifier";
import type { MockCircuitVerifier } from "../../types/contracts/test/MockSlashingVerifier.sol/MockCircuitVerifier";
import type { MockUSDC } from "../../types/contracts/test/MockStableToken.sol/MockUSDC";
import type { InterfoldTicketToken } from "../../types/contracts/token/InterfoldTicketToken";
import type { InterfoldToken } from "../../types/contracts/token/InterfoldToken";
/** Timeout configuration accepted by `Interfold`. */
export interface TimeoutConfig {
    dkgWindow: number;
    computeWindow: number;
    decryptionWindow: number;
}
/** `[CommitteeSize enum value, [min, max]]`. */
export type CommitteeThreshold = [number, [number, number]];
/** Options accepted by {@link deployInterfoldSystem}. All optional. */
export interface DeployInterfoldSystemOptions {
    /** Override the sortition submission window (seconds). */
    submissionWindow?: number;
    /** Override `Interfold.maxDuration` (seconds). */
    maxDuration?: number;
    /** Override the timeout config. Defaults to {@link DEFAULT_TIMEOUT_CONFIG}. */
    timeoutConfig?: TimeoutConfig;
    /** Treasury for `E3RefundManager`. Defaults to `"owner"`. */
    treasury?: "owner" | Signer;
    /** `slashedFundsTreasury` passed to `BondingRegistry`. Defaults to `"owner"`. */
    slashedFundsTreasury?: "owner" | Signer;
    /**
     * If `true` (default), perform the full slashing-side wiring:
     *  - `interfold.setSlashingManager`
     *  - `registry.setSlashingManager`
     *  - `slashingManager.{setCiphernodeRegistry,setInterfold,setE3RefundManager}`
     *
     * Pass `false` for legacy fixtures that only wire the
     * `bondingRegistry <-> slashingManager` link (always wired).
     */
    wireSlashingManager?: boolean;
    /**
     * Committee thresholds to install on the Interfold.
     * Defaults to `[[0, [1, 3]], [1, [2, 5]]]` (Micro & Small).
     */
    committeeThresholds?: CommitteeThreshold[];
    /**
     * Signers to mint `mintUsdcAmount` USDC to.
     * Defaults to `[owner, notTheOwner]`.
     * Pass `[]` to skip end-user USDC minting (operators are still funded).
     */
    mintUsdcTo?: Signer[];
    /** Amount minted to each entry of `mintUsdcTo`. Defaults to 1,000,000 USDC. */
    mintUsdcAmount?: bigint;
    /**
     * Number of operators to bond + register + fund + add to the ciphernode
     * registry. Operators are taken from `getSigners()[2..2+N]`. Defaults to `3`.
     * Pass `0` to skip operator onboarding entirely.
     */
    setupOperators?: number;
    /**
     * BFV parameter set to register as `paramSet 0`.
     *  - `"default"` → degree 512 (used by short tests)
     *  - `"large"`   → degree 2048 (used by integration tests)
     */
    bfvParams?: "default" | "large";
    /**
     * If `true`, also deploys the `MockCircuitVerifier` used by slashing
     * proof-based lanes. Defaults to `false`.
     */
    deployCircuitVerifier?: boolean;
    /**
     * If `true`, deploy `MockCiphernodeRegistry` instead of the real
     * `CiphernodeRegistryOwnable`. The mock implements `ICiphernodeRegistry`
     * with no-ops / configurable committees for tests that only exercise
     * BondingRegistry / SlashingManager flows. Implies `setupOperators` may
     * still be used (the mock's `addCiphernode` is a no-op).
     *
     * When `true`, the fixture also skips `ciphernodeRegistry.setSlashingManager`
     * (the mock does not expose that setter).
     */
    useMockCiphernodeRegistry?: boolean;
    /**
     * If `true`, deploy `MockBlacklistUSDC` instead of `MockUSDC` as the
     * fee/ticket token. The returned `usdcToken` is typed as `MockUSDC` but
     * the underlying contract exposes `blacklist`/`unblacklist`; tests can
     * cast to call them.
     */
    useBlacklistFeeToken?: boolean;
}
/** Mock contract bundle returned by {@link deployInterfoldSystem}. */
export interface InterfoldSystemMocks {
    e3Program: MockE3Program;
    decryptionVerifier: MockDecryptionVerifier;
    pkVerifier: MockPkVerifier;
    mockComputeProvider: MockComputeProvider;
    /** Only populated when `deployCircuitVerifier: true`. */
    circuitVerifier?: MockCircuitVerifier;
}
/** Bundle returned by {@link deployInterfoldSystem}. */
export interface InterfoldSystem {
    interfold: Interfold;
    ciphernodeRegistry: CiphernodeRegistryOwnable;
    /** Populated only when `useMockCiphernodeRegistry: true`. */
    mockCiphernodeRegistry?: MockCiphernodeRegistry;
    bondingRegistry: BondingRegistry;
    slashingManager: SlashingManager;
    e3RefundManager: E3RefundManager;
    licenseToken: InterfoldToken;
    ticketToken: InterfoldTicketToken;
    usdcToken: MockUSDC;
    mocks: InterfoldSystemMocks;
    owner: Signer;
    notTheOwner: Signer;
    operators: Signer[];
    /** First 3 onboarded operators (when `setupOperators >= 3`). */
    operator1: Signer | undefined;
    operator2: Signer | undefined;
    operator3: Signer | undefined;
    /** Resolved treasury signer for `E3RefundManager`. */
    treasury: Signer;
    /** Resolved slashedFundsTreasury signer for `BondingRegistry`. */
    slashedFundsTreasury: Signer;
    /** Default `Interfold.request(...)` params anchored at the fixture's `time.latest()`. */
    request: IInterfold.E3RequestParamsStruct;
}
/**
 * Deploy a fully-wired Interfold system and return typed handles. Call from a
 * spec's `setup()` and add only file-specific extras (extra signers,
 * additional thresholds, custom wiring, etc.).
 */
export declare function deployInterfoldSystem(opts?: DeployInterfoldSystemOptions): Promise<InterfoldSystem>;
//# sourceMappingURL=system.d.ts.map