# Resolver

**1. Fetch Zone Details by Zone Name**

* **GET** `/api/v1/resolver/resolve/{zoneName}`
* Resolve a specific zone by its name.

**Path Parameters**

| **Parameter** | **Type** | **Description**                                  |
| ------------- | -------- | ------------------------------------------------ |
| zoneName      | string   | **\[Required]** The name of the zone to resolve. |

<pre><code><strong>e.g. api/v1/resolver/resolve/cederico.metaverse
</strong></code></pre>

**Response**

**200 OK**

```json
{
    "timestamp": "2024-07-03T16:22:53.157",
    "data": {
        "host": "cederico.metaverse",
        "network": "POLYGON",
        "tld": "metaverse",
        "tokenId": "27852860280769187492768842851433555806350745604062440243777647496936527137670",
        "sld": "cederico",
        "isTld": false,
        "isSld": true,
        "records": [
            {
                "key": "token.ETH.0",
                "type": "ETH",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.BTC.0",
                "type": "BTC",
                "value": "bc1qmklcz6knjtudu5vk535zegfk9xf4n0vg8tsv6n"
            },
            {
                "key": "token.MATIC.0",
                "type": "MATIC",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.BNB.0",
                "type": "BNB",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.USDT.0",
                "type": "USDT",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.USDC.0",
                "type": "USDC",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.EUROC.0",
                "type": "EUROC",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.xDAI.0",
                "type": "xDAI",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.BUSD.0",
                "type": "BUSD",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.AURORA.0",
                "type": "AURORA",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "record.A.0",
                "type": "A",
                "value": "34.22.218.54"
            }
        ]
    }
}
```

2. &#x20;**Fetch Zone Details by Address**

* **GET** `/api/v1/resolver/resolve/address/{address}`
* Resolve a specific zone by blockchain address.

**Path Parameters**

| **Parameter** | **Type** | **Description**                                     |
| ------------- | -------- | --------------------------------------------------- |
| address       | string   | **\[Required]** The address of the zone to resolve. |

<pre><code><strong>e.g. api/v1/resolver/resolve/address/0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5
</strong></code></pre>

**Response**

**200 OK**

```json
{
    "timestamp": "2024-08-22T09:27:44.830132",
    "data": {
        "host": "cederico.metaverse",
        "network": "POLYGON",
        "tld": "metaverse",
        "tokenId": "27852860280769187492768842851433555806350745604062440243777647496936527137670",
        "sld": "cederico",
        "isTld": false,
        "isSld": true,
        "records": [
            {
                "key": "token.ETH.0",
                "type": "ETH",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.BTC.0",
                "type": "BTC",
                "value": "bc1qmklcz6knjtudu5vk535zegfk9xf4n0vg8tsv6n"
            },
            {
                "key": "token.MATIC.0",
                "type": "MATIC",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.BNB.0",
                "type": "BNB",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.USDT.0",
                "type": "USDT",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.USDC.0",
                "type": "USDC",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.EUROC.0",
                "type": "EUROC",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.xDAI.0",
                "type": "xDAI",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.BUSD.0",
                "type": "BUSD",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "token.AURORA.0",
                "type": "AURORA",
                "value": "0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"
            },
            {
                "key": "record.A.0",
                "type": "A",
                "value": "34.22.218.54"
            }
        ]
    }
}
```

**3. Single Namespace Resolver**

* **GET** `/api/v1/resolver/{namespace}/{zoneName}`
* Resolve a specific zone by its name in a given namespace. Available namespace: Freename (`FNS`), Unstoppable Domains (`UD`) and Ethereum Name Space (`ENS`).
* If a domain is in custody, it returns as resolved address the wallet address passed as body parameter to the endpoint: `/api/v1/resolver/{asciiName}`

**Path Parameters**

| **Parameter** | **Type** | **Description**                                                                                                                                         |
| ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| namespace     | string   | <p><strong>[Required]</strong> The acronym of the namespace in which perform resolution.<br><code>FNS</code><br><code>UD</code><br><code>ENS</code></p> |
| zoneName      | string   | **\[Required]** The name of the zone to resolve.                                                                                                        |



**Response**

**200 OK**\
\
**FNS Example:**

