UNPKG

@saberhq/snapshots

Version:

The TypeScript SDK for the Saber Voting Escrow Snapshot system.

34 lines 846 B
/** * Number of seconds in an era. */ export declare const SECONDS_PER_ERA: number; /** * Calculates the era that the given {@link Date} is in. * @param date * @returns */ export declare const calculateEra: (date: Date) => number; /** * Calculates the start date of a period. * @param era * @param period * @returns */ export declare const calculatePeriodStart: (era: number, period: number) => Date; /** * Calculates the start date of an era. * @param era * @returns */ export declare const calculateEraStart: (era: number) => Date; /** * Returns the eras included in a given period. * * This is useful for figuring out what histories must be fetched. * * @param start * @param end * @returns */ export declare const calculateErasForPeriod: (start: Date, end: Date) => readonly number[]; //# sourceMappingURL=math.d.ts.map