import { Hex } from 'viem'; import { AggregatorMode } from './constants.js'; import type { AggregatorExtraDataEntry, CacheInterface, CrossChainAddress, EpochData, EpochRange, NetworkConfig, NetworkData, ValidatorRoles, SettlementValSetLog, SettlementValSetStatus, ValSetStatus, ValidatorSet, ValidatorSetHeader } from './types/index.js'; export interface ValidatorSetDeriverConfig { rpcUrls: string[]; driverAddress: CrossChainAddress; cache?: CacheInterface | null; maxSavedEpochs?: number; validateChainsOnCreate?: boolean; } export declare class ValidatorSetDeriver { /** @notice Static factory that initializes clients and validates coverage. */ static create(config: ValidatorSetDeriverConfig): Promise; /** @notice Public factory; use to ensure clients are initialized/validated. */ private readonly clients; private readonly driverAddress; private readonly cache; private readonly cacheNs; private readonly maxSavedEpochs; private readonly cacheTracker; private readonly initializedPromise; private readonly rpcUrls; private readonly lastCommittedInFlight; constructor(config: ValidatorSetDeriverConfig); /** @notice Derive network metadata (NETWORK/SUBNETWORK + settlement EIP-712 domain). */ getNetworkData(settlement?: CrossChainAddress, finalized?: boolean): Promise; /** @notice Build aggregator extraData entries for simple or zk verification modes. */ getAggregatorsExtraData(mode: AggregatorMode, keyTags?: number[], finalized?: boolean, epoch?: number): Promise; getAggregatorsExtraDataForEpochs(options: { epochRange?: EpochRange; mode: AggregatorMode; keyTags?: number[]; finalized?: boolean; }): Promise<{ epoch: number; data: AggregatorExtraDataEntry[]; }[]>; /** @notice One-shot epoch snapshot: validator set, statuses, events, extras, metadata. */ getEpochData(options?: { epoch?: number; finalized?: boolean; includeNetworkData?: boolean; includeSettlementStatus?: boolean; includeCollateralMetadata?: boolean; includeValSetEvent?: boolean; settlement?: CrossChainAddress; aggregatorKeyTags?: number[]; }): Promise; getEpochsData(options?: { epochRange?: EpochRange; finalized?: boolean; includeNetworkData?: boolean; includeSettlementStatus?: boolean; includeCollateralMetadata?: boolean; includeValSetEvent?: boolean; settlement?: CrossChainAddress; aggregatorKeyTags?: number[]; }): Promise; /** @notice Derive validator roles (aggregator/committer assignments) for a single epoch. */ getValidatorRoles(options?: { epoch?: number; finalized?: boolean; }): Promise; /** @notice Derive validator roles for a range of epochs. */ getValidatorRolesForEpochs(options?: { epochRange?: EpochRange; finalized?: boolean; }): Promise<{ epoch: number; data: ValidatorRoles; }[]>; private initializeClients; private validateRequiredChains; private normalizeEpochRange; private expandEpochRange; private resolveEpochRange; private getVerificationMode; private isValSetStatus; private isValidatorSet; private isAggregatorExtraCacheEntry; private resolveEpochWindow; private fetchSettlementEventsByRange; private applyValidatorSetStatuses; private updateCachedValidatorSets; private loadNetworkConfigDataBatch; private loadValSetStatusBatch; private getSettlementLastCommittedEpoch; private loadAggregatorsExtraData; private loadValidatorSetsByEpoch; private ensureInitialized; private getClient; private readDriverNumber; private readDriverNumbersBatch; getCurrentEpoch(finalized?: boolean): Promise; getCurrentEpochDuration(finalized?: boolean): Promise; getCurrentEpochStart(finalized?: boolean): Promise; /** @notice Get the next epoch index (scheduled). */ getNextEpoch(finalized?: boolean): Promise; /** @notice Get the duration of the next epoch (seconds). */ getNextEpochDuration(finalized?: boolean): Promise; /** @notice Get the start timestamp of the next epoch. */ getNextEpochStart(finalized?: boolean): Promise; /** @notice Get the start timestamp of a specific epoch. */ getEpochStart(epoch: number, finalized?: boolean): Promise; /** @notice Get the start timestamps for an epoch range. */ getEpochStarts(epochRange: EpochRange, finalized?: boolean): Promise<{ epoch: number; start: number; }[]>; /** @notice Get the duration of a specific epoch (seconds). */ getEpochDuration(epoch: number, finalized?: boolean): Promise; /** @notice Get the durations for an epoch range (seconds). */ getEpochDurations(epochRange: EpochRange, finalized?: boolean): Promise<{ epoch: number; duration: number; }[]>; /** @notice Resolve epoch index for a given timestamp. */ getEpochIndex(timestamp: number, finalized?: boolean): Promise; getNetworkConfig(epoch?: number, finalized?: boolean): Promise; getNetworkConfigs(epochRange?: EpochRange, finalized?: boolean): Promise<{ epoch: number; config: NetworkConfig; }[]>; getValidatorSet(epoch?: number, finalized?: boolean, includeCollateralMetadata?: boolean): Promise; getValidatorSets(epochRange?: EpochRange, finalized?: boolean, includeCollateralMetadata?: boolean): Promise; /** @notice Get the current validator set (finalized). */ getCurrentValidatorSet(includeCollateralMetadata?: boolean): Promise; /** @notice Get the current network configuration (finalized). */ getCurrentNetworkConfig(): Promise; /** @notice Compute total active voting power for a validator set. */ getTotalActiveVotingPower(validatorSet: ValidatorSet): bigint; /** @notice Build a validator-set header from a full set. */ getValidatorSetHeader(validatorSet: ValidatorSet): ValidatorSetHeader; /** @notice ABI encode a validator-set header. */ abiEncodeValidatorSetHeader(header: ValidatorSetHeader): Hex; /** @notice Keccak hash of a validator-set header. */ hashValidatorSetHeader(header: ValidatorSetHeader): Hex; /** @notice Hash a full validator set (header derived). */ getValidatorSetHeaderHash(validatorSet: ValidatorSet): Hex; private getVotingPowersBatch; private getKeysBatch; getValSetStatus(epoch: number, finalized?: boolean): Promise; getValSetStatuses(epochRange: EpochRange, finalized?: boolean): Promise<{ epoch: number; status: ValSetStatus; }[]>; /** @notice Settlement commitment status for an epoch (all or provided settlements). */ getValSetSettlementStatuses(options?: { epoch?: number; finalized?: boolean; settlements?: CrossChainAddress[]; }): Promise; /** @notice Settlement commitment status for an epoch range (all or provided settlements). */ getValSetSettlementStatusesForEpochs(options?: { epochRange?: EpochRange; finalized?: boolean; settlements?: CrossChainAddress[]; }): Promise<{ epoch: number; settlements: SettlementValSetStatus[]; }[]>; /** @notice Settlement-indexed validator-set events (committed settlements only). */ getValSetLogEvents(options?: { epoch?: number; finalized?: boolean; settlements?: CrossChainAddress[]; }): Promise; /** @notice Settlement-indexed validator-set events for an epoch range (committed settlements only). */ getValSetLogEventsForEpochs(options?: { epochRange?: EpochRange; finalized?: boolean; settlements?: CrossChainAddress[]; }): Promise<{ epoch: number; logs: SettlementValSetLog[]; }[]>; } //# sourceMappingURL=deriver.d.ts.map