ens_namehash
Compute the EIP-137 namehash and labelhash for any ENS name, returning both the full namehash and the keccak labelhash of the leftmost label.
Instructions
Compute the EIP-137 namehash (and labelhash) of an ENS name.
The name is hashed exactly as given; EIP-137 expects it already UTS-46 normalized (use unicode_normalize first if needed), and empty labels from a stray dot are rejected. Returns {name, namehash, labelhash}, where labelhash is the keccak of the leftmost label — for a single label that is the .eth registrar token id for that name.
Example: ens_namehash("vitalik.eth") -> namehash="0xee6c4522aab0003e8d14cd40a6af439055fd2577951148c14b6cea9a53475835".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A dot-separated ENS name, e.g. 'vitalik.eth' (''=the root). EIP-137 expects it ALREADY UTS-46 normalized — run unicode_normalize first if it may contain uppercase/unicode. Empty labels (leading/trailing/double dots) are rejected. |