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