{
  "openapi": "3.1.0",
  "info": {
    "title": "D17 Optional Read API",
    "version": "1.0.0",
    "summary": "Read-only D17 launch snapshots and realtime notifications.",
    "description": "Provider-neutral reference API backed by public Ethereum RPC. It has no wallet key and no transaction endpoint. Amounts are decimal strings in contract units; clients must validate meta.chainId."
  },
  "servers": [
    {
      "url": "http://127.0.0.1:8787",
      "description": "Default local Sepolia profile"
    },
    {
      "url": "http://127.0.0.1:8788",
      "description": "Default local Ethereum mainnet profile"
    }
  ],
  "tags": [
    {
      "name": "Health",
      "description": "Profile readiness and index source status."
    },
    {
      "name": "Deployment",
      "description": "Read-only contract identity, ABI, limits, and hosted policy."
    },
    {
      "name": "Launches",
      "description": "Canonical launch snapshots and phases."
    },
    {
      "name": "Activity",
      "description": "Filtered D17 lifecycle activity."
    },
    {
      "name": "Lockers",
      "description": "Launch-scoped participant locker snapshots."
    },
    {
      "name": "Assets",
      "description": "Sanitized on-chain display assets and optional USD reference."
    },
    {
      "name": "Realtime",
      "description": "WebSocket and SSE notification channels; no replay guarantee."
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Profile health",
        "description": "Returns current chain/index/storage/WebSocket health and public RPC counters.",
        "tags": [
          "Health"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Health"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/prices/eth-usd": {
      "get": {
        "operationId": "getEthUsd",
        "summary": "ETH/USD display reference",
        "description": "Optional cached Chainlink mainnet reference. Display-only; never used in contract math.",
        "tags": [
          "Assets"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/EthUsdPrice"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Collector disabled, unconfigured, stale upstream, or temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/deployer/schema": {
      "get": {
        "operationId": "getDeployerSchema",
        "summary": "Deployer schema",
        "description": "Returns chain identity, canonical factories, the exact createLaunch ABI, validation limits, refund policy, and hosted deployment gates. This is not a write endpoint.",
        "tags": [
          "Deployment"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeployerSchema"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/deploy/schema": {
      "get": {
        "operationId": "getDeploySchemaAlias",
        "summary": "Deployer schema alias",
        "description": "Back-compatible alias for /api/deployer/schema.",
        "tags": [
          "Deployment"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/DeployerSchema"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/launches": {
      "get": {
        "operationId": "listLaunches",
        "summary": "List launches",
        "description": "Returns canonical launches ordered by creation block, each with hydrated config, phase, tokenomics, pool composition, and locker summaries.",
        "tags": [
          "Launches"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Launch"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/launches/{launch}": {
      "get": {
        "operationId": "getLaunch",
        "parameters": [
          {
            "name": "launch",
            "in": "path",
            "required": true,
            "description": "Canonical D17 launch address.",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "examples": [
                "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
              ]
            }
          }
        ],
        "summary": "Get launch",
        "description": "Returns one complete canonical launch snapshot.",
        "tags": [
          "Launches"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Launch"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/launches/{launch}/metadata": {
      "get": {
        "operationId": "getLaunchMetadata",
        "parameters": [
          {
            "name": "launch",
            "in": "path",
            "required": true,
            "description": "Canonical D17 launch address.",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "examples": [
                "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
              ]
            }
          }
        ],
        "summary": "Get launch metadata",
        "description": "Returns parsed/hydrated launch metadata or null.",
        "tags": [
          "Launches"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Metadata"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/launches/{launch}/phase": {
      "get": {
        "operationId": "getLaunchPhase",
        "parameters": [
          {
            "name": "launch",
            "in": "path",
            "required": true,
            "description": "Canonical D17 launch address.",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "examples": [
                "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
              ]
            }
          }
        ],
        "summary": "Get current phase",
        "description": "Computes the current phase from indexed state and wall-clock boundaries.",
        "tags": [
          "Launches"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Phase"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/launches/{launch}/activity": {
      "get": {
        "operationId": "getLaunchActivity",
        "parameters": [
          {
            "name": "launch",
            "in": "path",
            "required": true,
            "description": "Canonical D17 launch address.",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "examples": [
                "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Event ID returned as nextCursor by the previous page."
          },
          {
            "name": "locker",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "examples": [
                "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
              ]
            }
          },
          {
            "name": "include",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated event names to include. Alias: eventTypes."
          },
          {
            "name": "eventTypes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Alias of include."
          },
          {
            "name": "exclude",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated event names to omit. Alias: excludeTypes."
          },
          {
            "name": "excludeTypes",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Alias of exclude."
          }
        ],
        "summary": "Get launch activity",
        "description": "Returns newest-first public D17 lifecycle events with cursor pagination and mirrored-event deduplication.",
        "tags": [
          "Activity"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ActivityPage"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/launches/{launch}/lockers": {
      "get": {
        "operationId": "listLaunchLockers",
        "parameters": [
          {
            "name": "launch",
            "in": "path",
            "required": true,
            "description": "Canonical D17 launch address.",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "examples": [
                "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
              ]
            }
          }
        ],
        "summary": "List launch lockers",
        "description": "Returns launch-scoped locker accounting, cached balances, positions, and event summaries.",
        "tags": [
          "Lockers"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Locker"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/launches/{launch}/lockers/{locker}": {
      "get": {
        "operationId": "getLaunchLocker",
        "parameters": [
          {
            "name": "launch",
            "in": "path",
            "required": true,
            "description": "Canonical D17 launch address.",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "examples": [
                "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
              ]
            }
          },
          {
            "name": "locker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "examples": [
                "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
              ]
            },
            "description": "Canonical locker address registered for this launch."
          }
        ],
        "summary": "Get launch locker",
        "description": "Returns one locker only if it is known for the requested launch.",
        "tags": [
          "Lockers"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Locker"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/assets/logos/{token}.svg": {
      "get": {
        "operationId": "getTokenLogo",
        "summary": "Get sanitized token SVG",
        "description": "Materializes the token's on-chain base64 SVG after size/content checks.",
        "tags": [
          "Assets"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "D17 token address whose on-chain SVG should be served.",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "examples": [
                "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sanitized SVG",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Logo not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Logo exceeds configured maximum",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsafe or unsupported SVG",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/stream": {
      "get": {
        "operationId": "openSseStream",
        "summary": "Open SSE notifications",
        "description": "Sends snapshot, activity, and 25-second comment heartbeats. Notifications have no replay guarantee.",
        "tags": [
          "Realtime"
        ],
        "parameters": [
          {
            "name": "launch",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "examples": [
                "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
              ]
            },
            "description": "Optional launch filter."
          },
          {
            "name": "includeNoisyEvents",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Opt into server-retained silent event types when the profile permits them."
          },
          {
            "name": "includeMarketEvents",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Alias of includeNoisyEvents."
          }
        ],
        "responses": {
          "200": {
            "description": "Server-Sent Events stream",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "snapshot/activity SSE frames and comment heartbeats"
                }
              }
            }
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/ws": {
      "get": {
        "operationId": "openWebSocket",
        "summary": "Open WebSocket notifications",
        "description": "HTTP upgrade to a notification-only WebSocket. The server sends a snapshot immediately, activity later, and ping frames every 25 seconds. Client messages are unsupported. No replay guarantee.",
        "tags": [
          "Realtime"
        ],
        "x-websocket": {
          "queryParameters": {
            "launch": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "examples": [
                "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
              ],
              "required": false
            },
            "includeNoisyEvents": {
              "type": "boolean",
              "default": false
            },
            "includeMarketEvents": {
              "type": "boolean",
              "default": false
            }
          },
          "serverMessages": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RealtimeSnapshot"
              },
              {
                "$ref": "#/components/schemas/RealtimeActivity"
              }
            ]
          },
          "clientMessages": false,
          "closeCodes": {
            "1003": "Client messages are not supported",
            "1008": "Malformed URL or launch filter"
          }
        },
        "parameters": [
          {
            "name": "launch",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "examples": [
                "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
              ]
            },
            "description": "Optional launch filter."
          },
          {
            "name": "includeNoisyEvents",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "includeMarketEvents",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Alias of includeNoisyEvents."
          }
        ],
        "responses": {
          "101": {
            "description": "Switching Protocols"
          },
          "400": {
            "description": "Malformed input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Request rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Meta": {
        "type": "object",
        "required": [
          "chainId",
          "latestBlock",
          "indexedToBlock",
          "stale",
          "generatedAt"
        ],
        "properties": {
          "chainId": {
            "type": "integer",
            "examples": [
              11155111,
              1
            ]
          },
          "latestBlock": {
            "type": "integer",
            "minimum": 0
          },
          "indexedToBlock": {
            "type": "integer",
            "minimum": 0
          },
          "stale": {
            "type": "boolean"
          },
          "sourceStale": {
            "type": "boolean"
          },
          "sourceStaleMs": {
            "type": "integer",
            "minimum": 0
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "ok",
          "error"
        ],
        "properties": {
          "ok": {
            "const": false
          },
          "error": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "retryAfterSeconds": {
            "type": "integer",
            "minimum": 1
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "Summary": {
        "type": "object",
        "required": [
          "chainId",
          "startBlock",
          "latestBlock",
          "indexedToBlock",
          "watchedAddresses",
          "launches",
          "lockers",
          "events"
        ],
        "properties": {
          "chainId": {
            "type": "integer"
          },
          "startBlock": {
            "type": "integer"
          },
          "latestBlock": {
            "type": "integer"
          },
          "indexedToBlock": {
            "type": "integer"
          },
          "watchedAddresses": {
            "type": "integer"
          },
          "launches": {
            "type": "integer"
          },
          "lockers": {
            "type": "integer"
          },
          "events": {
            "type": "integer"
          }
        }
      },
      "Health": {
        "type": "object",
        "required": [
          "status",
          "summary",
          "ws",
          "wsStatus",
          "rpcUsage",
          "storage"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "degraded"
            ]
          },
          "summary": {
            "$ref": "#/components/schemas/Summary"
          },
          "ws": {
            "type": "boolean"
          },
          "wsStatus": {
            "type": "object",
            "properties": {
              "configured": {
                "type": "boolean"
              },
              "live": {
                "type": "boolean"
              },
              "fallbackPolling": {
                "type": "boolean"
              },
              "reconnectScheduled": {
                "type": "boolean"
              },
              "sourceMode": {
                "type": "string",
                "enum": [
                  "ws-logs",
                  "http-poll"
                ]
              },
              "indexDisabled": {
                "type": "boolean"
              },
              "trustedHeads": {
                "type": "boolean"
              },
              "rpcFallbackEnabled": {
                "type": "boolean"
              },
              "logSubscriptionAddresses": {
                "type": "integer"
              },
              "safetyBackfillMs": {
                "type": "integer"
              },
              "gapBackfillBlocks": {
                "type": "integer"
              }
            }
          },
          "rpcUsage": {
            "type": "object",
            "additionalProperties": true,
            "description": "Public source counters; verbose diagnostics are opt-in server-side."
          },
          "storage": {
            "type": "object",
            "properties": {
              "mode": {
                "const": "json-file"
              },
              "writable": {
                "type": "boolean"
              }
            }
          },
          "diagnostics": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "Contracts": {
        "type": "object",
        "required": [
          "d17Factory",
          "tokenFactory",
          "launchFactory",
          "liquidityVaultFactory",
          "lockerFactory"
        ],
        "properties": {
          "d17Factory": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "tokenFactory": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "launchFactory": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "liquidityVaultFactory": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "lockerFactory": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          }
        }
      },
      "AbiItem": {
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": true,
        "description": "Canonical ABI item for D17Factory.createLaunch."
      },
      "DeployerSchema": {
        "type": "object",
        "required": [
          "chainId",
          "profile",
          "contractVersion",
          "contractVersionId",
          "hostedPublicDeployEnabled",
          "mainnetHostedDeployEnabled",
          "contracts",
          "createLaunch",
          "validation",
          "refundPolicy",
          "knownContractGaps"
        ],
        "properties": {
          "chainId": {
            "type": "integer"
          },
          "profile": {
            "type": "string",
            "enum": [
              "sepolia",
              "mainnet",
              "self-hosted"
            ]
          },
          "contractVersion": {
            "type": "string"
          },
          "contractVersionId": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{64}$"
          },
          "hostedPublicDeployEnabled": {
            "type": "boolean"
          },
          "mainnetHostedDeployEnabled": {
            "type": "boolean"
          },
          "contracts": {
            "$ref": "#/components/schemas/Contracts"
          },
          "createLaunch": {
            "type": "object",
            "required": [
              "contract",
              "method",
              "signature",
              "txValueWei",
              "signaturesRequired",
              "abi",
              "configFields"
            ],
            "properties": {
              "contract": {
                "const": "D17Factory"
              },
              "method": {
                "const": "createLaunch"
              },
              "signature": {
                "type": "string"
              },
              "txValueWei": {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Unsigned integer encoded as a decimal string in contract units."
              },
              "signaturesRequired": {
                "const": 1
              },
              "abi": {
                "$ref": "#/components/schemas/AbiItem"
              },
              "configFields": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "validation": {
            "type": "object",
            "additionalProperties": true
          },
          "refundPolicy": {
            "type": "object",
            "additionalProperties": true
          },
          "manualDistribution": {
            "type": "object",
            "additionalProperties": true
          },
          "revertStrings": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "knownContractGaps": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "lateSettlement": {
            "type": "object",
            "additionalProperties": true
          },
          "metadataVerification": {
            "type": "object",
            "additionalProperties": true
          },
          "realtime": {
            "type": "object",
            "additionalProperties": true
          },
          "launchDiscovery": {
            "type": "object",
            "additionalProperties": true
          },
          "lockerBalances": {
            "type": "object",
            "additionalProperties": true
          },
          "ingestionPolicy": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "Phase": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "kind": {
            "type": "integer",
            "minimum": 0,
            "maximum": 7
          },
          "label": {
            "type": "string",
            "enum": [
              "not-started",
              "round-open",
              "refund-open",
              "ready-to-finalize",
              "settlement-open",
              "pool-ready",
              "trading-open",
              "failed",
              "unknown"
            ]
          },
          "roundIndex": {
            "type": "integer"
          },
          "displayRound": {
            "type": [
              "integer",
              "null"
            ]
          },
          "startsAt": {
            "type": "integer"
          },
          "endsAt": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Unix timestamp in seconds, or null for an open-ended/unknown boundary."
          },
          "openEnded": {
            "type": "boolean"
          },
          "raw": {
            "type": "array",
            "minItems": 4,
            "maxItems": 4,
            "items": {
              "type": "string"
            }
          },
          "source": {
            "type": "string"
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RefundPolicy": {
        "type": "object",
        "properties": {
          "refundable": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "refundWindowStart": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Unix timestamp in seconds, or null for an open-ended/unknown boundary."
          },
          "refundWindowEnd": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Unix timestamp in seconds, or null for an open-ended/unknown boundary."
          },
          "source": {
            "type": "string"
          },
          "appliesPenalty": {
            "type": "boolean"
          },
          "refundPenaltyBps": {
            "type": [
              "integer",
              "null"
            ]
          },
          "deflectionCostBps": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "Round": {
        "type": "object",
        "required": [
          "round",
          "displayRound",
          "start",
          "end",
          "seconds",
          "shareBps",
          "refundable",
          "refundPolicy"
        ],
        "properties": {
          "round": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4
          },
          "displayRound": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5
          },
          "start": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Unix timestamp in seconds, or null for an open-ended/unknown boundary."
          },
          "end": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Unix timestamp in seconds, or null for an open-ended/unknown boundary."
          },
          "seconds": {
            "type": [
              "integer",
              "null"
            ]
          },
          "shareBps": {
            "type": [
              "integer",
              "null"
            ]
          },
          "baseTokenAllocation": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "tokenAllocation": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "soldTokens": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "raisedWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "anchorTargetWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "underfillRemainingWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "discoveredPriceWad": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "claimTime": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Unix timestamp in seconds, or null for an open-ended/unknown boundary."
          },
          "refundable": {
            "type": "boolean"
          },
          "refundPenaltyBps": {
            "type": [
              "integer",
              "null"
            ]
          },
          "deflectionCostBps": {
            "type": [
              "integer",
              "null"
            ]
          },
          "refundPolicy": {
            "$ref": "#/components/schemas/RefundPolicy"
          }
        },
        "additionalProperties": true
      },
      "LaunchConfig": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "launchId": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{64}$"
          },
          "roundCount": {
            "const": 5
          },
          "finalRound": {
            "const": 4
          },
          "refundStageCount": {
            "const": 4
          },
          "contractRoundIndexBase": {
            "const": 0
          },
          "displayRoundIndexBase": {
            "const": 1
          },
          "startTime": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Unix timestamp in seconds, or null for an open-ended/unknown boundary."
          },
          "roundSeconds": {
            "type": "array",
            "minItems": 5,
            "maxItems": 5,
            "items": {
              "type": "integer"
            }
          },
          "roundSharesBps": {
            "type": "array",
            "minItems": 5,
            "maxItems": 5,
            "items": {
              "type": "string"
            }
          },
          "roundStart": {
            "type": "array",
            "minItems": 5,
            "maxItems": 5,
            "items": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "description": "Unix timestamp in seconds, or null for an open-ended/unknown boundary."
            }
          },
          "roundEnd": {
            "type": "array",
            "minItems": 5,
            "maxItems": 5,
            "items": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "description": "Unix timestamp in seconds, or null for an open-ended/unknown boundary."
            }
          },
          "roundDiscoveredPriceWad": {
            "type": "array",
            "minItems": 5,
            "maxItems": 5,
            "items": {
              "type": "string",
              "pattern": "^[0-9]+$",
              "description": "Unsigned integer encoded as a decimal string in contract units."
            }
          },
          "refundSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Duration in seconds, or null when unavailable."
          },
          "settlementSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Duration in seconds, or null when unavailable."
          },
          "refundPenaltyBps": {
            "type": [
              "integer",
              "null"
            ]
          },
          "refundPolicySource": {
            "type": "string"
          },
          "refundPenaltySchedule": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RefundPolicy"
            }
          },
          "refundPenaltyRounds": {
            "type": "array",
            "items": {
              "type": "boolean"
            }
          },
          "minCommitWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "minPhase1Weth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "minAnchorPriceWad": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "treasuryBps": {
            "type": [
              "integer",
              "null"
            ]
          },
          "treasury": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "officialPair": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "examples": [
                  "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
                ]
              },
              {
                "const": ""
              }
            ]
          },
          "allFinalCommitmentsSettled": {
            "type": "boolean"
          },
          "poolCreationRequiresAllSettled": {
            "const": false
          }
        }
      },
      "Tokenomics": {
        "type": "object",
        "properties": {
          "supply": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "tokenSupply": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "maxSupply": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "totalSupply": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Unsigned integer encoded as a decimal string in contract units."
              },
              {
                "type": "null"
              }
            ]
          },
          "saleTokens": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "lpTokens": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "deadTokens": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "burnedTokens": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "manualDistributionTokens": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "deployerAirdropTokens": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "manualDistributionRecipient": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "treasuryBps": {
            "type": [
              "integer",
              "null"
            ]
          },
          "treasury": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "minCommitWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "officialPair": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "examples": [
                  "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
                ]
              },
              {
                "const": ""
              }
            ]
          },
          "officialTokenUsedForLp": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "lateTokenUsedForLp": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "reservedLpTokensRemaining": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          }
        }
      },
      "PoolComposition": {
        "type": "object",
        "properties": {
          "model": {
            "const": "proportional-initial-plus-late-topup"
          },
          "officialPair": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "examples": [
                  "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
                ]
              },
              {
                "const": ""
              }
            ]
          },
          "allFinalCommitmentsSettled": {
            "type": "boolean"
          },
          "finalCommittedWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "settledCommittedWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "unsettledCommittedWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "totalLiquidityWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "settledLiquidityWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "poolSettledCommittedWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "poolSettledLiquidityWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "initial": {
            "type": "object",
            "additionalProperties": true
          },
          "lateTopUp": {
            "type": "object",
            "additionalProperties": true
          },
          "reserved": {
            "type": "object",
            "additionalProperties": true
          },
          "totals": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "Metadata": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "tokenName": {
            "type": "string"
          },
          "tokenSymbol": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "logoSvgUri": {
            "type": "string"
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "linkType": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "metadataHash": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{64}$"
          },
          "verified": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "Activity": {
        "type": "object",
        "required": [
          "id",
          "eventName",
          "sourceKind",
          "address",
          "txHash",
          "blockNumber",
          "logIndex",
          "timestamp",
          "args"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "eventName": {
            "type": "string"
          },
          "sourceKind": {
            "type": "string"
          },
          "address": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "locker": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "examples": [
                  "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "owner": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "examples": [
                  "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "roundIndex": {
            "type": [
              "integer",
              "null"
            ]
          },
          "amountWeth": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Unsigned integer encoded as a decimal string in contract units."
              },
              {
                "type": "null"
              }
            ]
          },
          "amountToken": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Unsigned integer encoded as a decimal string in contract units."
              },
              {
                "type": "null"
              }
            ]
          },
          "penaltyWeth": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Unsigned integer encoded as a decimal string in contract units."
              },
              {
                "type": "null"
              }
            ]
          },
          "txHash": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{64}$"
          },
          "blockNumber": {
            "type": "integer"
          },
          "logIndex": {
            "type": "integer"
          },
          "timestamp": {
            "type": "integer"
          },
          "args": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "LockerBalances": {
        "type": "object",
        "required": [
          "lockedWeth",
          "withdrawableWeth",
          "accountedWeth",
          "position",
          "source",
          "refreshedAt",
          "indexedToBlock"
        ],
        "properties": {
          "lockedWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "withdrawableWeth": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Unsigned integer encoded as a decimal string in contract units."
              },
              {
                "type": "null"
              }
            ]
          },
          "accountedWeth": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Unsigned integer encoded as a decimal string in contract units."
              },
              {
                "type": "null"
              }
            ]
          },
          "position": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "estimatedLockedWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "source": {
            "type": "string",
            "enum": [
              "indexed-event-estimate",
              "cached-contract-read"
            ]
          },
          "refreshedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "indexedToBlock": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": true
      },
      "Locker": {
        "type": "object",
        "properties": {
          "locker": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "owner": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "launch": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "committedWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "refundedWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "penaltyWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "settledWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "saleTokens": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "estimatedLockedWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "settled": {
            "type": "boolean"
          },
          "lastBlock": {
            "type": "integer"
          },
          "lockedWeth": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "withdrawableWeth": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Unsigned integer encoded as a decimal string in contract units."
              },
              {
                "type": "null"
              }
            ]
          },
          "accountedWeth": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Unsigned integer encoded as a decimal string in contract units."
              },
              {
                "type": "null"
              }
            ]
          },
          "lockerWethBalance": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Unsigned integer encoded as a decimal string in contract units."
              },
              {
                "type": "null"
              }
            ]
          },
          "balanceSource": {
            "type": "string"
          },
          "balanceRefreshedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "rounds": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "position": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "balances": {
            "$ref": "#/components/schemas/LockerBalances"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Activity"
            }
          }
        },
        "additionalProperties": true
      },
      "Launch": {
        "type": "object",
        "required": [
          "launch",
          "rounds",
          "config",
          "tokenomics",
          "poolComposition",
          "phase",
          "lockers",
          "activityCount"
        ],
        "properties": {
          "launch": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "token": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "liquidityVault": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "creator": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "treasury": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          },
          "officialPair": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "examples": [
                  "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
                ]
              },
              {
                "const": ""
              }
            ]
          },
          "rulesHash": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{64}$"
          },
          "launchId": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{64}$"
          },
          "metadataHash": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{64}$"
          },
          "createdBlock": {
            "type": "integer"
          },
          "createdTx": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{64}$"
          },
          "tokenName": {
            "type": "string"
          },
          "tokenSymbol": {
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "finalized": {
            "type": "boolean"
          },
          "launchFailed": {
            "type": "boolean"
          },
          "liquidityPoolCreated": {
            "type": "boolean"
          },
          "tradingOpen": {
            "type": "boolean"
          },
          "rounds": {
            "type": "array",
            "minItems": 5,
            "maxItems": 5,
            "items": {
              "$ref": "#/components/schemas/Round"
            }
          },
          "config": {
            "$ref": "#/components/schemas/LaunchConfig"
          },
          "tokenomics": {
            "$ref": "#/components/schemas/Tokenomics"
          },
          "poolComposition": {
            "$ref": "#/components/schemas/PoolComposition"
          },
          "phase": {
            "$ref": "#/components/schemas/Phase"
          },
          "lockers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Locker"
            }
          },
          "activityCount": {
            "type": "integer"
          }
        },
        "additionalProperties": true
      },
      "ActivityPage": {
        "type": "object",
        "required": [
          "items",
          "nextCursor"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Activity"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "EthUsdPrice": {
        "type": "object",
        "required": [
          "pair",
          "price",
          "priceScaled",
          "decimals",
          "roundId",
          "answeredInRound",
          "oracleStartedAt",
          "oracleUpdatedAt",
          "observedAt",
          "stale",
          "source",
          "referenceNetwork",
          "feedAddress"
        ],
        "properties": {
          "pair": {
            "const": "ETH/USD"
          },
          "price": {
            "type": "string",
            "pattern": "^[0-9]+(?:\\.[0-9]+)?$"
          },
          "priceScaled": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "decimals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 18
          },
          "roundId": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "answeredInRound": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Unsigned integer encoded as a decimal string in contract units."
          },
          "oracleStartedAt": {
            "type": "integer"
          },
          "oracleUpdatedAt": {
            "type": "integer"
          },
          "observedAt": {
            "type": "integer"
          },
          "stale": {
            "type": "boolean"
          },
          "source": {
            "const": "chainlink-mainnet"
          },
          "referenceNetwork": {
            "const": "ethereum-mainnet"
          },
          "feedAddress": {
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "examples": [
              "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
            ]
          }
        }
      },
      "RealtimeSnapshot": {
        "type": "object",
        "properties": {
          "type": {
            "const": "snapshot"
          },
          "data": {
            "type": "object",
            "properties": {
              "summary": {
                "$ref": "#/components/schemas/Summary"
              },
              "launch": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^0x[a-fA-F0-9]{40}$",
                    "examples": [
                      "0x4103c658141447DFc3a70aE2D5C7a5Ad8d970844"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "RealtimeActivity": {
        "type": "object",
        "properties": {
          "type": {
            "const": "activity"
          },
          "data": {
            "type": "object",
            "properties": {
              "event": {
                "$ref": "#/components/schemas/Activity"
              },
              "meta": {
                "$ref": "#/components/schemas/Meta"
              }
            }
          }
        }
      }
    }
  }
}
