import { EthAddress } from '@aztec/aztec.js/addresses';
import type { Logger } from '@aztec/aztec.js/log';
import { SecretValue } from '@aztec/foundation/config';
import { Pool } from 'pg';
/**
 * Configuration for HA database connection
 */
export interface HADatabaseConfig {
    /** PostgreSQL connection URL */
    databaseUrl: string;
    /** Node ID for HA coordination */
    nodeId: string;
    /** Enable HA signing */
    haSigningEnabled: boolean;
    /** Polling interval in ms */
    pollingIntervalMs: number;
    /** Signing timeout in ms */
    signingTimeoutMs: number;
    /** Max stuck duties age in ms */
    maxStuckDutiesAgeMs: number;
}
/**
 * Get database configuration from environment variables
 */
export declare function createHADatabaseConfig(nodeId: string): HADatabaseConfig;
/**
 * Setup PostgreSQL database connection pool for HA tests
 *
 * Note: Database migrations should be run separately before starting tests,
 * either via docker-compose entrypoint or manually with: aztec migrate-ha-db up
 */
export declare function setupHADatabase(databaseUrl: string, logger?: Logger): Pool;
/**
 * Clean up HA database - drop all tables
 * Use this between tests to ensure clean state
 */
export declare function cleanupHADatabase(pool: Pool, logger?: Logger): Promise<void>;
/**
 * Query validator duties from the database
 */
export declare function getValidatorDuties(pool: Pool, slot: bigint, dutyType?: 'ATTESTATION' | 'BLOCK_PROPOSAL' | 'GOVERNANCE_VOTE' | 'SLASHING_VOTE'): Promise<Array<{
    slot: string;
    dutyType: string;
    validatorAddress: string;
    nodeId: string;
    startedAt: Date;
    completedAt: Date | undefined;
}>>;
/**
 * Convert private keys to Ethereum addresses
 */
export declare function getAddressesFromPrivateKeys(privateKeys: `0x${string}`[]): string[];
/**
 * Create initial validators from private keys for L1 contract deployment
 */
export declare function createInitialValidatorsFromPrivateKeys(attesterPrivateKeys: `0x${string}`[]): Array<{
    attester: EthAddress;
    withdrawer: EthAddress;
    privateKey: `0x${string}`;
    bn254SecretKey: SecretValue<bigint>;
}>;
/**
 * Verify no duplicate attestations per validator (HA coordination check)
 * Groups duties by validator address and verifies each validator attested exactly once
 */
export declare function verifyNoDuplicateAttestations(attestationDuties: Array<{
    validatorAddress: string;
    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