# `Runic.Identity.Canonical`
[🔗](https://github.com/zblanco/runic/blob/main/lib/identity/canonical.ex#L1)

Restricted deterministic encoding used by Runic identity scheme version 1.

The format uses explicit type tags and length framing. Map entries are sorted
by their encoded key bytes, making identity independent of map construction
order and BEAM map iteration order. Process-local and executable terms are
rejected rather than assigned misleading portable identities.

# `option`

```elixir
@type option() ::
  {:max_depth, pos_integer()}
  | {:max_items, pos_integer()}
  | {:max_bytes, pos_integer()}
```

# `encode!`

```elixir
@spec encode!(term(), [option()]) :: binary()
```

Encodes an identity-safe value into canonical version 1 bytes.

---

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