Tama.Dex.Document (tama_dex v0.1.0)

Copy Markdown View Source

A validated tama-operations/1 document, as returned by Tama.Dex.Profile.validate/1.

  • source is the document's x-tama-source, the ID executors are registered under.
  • title and version come from info.
  • digest is the lowercase hex SHA-256 of canonical_json.
  • canonical_json is the whole document as canonical JSON: object keys sorted by their UTF-8 bytes, with no insignificant whitespace.
  • operations are the normalized operations, ordered by operationId.

Summary

Types

t()

@type t() :: %Tama.Dex.Document{
  canonical_json: binary(),
  digest: String.t(),
  operations: [Tama.Dex.Operation.t()],
  profile: String.t(),
  source: String.t(),
  title: String.t(),
  version: String.t()
}