Enum nostr_types::EventKind
source · #[repr(u32)]pub enum EventKind {
Show 101 variants
Metadata = 0,
TextNote = 1,
RecommendRelay = 2,
ContactList = 3,
EncryptedDirectMessage = 4,
EventDeletion = 5,
Repost = 6,
Reaction = 7,
BadgeAward = 8,
GroupChatMessage = 9,
GroupChatThreadedReply = 10,
GroupChatThread = 11,
GroupChatReply = 12,
Seal = 13,
DmChat = 14,
GenericRepost = 16,
ChannelCreation = 40,
ChannelMetadata = 41,
ChannelMessage = 42,
ChannelHideMessage = 43,
ChannelMuteUser = 44,
Bid = 1_021,
BidConfirmation = 1_022,
Timestamp = 1_040,
GiftWrap = 1_059,
FileMetadata = 1_063,
LiveChatMessage = 1_311,
Patches = 1_617,
GitIssue = 1_621,
GitReply = 1_622,
GitStatusOpen = 1_630,
GitStatusApplied = 1_631,
GitStatusClosed = 1_632,
GitStatusDraft = 1_633,
ProblemTracker = 1_971,
Reporting = 1_984,
Label = 1_985,
CommunityPost = 4_549,
CommunityPostApproval = 4_550,
JobFeedback = 7_000,
ZapGoal = 9_041,
ZapRequest = 9_734,
Zap = 9_735,
Highlights = 9_802,
MuteList = 10_000,
PinList = 10_001,
RelayList = 10_002,
BookmarkList = 10_003,
CommunityList = 10_004,
PublicChatsList = 10_005,
BlockedRelaysList = 10_006,
SearchRelaysList = 10_007,
UserGroups = 10_009,
InterestsList = 10_015,
UserEmojiList = 10_030,
DmRelayList = 10_050,
FileStorageServerList = 10_096,
WalletInfo = 13_194,
LightningPubRpc = 21_000,
Auth = 22_242,
WalletRequest = 23_194,
WalletResponse = 23_195,
NostrConnect = 24_133,
HttpAuth = 27_235,
FollowSets = 30_000,
GenericSets = 30_001,
RelaySets = 30_002,
BookmarkSets = 30_003,
CurationSets = 30_004,
ProfileBadges = 30_008,
BadgeDefinition = 30_009,
InterestSets = 30_015,
CreateUpdateStall = 30_017,
CreateUpdateProduct = 30_018,
MarketplaceUi = 30_019,
ProductSoldAuction = 30_020,
LongFormContent = 30_023,
DraftLongFormContent = 30_024,
EmojiSets = 30_030,
ReleaseArtifactSets = 30_063,
AppSpecificData = 30_078,
LiveEvent = 30_311,
UserStatus = 30_315,
ClassifiedListing = 30_402,
DraftClassifiedListing = 30_403,
RepositoryAnnouncement = 30_617,
WikiArticle = 30_818,
DateBasedCalendarEvent = 31_922,
TimeBasedCalendarEvent = 31_923,
Calendar = 31_924,
CalendarEventRsvp = 31_925,
HandlerRecommendation = 31_989,
HandlerInformation = 31_990,
CommunityDefinition = 34_550,
JobRequest(u32),
JobResult(u32),
GroupControl(u32),
Replaceable(u32),
Ephemeral(u32),
GroupMetadata(u32),
Other(u32),
}
Expand description
A kind of Event
Variants§
Metadata = 0
Event sets the metadata associated with a public key (NIP-01)
TextNote = 1
Event is a text note (NIP-01)
RecommendRelay = 2
Event contains a relay URL which the author recommends
ContactList = 3
Event contains tags which represent the authors contacts including the authors pet names for them (NIP-02)
EncryptedDirectMessage = 4
Event is an encrypted direct message (NIP-04)
EventDeletion = 5
Event is an authors request to delete previous events (NIP-09)
Repost = 6
Repost (NIP-18)
Reaction = 7
Event is a reaction to a TextNote
event (NIP-25)
BadgeAward = 8
Badge Award (NIP-58)
GroupChatMessage = 9
Group Chat Message (NIP-29)
GroupChatThreadedReply = 10
Group Chat Threaded Reply (NIP-29)
GroupChatThread = 11
Group Chat Thread (NIP-29)
GroupChatReply = 12
Group Chat Reply (NIP-29)
Seal = 13
Seal (NIP-59 PR 716)
DmChat = 14
Chat Message / DM (NIP-24 PR 686)
GenericRepost = 16
Generic Repost (NIP-18)
ChannelCreation = 40
Event creates a public channel (NIP-28)
ChannelMetadata = 41
Event sets metadata on a public channel (NIP-28)
ChannelMessage = 42
Event creates a message on a public channel (NIP-28)
ChannelHideMessage = 43
Event hides a message on a public channel (NIP-28)
ChannelMuteUser = 44
Event mutes a user on a public channel (NIP-28)
Bid = 1_021
Bid (NIP-15)
BidConfirmation = 1_022
Bid Confirmation (NIP-15)
Timestamp = 1_040
Timestamps
GiftWrap = 1_059
Gift Wrap (NIP-59 PR 716)
FileMetadata = 1_063
File Metadata (NIP-94)
LiveChatMessage = 1_311
Live Chat Message (NIP-53)
Patches = 1_617
Patches (NIP-34)
GitIssue = 1_621
Issue (NIP-34)
GitReply = 1_622
Replies (NIP-34)
GitStatusOpen = 1_630
Status Open (NIP-34)
GitStatusApplied = 1_631
Status Applied (NIP-34)
GitStatusClosed = 1_632
Status Closed (NIP-34)
GitStatusDraft = 1_633
Status Draft (NIP-34)
ProblemTracker = 1_971
Problem Tracker (nostrocket-1971)
Reporting = 1_984
Reporting (NIP-56)
Label = 1_985
Label (NIP-32)
CommunityPost = 4_549
Community (exclusive) Post (NIP-72 pr 753)
CommunityPostApproval = 4_550
Community Post Approval (NIP-72)
JobFeedback = 7_000
Job Feedback (NIP-90)
ZapGoal = 9_041
Zap Goal (NIP-75)
ZapRequest = 9_734
Zap Request
Zap = 9_735
Zap
Highlights = 9_802
Highlights (NIP-84)
MuteList = 10_000
Mute List (NIP-51)
PinList = 10_001
PinList (NIP-51)
RelayList = 10_002
Relays List (NIP-65)
BookmarkList = 10_003
Bookmarks List (NIP-51)
CommunityList = 10_004
Communities List (NIP-51)
PublicChatsList = 10_005
Public Chats List (NIP-51)
BlockedRelaysList = 10_006
Blocked Relays List (NIP-51)
SearchRelaysList = 10_007
Search Relays List (NIP-51)
UserGroups = 10_009
User Groups (NIP-51, NIP-29)
InterestsList = 10_015
Interests List (NIP-51)
UserEmojiList = 10_030
User Emoji List (NIP-51)
DmRelayList = 10_050
Relay list to receive DMs (NIP-17)
FileStorageServerList = 10_096
File storage server list (NIP-96)
WalletInfo = 13_194
Wallet Info (NIP-47)
LightningPubRpc = 21_000
Lightning Pub RPC (Lightning.Pub)
Auth = 22_242
Client Authentication (NIP-42)
WalletRequest = 23_194
Wallet Request (NIP-47)
WalletResponse = 23_195
Wallet Response (NIP-47)
NostrConnect = 24_133
Nostr Connect (NIP-46)
HttpAuth = 27_235
HTTP Auth (NIP-98)
FollowSets = 30_000
Categorized People List (NIP-51)
GenericSets = 30_001
Categorized Bookmark List (NIP-51)
RelaySets = 30_002
Relay Sets (NIP-51)
BookmarkSets = 30_003
Bookmark Sets (NIP-51)
CurationSets = 30_004
Curation Sets (NIP-51)
ProfileBadges = 30_008
Profile Badges (NIP-58)
BadgeDefinition = 30_009
Badge Definition (NIP-58)
InterestSets = 30_015
Interest Sets (NIP-51)
CreateUpdateStall = 30_017
Create or update a stall (NIP-15)
CreateUpdateProduct = 30_018
Create or update a product (NIP-15)
MarketplaceUi = 30_019
Marketplace UI/UX (NIP-15)
ProductSoldAuction = 30_020
Product sold as auction (NIP-15)
LongFormContent = 30_023
Long-form Content (NIP-23)
DraftLongFormContent = 30_024
Draft Long-form Content (NIP-23)
EmojiSets = 30_030
Emoji Sets (NIP-51)
ReleaseArtifactSets = 30_063
Release artifact sets (NIP-51)
AppSpecificData = 30_078
Application Specific Data, (NIP-78)
LiveEvent = 30_311
Live Event (NIP-53)
UserStatus = 30_315
User Status (NIP-315 PR 737)
ClassifiedListing = 30_402
Classified Listing (NIP-99)
DraftClassifiedListing = 30_403
Draft Classified Listing (NIP-99)
RepositoryAnnouncement = 30_617
Repository Announcement (NIP-34)
WikiArticle = 30_818
Wiki Article (NIP-54)
DateBasedCalendarEvent = 31_922
Date-Based Calendar Event (NIP-52)
TimeBasedCalendarEvent = 31_923
Time-Based Calendar Event (NIP-52)
Calendar = 31_924
Calendar (NIP-52)
CalendarEventRsvp = 31_925
Calendar Event RSVP (NIP-52)
HandlerRecommendation = 31_989
Handler Recommendation (NIP-89)
HandlerInformation = 31_990
Handler Information (NIP-89)
CommunityDefinition = 34_550
Community Definition (NIP-72)
JobRequest(u32)
Job Request (NIP-90) 5000-5999
JobResult(u32)
Job Result (NIP-90) 6000-6999
GroupControl(u32)
Group control events (NIP-29) 9000-9030
Replaceable(u32)
Relay-specific replaceable event
Ephemeral(u32)
Ephemeral event, sent to all clients with matching filters and should not be stored
GroupMetadata(u32)
Group Metadata events
Other(u32)
Something else?
Implementations§
source§impl EventKind
impl EventKind
sourcepub fn is_job_request(&self) -> bool
pub fn is_job_request(&self) -> bool
Is a job request kind
sourcepub fn is_job_result(&self) -> bool
pub fn is_job_result(&self) -> bool
Is a job result kind
sourcepub fn is_replaceable(&self) -> bool
pub fn is_replaceable(&self) -> bool
If this event kind is a replaceable event NOTE: this INCLUDES parameterized replaceable events
sourcepub fn is_ephemeral(&self) -> bool
pub fn is_ephemeral(&self) -> bool
If this event kind is ephemeral
sourcepub fn is_parameterized_replaceable(&self) -> bool
pub fn is_parameterized_replaceable(&self) -> bool
If this event kind is parameterized replaceable
If this event kind is feed related.
sourcepub fn is_feed_displayable(&self) -> bool
pub fn is_feed_displayable(&self) -> bool
If this event kind is feed displayable.
Is direct message related
If this event kind augments a feed related event
sourcepub fn contents_are_encrypted(&self) -> bool
pub fn contents_are_encrypted(&self) -> bool
If the contents are expected to be encrypted (or empty)
sourcepub fn iter() -> EventKindIterator ⓘ
pub fn iter() -> EventKindIterator ⓘ
This iterates through every well-known EventKind