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

Portable proof that an authorized Act removed information labels.

The output `Evidence` remains content-addressed independently of the Act.
This record is materialized only after admission and forms the acyclic link
from the governing Act to that immutable Evidence.  Label ownership is
represented by stable content references so Mandates can constrain each
label without imposing a universal label taxonomy on applications.

# `t`

```elixir
@type t() :: %Spectre.GAM.Declassification{
  evidence_ref: String.t(),
  parent_refs: [String.t()],
  recorded_at: integer(),
  ref: String.t(),
  removed_label_refs: [String.t()],
  removed_labels: [Spectre.GAM.Label.t()],
  removed_owner_refs: [String.t()],
  schema_version: 1,
  source_act_ref: String.t()
}
```

# `bind_producer`

```elixir
@spec bind_producer(Spectre.GAM.Evidence.t() | map() | keyword(), String.t()) ::
  {:ok, Spectre.GAM.Evidence.t()} | {:error, term()}
```

Attributes the relabelled Evidence to the authenticated declassification proposer.

# `canonical`

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

Returns the plain, string-keyed ledger representation.

# `content_ref`

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

Returns the reference derived from immutable declassification content.

# `decode_draft`

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

Decodes and canonicalizes Candidate declassification material.

# `digest`

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

Returns the stable digest of the complete declassification record.

# `draft`

```elixir
@spec draft(Spectre.GAM.Evidence.t() | map() | keyword(), [
  Spectre.GAM.Label.t() | map() | keyword()
]) ::
  {:ok, map()} | {:error, term()}
```

Returns the exact pre-Act material carried by a `data.declassify` Candidate.

# `from_canonical`

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

Restores a declassification record and verifies its content reference.

# `from_draft`

```elixir
@spec from_draft(map(), String.t(), integer()) :: {:ok, t()} | {:error, term()}
```

Materializes the post-admission record without adding an Act reference to Evidence.

# `label_refs`

```elixir
@spec label_refs([Spectre.GAM.Label.t() | map() | keyword()]) ::
  {:ok, [String.t()]} | {:error, term()}
```

Returns the stable references of canonical labels.

# `new`

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

Builds and validates a declassification record tied to its governing Act.

# `owner_refs`

```elixir
@spec owner_refs([Spectre.GAM.Label.t() | map() | keyword()]) ::
  {:ok, [String.t()]} | {:error, term()}
```

Returns the principals which own the removed constraints.

# `required_target_refs`

```elixir
@spec required_target_refs(Spectre.GAM.Evidence.t(), [
  Spectre.GAM.Label.t() | map() | keyword()
]) ::
  {:ok, [String.t()]} | {:error, term()}
```

Returns every target that a declassification Mandate must cover.

# `validate_producer`

```elixir
@spec validate_producer(Spectre.GAM.Evidence.t(), String.t()) ::
  :ok | {:error, term()}
```

Verifies who attested the newly declassified Evidence.

# `validate_transition`

```elixir
@spec validate_transition(t(), Spectre.GAM.Evidence.t(), [Spectre.GAM.Evidence.t()]) ::
  :ok | {:error, term()}
```

Checks the exact, conservative label delta proven by this record.

---

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