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

Attested statement about the deployment boundary in force for a domain.

The profile records what the deployment claims (`:mediated`, `:isolated` or
`:development`) and the assumptions behind that claim.  Recording it does
not prove that the physical isolation is real.

# `t`

```elixir
@type t() :: %Spectre.GAM.HostProfile{
  assumptions: [term()],
  attestation_ref: String.t(),
  declared_at: integer(),
  mode: :mediated | :isolated | :development,
  ref: String.t(),
  revision: pos_integer(),
  schema_version: 1
}
```

# `canonical`

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

Returns the plain, string-keyed ledger representation.

# `content_ref`

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

Returns the content-derived reference, independent of an assigned `ref`.

# `digest`

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

Returns the stable digest of the complete canonical record.

# `from_canonical`

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

Restores a host profile from its canonical map.

# `new`

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

Builds and validates a host profile.

---

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