import { MessagePort } from 'node:worker_threads';
import { DbServer } from '../index.js';
export declare abstract class DbWorker {
    constructor(address: BigInt, db: DbServer, onExit: (code: number) => void, workerName: string);
    protected db: DbServer;
    protected channel: MessagePort;
    private worker;
    protected resolvers: ((x: any) => any)[];
    readyPromise: Promise<true>;
    terminate(): Promise<void>;
    abstract handleMsg(buf: any): void;
    protected callback: (resolve: (x: any) => any) => void;
    /**
     * Send msg to the worker thread and return a promise to the response.
     */
    protected call(msg: any): Promise<Uint8Array>;
    updateCtx(address: BigInt): Promise<void>;
}
