import { Querable } from "../../../lib/common-libs/querable"; /********* * * PoW worker * ---------- * * Its model is super simple: we ask him to find a proof, and we can wait for it. * Eventually, we can tell him to cancel his proof, which makes it answer `null` as proof value. * * The worker also provides two properties: * * - `worker.online`: a promise which is resolved when the worker gets « online » for the first time * - `worker.exit`: a promise which is resolved when the worker exits (which occurs when the worker is being closed or killed) * ********/ export declare class PowWorker { private nodejsWorker; private onPowMessage; private onlineHandler; private exitHandler; private onlinePromise; private onlineResolver; private exitPromise; private exitResolver; private proofPromise; private proofResolver; private messageHandler; constructor(nodejsWorker: any, onPowMessage: (message: any) => void, onlineHandler: () => void, exitHandler: (code: any, signal: any) => void); get online(): Promise; get exited(): Promise; get pid(): any; askProof(commandMessage: { uuid: string; command: string; value: any; }): Querable<{ message: { answer: any; }; } | null>; sendConf(confMessage: { rootPath: string; command: string; value: any; }): void; sendCancel(): void; kill(): void; }