mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-08 16:14:22 +01:00
Add verifySignatureWorker
This commit is contained in:
13
src/workers/verify.ts
Normal file
13
src/workers/verify.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Comlink, type Event } from '@/deps.ts';
|
||||
|
||||
import type { VerifyWorker } from './verify.worker.ts';
|
||||
|
||||
const worker = Comlink.wrap<typeof VerifyWorker>(
|
||||
new Worker(new URL('./verify.worker.ts', import.meta.url), { type: 'module' }),
|
||||
);
|
||||
|
||||
function verifySignatureWorker<K extends number>(event: Event<K>): Promise<boolean> {
|
||||
return worker.verifySignature(event);
|
||||
}
|
||||
|
||||
export { verifySignatureWorker };
|
||||
Reference in New Issue
Block a user