import { CredentialHolder, Signer } from '../signer.js'; import { createTx } from './rpc.js'; export interface WorkerManager { tx: ReturnType; registerSignReceiver: (signFn: Signer['sign']) => number; registerCredentialHolderReceiver: (signFn: CredentialHolder['sign']) => number; terminate: () => void; } export interface CreateWorkerManagerConfig { wasm: WebAssembly.Module; workerSrc?: URL; } /** * Validates a worker source URL before it is loaded into a Worker. The value * must be a structurally valid URL served over https, since arbitrary or * insecure sources would let untrusted code run in the worker context. * * @param workerSrc - the worker source URL to validate * @returns the normalized URL string, safe to pass to `new Worker` * @throws if the value is not a valid URL or does not use https */ export declare function validateWorkerSrc(workerSrc: URL): string; /** * Creates a new web worker and performs initialization steps: * - Compile WASM * * @param config - configuration object * @returns Facade providing convenient control over worker functions */ export declare function createWorkerManager(config: CreateWorkerManagerConfig): Promise; //# sourceMappingURL=workerManager.d.ts.map