mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
Add Kind enum for easier client development (#61)
This commit is contained in:
19
event.ts
19
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
|
||||
|
||||
Reference in New Issue
Block a user