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

Immutable request and causal tombstone for deletion outside the ledger.

The record does not claim that bytes disappeared merely because deletion was
authorized.  Its source Act records the request; a later definitive Outcome
is the evidence that an executor completed it.  Ledger digests and this
causal description remain even when the referenced payload is gone.

# `t`

```elixir
@type t() :: %Spectre.GAM.Erasure{
  affected_refs: [String.t()],
  reason: String.t(),
  reduces_verifiability: boolean(),
  ref: String.t(),
  requested_at: integer(),
  schema_version: 1,
  scope_ref: String.t() | nil,
  source_act_ref: String.t(),
  target_digest: String.t(),
  target_ref: String.t()
}
```

# `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 of an erasure record.

# `digest`

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

Returns the stable digest of the complete erasure record.

# `from_canonical`

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

Restores an erasure record and verifies its content reference.

# `from_request_draft`

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

Materializes an immutable erasure record after the authorizing Act exists.

# `new`

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

Builds and validates an erasure request tied to its authorizing Act.

# `request_draft`

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

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

---

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