libid-identity 0.14.0

The libid handle transform: per-platform normalization rules and the shared vector table, mirroring HandleNormalizer.sol byte for byte.
Documentation

libid-identity

The off-chain half of libid handle normalization.

normalize(raw, rules) turns a platform handle into the one form the identity system keys, mirroring contracts/identity/HandleNormalizer.sol byte for byte: a closed ASCII byte transform — trim spaces, strip one leading @ where the platform says so, fold A-Z, refuse everything outside the platform's set. It is deliberately not Unicode case folding and not UTS-46.

The per-platform rules (Rules::X, Rules::GITHUB, Rules::GOOGLE) and the shared vector table come from contracts/identity/handles.json, generated by scripts/regen-identity-handles.py. Solidity, Rust and TypeScript each run the same table, so a normalizer that drifted from the chain fails a test instead of looking up a key the chain never wrote.

handle_vectors also carries each platform's domain string (PLATFORM_X_DOMAIN, …); keccak256 of that string is the platform id the contracts key on.

No dependencies, on purpose: every consumer of the identity system needs this transform, and none of them should inherit anything for it.