Version: 1.0.0 Last Updated: 2026-02-14
Author: @cloudsay | Website: microblog.bitspv.com | Published at: Gist
This document defines the protocol specification for Metanet Microblog, a decentralized social media protocol built on the BSV blockchain. It enables developers to build diverse applications on a shared, on-chain data layer where users retain full data ownership. The protocol leverages a Key-Value store model for all data interactions.
- Storage Layer: The protocol MUST use the
GlobalKVStorecomponent from the@bsv/sdklibrary to store data on the BSV blockchain. - Data Model: All data is stored in a Key-Value model, where the key is a unique string and the value is a JSON-encoded string.
- Identity: The identity of a user (e.g., author, liker, tipper) is the public key that controls the UTXO creating the KVStore record.
To ensure data isolation between different data types and applications, all KVStore entries MUST use a PROTOCOL_ID. A PROTOCOL_ID is a tuple of [number, string].
For development and testing, it is RECOMMENDED to prefix the string identifier with DEV (e.g., [0, 'DEV Microblog Posts v1']) to isolate test data from production data.
The official PROTOCOL_IDs are:
| Data Type | PROTOCOL_ID |
Description |
|---|---|---|
| Posts | [0, 'Microblog Posts v1'] |
For all posts, including original posts and reposts. |
| Likes | [0, 'Microblog Likes v1'] |
For "like" actions on posts. |
| Comments | [0, 'Microblog Comments v1'] |
For comments on posts. |
| Tips | [0, 'Microblog Tips v1'] |
For tipping content creators. |
| Chats | [0, 'Microblog Chat v1'] |
For direct chat messages. |
Note: The Reposts protocol mentioned in older versions is now deprecated. Reposts are a special type of Post and use the Microblog Posts v1 protocol.
This section details the specific structure for each data type's Key, Value, and Tags.
A "Post" is the fundamental content type. Reposts are considered a special type of Post.
-
Key Format:
post_{uuid}uuid: A unique, randomly generated Base62 string. This identifier MUST be stable for the lifetime of the post.
-
Value Format (JSON String): A JSON object containing the post's data.
Base Fields (for all posts):
Field Type Required Description uuidstringMUST The same unique identifier used in the key. contentstringMUST The main content of the post. timestampnumberMUST A UTC Unix Timestamp in seconds indicating when the post was created. formatstringOPTIONAL The format of the content. Can be"text"or"markdown". If omitted, clients SHOULD interpret it as"text".Repost-Specific Fields: For reposts, the following fields MUST be added to the base structure.
Field Type Required Description isRepostbooleanMUST MUST be true.originalAuthorPublicKeystringMUST The public key of the original post's author. originalUuidstringMUST The uuidof the original post being reposted. -
Tags: Tags are used for efficient querying and establishing relationships.
Tag Format Required Description post_id_{uuid}MUST The primary identifier for the post. uuidis the post's own unique ID.repost_of_{originalPost.key}If Repost Links to the original post. originalPost.keyis the full key of the original post (e.g.,post_...).reposted_by_{reposterPublicKey}If Repost Identifies the reposter. reposterPublicKeyis the public key of the user creating the repost.
A "Like" indicates a user's appreciation for a post.
-
Key Format:
like_{post.uuid}- The key is composed of the prefix
like_and theuuidof the post being liked. The identity of the liker is derived from the UTXO controller, so it is not needed in the key to ensure uniqueness for one like per person per post.
- The key is composed of the prefix
-
Value Format (JSON String):
Field Type Required Description likedAtnumberMUST A UTC Unix Timestamp in seconds indicating when the like was created. -
Tags:
Tag Format Required Description post_id_{post.uuid}MUST Links the like to the corresponding post, enabling efficient querying of all likes for that post.
A "Comment" is a textual response to a post.
-
Key Format:
comment_{post.uuid}_{comment_uuid}post.uuid: Theuuidof the post being commented on.comment_uuid: A new, unique, randomly generated Base62 string for the comment itself.
-
Value Format (JSON String): Comments share a similar value structure to Posts.
Field Type Required Description uuidstringMUST The same unique identifier used in the key ( comment_uuid).contentstringMUST The content of the comment. timestampnumberMUST A UTC Unix Timestamp in seconds. formatstringOPTIONAL Format of the content("text"or"markdown"). -
Tags:
Tag Format Required Description post_id_{post.uuid}MUST Links the comment to the parent post.
A "Tip" is an atomic operation that combines a fund transfer and an on-chain metadata record in a single transaction.
-
Key Format:
tip_{post.uuid}_{timestamp}post.uuid: Theuuidof the post being tipped.timestamp: The UTC Unix Timestamp (in seconds) of the tip, used to ensure key uniqueness for multiple tips from the same user.
-
Operation: A single transaction with two outputs:
- Output 1 (Fund Transfer): A standard P2PKH output sending satoshis to the post's author. It is RECOMMENDED to use a PeerPay-style (BRC-29) key derivation to protect recipient privacy.
- Output 2 (Metadata): A
PushDropoutput creating theGlobalKVStorerecord for the tip.
-
Value Format (JSON String):
Field Type Required Description amountnumberMUST The amount of satoshis tipped. timestampnumberMUST A UTC Unix Timestamp in seconds. -
Tags:
Tag Format Required Description post_id_{post.uuid}MUST Links the tip to the tipped post. tipper_id_{tipperPublicKey}MUST Identifies the tipper. recipient_id_{authorPublicKey}MUST Identifies the recipient of the tip. -
Notification: It is RECOMMENDED to notify the recipient of the tip via an off-chain mechanism, such as
@bsv/message-box-client.
- v1.0.0 (2026-02-14):
- Initial formal specification.
- Transitioned post keys from
post_{authorPublicKey}_{randomNonce}to a stablepost_{uuid}format. - Introduced a
uuidfield in the value of Posts and Comments for consistent identification. - Updated key and tag structures for Likes, Reposts, and Tips to use the post
uuid. - Added
ChatandTipsto the list of official protocols. - Clarified that Reposts are a special type of Post.