Files
welshman/packages/util/Kinds.ts
T
2024-05-03 14:11:51 -07:00

86 lines
2.1 KiB
TypeScript

import {kinds} from 'nostr-tools'
export const isRegularKind = kinds.isRegularKind
export const isEphemeralKind = kinds.isEphemeralKind
export const isPlainReplaceableKind = kinds.isReplaceableKind
export const isParameterizedReplaceableKind = kinds.isParameterizedReplaceableKind
export const isReplaceableKind = (kind: number) =>
isPlainReplaceableKind(kind) || isParameterizedReplaceableKind(kind)
export enum Kind {
Profile = 0,
Note = 1,
Relay = 2,
DM = 4,
EventDeletion = 5,
Repost = 6,
Reaction = 7,
BadgeAward = 8,
GenericRepost = 16,
ChannelCreation = 40,
ChannelMetadata = 41,
ChannelMessage = 42,
ChannelHideMessage = 43,
ChannelMuteUser = 44,
OpenTimestamp = 1040,
GiftWrap = 1059,
FileMetadata = 1063,
LiveChatMessage = 1311,
Remix = 1808,
ProblemTracker = 1971,
Report = 1984,
Label = 1985,
CommunityPostApproval = 4550,
JobRequest = 5999,
JobResult = 6999,
JobFeedback = 7000,
ZapGoal = 9041,
ZapRequest = 9734,
ZapResponse = 9735,
Highlight = 9802,
UserListMutes = 10000,
UserListPins = 10001,
UserListRelays = 10002,
UserListBookmarks = 10003,
UserListCommunities = 10004,
UserListPublicChats = 10005,
UserListBlockedRelays = 10006,
UserListSearchRelays = 10007,
UserListInterests = 10015,
UserListEmojis = 10030,
LightningPubRpc = 21000,
ClientAuth = 22242,
NWCInfo = 13194,
NWCRequest = 23194,
NWCResponse = 23195,
NostrConnect = 24133,
HttpAuth = 27235,
ListFollows = 3,
ListPeople = 30000,
ListGeneric = 30001,
ListRelays = 30002,
ListBookmarks = 30003,
ListCurations = 30004,
ProfileBadges = 30008,
BadgeDefinition = 30009,
ListEmojis = 30030,
ListInterests = 30015,
LongFormArticle = 30023,
LongFormArticleDraft = 30024,
Application = 30078,
LiveEvent = 30311,
UserStatuses = 30315,
ClassifiedListing = 30402,
DraftClassifiedListing = 30403,
Audio = 31337,
Feed = 31890,
Calendar = 31924,
CalendarEventDate = 31922,
CalendarEventTime = 31923,
CalendarEventRsvp = 31925,
HandlerRecommendation = 31989,
HandlerInformation = 31990,
CommunityDefinition = 34550,
GroupDefinition = 35834,
}