import { ApiClient, ApiRequestInit, routes } from "@lodestar/api"; import { BeaconConfig, ChainForkConfig } from "@lodestar/config"; import { BLSPubkey, phase0 } from "@lodestar/types"; import { Genesis } from "@lodestar/types/phase0"; import { Logger } from "@lodestar/utils"; import { Metrics } from "./metrics.js"; import { AttestationService } from "./services/attestation.js"; import { BlockProposingService } from "./services/block.js"; import { ChainHeaderTracker } from "./services/chainHeaderTracker.js"; import { ExternalSignerOptions } from "./services/externalSignerSync.js"; import { PtcService } from "./services/ptc.js"; import { SyncCommitteeService } from "./services/syncCommittee.js"; import { SyncingStatusTracker } from "./services/syncingStatusTracker.js"; import { Signer, ValidatorProposerConfig, ValidatorStore } from "./services/validatorStore.js"; import { ISlashingProtection, Interchange, InterchangeFormatVersion } from "./slashingProtection/index.js"; import { LodestarValidatorDatabaseController, ProcessShutdownCallback, PubkeyHex } from "./types.js"; import { ClockOptions, IClock } from "./util/clock.js"; export type ValidatorModules = { opts: ValidatorOptions; genesis: Genesis; validatorStore: ValidatorStore; slashingProtection: ISlashingProtection; blockProposingService: BlockProposingService; attestationService: AttestationService; ptcService: PtcService; syncCommitteeService: SyncCommitteeService; config: BeaconConfig; api: ApiClient; clock: IClock; chainHeaderTracker: ChainHeaderTracker; syncingStatusTracker: SyncingStatusTracker; logger: Logger; db: LodestarValidatorDatabaseController; metrics: Metrics | null; controller: AbortController; }; export type ValidatorOptions = { slashingProtection: ISlashingProtection; db: LodestarValidatorDatabaseController; config: ChainForkConfig; api: { clientOrUrls: ApiClient | string | string[]; globalInit?: ApiRequestInit; }; signers: Signer[]; logger: Logger; processShutdownCallback: ProcessShutdownCallback; abortController: AbortController; afterBlockDelaySlotFraction?: number; scAfterBlockDelaySlotFraction?: number; doppelgangerProtection?: boolean; closed?: boolean; valProposerConfig?: ValidatorProposerConfig; distributed?: boolean; broadcastValidation?: routes.beacon.BroadcastValidation; blindedLocal?: boolean; externalSigner?: ExternalSignerOptions; clock?: ClockOptions; }; /** * Main class for the Validator client. */ export declare class Validator { private readonly genesis; readonly validatorStore: ValidatorStore; private readonly slashingProtection; private readonly blockProposingService; private readonly attestationService; private readonly ptcService; private readonly syncCommitteeService; private readonly config; private readonly api; private readonly clock; private readonly chainHeaderTracker; readonly syncingStatusTracker: SyncingStatusTracker; private readonly logger; private readonly db; private state; private readonly controller; constructor({ opts, genesis, validatorStore, slashingProtection, blockProposingService, attestationService, ptcService, syncCommitteeService, config, api, clock, chainHeaderTracker, syncingStatusTracker, logger, db, metrics, controller }: ValidatorModules); get isRunning(): boolean; /** * Initialize and start a validator client */ static init(opts: ValidatorOptions, genesis: Genesis, metrics?: Metrics | null): Promise; /** Waits for genesis and genesis time */ static initializeFromBeaconNode(opts: ValidatorOptions, metrics?: Metrics | null): Promise; removeDutiesForKey(pubkey: PubkeyHex): void; /** * Stops all validator functions. */ close(): Promise; importInterchange(interchange: Interchange): Promise; exportInterchange(pubkeys: BLSPubkey[], formatVersion: InterchangeFormatVersion): Promise; /** * Perform a voluntary exit for the given validator by its key. */ voluntaryExit(publicKey: string, exitEpoch?: number): Promise; /** * Create a signed voluntary exit message for the given validator by its key. */ signVoluntaryExit(publicKey: string, exitEpoch?: number): Promise; } //# sourceMappingURL=validator.d.ts.map