Insider.Incident.ArtifactReference (Insider v0.1.0)

Copy Markdown View Source

A bounded content-addressed reference to evidence kept outside a capsule.

References contain no path, URL, credentials, or inline bytes. Offline capsule validation proves the reference shape, not availability of the referenced content. A consumer verifies retrieved content against sha256 and byte_size before use.

Summary

Types

t()

@type t() :: %Insider.Incident.ArtifactReference{
  byte_size: pos_integer(),
  media_type: String.t(),
  role: String.t(),
  sha256: String.t()
}

Functions

decode_map(payload)

@spec decode_map(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}

new(options)

@spec new(keyword()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}

to_wire_map(reference)

@spec to_wire_map(t()) :: map()