TIP 传播
协议
type UpdateMessage = {
typ: MsgType.UPDATE //0
stream: StreamID
tip: CID
model?: StreamID
}/**
* Ceramic Pub/Sub message type.
*/
enum MsgType {
UPDATE = 0,
QUERY = 1,
RESPONSE = 2,
KEEPALIVE = 3,
}
type UpdateMessage = {
typ: MsgType.UPDATE
stream: StreamID
tip: CID // the CID of the latest commit
model?: StreamID // optional
}
// All nodes will always ignore this message
type KeepaliveMessage = {
typ: MsgType.KEEPALIVE
ts: number // current time in milliseconds since epoch
ver: string // current ceramic version
}Last updated