Overview
Basenames are human-readable names for addresses on Base. They are built on top of the ENS protocol and comply with ENSIP-19. To learn more about Basenames, check out the Basenames FAQ. This guide will show you how to add support for Basenames to your application using Viem.Usage
UsegetEnsName
to retrieve the primary ENS name for an address on Base:
It is necessary to use a private RPC provider (
YOUR_PRIVATE_RPC_URL
) due to the computational demands associated with some of the ENSIP-19 resolution steps.There may be some latency between the initial registration of a Basename and the ability to resolve this name via ENSIP-19 due to the slow production of state proofs necessary for trustless resolution.