import { LightClientUpdate, Slot } from "@lodestar/types"; /** * Wrapper type for `isBetterUpdate()` so we can apply its logic without requiring the full LightClientUpdate type. */ export type LightClientUpdateSummary = { activeParticipants: number; attestedHeaderSlot: Slot; signatureSlot: Slot; finalizedHeaderSlot: Slot; /** `if update.next_sync_committee_branch != [Bytes32() for _ in range(floorlog2(NEXT_SYNC_COMMITTEE_INDEX))]` */ isSyncCommitteeUpdate: boolean; /** `if update.finality_branch != [Bytes32() for _ in range(floorlog2(FINALIZED_ROOT_INDEX))]` */ isFinalityUpdate: boolean; }; /** * Returns the update with more bits. On ties, prevUpdate is the better * * https://github.com/ethereum/consensus-specs/blob/be3c774069e16e89145660be511c1b183056017e/specs/altair/light-client/sync-protocol.md#is_better_update */ export declare function isBetterUpdate(newUpdate: LightClientUpdateSummary, oldUpdate: LightClientUpdateSummary): boolean; export declare function isSafeLightClientUpdate(update: LightClientUpdateSummary): boolean; export declare function toLightClientUpdateSummary(update: LightClientUpdate): LightClientUpdateSummary; //# sourceMappingURL=isBetterUpdate.d.ts.map