# `Spectre.GAM.Genesis`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/gam/genesis.ex#L1)

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.

# `t`

```elixir
@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()
}
```

# `canonical`

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

Returns the plain, string-keyed ledger representation.

# `content_ref`

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

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

# `digest`

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

Returns the stable digest of the complete genesis record.

# `from_canonical`

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

Restores genesis from its canonical map.

# `new`

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

Builds and validates a genesis record.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
