import { BitArray } from "@chainsafe/ssz"; import { ChainForkConfig } from "@lodestar/config"; import { ForkName } from "@lodestar/params"; import { BeaconBlockHeader, LightClientBootstrap, LightClientFinalityUpdate, LightClientHeader, LightClientOptimisticUpdate, LightClientUpdate, SyncCommittee } from "@lodestar/types"; import type { ILightClientStore, SyncCommitteeFast } from "./store.js"; export declare const GENESIS_SLOT = 0; export declare const ZERO_HASH: Uint8Array; export declare const ZERO_SYNC_COMMITTEE: import("@chainsafe/ssz").ValueOfFields<{ pubkeys: import("@chainsafe/ssz").VectorCompositeType; aggregatePubkey: import("@chainsafe/ssz").ByteVectorType; }>; export declare const ZERO_HEADER: import("@chainsafe/ssz").ValueOfFields<{ slot: import("@chainsafe/ssz").UintNumberType; proposerIndex: import("@chainsafe/ssz").UintNumberType; parentRoot: import("@chainsafe/ssz").ByteVectorType; stateRoot: import("@chainsafe/ssz").ByteVectorType; bodyRoot: import("@chainsafe/ssz").ByteVectorType; }>; export declare function sumBits(bits: BitArray): number; /** * Util to guarantee that all bits have a corresponding pubkey. */ export declare function getParticipantPubkeys(pubkeys: T[], bits: BitArray): T[]; export declare function deserializeSyncCommittee(syncCommittee: SyncCommittee): SyncCommitteeFast; export declare function serializeSyncCommittee(syncCommittee: SyncCommitteeFast): SyncCommittee; export declare function getSafetyThreshold(maxActiveParticipants: number): number; export declare function getZeroSyncCommitteeBranch(fork: ForkName): Uint8Array[]; export declare function getZeroFinalityBranch(fork: ForkName): Uint8Array[]; export declare function isSyncCommitteeUpdate(update: LightClientUpdate): boolean; export declare function isFinalityUpdate(update: LightClientUpdate): boolean; export declare function isZeroedHeader(header: BeaconBlockHeader): boolean; export declare function isZeroedSyncCommittee(syncCommittee: SyncCommittee): boolean; export declare function isValidMerkleBranch(leaf: Uint8Array, branch: Uint8Array[], depth: number, index: number, root: Uint8Array): boolean; export declare function isValidNormalizedMerkleBranch(leaf: Uint8Array, branch: Uint8Array[], gindex: number, root: Uint8Array): boolean; export declare function normalizeMerkleBranch(branch: Uint8Array[], gindex: number): Uint8Array[]; export declare function currentSyncCommitteeGindexAtFork(fork: ForkName): number; export declare function finalizedRootGindexAtFork(fork: ForkName): number; export declare function nextSyncCommitteeGindexAtFork(fork: ForkName): number; /** * Returns the execution root represented by a light-client header. * * Gloas headers removed `execution` so Pre-Gloas headers upgraded to the Gloas format * require reconstruction of the original execution payload header root. * * Spec: https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.14/specs/gloas/light-client/sync-protocol.md#modified-get_lc_execution_root */ export declare function getLightClientExecutionRoot(config: ChainForkConfig, header: LightClientHeader): Uint8Array; export declare function upgradeLightClientBootstrap(config: ChainForkConfig, targetFork: ForkName, bootstrap: LightClientBootstrap): LightClientBootstrap; export declare function upgradeLightClientHeader(config: ChainForkConfig, targetFork: ForkName, header: LightClientHeader): LightClientHeader; export declare function isValidLightClientHeader(config: ChainForkConfig, header: LightClientHeader): boolean; export declare function upgradeLightClientUpdate(config: ChainForkConfig, targetFork: ForkName, update: LightClientUpdate): LightClientUpdate; export declare function upgradeLightClientFinalityUpdate(config: ChainForkConfig, targetFork: ForkName, finalityUpdate: LightClientFinalityUpdate): LightClientFinalityUpdate; export declare function upgradeLightClientOptimisticUpdate(config: ChainForkConfig, targetFork: ForkName, optimisticUpdate: LightClientOptimisticUpdate): LightClientOptimisticUpdate; /** * Currently this upgradation is not required because all processing is done based on the * summary that the store generates and maintains. In case store needs to be saved to disk, * this could be required depending on the format the store is saved to the disk */ export declare function upgradeLightClientStore(config: ChainForkConfig, targetFork: ForkName, store: ILightClientStore): ILightClientStore; //# sourceMappingURL=utils.d.ts.map