import { ChainForkConfig } from "@lodestar/config"; import { ForkSeq } from "@lodestar/params"; import { Epoch, ValidatorIndex, phase0 } from "@lodestar/types"; import { BeaconStateAllForks, CachedBeaconStateElectra, CachedBeaconStateGloas, EpochCache } from "../types.js"; /** * Check if [[validator]] is active */ export declare function isActiveValidator(validator: phase0.Validator, epoch: Epoch): boolean; /** * Check if [[validator]] is slashable */ export declare function isSlashableValidator(validator: phase0.Validator, epoch: Epoch): boolean; /** * Return the sequence of active validator indices at [[epoch]]. * * NAIVE - SLOW CODE 🐢 */ export declare function getActiveValidatorIndices(state: BeaconStateAllForks, epoch: Epoch): Uint32Array; export declare function getValidatorActivationChurnLimit(config: ChainForkConfig, fork: ForkSeq, activeValidatorCount: number): number; export declare function getChurnLimit(config: ChainForkConfig, activeValidatorCount: number): number; /** * Get combined churn limit of activation-exit and consolidation */ export declare function getBalanceChurnLimit(totalActiveBalanceIncrements: number, churnLimitQuotient: number, minPerEpochChurnLimit: number): number; export declare function getBalanceChurnLimitFromCache(epochCtx: EpochCache): number; export declare function getActivationExitChurnLimit(epochCtx: EpochCache): number; /** * https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.6/specs/gloas/beacon-chain.md#new-get_activation_churn_limit */ export declare function getActivationChurnLimit(epochCtx: EpochCache): number; /** * https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.6/specs/gloas/beacon-chain.md#new-get_exit_churn_limit */ export declare function getExitChurnLimit(epochCtx: EpochCache): number; /** * Spec (electra): get_consolidation_churn_limit (uses combined balance churn minus activation+exit churn) * Spec (gloas): get_consolidation_churn_limit (independent quotient, no MIN floor) */ export declare function getConsolidationChurnLimit(fork: ForkSeq, epochCtx: EpochCache): number; export declare function getGloasChurnLimits(config: ChainForkConfig, totalActiveBalanceIncrements: number): { exit: number; activation: number; consolidation: number; }; export declare function getMaxEffectiveBalance(withdrawalCredentials: Uint8Array): number; /** * Check if validator is partially withdrawable. * https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.1/specs/electra/beacon-chain.md#modified-is_partially_withdrawable_validator */ export declare function isPartiallyWithdrawableValidator(fork: ForkSeq, validator: phase0.Validator, balance: number): boolean; export declare function getPendingBalanceToWithdraw(state: CachedBeaconStateElectra | CachedBeaconStateGloas, validatorIndex: ValidatorIndex): number; //# sourceMappingURL=validator.d.ts.map