pure: document that verifyEvent caches its result

This commit is contained in:
Seydi Charyyev
2026-09-30 11:53:11 -03:00
committed by GitHub
parent e59909038e
commit cb8d22d4c9
+8
View File
@@ -55,5 +55,13 @@ const i: JS = new JS()
export const generateSecretKey = i.generateSecretKey export const generateSecretKey = i.generateSecretKey
export const getPublicKey = i.getPublicKey export const getPublicKey = i.getPublicKey
export const finalizeEvent = i.finalizeEvent export const finalizeEvent = i.finalizeEvent
/**
* Checks the event `id` and `sig`.
*
* The result is cached on the event object, and `finalizeEvent()` marks the event as verified.
* After that, `verifyEvent()` returns the cached result and does not see changes made to the event.
* A `{ ...event }` copy keeps the cached result too.
* To check an event again, pass a new object with only the event fields.
*/
export const verifyEvent = i.verifyEvent export const verifyEvent = i.verifyEvent
export * from './core.ts' export * from './core.ts'