INNER CODE UNIT · Python

_build_app

YichengYang-Ethan/oracle3 · oracle3/blinks/server.py:49

def _build_app():
    """Build and return the FastAPI application (lazy import)."""
    try:
        from fastapi import FastAPI, HTTPException, Query
        from fastapi.middleware.cors import CORSMiddleware
        from fastapi.responses import JSONResponse
        from pydantic import BaseModel, Field
    except ImportError as exc:
        raise RuntimeError(
            'FastAPI not installed. Install with: poetry install -E blinks'
        ) from exc

    class ExecuteTradeBody(BaseModel):
        """Request body for the execute_trade endpoint (Solana Actions spec)."""
        account: str = Field(
            ...,
            description='Wallet public key of the user initiating the trade',
        )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…