{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fiatdock-com/json-schema/fiatdock-com-ens-resolve-schema.json",
  "title": "EnsResolve",
  "description": "Paid. ENS & Basename resolver (both ways, with profile records).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fiatdock-com-chain-api-openapi.yml#/components/schemas/EnsResolve",
  "type": "object",
  "properties": {
    "query": {
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "address": {
          "type": "string"
        }
      },
      "description": "What was asked: a name or an address"
    },
    "name": {
      "type": "string",
      "description": "The ENS name"
    },
    "address": {
      "type": "string",
      "description": "The address it resolves to (checksummed)"
    },
    "primaryName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The address's own primary (reverse) name, verified to resolve back, or null"
    },
    "isPrimaryName": {
      "type": "boolean",
      "description": "True when the address's primary name is this name"
    },
    "records": {
      "type": "object",
      "properties": {
        "url": {
          "type": [
            "string",
            "null"
          ]
        },
        "twitter": {
          "type": [
            "string",
            "null"
          ]
        },
        "github": {
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "avatar": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "url",
        "twitter",
        "github",
        "description",
        "avatar"
      ],
      "description": "Profile records the name's owner published (their words, unverified); avatar is the raw record and is not fetched"
    },
    "chain": {
      "type": "string",
      "description": "Where ENS was read (Ethereum mainnet)"
    },
    "resolvedVia": {
      "type": "string",
      "description": "How the name was resolved"
    },
    "elapsedMs": {
      "type": "number",
      "description": "Time taken, in ms"
    },
    "asOf": {
      "type": "string",
      "description": "ISO time of the read"
    },
    "note": {
      "type": "string",
      "description": "What the records are, and the limits"
    },
    "defaulted": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "field",
        "to",
        "value",
        "note"
      ],
      "description": "Present only when the body was empty: which subject the answer is for, and why"
    }
  },
  "required": [
    "query",
    "name",
    "address",
    "primaryName",
    "isPrimaryName",
    "records",
    "chain",
    "resolvedVia",
    "elapsedMs",
    "asOf",
    "note"
  ]
}