Spectre.GAM.Genesis (Spectre v0.4.0)

Copy Markdown View Source

Externally attested root of a governed domain.

Genesis names the initial principals, root mandates, constitution, governed surface and host profile. It is deliberately not authorized by an internal Act: its attestation is the visible external trust boundary. Its ref is an externally assigned trust-anchor identifier, rather than a content address; this is the one deliberate exception that breaks the Genesis/root-Mandate reference cycle. content_ref/1 remains available for signing and auditing the exact document.

Summary

Functions

Returns the plain, string-keyed ledger representation.

Returns a content-derived attestation reference, independent of the trust-anchor ref.

Returns the stable digest of the complete genesis record.

Restores genesis from its canonical map.

Builds and validates a genesis record.

Types

t()

@type t() :: %Spectre.GAM.Genesis{
  attestation_ref: String.t(),
  constitution_ref: String.t(),
  domain_ref: String.t(),
  emergency_mandate_ref: String.t() | nil,
  host_profile_ref: String.t(),
  issued_at: integer(),
  principal_refs: [String.t()],
  ref: String.t(),
  root_mandate_refs: [String.t()],
  schema_version: 1,
  surface_ref: String.t(),
  surface_revision: non_neg_integer()
}

Functions

canonical(genesis)

@spec canonical(t()) :: map()

Returns the plain, string-keyed ledger representation.

content_ref(genesis)

@spec content_ref(t()) :: String.t()

Returns a content-derived attestation reference, independent of the trust-anchor ref.

digest(genesis)

@spec digest(t()) :: String.t()

Returns the stable digest of the complete genesis record.

from_canonical(value)

@spec from_canonical(map()) :: {:ok, t()} | {:error, term()}

Restores genesis from its canonical map.

new(genesis)

@spec new(map() | keyword() | t()) :: {:ok, t()} | {:error, term()}

Builds and validates a genesis record.