Documentation
Primitives - Building Blocks
Posts

Posts

Overview

Posts on Orbis are the main way of submitting content to the network.
They can be used for short and long-form content.

You may attach IPFS-hosted media to posts.

The content of a post (media included!) can be encrypted using Lit which makes them perfect for keeping discussion private - in public. Only eligible users will be able to decrypt and read the content and rules can be based on your business logic, as defined by Lit.

Posts can reference other Posts, serving as comments.
They can also reply to other comments allowing for robust discussions.

They can be tagged for easier querying and grouping.
You are able to mention other users, triggering relevant notifications.

Posts can be a part of different and dynamic Contexts.
This helps users organize and scope content to relevant parts of their app or project.

Use case

Posts are built to be versatile, they should be thought of as a "payload carrier".
We decided we want a single and simple entity to be used for all content submissions.

  • messages with replies and threads (ie. Discord)
  • blog articles with attached media
  • comments with multi-level replies
  • forum and governance posts and replies

Properties

Schema

The stream ID of Post schema is kjzl6cwe1jw1498inegtpji0iqf0htspb0qqswlofjy0hak1s3u2pf19qql7oak.

You can check the latest version using Cerscan (opens in a new tab).

Format

{
    "body": "string", // required
    "title": "string",
    "media": [
        {
            "url": "ipfs://*", // required
            "title": "string",
            "gateway": "string"
        }
    ],
    "master": "string",
    "reply_to": "string",
    "context": "string",
    "mentions": [
        {
            "did": "string", // required
            "username": "string" // required
        }
    ],
    "tags": [
        {
            "slug": "string", // required
            "title": "string"
        }
    ],
    "encryptedBody": {
        "encryptedString": "string",
        "encryptedSymmetricKey": "string",
        "accessControlConditions": "string"
    },
    "sourceUrl": "string",
	"data": "object"
}

Parameter explanation:

  • body - content of the post being shared
  • title - title of the post (can be used for articles)
  • media - an array of media objects stored on IPFS
    • url - media URL must start with ipfs://
    • title - media's alt title
    • gateway - URL of the IPFS gateway where the media is stored
  • master - if the post is being shared as a comment of a post
  • reply_to - if the post shared is a reply to another comment in a thread
  • context - context in which the post is being shared. Can be a random string or a group / channel id
  • mentions - an array of mentions if this post is mentioning other users, the array items must contain:
    • did - DID of the user being mentioned
    • username - the current username of the user
  • tags - an array of tags that can be used to filter posts in queries:
    • slug - an identifier for the tag (used in queries)
    • title - title that can be displayed in the app for example
  • encryptedBody - Lit Encrypted data used to request decryption keys and decrypt content
  • data - can be used to attach some custom data to a post

SDK methods

Related concepts