> ## Documentation Index
> Fetch the complete documentation index at: https://docs.compasslabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Resolve ENS

> An ENS name is a string ending in `.eth`.

E.g. `vitalik.eth`. This endpoint can be used to
query the actual ethereum wallet address behind the ENS name.



## OpenAPI

````yaml /v1/combined_spec.json get /v1/generic/ens
openapi: 3.1.0
info:
  title: Compass API
  description: Compass Labs DeFi API
  version: 0.0.1
servers:
  - url: https://api.compasslabs.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v1/generic/ens:
    get:
      tags:
        - Universal
      summary: Resolve ENS
      description: |-
        An ENS name is a string ending in `.eth`.

        E.g. `vitalik.eth`. This endpoint can be used to
        query the actual ethereum wallet address behind the ENS name.
      operationId: v1_generic_ens
      parameters:
        - name: chain
          in: query
          required: true
          schema:
            type: string
            enum:
              - ethereum
            title: Chain
            default: ethereum
        - name: ens_name
          in: query
          required: false
          schema:
            type: string
            default: vitalik.eth
            title: Ens Name
          description: The ENS name to resolve.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnsNameInfoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from compass_api_sdk import CompassAPI, models


            with CompassAPI(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as compass_api:

                res = compass_api.universal.generic_ens(chain=models.V1GenericEnsChain.ETHEREUM, ens_name="vitalik.eth")

                # Handle response
                print(res)
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { CompassApiSDK } from "@compass-labs/api-sdk";

            const compassApiSDK = new CompassApiSDK({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await compassApiSDK.universal.genericEns({
                chain: "ethereum",
                ensName: "vitalik.eth",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    EnsNameInfoResponse:
      properties:
        wallet_address:
          type: string
          title: Wallet Address
          description: The wallet address of the user
          examples:
            - '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45'
        registrant:
          type: string
          title: Registrant
          description: The registrant of the ENS
          examples:
            - '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45'
      type: object
      required:
        - wallet_address
        - registrant
      title: EnsNameInfoResponse
      description: Response model for ENS name details.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Compass API Key. Get your key
        [here](https://www.compasslabs.ai/dashboard).

````