Skip to content

TileDocument

TileDocument is a StreamType that stores a mutable JSON document, providing similar functionality as a NoSQL document store.

Usage

See TileDocument API for instructions on how to create and update TileDocument streams. You can query TileDocuments using Ceramic's standard queries API.

Specification

See TileDocument StreamType (CIP-8) for the complete specification.

Storage

TileDocuments are streams used for storing JSON documents. The TileDocument stream is structured as a single log of commits, where each commit only contains the diff from the previous version. Optionally, TileDocuments may specify a JSON schema and all commits must adhere to the schema.

Consensus

TileDocuments rely on anchor commits for providing immutable timestamps for the genesis commit and subsequent signed commits in the stream. In the case of conflicting versions, the branch with the earliest recorded anchor commit will be respected as the canonical branch.

Authentication

TileDocuments rely on DIDs for authentication. Only the DID(s) assigned as the controller of the stream are allowed to perform writes.

Sample use cases

TileDocuments are commonly used for storing:

  • Schemas
  • Identity metadata and information
  • User-generated content (i.e. blog posts, social media, etc)
  • Lists of other streamIDs to form collections (i.e. IDX)
  • DID Documents (i.e. 3ID DID Method)
  • Verifiable claims
  • and more