In order to implement a new Ceramic StreamType there are a couple of interfaces which should be followed:
There are other constructs which need to be used in order to create a
One interface worth noting is the
CeramicAPI interface which lets the developer communicate with the Ceramic node in two ways:
The Stream interface extends the
EventEmitter interface which means that the developer can subscribe to events emitted from the Ceramic node like the
change event (more events will be defined in the future).
change is more or less sugar coding for the developer since all the operations can be implemented using the CeramicApi interface. For example the TileDocument included in the Ceramic node out-of-the-box.
The StreamHandler interface is used for determining the next state of the document. The method worth noting is
applyCommit which is used for that state transition. For example the TileDocumentHandler is included in the Ceramic node out-of-the-box as well.