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
@type validated_pair() :: %{ document: RelayMark.Document.t(), manifest: RelayMark.Manifest.t(), document_digest: String.t(), manifest_digest: String.t() }
Functions
@spec validate_transported_pair(binary(), binary(), map()) :: {:ok, validated_pair()} | {:error, [RelayMark.Diagnostic.t()]}