pub struct Commit {
pub did: String,
pub version: u64,
pub data: Cid,
pub rev: String,
pub prev: Option<Cid>,
pub sig: Vec<u8>,
}
Expand description
The top-level data object in a repository’s tree is a signed commit.
Fields§
§did: String
the account DID associated with the repo, in strictly normalized form (eg, lowercase as appropriate)
version: u64
fixed value of 3 for this repo format version
data: Cid
pointer to the top of the repo contents tree structure (MST)
rev: String
revision of the repo, used as a logical clock.
TID format. Must increase monotonically. Recommend using current timestamp as TID; rev values in the “future” (beyond a fudge factor) should be ignored and not processed
prev: Option<Cid>
pointer (by hash) to a previous commit object for this repository.
Could be used to create a chain of history, but largely unused (included for v2 backwards compatibility). In version 3 repos, this field must exist in the CBOR object, but is virtually always null. NOTE: previously specified as nullable and optional, but this caused interoperability issues.
sig: Vec<u8>
cryptographic signature of this commit, as raw bytes