Skip to main content

Capsule metadata

Capsule metadata gives applications a portable description of a publication while the on-chain Capsule preserves a hash commitment to that description. The current canonical metadata schema is:

Envelope fields

The V1 metadata model contains:

Example

The abbreviated identity examples illustrate format intent only. Use exact canonical references produced by the active identity and outlet systems.

Canonicalization matters

Hashing JSON without canonicalization is dangerous because insignificant representation differences can change the bytes. The canonical Rust model normalizes required string values, enforces the exact schema version, requires a non-zero publication timestamp, lowercases content type and language, and validates cover_media_hash as bytes32 hex when present. Use the canonical model implementation when generating the metadata hash.

Separate content from metadata

The Capsule carries both a contentHash and a metadataHash. This lets an application verify editorial content independently from its descriptive envelope. For example, changing a cover image URI should not silently imply that the article body changed. A revision policy can make those differences explicit.

Stable URIs

A canonical URI should be durable enough that a future reader has a reasonable chance of resolving it. If your application uses content-addressed storage, preserve the full content address. If it uses HTTPS, avoid temporary signed download URLs as canonical metadata. Temporary delivery URLs can be generated at read time without replacing the stable source URI.

Metadata retrieval UX

When loading a Capsule, the application can show three distinct states:
  1. on-chain metadata hash exists
  2. metadata document is retrievable
  3. retrieved canonical bytes match the on-chain hash
Only the third state establishes both availability and integrity. This layered presentation is especially important for archives, because an unavailable metadata host should not be mistaken for an invalid on-chain Capsule.