flotilla/fdroid/crypto/nostr/index.js
2026-09-21 10:53:27 -07:00

10 lines
287 B
JavaScript

import {verifyEvent} from "nostr-tools/pure"
// Welshman's optional accelerator expects verification to throw on invalid events.
export const initNostrWasm = async () => ({
verifyEvent(event) {
if (!verifyEvent(event)) {
throw new Error("Invalid Nostr event")
}
},
})