In order to implement a new Ceramic Doctype 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 Doctype 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 TileDoctype included in the Ceramic node out-of-the-box.
The DoctypeHandler interface is used for determining the next state of the document. The method worth noting is
applyRecord which is used for that state transition. For example the TileDoctypeHandler is included in the Ceramic node out-of-the-box as well.