MCPcopy Index your code
hub / github.com/cameri/nostream / isEventIdValid

Function isEventIdValid

src/utils/event.ts:114–116  ·  view source on GitHub ↗
(event: Event)

Source from the content-addressed store, hash-verified

112}
113
114export const isEventIdValid = async (event: Event): Promise<boolean> => {
115 return event.id === (await getEventHash(event))
116}
117
118export const isEventSignatureValid = async (event: Event): Promise<boolean> => {
119 return secp256k1.schnorr.verify(event.sig, event.id, event.pubkey)

Callers 6

event.spec.tsFile · 0.90
importFromCandidatesMethod · 0.90
handleMessageMethod · 0.90
isEventValidMethod · 0.90
createMirrorMethod · 0.90

Calls 1

getEventHashFunction · 0.85

Tested by

no test coverage detected