ExGAM.Interop (ExGAM v0.1.0)

Copy Markdown View Source

Portable exchange boundary between independently governed Domains.

An envelope carries only a Candidate and its Evidence closure. It cannot carry a Mandate, Decision, Act, Grant or execution capability. Receiving an envelope therefore does not import authority: the destination application's authenticated ingress decides how to attest the message as local Evidence, and every resulting proposal is evaluated under a local Mandate.

Transport authentication, signatures, peer identity and label mapping remain adapter concerns. inbound/2 only verifies canonical shape, content identity, destination binding and a self-contained Evidence lineage.

Summary

Types

Validated, capability-free contents of an inbound envelope.

Canonical string-keyed value suitable for transport or an Evidence payload.

Functions

Validates an inbound envelope for the exact destination Domain.

Builds a content-addressed outbound Candidate + Evidence envelope.

Types

contents()

@type contents() :: %{
  ref: String.t(),
  source_domain_ref: String.t(),
  destination_domain_ref: String.t(),
  candidate: ExGAM.Candidate.t(),
  evidence: [ExGAM.Evidence.t()]
}

Validated, capability-free contents of an inbound envelope.

envelope()

@type envelope() :: %{required(String.t()) => term()}

Canonical string-keyed value suitable for transport or an Evidence payload.

Functions

inbound(envelope, expected_destination_domain_ref)

@spec inbound(envelope(), String.t()) :: {:ok, contents()} | {:error, term()}

Validates an inbound envelope for the exact destination Domain.

outbound(source_domain_ref, destination_domain_ref, candidate, evidence)

@spec outbound(
  String.t(),
  String.t(),
  ExGAM.Candidate.t() | map() | keyword(),
  [ExGAM.Evidence.t() | map() | keyword()]
) :: {:ok, envelope()} | {:error, term()}

Builds a content-addressed outbound Candidate + Evidence envelope.