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

Function serializeEvent

src/utils/event.ts:15–22  ·  view source on GitHub ↗
(event: UnidentifiedEvent)

Source from the content-addressed store, hash-verified

13import { WebSocketServerAdapterEvent } from '../constants/adapter'
14
15export const serializeEvent = (event: UnidentifiedEvent): CanonicalEvent => [
16 0,
17 event.pubkey,
18 event.created_at,
19 event.kind,
20 event.tags,
21 event.content,
22]
23
24export const toNostrEvent: (event: DBEvent) => Event = applySpec({
25 id: pipe(prop('event_id') as () => Buffer, fromBuffer),

Callers 3

createEventFunction · 0.90
event.spec.tsFile · 0.90
getEventHashFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected