Documentation
¶
Overview ¶
Package chain verifies that a bundle's claims sit in an intact append-only chain under the declared profile. Unkeyed profiles recompute every link; keyed profiles verify continuity only, because the link key is the producer's forgery secret and never travels.
Index ¶
Constants ¶
View Source
const ( // ModeFull means every link was recomputed from claim content. ModeFull = "full" // ModeStructural means only continuity of prev to link could be checked without the key. ModeStructural = "structural" )
Mode names for a chain verification.
Variables ¶
View Source
var ErrBroken = errors.New("chain broken")
ErrBroken marks a chain whose order, continuity, or links do not verify.
View Source
var ErrClaim = errors.New("chain claim")
ErrClaim marks a claim missing what its chain profile needs.
View Source
var ErrProfile = errors.New("chain profile")
ErrProfile marks a chain declaration the verifier cannot process.
Functions ¶
Types ¶
type Result ¶
type Result struct {
// Mode is ModeFull or ModeStructural.
Mode string
// Claims is how many chained claims were checked.
Claims int
// HeadMatched reports whether the declared head coincided with the newest claim and
// matched it. A head beyond the bundled claims cannot be tied to them and stays false.
HeadMatched bool
}
Result describes how the chain verified.
Click to show internal directories.
Click to hide internal directories.