/// import { CommitHandler, Transaction } from "../crypto/index.js"; import { EventListener } from "../kernel/index.js"; import { EventCallback, Subprocess } from "../kernel/ipc.js"; import { StoreChange } from "../state/index.js"; import { KeyValuePair } from "../types/index.js"; export interface WorkerFlags extends KeyValuePair { } export interface WorkerScriptHandler { boot(flags: WorkerFlags): Promise; getTransactions(): Promise; importSnapshot(height: number): Promise; commit(data: { block: string; failedTransactions: string[]; store: StoreChange; }): Promise; setPeer(ip: string): Promise; forgetPeer(ip: string): Promise; start(): Promise; reloadWebhooks(): Promise; } export type WorkerFactory = () => Worker; export type WorkerSubprocess = Subprocess; export type WorkerSubprocessFactory = () => WorkerSubprocess; export interface Worker extends Omit, CommitHandler, EventListener { getQueueSize(): number; kill(): Promise; setFailedTransactions(transactions: Transaction[]): void; getTransactionBytes(): Promise; registerEventHandler(event: string, callback: EventCallback): void; } //# sourceMappingURL=worker.d.ts.map