Decastecastdocstestnet

Reference

Post metadata

Every post NFT points at a SIP-016 JSON file. Decast adds its own schema under properties.decast.

metadata-uri

decast-postx takes a metadata-uri (string-ascii 256) and stores it for the minted decast-post token. get-token-uri returns it. The app you post through hosts the file. Decast Alpha uses https://testnet.decast.io/post/{id}.json, and passes https://testnet.decast.io/post/{id} as via-url. See decast-postx.

SIP-016 fields

Standard fields so any Stacks wallet or marketplace can display the post.

sipnumberAlways 16.
namestring"Decast Post #<token-id>" ("pending" until the NFT is minted).
descriptionstringCurrent post text. May differ from the on-chain message after an edit.
imageurl?Attached picture, if any. Shown by ordinary NFT wallets.
properties.categorystringtext, image, video, audio or live. Taken from the first media link, else image, else text.
properties.external_urlurlThe post page. Matches the via-url passed on-chain.

Decast schema · properties.decast

Version 1.0.0. Apps and indexers should read this for the full post.

schema_versionstring"1.0.0".
typestring"post".
nft.contract_idprincipalThe author's user contract that minted the decast-post NFT.
nft.token_iduint | nullToken id, null until minted.
author_principalprincipalWallet that owns the user contract.
author_user_contractprincipalThe author's decast-user-v1 contract id.
content.typestring"text".
content.textstringPost text (same as description).
content.media[]array{ type, url, provider?, embed_url? }. Images first, then links. Providers: youtube, soundcloud, twitch, kick.
timestamps.created_at / updated_atISO-8601UTC, no milliseconds, e.g. 2026-11-20T18:04:11Z.
mutation.editableboolWhether the host still accepts edits.
mutation.authoritystring"original_author": only the author's wallet may edit.
mutation.revisionnumberStarts at 1, increases on every edit.

Examples

A post with a picture, then an edited post with a video.

json · picture post
{
  "sip": 16,
  "name": "Decast Post #12",
  "description": "Sunset over the pond",
  "image": "https://testnet.decast.io/post/aB3dE5gH7j.png",
  "properties": {
    "category": "image",
    "external_url": "https://testnet.decast.io/post/aB3dE5gH7j",
    "decast": {
      "schema_version": "1.0.0",
      "type": "post",
      "nft": {
        "contract_id": "ST2K5SEC5KQ863QM3H0AN3FK69XSJV3YV16507WX8.decast-user-v1",
        "token_id": 12
      },
      "author_principal": "ST2K5SEC5KQ863QM3H0AN3FK69XSJV3YV16507WX8",
      "author_user_contract": "ST2K5SEC5KQ863QM3H0AN3FK69XSJV3YV16507WX8.decast-user-v1",
      "content": {
        "type": "text",
        "text": "Sunset over the pond",
        "media": [
          {
            "type": "image",
            "url": "https://testnet.decast.io/post/aB3dE5gH7j.png"
          }
        ]
      },
      "timestamps": {
        "created_at": "2026-11-20T18:04:11Z",
        "updated_at": "2026-11-20T18:04:11Z"
      },
      "mutation": {
        "editable": true,
        "authority": "original_author",
        "revision": 1
      }
    }
  }
}
json · video post, revision 2
{
  "sip": 16,
  "name": "Decast Post #13",
  "description": "New episode is live (fixed typo)",
  "properties": {
    "category": "video",
    "external_url": "https://testnet.decast.io/post/Kq9Zt2Lm4P",
    "decast": {
      "schema_version": "1.0.0",
      "type": "post",
      "nft": {
        "contract_id": "ST2K5SEC5KQ863QM3H0AN3FK69XSJV3YV16507WX8.decast-user-v1",
        "token_id": 13
      },
      "author_principal": "ST2K5SEC5KQ863QM3H0AN3FK69XSJV3YV16507WX8",
      "author_user_contract": "ST2K5SEC5KQ863QM3H0AN3FK69XSJV3YV16507WX8.decast-user-v1",
      "content": {
        "type": "text",
        "text": "New episode is live (fixed typo)",
        "media": [
          {
            "type": "video",
            "provider": "youtube",
            "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
            "embed_url": "https://www.youtube.com/embed/dQw4w9WgXcQ"
          }
        ]
      },
      "timestamps": {
        "created_at": "2026-11-20T19:10:00Z",
        "updated_at": "2026-11-20T19:25:42Z"
      },
      "mutation": {
        "editable": true,
        "authority": "original_author",
        "revision": 2
      }
    }
  }
}

Editing & trust

  • On-chain text never changes. The message in the post event is permanent.
  • The JSON can be edited, only by the original author's wallet. Each edit increases mutation.revision and updates timestamps.updated_at.
  • Display rule: show description (or content.text), falling back to the on-chain message. Mark it edited when revision > 1 or the text differs from the on-chain message.
  • Hashes: content-hash and thumbnail-hash are passed on-chain so readers can check that the hosted media matches what was posted. Decast Alpha's content hash is sha256 of message|picture-sha256|sorted links joined with |.

Hosting guide for apps

  • Serve the file as JSON with access-control-allow-origin: * so other apps can read it.
  • Keep the URL under 256 ASCII characters. Short ids work well.
  • Always fill name, description and image so wallets without Decast support still show the post.
  • Only accept edits signed by the author's wallet. Posts made through another app are edited on that app's host.