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: StreamReaderWriter

      Interface to read and write data to ceramic network

    • Optional state: StreamState<ModelInstanceDocumentStateMetadata>

      Document state

    Returns Promise<StreamState<StreamMetadata>>