import { CompositeViewDU, ListCompositeType } from "@chainsafe/ssz"; import { ChainForkConfig } from "@lodestar/config"; import { Bytes32, TimeSeconds, phase0, ssz } from "@lodestar/types"; import { EpochCacheImmutableData } from "../cache/epochCache.js"; import { BeaconStateAllForks, CachedBeaconStateAllForks } from "../types.js"; type DepositDataRootListType = ListCompositeType; type DepositDataRootViewDU = CompositeViewDU; /** * Check if it's valid genesis state. * @param config * @param state */ export declare function isValidGenesisState(config: ChainForkConfig, state: BeaconStateAllForks): boolean; /** * Check if it's valid genesis validators state. * @param config * @param state */ export declare function isValidGenesisValidators(config: ChainForkConfig, state: BeaconStateAllForks): boolean; /** * Generate the initial beacon chain state. * * SLOW CODE - 🐢 */ export declare function getGenesisBeaconState(config: ChainForkConfig, genesisEth1Data: phase0.Eth1Data, latestBlockHeader: phase0.BeaconBlockHeader): BeaconStateAllForks; /** * Apply eth1 block hash to state. * @param config ChainForkConfig * @param state BeaconState * @param eth1BlockHash eth1 block hash */ export declare function applyEth1BlockHash(state: CachedBeaconStateAllForks, eth1BlockHash: Bytes32): void; /** * Apply eth1 block timestamp to state. * @param config IBeaconState * @param state BeaconState * @param eth1Timestamp eth1 block timestamp */ export declare function applyTimestamp(config: ChainForkConfig, state: CachedBeaconStateAllForks, eth1Timestamp: number): void; /** * Apply deposits to state. * For spec test, fullDepositDataRootList is undefined. * For genesis builder, fullDepositDataRootList is full list of deposit data root from index 0. * * SLOW CODE - 🐢 * * @param config ChainForkConfig * @param state BeaconState * @param newDeposits new deposits * @param fullDepositDataRootList full list of deposit data root from index 0 * @returns active validator indices */ export declare function applyDeposits(config: ChainForkConfig, state: CachedBeaconStateAllForks, newDeposits: phase0.Deposit[], fullDepositDataRootList?: DepositDataRootViewDU): { activatedValidatorCount: number; }; /** * Mainly used for spec test. * * SLOW CODE - 🐢 */ export declare function initializeBeaconStateFromEth1(config: ChainForkConfig, immutableData: EpochCacheImmutableData, eth1BlockHash: Bytes32, eth1Timestamp: TimeSeconds, deposits: phase0.Deposit[], fullDepositDataRootList?: DepositDataRootViewDU, executionPayloadHeader?: CompositeViewDU): CachedBeaconStateAllForks; export {}; //# sourceMappingURL=genesis.d.ts.map