import { P2P } from '@shardeum-foundation/lib-types'; import * as Active from './Active'; import * as Apoptosis from './Apoptosis'; import * as Archivers from './Archivers'; import * as CycleAutoScale from './CycleAutoScale'; import * as Join from './Join'; import * as Lost from './Lost'; import * as Refresh from './Refresh'; import * as Rotation from './Rotation'; import * as SafetyMode from './SafetyMode'; import * as Modes from './Modes'; import * as ServiceQueue from './ServiceQueue'; import * as LostArchivers from './LostArchivers'; type submoduleTypes = typeof Archivers | typeof Join | typeof Active | typeof Rotation | typeof Refresh | typeof Apoptosis | typeof Lost | typeof SafetyMode | typeof Modes | typeof CycleAutoScale | typeof LostArchivers | typeof ServiceQueue; export declare let hasAlreadyEnteredProcessing: boolean; export declare let submodules: submoduleTypes[]; export declare let currentQuarter: number; export declare let currentCycle: number; export declare let currentStart: number; export declare let nextQ1Start: number; export declare let q1SendRequests: boolean; export declare let scaleFactor: number; export declare let scaleFactorSyncBoost: number; export declare let netConfig: any; /** CONTROL FUNCTIONS */ export declare function init(): void; /** * Entrypoint for cycle record creation. Sets things up then kicks off the * scheduler (cycleCreator) to start scheduling the callbacks for cycle record * creation. */ export declare function startCycles(): Promise; /** HELPER FUNCTIONS */ export declare function makeRecordZero(): P2P.CycleCreatorTypes.CycleRecord; export declare function makeCycleMarker(record: P2P.CycleCreatorTypes.CycleRecord): string; /** * Returns the timestamp of each quarter and the timestamp of the end of the * cycle record AFTER the given cycle record. * * @param record CycleRecord */ export declare function calcIncomingTimes(record: P2P.CycleCreatorTypes.CycleRecord): { quarterDuration: number; startQ1: number; startQ2: number; startQ3: number; startQ4: number; end: number; }; /** * Schedules a callback to run at a certain time. It will run the callback even * if its time has passed, as long as it has not gone past runEvenIfLateBy ms. * * @param callback * @param time * @param opts * @param args */ export declare function schedule(callback: (...args: U) => T | Promise, time: number, { runEvenIfLateBy }?: { runEvenIfLateBy?: number; }, ...args: U): Promise; export declare function shutdown(): void; export declare function getBestCycleCerts(counter: number): P2P.CycleCreatorTypes.CycleCert[]; export {};