flotilla/fdroid/crypto/nostr/index.js

11 lines
287 B
JavaScript
Raw Normal View History

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