import { P2P } from '@shardeum-foundation/lib-types'; import { SignedObject } from '@shardeum-foundation/lib-types/build/src/p2p/P2PTypes'; /** TYPES */ export type ScheduledLostReport = { targetNode: Target; reason: string; timestamp: number; scheduledInCycle: number; requestId: string; }; export type ScheduledRemoveByApp = { target: Target; reason: string; timestamp: number; certificate: P2P.LostTypes.RemoveCertificate; }; export declare let isDown: {}; interface PingMessage { m: string; } export declare type SignedPingMessage = PingMessage & SignedObject; /** FUNCTIONS */ export declare function init(): void; export declare function reset(): void; export declare function getTxs(): P2P.LostTypes.Txs; export declare function validateRecordTypes(rec: P2P.LostTypes.Record): string; export declare function dropInvalidTxs(txs: P2P.LostTypes.Txs): P2P.LostTypes.Txs; export declare function updateRecord(txs: P2P.LostTypes.Txs, record: P2P.CycleCreatorTypes.CycleRecord, prev: P2P.CycleCreatorTypes.CycleRecord): void; export declare function parseRecord(record: P2P.CycleCreatorTypes.CycleRecord): P2P.CycleParserTypes.Change; export declare function sendRequests(): void; export declare function scheduleLostReport(target: P2P.NodeListTypes.Node, reason: string, requestId: string): void; export declare function setIsUpTs(nodeId: string): void; export declare function isNodeUpRecent(nodeId: string, maxAge: number): { upRecent: boolean; state: string; age: number; }; export declare function isNodeDown(nodeId: string): { down: boolean; state: string; }; export declare function isNodeLost(nodeId: string): boolean; export declare function removeNodeWithCertificiate(certificate: P2P.LostTypes.RemoveCertificate): void; export {};