ditto/packages/utils/purify.ts
2025-02-17 15:32:18 -06:00

14 lines
363 B
TypeScript

import { NostrEvent } from '@nostrify/nostrify';
/** Return a normalized event without any non-standard keys. */
export function purifyEvent(event: NostrEvent): NostrEvent {
return {
id: event.id,
pubkey: event.pubkey,
kind: event.kind,
content: event.content,
tags: event.tags,
sig: event.sig,
created_at: event.created_at,
};
}