resolveAvatar

Resolves an ENS name to the avatar URL.

Example

import { resolveAvatar } from "thirdweb/extensions/ens";
const address = await resolveAvatar({
client,
name: "vitalik.eth",
});
function resolveAvatar(
): Promise<null | string>;

Parameters

The options for resolving an ENS address.

Type

let options: {
client: ThirdwebClient;
name: string;
resolverAddress?: string;
resolverChain?: Chain;
};

Returns

let returnType: Promise<null | string>;

A promise that resolves to the avatar url, or null if not set.