MCPcopy Create free account
hub / github.com/cameri/nostream / getEventProofOfWork

Function getEventProofOfWork

src/utils/event.ts:252–254  ·  view source on GitHub ↗
(eventId: EventId)

Source from the content-addressed store, hash-verified

250}
251
252export const getEventProofOfWork = (eventId: EventId): number => {
253 return getLeadingZeroBits(Buffer.from(eventId, 'hex'))
254}
255
256export const getPubkeyProofOfWork = (pubkey: Pubkey): number => {
257 return getLeadingZeroBits(Buffer.from(pubkey, 'hex'))

Callers 3

mineEventForPowFunction · 0.90
canAcceptEventMethod · 0.90
canAcceptEventMethod · 0.90

Calls 1

getLeadingZeroBitsFunction · 0.90

Tested by

no test coverage detected