UNPKG

@lifi/sdk

Version:

LI.FI Any-to-Any Cross-Chain-Swap SDK

17 lines 500 B
import { ChainId } from '@lifi/types'; import { getEnsAddress, normalize } from 'viem/ens'; import { getPublicClient } from './publicClient.js'; export const resolveENSAddress = async (name) => { try { const client = await getPublicClient(ChainId.ETH); const address = await getEnsAddress(client, { name: normalize(name), }); return address; } catch (_) { // ignore return; } }; //# sourceMappingURL=resolveENSAddress.js.map