Content-addressed identity of one canonical Spectre Definition.
A Ref proves integrity of canonical bytes. It does not prove publisher identity, trust, approval, or current authority.
Summary
Functions
Builds the Ref for a canonical Definition.
Parses the stable sha256:<hex> representation.
Returns the stable textual representation of a Ref.
Checks the shape and supported algorithm of a Definition Ref.
Verifies that a Ref addresses the supplied canonical Definition.
Types
@type t() :: %Spectre.Definition.Ref{ algorithm: :sha256, canonicalization_version: pos_integer(), contract_version: pos_integer(), digest: String.t() }
Functions
@spec new(Spectre.Definition.Canonical.t()) :: t()
Builds the Ref for a canonical Definition.
Parses the stable sha256:<hex> representation.
Returns the stable textual representation of a Ref.
Checks the shape and supported algorithm of a Definition Ref.
@spec verify(t(), Spectre.Definition.Canonical.t()) :: :ok | {:error, term()}
Verifies that a Ref addresses the supplied canonical Definition.