ModelInstanceDocument stream handler implementation

Hierarchy

  • ModelInstanceDocumentHandler

Implements

  • StreamHandler<ModelInstanceDocument>

Constructors

Accessors

Methods

  • Validates the ModelInstanceDocument header against the Model definition.

    Parameters

    • model: Model

      The model that this ModelInstanceDocument belongs to

    • header: ModelInstanceDocumentHeader

      the header to validate

    Returns Promise<void>

  • Applies commit (genesis|signed|anchor)

    Parameters

    • commitData: CommitData

      Commit (with JWS envelope or anchor proof, if available and extracted before application)

    • context: Context

      Ceramic context

    • Optional state: StreamState

      Document state

    Returns Promise<StreamState>