Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
getMetadata – ENS Organizational Registry
Skip to content

getMetadata

Gets metadata for specified ENS name.

Calls resolve(bytes, bytes) on ENS Universal Resolver Contract.

Usage

example.ts
import { normalize } from 'viem/ens'
import { client } from './client'
 
 
 
const schema = await client.getSchema({
  name: normalize('hypernets.eth')
})
const metadata = await client.getMetadata({
  name: normalize('hypernets.eth')
  schema // Optional
})
 
// =>  {
//   "class": "Orgnisation",
//   "schema: "CID",
//   "properties": {
//     "avatar: "value"
//   }
// }
 
const isValid = validate(schema, metadata)
=> True