Spectre.GAM.Erasure (Spectre v0.4.0)

Copy Markdown View Source

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.

Summary

Functions

Returns the plain, string-keyed ledger representation.

Returns the content-derived reference of an erasure record.

Returns the stable digest of the complete erasure record.

Restores an erasure record and verifies its content reference.

Materializes an immutable erasure record after the authorizing Act exists.

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

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

Types

t()

@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()
}

Functions

canonical(erasure)

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

Returns the plain, string-keyed ledger representation.

content_ref(erasure)

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

Returns the content-derived reference of an erasure record.

digest(erasure)

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

Returns the stable digest of the complete erasure record.

from_canonical(value)

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

Restores an erasure record and verifies its content reference.

from_request_draft(draft, source_act_ref)

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

Materializes an immutable erasure record after the authorizing Act exists.

new(erasure)

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

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

request_draft(erasure)

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

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