Add PowWorker to mine Nostr events off the main thread
This commit is contained in:
9
src/workers.ts
Normal file
9
src/workers.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import * as Comlink from 'comlink';
|
||||
|
||||
import type { PowWorker } from './workers/pow.worker';
|
||||
|
||||
const powWorker = Comlink.wrap<typeof PowWorker>(
|
||||
new Worker(new URL('./workers/pow.worker.ts', import.meta.url), { type: 'module' }),
|
||||
);
|
||||
|
||||
export { powWorker };
|
||||
Reference in New Issue
Block a user