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
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 validatescover_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 acontentHash 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:- on-chain metadata hash exists
- metadata document is retrievable
- retrieved canonical bytes match the on-chain hash