<pre><code><strong>e.g. api/v1/resolver/FNS/davide.chain
</strong></code></pre>

**Response**

```json
{
  "timestamp": "2025-03-05T14:49:59.504098117",
  "data": {
    "name": "davide.chain",
    "asciiName": "davide.chain",
    "level": "SLD",
    "namespace": "FNS",
    "network": "polygon",
    "tokenId": "90777953609510054281488883743633119686125636071182760521340225939732332499981",
    "owner": "0x47f22fee23c165231fa4ae22f5fb601c18097f6f",
    "resolvedAddress": null,
    "registrationDate": "2022-10-16T11:15:12.523",
    "expirationDate": null,
    "records": [
      {
        "key": "record.CNAME.0",
        "type": "CNAME",
        "value": "cname.vercel-dns.com"
      },
      {
        "key": "record.A.0",
        "type": "A",
        "value": "76.76.21.21"
      }
    ]
  }
}
```

\
**UD Example:**

<pre><code><strong>e.g. api/v1/resolver/UD/free.xmr
</strong></code></pre>

```json
{
  "timestamp": "2025-03-05T14:51:28.232227843",
  "data": {
    "name": "free.xmr",
    "asciiName": "free.xmr",
    "level": "SLD",
    "namespace": "UD",
    "network": "POLYGON",
    "tokenId": "49876188011878691066630568005647820382064440584891401385971285090972192179634",
    "owner": "0x9ce6ddab7e8a17025167367a47daa026fcc218eb",
    "resolvedAddress": "0x9ce6ddab7e8a17025167367a47daa026fcc218eb",
    "registrationDate": null,
    "expirationDate": null,
    "records": [
      {
        "key": "crypto.SOL.address",
        "type": null,
        "value": "DhUbrEyq9bHwD9jf8bLcNCBNnmk8K3MV6QEkhVG3DGSD"
      },
      {
        "key": "crypto.USDC.version.MATIC.address",
        "type": null,
        "value": "0x9ce6ddaB7E8A17025167367a47DAa026fCc218EB"
      },
      {
        "key": "crypto.ETH.address",
        "type": null,
        "value": "0x9ce6ddaB7E8A17025167367a47DAa026fCc218EB"
      },
      {
        "key": "crypto.BTC.address",
        "type": null,
        "value": "bc1qk3p9esfapts4yq59qwcgjudfump8e6enjy00kq"
      },
      {
        "key": "crypto.MATIC.version.MATIC.address",
        "type": null,
        "value": "0x9ce6ddaB7E8A17025167367a47DAa026fCc218EB"
      },
      {
        "key": "ipfs.html.value",
        "type": null,
        "value": "QmQLvsgTQToosdwZp2dWL1bKjBWtfy9zHqZX6yyzTDZ7yQ"
      }
    ]
  }
}
```

\
**ENS Example:**

<pre><code><strong>e.g. api/v1/resolver/ENS/vitalik.eth
</strong></code></pre>

```json
{
  "timestamp": "2025-03-05T14:52:03.099267659",
  "data": {
    "name": "vitalik.eth",
    "asciiName": "vitalik.eth",
    "level": "SLD",
    "namespace": "ENS",
    "network": "ETHEREUM",
    "tokenId": "0xee6c4522aab0003e8d14cd40a6af439055fd2577951148c14b6cea9a53475835",
    "owner": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
    "resolvedAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
    "registrationDate": "2017-06-18T08:39:14",
    "expirationDate": "2046-03-28T13:25:30",
    "records": [
      {
        "key": "url",
        "type": null,
        "value": "https://vitalik.ca"
      },
      {
        "key": "avatar",
        "type": null,
        "value": "https://euc.li/vitalik.eth"
      },
      {
        "key": "description",
        "type": null,
        "value": "mi pinxe lo crino tcati"
      },
      {
        "key": "com.twitter",
        "type": null,
        "value": "VitalikButerin"
      },
      {
        "key": "com.github",
        "type": null,
        "value": "vbuterin"
      },
      {
        "key": "header",
        "type": null,
        "value": "https://pbs.twimg.com/profile_banners/295218901/1638557376/1500x500"
      },
      {
        "key": "60",
        "type": null,
        "value": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
      }
    ]
  }
}
```
