Tools · data

ENS & Basename resolver (both ways, with profile records)

Resolve an ENS name or Basename to its address (vitalik.eth, jesse.base.eth), or an address to its primary name - verified to resolve back - with the profile records the owner published: url, X/Twitter, GitHub, description, avatar. Read from Ethereum mainnet through the ENS Universal Resolver; off-chain gateways go through our SSRF guard. ASCII names. Send {} for the published example. A name with no address is not charged. Pay-per-call via x402.

$0.0027 per call, paid in USDC on Base or Solana with x402 — no account, no API key. POST https://fiatdock.com/v1/chain/ens (or GET with the same fields as query parameters) · MCP tool ens_resolve. An answer the tool cannot produce is refused with 4xx/5xx and is not charged.

Inputs

FieldTypeDescriptionExample
namestringAn ENS name to resolve (vitalik.eth, jesse.base.eth …) — ASCII letters, digits and hyphens"vitalik.eth"
addressstringOr an address, to find its primary ENS name (0x + 40 hex)"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

Example

Request body

{"name":"vitalik.eth"}

Answer (the published example)

{"query":{"name":"vitalik.eth"},"name":"vitalik.eth","address":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","primaryName":"vitalik.eth","isPrimaryName":true,"records":{"url":"https://vitalik.ca","twitter":"VitalikButerin","github":"vbuterin","description":"mi pinxe lo crino tcati","avatar":"https://euc.li/vitalik.eth"},"chain":"ethereum","resolvedVia":"ENS Universal Resolver on Ethereum mainnet; off-chain (CCIP-Read) gateways are fetched through FiatDock's SSRF guard","elapsedMs":281,"asOf":"2026-10-05T00:00:00.000Z","note":"records are what the name's owner published (their words, not verified by us)."}

Call it

curl

# 1) ask: an unpaid call answers 402 with the exact price (free)
curl -i -X POST https://fiatdock.com/v1/chain/ens -H 'content-type: application/json' -d '{"name":"vitalik.eth"}'
# 2) pay: any x402 client signs that 402 and resends — see Node or Python below

Node

// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:*", client: new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_PRIVATE_KEY)) }],
});
const r = await pay("https://fiatdock.com/v1/chain/ens", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"name":"vitalik.eth"}),
});
console.log(r.status, await r.json());

Python

# pip install "x402[httpx,evm]"
import asyncio, json, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm.exact import register_exact_evm_client

async def main():
    client = register_exact_evm_client(x402Client(), Account.from_key(os.environ["AGENT_PRIVATE_KEY"]))
    async with x402HttpxClient(client) as http:
        r = await http.post("https://fiatdock.com/v1/chain/ens", json=json.loads("{\"name\":\"vitalik.eth\"}"))
        print(r.status_code, r.json())

asyncio.run(main())

MCP (Claude, Cursor, any MCP client)

{"mcpServers":{"fiatdock":{"command":"npx","args":["-y","fiatdock-mcp"],"env":{"AGENT_PRIVATE_KEY":"0x<your agent wallet key>"}}}}
// then call the tool "ens_resolve" — the package pays each call from that wallet

The wallet needs USDC on Base. Prefer no install? The remote server https://fiatdock.com/mcp answers the 402 as tool output for an agent that signs its own payments.

Related tools

Machine-readable: OpenAPI · tools.json · llms.txt · /.well-known/x402