{
  "type": "object",
  "properties": {
    "key": { "type": "string" },
    "projectID": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
    "name": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
    "registry": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
    "country": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
    "description": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
    "location": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "type": { "type": "string", "enum": ["Feature"] },
            "geometry": {
              "type": "object",
              "properties": {
                "type": { "type": "string", "enum": ["Point"] },
                "coordinates": {
                  "minItems": 2,
                  "maxItems": 2,
                  "type": "array",
                  "items": { "type": "number" }
                }
              },
              "required": ["type", "coordinates"]
            }
          },
          "required": ["type", "geometry"]
        },
        { "type": "null" }
      ]
    },
    "methodologies": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
                  "category": {
                    "anyOf": [{ "type": "string" }, { "type": "null" }]
                  },
                  "name": {
                    "anyOf": [{ "type": "string" }, { "type": "null" }]
                  }
                }
              },
              { "type": "null" }
            ]
          }
        },
        { "type": "null" }
      ]
    },
    "images": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "caption": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
          "url": { "anyOf": [{ "type": "string" }, { "type": "null" }] }
        }
      }
    },
    "long_description": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
    "short_description": {
      "anyOf": [{ "type": "string" }, { "type": "null" }]
    },
    "url": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
    "stats": {
      "type": "object",
      "properties": {
        "totalBridged": { "type": "number" },
        "totalRetired": { "type": "number" },
        "totalSupply": { "type": "number" }
      },
      "required": ["totalBridged", "totalRetired", "totalSupply"]
    },
    "prices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "poolName": {
            "description": "Lowercase name of pool / pool token e.g. 'bct'",
            "anyOf": [
              { "type": "string", "enum": ["ubo"] },
              { "type": "string", "enum": ["nbo"] },
              { "type": "string", "enum": ["bct"] },
              { "type": "string", "enum": ["nct"] }
            ]
          },
          "supply": {
            "description": "Remaining supply in pool",
            "type": "string"
          },
          "poolAddress": {
            "description": "Address of the pool itself, e.g. bct token address",
            "type": "boolean"
          },
          "projectTokenAddress": {
            "description": "Address of the project token in this pool",
            "type": "string"
          },
          "isPoolDefault": {
            "description": "True if default project for pool and no selective redemption fee applies",
            "type": "boolean"
          },
          "singleUnitPrice": {
            "description": "formatted USDC price for 1 tonne e.g. '0.123456'",
            "type": "string"
          }
        },
        "required": [
          "poolName",
          "supply",
          "poolAddress",
          "projectTokenAddress",
          "isPoolDefault",
          "singleUnitPrice"
        ]
      }
    },
    "listings": {
      "type": "array",
      "items": {
        "description": "Marketplace listing with per-tonne price and project info.",
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique listing identifier",
            "type": "string"
          },
          "leftToSell": {
            "description": "Remaining supply. Unformatted 18 decimal string",
            "type": "string"
          },
          "tokenAddress": {
            "description": "Address of the asset being sold",
            "type": "string"
          },
          "singleUnitPrice": {
            "description": "USDC price per tonne. Unformatted 6 decimal string. e.g. 1000000",
            "type": "string"
          },
          "totalAmountToSell": { "type": "string" },
          "active": { "anyOf": [{ "type": "boolean" }, { "type": "null" }] },
          "deleted": { "anyOf": [{ "type": "boolean" }, { "type": "null" }] },
          "batches": {
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "null" }
            ]
          },
          "batchPrices": {
            "anyOf": [
              { "type": "array", "items": { "type": "string" } },
              { "type": "null" }
            ]
          },
          "createdAt": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
          "updatedAt": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
          "seller": {
            "type": "object",
            "properties": {
              "handle": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
              "username": {
                "anyOf": [{ "type": "string" }, { "type": "null" }]
              },
              "description": {
                "anyOf": [{ "type": "string" }, { "type": "null" }]
              },
              "profileImgUrl": {
                "anyOf": [{ "type": "string" }, { "type": "null" }]
              },
              "id": { "type": "string" }
            },
            "required": ["id"]
          },
          "expiration": {
            "description": "Unix Timestamp (seconds) when the listing expires.",
            "type": "string"
          },
          "minFillAmount": {
            "description": "Minimum quantity for purchase transaction to succeed.",
            "type": "string"
          },
          "project": {
            "type": "object",
            "properties": {
              "id": { "type": "string" },
              "key": { "type": "string" },
              "vintage": { "type": "string" },
              "name": { "type": "string" },
              "category": { "type": "string" },
              "country": { "type": "string" },
              "methodology": { "type": "string" }
            },
            "required": [
              "id",
              "key",
              "vintage",
              "name",
              "category",
              "country",
              "methodology"
            ]
          }
        },
        "required": [
          "id",
          "leftToSell",
          "tokenAddress",
          "singleUnitPrice",
          "totalAmountToSell",
          "seller",
          "expiration",
          "minFillAmount",
          "project"
        ]
      }
    },
    "activities": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "amount": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
          "previousAmount": {
            "anyOf": [{ "type": "string" }, { "type": "null" }]
          },
          "price": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
          "previousPrice": {
            "anyOf": [{ "type": "string" }, { "type": "null" }]
          },
          "timeStamp": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
          "activityType": {
            "anyOf": [{ "type": "string" }, { "type": "null" }]
          },
          "seller": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": { "type": "string" },
                  "handle": {
                    "anyOf": [{ "type": "string" }, { "type": "null" }]
                  }
                },
                "required": ["id"]
              },
              { "type": "null" }
            ]
          },
          "buyer": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": { "type": "string" },
                  "handle": {
                    "anyOf": [{ "type": "string" }, { "type": "null" }]
                  }
                },
                "required": ["id"]
              },
              { "type": "null" }
            ]
          }
        },
        "required": ["id"]
      }
    },
    "price": { "type": "string" },
    "vintage": { "type": "string" }
  },
  "required": [
    "key",
    "images",
    "stats",
    "prices",
    "listings",
    "activities",
    "price",
    "vintage"
  ],
  "x-readme-ref-name": "DetailedProject"
}
