resolveAddress

Resolves an ENS name to an Ethereum address.

Example

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

Resolve an address to a Basename.

import {
resolveAddress,
BASENAME_RESOLVER_ADDRESS,
} from "thirdweb/extensions/ens";
import { base } from "thirdweb/chains";
const address = await resolveAddress({
client,
name: "myk.base.eth",
resolverAddress: BASENAME_RESOLVER_ADDRESS,
resolverChain: base,
});
function resolveAddress(
): Promise<`0x${string}`>;

Parameters

The options for resolving an ENS address.

Type

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

Returns

let returnType: Promise<`0x${string}`>;

A promise that resolves to the Ethereum address.