Skip to main content

Module commit

Module commit 

Source
Expand description

The commit: the one block in a repository that is signed.

Everything else in a repository is content-addressed and therefore self-checking — a block either hashes to the CID that points at it or it does not. None of that says who wrote it. The commit is where an identity makes a claim: this DID says its repository is the tree rooted here, as of this revision. A reader resolves the DID, takes the public key out of the document, and checks the signature over the commit’s other fields. That chain — document to key to signature to root to records — is the whole of what makes an at:// URI mean anything to somebody who does not trust the server it came from.

Structs§

Commit
A commit before it is signed.
SignedCommit
A commit and the signature over it.

Enums§

CommitError
Why a commit could not be trusted.
CommitKey
A key another repository’s commits are signed with, as its DID document publishes it. atproto signs with either of two curves; this crate signs with secp256k1 only and reads both.

Constants§

REPO_VERSION
The repository format this crate writes.