Post Token
This token represents a post created by a user.
The post token must contain a content (c) field. For other constraints see the Action Tokens.
There can be multiple subtypes of this token, which can represent the content of the post in different ways.
POST
A simple text only post. The content must be in markdown format.
POST:IMG
A post with an image. The content must be in markdown format, the attachment (a) field must contain exactly one item which must be an image.
POST:VID
A post with a video. The content must be in markdown format, the attachment (a) field must contain exactly one item which must be a video.
Content-Addressing
This token is content-addressed using SHA-256:
- The entire JWT token (header + payload + signature) is hashed
- Action ID format:
a1~{base64_hash} - Changing any field invalidates the action_id
- See Content-Addressing & Merkle Trees for details
Immutability: Once created, a POST token cannot be modified without changing its action ID.
Attachments
The a (attachments) field can contain file references:
- Each entry is a file_id (
f1~...) - File IDs are content-addressed (SHA256 of file descriptor)
- Files contain multiple variants (different resolutions)
- See File Storage for details
Properties:
- Attachments are cryptographically bound to the post
- Cannot swap images without breaking the action signature
- Deduplication: same image in multiple posts = same file_id
- Federation: remote instances can verify attachment integrity
Database Key
The database key for a post token is [iss, "POST", id]
Purpose: The database key is used to identify and potentially invalidate previous versions of this action type. For POST tokens, the key includes the action ID itself, meaning each post is unique and not overridden by subsequent posts.
Example
User @someuser.cloudillo.net writes a post on the wall of @somegroup.cloudillo.net, attaching an image:
| Field | Value |
|---|---|
| iss | someuser.cloudillo.net |
| aud | somegroup.cloudillo.net |
| iat | 2024-04-13T00:00:00.000Z |
| k | 20240109 |
| t | POST:IMG |
| c | “Love U All <3” |
| a | [“ohst:51mp8Oe5gekbAualO6jydbOriq0OfuZ5zpBY-I30U00,CFN6hm21Z73m12CK2igjFy8bVDhSV8oFZS4xOrzHE98,rk9n8iz–t0ov4sJAnBzEktmyZVsLmcKkPEVhkK4688,nfpr7eTtApLNTRS5qDokBsodo4UQ_zj7kzNWwvj7oEs”] |