# `Tama.Dex.Document`
[🔗](https://github.com/kritama/tama-dex/blob/v0.1.0/lib/tama/dex/document.ex#L1)

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`.

# `t`

```elixir
@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()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
