mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2026-10-05 14:38:23 +00:00
pure: document that verifyEvent caches its result
This commit is contained in:
@@ -55,5 +55,13 @@ const i: JS = new JS()
|
||||
export const generateSecretKey = i.generateSecretKey
|
||||
export const getPublicKey = i.getPublicKey
|
||||
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 * from './core.ts'
|
||||
|
||||
Reference in New Issue
Block a user