Runic.Identity.Canonical (Runic v0.1.0-alpha.10)

Copy Markdown View Source

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.

Summary

Functions

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

Types

option()

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

Functions

encode!(term, opts \\ [])

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

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