Skip to content
On this page

labelhash

Hashes ENS label.

Import

ts
import { labelhash } from 'viem/ens'

Usage

ts
import { labelhash } from 'viem/ens'

labelhash('eth') 
// '0x4f5b812789fc606be1b3b16908db13fc7a9adf7ca72641f84d75b47069d3d7f0'

Returns

string

The hashed ENS label.

Parameters

name

  • Type: string

A ENS label.

Released under the MIT License.