# Base Basename/ENS Resolver

> Base Basename/ENS Resolver is a paid API for AI agents from x402-data-api.bodhinindustries.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Resolves a Basename or ENS name to its on-chain address (or reverse-resolves an address to its primary Basename), with spoof-guard verification, computed live from the Base chain.

## Facts

- Endpoint: GET https://x402-data-api.bodhinindustries.workers.dev/basename
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-basename-ens-resolver-d425d301
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9r5RO5stonpOcWchry67d

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability base-basename-ens-resolver-d425d301
```

Example prompt: What wallet address does jesse.base.eth resolve to on Base, and does the reverse lookup confirm it's not spoofed?

## When to prefer this

Use this endpoint when you need trustless, live Basename/ENS resolution on Base L2 with built-in spoof-guard verification and no reliance on third-party indexers. Prefer it over centralized name services when on-chain freshness, anti-spoofing guarantees, and avatar record retrieval matter.

## Known failure modes

- Name not registered or expired — resolved: false with a reason string
- Address has no primary Basename set — resolved: false
- Spoof detected — verified: false when reverse name doesn't resolve back to the queried address
- Malformed input (neither valid ENS/Basename nor 0x address) — error or resolved: false
- Base RPC unavailable — service error

## How this service works

Self-computed Base onchain toolkit for AI agents: ERC-20 safety scan, manipulation-resistant TWAP price oracle, gas/fee oracle, calldata decoder, token/address/contract intel, wallet approval-risk audit, and batch token triage — all computed live from raw Base chain, no third-party data.

## Output

Returns whether the Basename/ENS resolved successfully, the resolved wallet address, the primary Basename (if reverse mode), an avatar URL if set, the direction of resolution (forward or reverse), a spoof-guard verified flag confirming the primary name resolves back to the queried address, the Base block height at query time, and an ISO-8601 timestamp — all computed live from the Base chain with no third-party data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "query"
 ],
 "properties": {
  "query": {
   "type": "string",
   "description": "A Basename/ENS name (e.g. jesse.base.eth) to resolve to an address, OR a 0x address to reverse-resolve to its primary name."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "description": "resolved/primary Basename (or null)"
  },
  "block": {
   "type": "integer",
   "description": "Base block height"
  },
  "query": {
   "type": "string",
   "description": "raw input"
  },
  "avatar": {
   "type": "string",
   "description": "avatar text record (or null)"
  },
  "reason": {
   "type": "string",
   "description": "why unresolved (or null)"
  },
  "address": {
   "type": "string",
   "description": "resolved/queried address (or null)"
  },
  "resolved": {
   "type": "boolean",
   "description": "a record was found"
  },
  "verified": {
   "type": "boolean",
   "description": "reverse-mode spoof-guard: primary name resolves back to this address (or null in forward mode)"
  },
  "direction": {
   "type": "string",
   "description": "forward | reverse"
  },
  "computedAt": {
   "type": "string",
   "description": "ISO-8601 timestamp"
  },
  "thirdPartyDataUsed": {
   "type": "boolean",
   "description": "always false"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-basename-ens-resolver-d425d301/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-data-api.bodhinindustries.workers.dev](https://www.zero.xyz/host/x402-data-api.bodhinindustries.workers.dev/llms.txt)
