Add Kind enum for easier client development (#61)

This commit is contained in:
adamritter
2022-12-23 19:38:59 +00:00
committed by GitHub
parent 74a0d5454a
commit 613a843838

View File

@@ -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