Skip to main content

Method Signature

Parameters

string
required
ENS name (e.g., vitalik.eth)
JsonRpcProvider
required
Ethereum mainnet provider (ENS only works on mainnet)

Returns

Returns the address as a string, or null if not found.

Examples

Accept ENS or Address

ENS resolution only works on Ethereum mainnet. The SDK uses the mainnet provider regardless of which network you’re transacting on.

Lookup Address

Reverse ENS lookup

Validate Address

Check address format