Module: Nostr::EventKind
- Defined in:
- lib/nostr/event_kind.rb
Overview
Defines the event kinds that can be emitted by clients.
Constant Summary collapse
- SET_METADATA =
The content is set to a stringified JSON object {name: <username>, about: <string>, picture: <url, string>} describing the user who created the event. A relay may delete past set_metadata events once it gets a new one for the same pubkey.
0
- TEXT_NOTE =
The content is set to the text content of a note (anything the user wants to say). Non-plaintext notes should instead use kind 1000-10000 as described in NIP-16.
1
- RECOMMEND_SERVER =
Deprecated.
This event kind was removed in github.com/nostr-protocol/nips/pull/703/files#diff-39307f1617417657ee9874be314f13aabdc74401b124d0afe8217f2919c9c7d8L105
The content is set to the URL (e.g., wss://somerelay.com) of a relay the event creator wants to recommend to its followers.
2
- CONTACT_LIST =
A special event with kind 3, meaning “contact list” is defined as having a list of p tags, one for each of the followed/known profiles one is following.
3
- ENCRYPTED_DIRECT_MESSAGE =
A special event with kind 4, meaning “encrypted direct message”. An event of this kind has its
content
equal to the base64-encoded, aes-256-cbc encrypted string of anything a user wants to write, encrypted using a shared cipher generated by combining the recipient’s public-key with the sender’s private-key. 4