Identity ens lookup

From XSpoonAi/spoon-awesome-skill · View interactive version

Identity ens lookup is an AI agent skill from the GitHub repository XSpoonAi/spoon-awesome-skill. Real-time Ethereum Name Service (ENS) resolution using blockchain RPC queries. Resolves ENS domain names to Ethereum addresses and vice versa, with support for retrieving metadata like avatars, text r

How to use this skill

Skill file

Identity ENS Lookup - Skill Specification

Skill ID

identity-ens-lookup

Category

Web3 Core Operations

Overview

Real-time Ethereum Name Service (ENS) resolution using blockchain RPC queries. Resolves ENS domain names to Ethereum addresses and vice versa, with support for retrieving metadata like avatars, text records, and resolver information.

Capabilities

Core Functions

  1. resolve - Forward resolution: ENS name → Ethereum address
  2. reverse - Reverse resolution: Ethereum address → ENS name

Supported Operations

Input Format

Parameters

{
  "name": "vitalik.eth",        // ENS name (with or without .eth suffix)
  "address": "0x...",           // Ethereum address (for reverse resolution)
  "action": "resolve|reverse"   // Optional, auto-detected from parameters
}

Note: Provide either name (for forward resolution) OR address (for reverse resolution), not both.

Output Format

Success Response (Forward Resolution)

{
  "success": true,
  "name": "vitalik.eth",
  "node": "0xee6c4522aab0003e8d14cd40a6af439055fd2577951148c14b6cea9a53475835",
  "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "owner": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "resolver": "0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E63",
  "text_records": {
    "avatar": "https://euc.li/vitalik.eth",
    "url": "https://vitalik.ca",
    "description": "mi pinxe lo crino tcati",
    "twitter": "@VitalikButerin",
    "github": "vbuterin"
  },
  "block_number": 24398659,
  "rpc_used": "https://eth-mainnet.public.blastapi.io",
  "timestamp": "2026-02-06T15:24:23+00:00"
}

Success Response (Reverse Resolution)

{
  "success": true,
  "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "name": "vitalik.eth",
  "verified": true,
  "block_number": 24398660,
  "rpc_used": "https://eth-mainnet.public.blastapi.io",
  "timestamp": "2026-02-06T15:24:35+00:00"
}

No ENS Name Registered (Reverse Resolution)

{
  "success": true,
  "address": "0x1234567890123456789012345678901234567890",
  "name": null,
  "message": "No reverse ENS name registered"
}

Error Response

{
  "success": false,
  "error": "validation_error|connection_error|dependency_error|system_error",
  "message": "Human-readable error description"
}

Error Handling

| Error Type | Cause | Solution |

|-----------|-------|----------|

| dependency_error | web3.py not installed | Run pip install web3 |

| connection_error | RPC endpoint unreachable | Check ETHEREUM_RPC environment variable or RPC endpoint availability |

| validation_error | No ENS name registered / Invalid format | Verify ENS name or address format |

| system_error | Unexpected error | Check logs and retry |

Configuration

Environment Variables

ETHEREUM_RPC=https://eth-mainnet.public.blastapi.io  # Custom RPC endpoint (optional)

Dependencies

Required

Optional

Blockchain Integration

RPC Methods

Smart Contracts

Protocol Details

Validation Rules

  1. ENS Name Validation: Must be valid domain format (alphanumeric + hyphens), case-insensitive
  2. Address Validation: Must be 42-character hex string starting with 0x
  3. Auto-Suffix: Automatically appends .eth if not provided in name
  4. Namehash Calculation: Uses Keccak-256 hashing over split labels in reverse order

Real-World Data Guarantees

All responses include:

Example: vitalik.eth resolves to 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 with real text records from blockchain.

Performance

Supported Networks

Currently supports Ethereum mainnet. Future versions may add:

Testing

Test Cases Included

Example Tests

# Test forward resolution
echo '{"name": "vitalik.eth"}' | python3 scripts/main.py

# Test reverse resolution
echo '{"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"}' | python3 scripts/main.py

# Test error handling
echo '{"name": "nonexistent123456789.eth"}' | python3 scripts/main.py

Version History

Author

web3devzz

License

MIT

Related Skills

References

$ echo '{"name": "vitalik.eth"}' | python3 scripts/main.py

{

"success": true,

"name": "vitalik.eth",

"address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",

"owner": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",

"avatar": "https://euc.li/vitalik.eth",

"text_records": {

"email": "user@example.com",

"twitter": "@user"

}

}


## Error Handling

When an error occurs, the skill returns:

{

"ok": false,

"error": "Error description",

"details": {

"name": "Name not found"

}

}

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.