TESTNET | Running on Dash Platform Testnet. Data may be reset.
Dash Platform data contract for the Yappr social media platform
{
"$format_version": "0",
"$schema": "https://schema.dash.org/dpp-0-4-0/meta/data-contract",
"version": 1,
"ownerId": "{{ownerId}}",
"documents": {
"profile": {
"type": "object",
"description": "User profile information",
"indices": [
{
"name": "owner",
"properties": [
{
"$ownerId": "asc"
}
],
"unique": true
},
{
"name": "createdAt",
"properties": [
{
"$createdAt": "asc"
}
]
}
],
"properties": {
"displayName": {
"type": "string",
"description": "Display name shown on profile",
"minLength": 1,
"maxLength": 50,
"position": 0
},
"bio": {
"type": "string",
"description": "User biography",
"maxLength": 160,
"position": 1
},
"avatarId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "Reference to the user's avatar document",
"position": 2
},
"bannerUrl": {
"type": "string",
"description": "URL to profile banner image",
"maxLength": 512,
"pattern": "^https?://.+$",
"position": 3
},
"website": {
"type": "string",
"description": "User's website",
"maxLength": 100,
"pattern": "^https?://.+$",
"position": 4
},
"location": {
"type": "string",
"description": "User location",
"maxLength": 50,
"position": 5
}
},
"required": [
"$createdAt",
"displayName"
],
"additionalProperties": false
},
"avatar": {
"type": "object",
"description": "User avatar customization data",
"indices": [
{
"name": "owner",
"properties": [
{
"$ownerId": "asc"
}
],
"unique": true
},
{
"name": "updatedAt",
"properties": [
{
"$updatedAt": "asc"
}
]
}
],
"properties": {
"version": {
"type": "integer",
"description": "Avatar format version",
"minimum": 1,
"maximum": 10,
"position": 0
},
"data": {
"type": "string",
"description": "Encoded avatar feature data",
"minLength": 16,
"maxLength": 128,
"position": 1
},
"style": {
"type": "string",
"enum": [
"realistic",
"cartoon",
"anime",
"pixel"
],
"description": "Rendering style for the avatar",
"position": 2
}
},
"required": [
"$updatedAt",
"version",
"data"
],
"additionalProperties": false
},
"post": {
"type": "object",
"description": "A post/tweet in the social network",
"indices": [
{
"name": "ownerAndTime",
"properties": [
{
"$ownerId": "asc"
},
{
"$createdAt": "asc"
}
]
},
{
"name": "timeline",
"properties": [
{
"$createdAt": "asc"
}
]
},
{
"name": "replyToPost",
"properties": [
{
"replyToPostId": "asc"
},
{
"$createdAt": "asc"
}
]
}
],
"properties": {
"content": {
"type": "string",
"description": "Post content",
"minLength": 1,
"maxLength": 500,
"position": 0
},
"mediaUrl": {
"type": "string",
"description": "URL to media file (temporary field - will support multiple media in future)",
"maxLength": 512,
"pattern": "^https?://.+$",
"position": 1
},
"replyToPostId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "ID of post this is replying to",
"position": 2
},
"quotedPostId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "ID of quoted post",
"position": 3
},
"firstMentionId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "First mentioned user ID (temporary field - will support multiple mentions in future)",
"position": 4
},
"primaryHashtag": {
"type": "string",
"description": "Primary hashtag for the post (temporary field - will support multiple hashtags in future)",
"pattern": "^[a-zA-Z0-9_]{1,100}$",
"maxLength": 100,
"position": 5
},
"language": {
"type": "string",
"description": "Language code of the post",
"pattern": "^[a-z]{2}$",
"maxLength": 2,
"position": 6
},
"sensitive": {
"type": "boolean",
"description": "Whether post contains sensitive content",
"position": 7
}
},
"required": [
"$createdAt",
"content"
],
"additionalProperties": false
},
"like": {
"type": "object",
"description": "A like on a post",
"mutable": false,
"indices": [
{
"name": "postAndOwner",
"properties": [
{
"postId": "asc"
},
{
"$ownerId": "asc"
}
],
"unique": true
},
{
"name": "ownerLikes",
"properties": [
{
"$ownerId": "asc"
},
{
"$createdAt": "asc"
}
]
},
{
"name": "postLikes",
"properties": [
{
"postId": "asc"
},
{
"$createdAt": "asc"
}
]
}
],
"properties": {
"postId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "ID of the liked post",
"position": 0
}
},
"required": [
"$createdAt",
"postId"
],
"additionalProperties": false
},
"repost": {
"type": "object",
"description": "A repost/retweet of a post",
"mutable": false,
"indices": [
{
"name": "postAndOwner",
"properties": [
{
"postId": "asc"
},
{
"$ownerId": "asc"
}
],
"unique": true
},
{
"name": "ownerReposts",
"properties": [
{
"$ownerId": "asc"
},
{
"$createdAt": "asc"
}
]
},
{
"name": "postReposts",
"properties": [
{
"postId": "asc"
},
{
"$createdAt": "asc"
}
]
}
],
"properties": {
"postId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "ID of the reposted post",
"position": 0
}
},
"required": [
"$createdAt",
"postId"
],
"additionalProperties": false
},
"follow": {
"type": "object",
"description": "A follow relationship between users",
"mutable": false,
"indices": [
{
"name": "ownerAndFollowing",
"properties": [
{
"$ownerId": "asc"
},
{
"followingId": "asc"
}
],
"unique": true
},
{
"name": "following",
"properties": [
{
"$ownerId": "asc"
},
{
"$createdAt": "asc"
}
]
},
{
"name": "followers",
"properties": [
{
"followingId": "asc"
},
{
"$createdAt": "asc"
}
]
}
],
"properties": {
"followingId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "Identity ID of the user being followed",
"position": 0
}
},
"required": [
"$createdAt",
"followingId"
],
"additionalProperties": false
},
"bookmark": {
"type": "object",
"description": "A bookmarked post",
"mutable": false,
"indices": [
{
"name": "ownerAndPost",
"properties": [
{
"$ownerId": "asc"
},
{
"postId": "asc"
}
],
"unique": true
},
{
"name": "ownerBookmarks",
"properties": [
{
"$ownerId": "asc"
},
{
"$createdAt": "asc"
}
]
}
],
"properties": {
"postId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "ID of the bookmarked post",
"position": 0
}
},
"required": [
"$createdAt",
"postId"
],
"additionalProperties": false
},
"list": {
"type": "object",
"description": "A user-created list",
"indices": [
{
"name": "ownerLists",
"properties": [
{
"$ownerId": "asc"
},
{
"$createdAt": "asc"
}
]
}
],
"properties": {
"name": {
"type": "string",
"description": "Name of the list",
"minLength": 1,
"maxLength": 50,
"position": 0
},
"description": {
"type": "string",
"description": "Description of the list",
"maxLength": 160,
"position": 1
},
"private": {
"type": "boolean",
"description": "Whether the list is private",
"position": 2
}
},
"required": [
"$createdAt",
"name"
],
"additionalProperties": false
},
"listMember": {
"type": "object",
"description": "A member of a list",
"mutable": false,
"indices": [
{
"name": "listAndMember",
"properties": [
{
"listId": "asc"
},
{
"memberId": "asc"
}
],
"unique": true
},
{
"name": "listMembers",
"properties": [
{
"listId": "asc"
},
{
"$createdAt": "asc"
}
]
}
],
"properties": {
"listId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "ID of the list",
"position": 0
},
"memberId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "Identity ID of the list member",
"position": 1
}
},
"required": [
"$createdAt",
"listId",
"memberId"
],
"additionalProperties": false
},
"block": {
"type": "object",
"description": "A block relationship",
"mutable": false,
"indices": [
{
"name": "ownerAndBlocked",
"properties": [
{
"$ownerId": "asc"
},
{
"blockedId": "asc"
}
],
"unique": true
},
{
"name": "ownerBlocks",
"properties": [
{
"$ownerId": "asc"
},
{
"$createdAt": "asc"
}
]
}
],
"properties": {
"blockedId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "Identity ID of the blocked user",
"position": 0
}
},
"required": [
"$createdAt",
"blockedId"
],
"additionalProperties": false
},
"mute": {
"type": "object",
"description": "A mute relationship",
"mutable": false,
"indices": [
{
"name": "ownerAndMuted",
"properties": [
{
"$ownerId": "asc"
},
{
"mutedId": "asc"
}
],
"unique": true
},
{
"name": "ownerMutes",
"properties": [
{
"$ownerId": "asc"
},
{
"$createdAt": "asc"
}
]
}
],
"properties": {
"mutedId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "Identity ID of the muted user",
"position": 0
},
"untilTimestamp": {
"type": "integer",
"description": "Unix timestamp when mute expires (optional)",
"minimum": 0,
"position": 1
}
},
"required": [
"$createdAt",
"mutedId"
],
"additionalProperties": false
},
"directMessage": {
"type": "object",
"description": "A direct message between users",
"indices": [
{
"name": "conversation",
"properties": [
{
"conversationId": "asc"
},
{
"$createdAt": "asc"
}
]
},
{
"name": "senderMessages",
"properties": [
{
"$ownerId": "asc"
},
{
"$createdAt": "asc"
}
]
}
],
"properties": {
"recipientId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "Identity ID of the recipient",
"position": 0
},
"conversationId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "Unique conversation ID",
"position": 1
},
"encryptedContent": {
"type": "string",
"description": "Encrypted message content",
"maxLength": 2048,
"position": 2
},
"read": {
"type": "boolean",
"description": "Whether the message has been read",
"position": 3
}
},
"required": [
"$createdAt",
"recipientId",
"conversationId",
"encryptedContent"
],
"additionalProperties": false
},
"notification": {
"type": "object",
"description": "A notification for a user",
"indices": [
{
"name": "ownerNotifications",
"properties": [
{
"$ownerId": "asc"
},
{
"$createdAt": "asc"
}
]
},
{
"name": "unreadNotifications",
"properties": [
{
"$ownerId": "asc"
},
{
"read": "asc"
},
{
"$createdAt": "asc"
}
]
}
],
"properties": {
"type": {
"type": "string",
"enum": [
"like",
"repost",
"follow",
"reply",
"mention",
"quote"
],
"description": "Type of notification",
"position": 0
},
"fromUserId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "Identity ID of the user who triggered the notification",
"position": 1
},
"postId": {
"type": "array",
"byteArray": true,
"minItems": 32,
"maxItems": 32,
"contentMediaType": "application/x.dash.dpp.identifier",
"description": "Related post ID (if applicable)",
"position": 2
},
"read": {
"type": "boolean",
"description": "Whether the notification has been read",
"position": 3
}
},
"required": [
"$createdAt",
"type",
"fromUserId"
],
"additionalProperties": false
}
}
}ownerId field with your Dash identity ID