turn kinds enum into simple constants in kinds.ts, bring more kind numbers from the nips readme.

This commit is contained in:
fiatjaf
2023-12-16 09:27:59 -03:00
parent 93538d2373
commit 1939c46eaa
2 changed files with 75 additions and 46 deletions

View File

@@ -8,37 +8,6 @@ import { utf8Encoder } from './utils.ts'
/** Designates a verified event signature. */
export const verifiedSymbol = Symbol('verified')
/** @deprecated Use numbers instead. */
/* eslint-disable no-unused-vars */
export enum Kind {
Metadata = 0,
Text = 1,
RecommendRelay = 2,
Contacts = 3,
EncryptedDirectMessage = 4,
EventDeletion = 5,
Repost = 6,
Reaction = 7,
BadgeAward = 8,
ChannelCreation = 40,
ChannelMetadata = 41,
ChannelMessage = 42,
ChannelHideMessage = 43,
ChannelMuteUser = 44,
Blank = 255,
Report = 1984,
ZapRequest = 9734,
Zap = 9735,
RelayList = 10002,
ClientAuth = 22242,
NwcRequest = 23194,
HttpAuth = 27235,
ProfileBadge = 30008,
BadgeDefinition = 30009,
Article = 30023,
FileMetadata = 1063,
}
export interface Event<K extends number = number> {
kind: K
tags: string[][]