Schema
Every activity performed by a user can be described as a message with the follow schema:
Message
id
STRING[255]
Unique message ID based on the content hash of the message. See “Message ID” section.
type
STRING[15]
Main type describing the primary purpose of the message
subtype
STRING[15]
Sub type describing the secondary purpose of the message
creator
STRING[65535]
Domain names of the creator (e.g. bob.eth, alice.crypto, etc)
createdAt
UINT64
Unix timestamp in seconds of when the message was created
payload
OBJECT
Schema containing data of a message depends on type
Message ID
We should hex-encode the message based on the following pseudo code in order to create a deterministic SHA256 hash.
A message can be used to described user activities such as a post, comment, likes, and follow.
Profile Message
The PROFILE type is used to support adding profile data to a name.
value
STRING[255]
value of the profile data
key
STRING[255]
Custom key of profile data
value
STRING[16777215]
Custom value of profile data
Post Message
The POST type is used to support posts (similar to tweets, status update, etc), comments, and reposts.
topic
STRING[255]
Topic of the post for ease of discovery. (e.g. sports, news)
title
STRING[255]
Plain text containing the title of the Post
content
STRING[16777215]
Markdown text containing content of the Post
attachment
STRING[255]
url or file message hash being attached to the message
reference
STRING[255]
post being reference
File Message
The File type is used to support adding file to a name
name
STRING[255]
File name
mimeType
STRING[255]
Mime types of the file
data
STRING[16777215]
magnetURI for the torrent
name
STRING[255]
File name
mimeType
STRING[255]
Mime types of the file
data
STRING[16777215]
ipfs hash for the file
Moderation Message
The MODERATION type is used to support moderation activities, such as a LIKE, UPVOTE, DOWNVOTE, BAN, etc.
STRING[255]
hash of the message receiving the moderation
Connection Message
The CONNECTION type is used to support follows and other types of links between names.
name
STRING[65535]
Domain names of the one being followed (e.g. bob.eth, alice.crypto, etc)
Last updated