from pydantic import Field
from pydantic_settings import BaseSettings, SettingsConfigDict


class Settings(BaseSettings):
    model_config = SettingsConfigDict(env_prefix="NEAR_FASTAPI_", env_file=".env", extra="ignore")

    app_name: str = Field(default="near-fastapi")
    app_env: str = Field(default="production")
    rpc_timeout_seconds: float = Field(default=15.0, gt=0)

    mainnet_rpc_url: str = Field(default="https://rpc.mainnet.near.org")
    testnet_rpc_url: str = Field(default="https://rpc.testnet.near.org")


settings = Settings()
