Interacting with ENS

Resolve an ENS name to an Ethereum address

import { resolveAddress } from "thirdweb/extensions/ens";
const address = await resolveAddress({
client,
name: "vitalik.eth",
});
// Expected result: "0x..."

Resolve the primary name for a specified address

import { resolveName } from "thirdweb/extensions/ens";
const name = await resolveName({
client,
address: "0x1234...",
});
// Expected result: "something.eth"

Resolve an ENS name to the avatar URL.

import { resolveAvatar } from "thirdweb/extensions/ens";
const address = await resolveAvatar({
client,
name: "vitalik.eth",
});
// Expected result: An URL that points to the image of the ENS