Content-addressed identity of a bootstrap Definition Candidate.
A Candidate Ref is intentionally distinct from a Definition.Ref: it binds
the exact publication receipt and provenance proposed for activation, while
the Definition Ref continues to identify behavior bytes.
Summary
Functions
Builds the Ref for a validated Candidate.
Parses the stable candidate:sha256:<hex> representation.
Returns the stable textual representation.
Checks the shape and supported digest algorithm.
Verifies that a Ref addresses the supplied Candidate.
Types
@type t() :: %Spectre.Definition.Candidate.Ref{algorithm: :sha256, digest: String.t()}
Functions
@spec new(Spectre.Definition.Candidate.t()) :: t()
Builds the Ref for a validated Candidate.
Parses the stable candidate:sha256:<hex> representation.
Returns the stable textual representation.
Checks the shape and supported digest algorithm.
@spec verify(t(), Spectre.Definition.Candidate.t()) :: :ok | {:error, term()}
Verifies that a Ref addresses the supplied Candidate.