# `ExGAM.GovernedAct.AuthorityChange`
[🔗](https://github.com/elchemista/ex_gam/blob/0.1.0/lib/ex_gam/governed_act/authority_change.ex#L1)

Pure interpretation of an authority-changing Act.

Both commit construction and replay need to answer the same two questions:
which Mandate changed, and whether a pending descendant is affected. Keeping
those answers here prevents dispatch cancellation from acquiring a second,
subtly different ancestry implementation.

# `resolution`

```elixir
@type resolution() :: {:ok, String.t(), boolean()} | {:error, term()}
```

# `affects?`

```elixir
@spec affects?(map(), String.t(), String.t(), boolean()) ::
  {:ok, boolean()} | {:error, term()}
```

Checks whether a Mandate falls under the resolved authority change.

# `cascades?`

```elixir
@spec cascades?(map(), String.t()) :: boolean()
```

Returns the cascade policy declared by a Mandate, defaulting safely to false.

# `resolve`

```elixir
@spec resolve(map(), ExGAM.Act.t(), :mandate_revoked | :mandate_restricted) ::
  resolution()
```

Resolves the target and cascade semantics of an already-folded authority change.

---

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