UNPKG

@test-org122/hypernet-core

Version:

Hypernet Core. Represents the SDK for running the Hypernet Protocol.

23 lines 1.25 kB
/// <reference types="node" /> import { IContextProvider } from "@interfaces/utilities"; import { ControlClaim, ResultAsync } from "@interfaces/objects"; import { IControlService } from "@interfaces/business"; import { BlockchainUnavailableError, CoreUninitializedError, LogicalError, ThreeBoxError } from "@interfaces/objects/errors"; import { IMessagingRepository } from "@interfaces/data"; export declare class ControlService implements IControlService { protected contextProvider: IContextProvider; protected messagingRepo: IMessagingRepository; protected claimPeriod: number; protected timeout: NodeJS.Timeout | null; protected lastControlClaim: ControlClaim | null; protected checkControlInterval: NodeJS.Timeout | null; constructor(contextProvider: IContextProvider, messagingRepo: IMessagingRepository); claimControl(): ResultAsync<void, CoreUninitializedError | BlockchainUnavailableError | ThreeBoxError | LogicalError>; /** * Processes an incoming control claim. Basically, if we get one, * SHUT DOWN EVERYTHING * @param controlClaim */ processControlClaim(controlClaim: ControlClaim): ResultAsync<void, CoreUninitializedError>; } //# sourceMappingURL=ControlService.d.ts.map