From 613a8438388f28334827814bb3a56b7cd0ef7a17 Mon Sep 17 00:00:00 2001 From: adamritter <58403584+adamritter@users.noreply.github.com> Date: Fri, 23 Dec 2022 19:38:59 +0000 Subject: [PATCH] Add Kind enum for easier client development (#61) --- event.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/event.ts b/event.ts index bb9ae63..0879b16 100644 --- a/event.ts +++ b/event.ts @@ -3,10 +3,27 @@ import {sha256} from '@noble/hashes/sha256' import {utf8Encoder} from './utils' + +/* eslint-disable no-unused-vars */ +export enum Kind { + Metadata = 0, + Text = 1, + RecommendRelay = 2, + Contacts = 3, + EncryptedDirectMessage = 4, + EventDeletion = 5, + Reaction = 7, + ChannelCreation = 40, + ChannelMetadata = 41, + ChannelMessage = 42, + ChannelHideMessage = 43, + ChannelMuteUser = 44, +} + export type Event = { id?: string sig?: string - kind: number + kind: Kind tags: string[][] pubkey: string content: string