GroundPlane.Contracts.ContentAddress (GroundPlane Contracts v0.1.0)

Copy Markdown View Source

Generic content-address facts for boundary-significant payloads.

This module deliberately owns only primitive hash metadata. It does not carry product, model, prompt, workflow, governance, or evidence semantics.

Summary

Types

t()

@type t() :: %GroundPlane.Contracts.ContentAddress{
  byte_size: non_neg_integer(),
  codec: String.t(),
  content_hash: String.t(),
  content_hash_algorithm: String.t(),
  media_type: String.t()
}

Functions

from_bytes(bytes, opts \\ [])

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

from_term(term, opts \\ [])

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

new(attrs)

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

to_map(address)

@spec to_map(t()) :: map()