ditto/src/workers/verify.worker.ts
2024-06-23 11:59:08 -05:00

14 lines
352 B
TypeScript

import { NostrEvent } from '@nostrify/nostrify';
import * as Comlink from 'comlink';
import { VerifiedEvent, verifyEvent } from 'nostr-tools';
import '@/nostr-wasm.ts';
import '@/sentry.ts';
export const VerifyWorker = {
verifyEvent(event: NostrEvent): event is VerifiedEvent {
return verifyEvent(event);
},
};
Comlink.expose(VerifyWorker);