# `Spectre.GAM.Authority.View`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/gam/authority/view.ex#L1)

Capability-free authority inventory for one authenticated Scope.

The view reports Mandates held by the authenticated Principal and the narrow
revocation controls retained by that Principal.  It is derived from the
current Domain projection and trusted Domain time; it cannot authorize a
Candidate, mint a Grant or replace normal kernel admission.

`blockers` describes only state shared by every possible Candidate under a
Mandate (time, revocation, restriction and unresolved Meter debt). Candidate
class, target, purpose, Evidence, consent and available quantity are still
evaluated by the kernel for each proposal.

# `blocker`

```elixir
@type blocker() ::
  :not_yet_valid
  | :expired
  | :revoked
  | :ancestor_revoked
  | :superseded
  | :ancestor_superseded
  | :meter_debt
  | :ancestor_meter_debt
```

# `held_mandate`

```elixir
@type held_mandate() :: %{
  mandate: Spectre.GAM.Mandate.t(),
  blockers: [blocker()],
  meters: map()
}
```

# `revocation_control`

```elixir
@type revocation_control() :: %{
  mandate_ref: String.t(),
  accountable_ref: String.t(),
  blockers: [:not_yet_valid | :expired | :already_revoked]
}
```

# `t`

```elixir
@type t() :: %Spectre.GAM.Authority.View{
  domain_ref: String.t(),
  held_mandates: [held_mandate()],
  host_profile_mode: :mediated | :isolated | :development,
  host_profile_ref: String.t(),
  observed_at: integer(),
  principal_ref: String.t(),
  retained_revocation_controls: [revocation_control()],
  revision: non_neg_integer(),
  scope_ref: String.t(),
  surface_ref: String.t(),
  surface_revision: non_neg_integer()
}
```

# `from_projection`

```elixir
@spec from_projection(
  Spectre.GAM.Domain.Projection.t(),
  Spectre.GAM.Scope.t(),
  integer()
) ::
  {:ok, t()} | {:error, term()}
```

Builds an immutable authority inventory for a validated Scope handle.

---

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