{
  "type": "object",
  "properties": {
    "handle": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
    "username": { "type": "string" },
    "description": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
    "profileImgUrl": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
    "updatedAt": { "type": "number" },
    "createdAt": { "type": "number" },
    "wallet": { "type": "string" },
    "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"]
      }
    },
    "assets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "token": {
            "type": "object",
            "properties": {
              "id": { "type": "string" },
              "name": { "type": "string" },
              "symbol": { "type": "string" },
              "decimals": { "type": "number" }
            },
            "required": ["id", "name", "symbol", "decimals"]
          },
          "amount": { "type": "string" }
        },
        "required": ["id", "token", "amount"]
      }
    }
  },
  "required": [
    "username",
    "updatedAt",
    "createdAt",
    "wallet",
    "listings",
    "activities",
    "assets"
  ],
  "x-readme-ref-name": "User"
}
