RelayMark.AgentAnswer (relay_mark_elixir v0.5.1)

Copy Markdown View Source

Portable validation for one transported Agent Answer document and manifest.

The returned digests bind the exact accepted UTF-8 JSON bytes. They are host envelope metadata and are never inserted into the RelayMark document.

Summary

Types

validated_pair()

@type validated_pair() :: %{
  document: RelayMark.Document.t(),
  manifest: RelayMark.Manifest.t(),
  document_digest: String.t(),
  manifest_digest: String.t()
}

Functions

validate_transported_pair(document_json, manifest_json, validation_context \\ %{})

@spec validate_transported_pair(binary(), binary(), map()) ::
  {:ok, validated_pair()} | {:error, [RelayMark.Diagnostic.t()]}