{
  "openapi": "3.1.0",
  "info": {
    "title": "Normies Yacht Club API",
    "version": "1.0.0",
    "summary": "CC0 official data and on-chain pixel art for the Normies Yacht Club collection.",
    "description": "Free, public-domain, read-only JSON API. No auth, no rate limits. Publishes no wallet addresses; live ownership is on-chain.",
    "license": {
      "name": "CC0 1.0 Universal",
      "url": "https://creativecommons.org/publicdomain/zero/1.0/"
    },
    "contact": {
      "name": "Normies Yacht Club",
      "url": "https://normiesyachtclub.com/developers.html"
    }
  },
  "servers": [
    {
      "url": "https://normiesyachtclub.com/api/v1"
    }
  ],
  "paths": {
    "/stats.json": {
      "get": {
        "operationId": "getStats",
        "summary": "Collection totals",
        "responses": {
          "200": {
            "description": "Totals",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stats"
                }
              }
            }
          }
        }
      }
    },
    "/fleet.json": {
      "get": {
        "operationId": "getFleet",
        "summary": "Index of every yacht (no wallets)",
        "responses": {
          "200": {
            "description": "Fleet index",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fleet"
                }
              }
            }
          }
        }
      }
    },
    "/traits.json": {
      "get": {
        "operationId": "getTraits",
        "summary": "Trait frequency table",
        "responses": {
          "200": {
            "description": "Frequencies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/contract.json": {
      "get": {
        "operationId": "getContract",
        "summary": "Contract address, chain and ABI",
        "responses": {
          "200": {
            "description": "Contract info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/yacht/{id}.json": {
      "get": {
        "operationId": "getYacht",
        "summary": "One yacht: traits + 40x40 art bitmap",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Yacht id, 0..2698",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2698
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Yacht",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Yacht"
                }
              }
            }
          },
          "404": {
            "description": "No such yacht"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Stats": {
        "type": "object",
        "properties": {
          "yachts": {
            "type": "integer"
          },
          "wallets": {
            "type": "integer"
          },
          "classes": {
            "type": "object"
          },
          "license": {
            "type": "string"
          }
        }
      },
      "Fleet": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "yachts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FleetEntry"
            }
          }
        }
      },
      "FleetEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "normieId": {
            "type": "integer"
          },
          "pixelCount": {
            "type": "integer"
          },
          "class": {
            "type": "string",
            "enum": [
              "Sloop",
              "Cruiser",
              "Superyacht"
            ]
          },
          "tier": {
            "type": "string",
            "enum": [
              "Cruiser",
              "Sloop",
              "Superyacht",
              "Commodore"
            ],
            "description": "Rarity band: hull class, or Commodore if in the Commodore's Club. Sets anchorPointsPerDay."
          },
          "anchorPointsPerDay": {
            "type": "integer",
            "description": "Anchor Points earned per day the yacht is held (rarity-weighted)."
          },
          "rarityRank": {
            "type": "integer"
          }
        }
      },
      "Yacht": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "normieId": {
            "type": "integer"
          },
          "pixelCount": {
            "type": "integer"
          },
          "class": {
            "type": "string",
            "enum": [
              "Sloop",
              "Cruiser",
              "Superyacht"
            ]
          },
          "tier": {
            "type": "string",
            "enum": [
              "Cruiser",
              "Sloop",
              "Superyacht",
              "Commodore"
            ]
          },
          "anchorPointsPerDay": {
            "type": "integer"
          },
          "rarityRank": {
            "type": "integer"
          },
          "traits": {
            "type": "object"
          },
          "art": {
            "$ref": "#/components/schemas/Art"
          }
        }
      },
      "Art": {
        "type": "object",
        "properties": {
          "size": {
            "type": "integer",
            "const": 40
          },
          "on": {
            "type": "string"
          },
          "off": {
            "type": "string"
          },
          "onPixels": {
            "type": "integer"
          },
          "bits": {
            "type": "string",
            "description": "1600 chars row-major; '1' = on. pixel(x,y)=bits[y*40+x]"
          }
        }
      }
    }
  }
}
