xmtplabs/xmtp-agent-examples / skills/resolving-domains
resolving-domains
VerifiedENS and Web3 identity resolution for XMTP agents. Use when resolving domain names, extracting mentions, or fetching Farcaster profiles. Triggers on ENS resolution, Farcaster lookup, or mention extraction.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.9 KB |
| rules/extract-mentions.md | markdown | 1.4 KB |
| rules/profiles-farcaster.md | markdown | 1.5 KB |
| rules/resolve-address.md | markdown | 1.3 KB |
rules/resolve-address.md
View on GitHub---
title: Resolve domain names to addresses
impact: HIGH
tags: resolver, ens, domains, addresses
---
## Resolve domain names to addresses
Use the name resolver to convert Web3 identities to Ethereum addresses.
**Basic resolution:**
```typescript
import { createNameResolver } from "@xmtp/agent-sdk";
const resolver = createNameResolver(process.env.WEB3_BIO_API_KEY || "");
// Resolve ENS name
const address = await resolver("vitalik.eth");
console.log(address); // "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
// Resolve Farcaster name
const fcAddress = await resolver("dwr.farcaster.eth");
// Resolve Basename
const baseAddress = await resolver("tony.base.eth");
```
**Using resolveIdentifier helper:**
```typescript
import { resolveIdentifier } from "../../utils/resolver";
// Handles multiple formats:
// - Full address: "0x1234...abcd" (returned as-is)
// - Shortened address: "0xabc5…f002" (matched against members)
// - Domain name: "vitalik.eth" (resolved via web3.bio)
// - Username: "fabri" (becomes "fabri.farcaster.eth")
const address = await resolveIdentifier("vitalik.eth");
const fromShortened = await resolveIdentifier("0xabc5…f002", memberAddresses);
```
**Environment setup:**
```bash
WEB3_BIO_API_KEY=your_api_key # Optional, for higher rate limits
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |