import { a as EngineWalletBalance } from '../engine-DSc1Em4V.js';
import { Token, TokenPrice, StrategyCategory, AIStrategy, AINavSnapshot, AIMarketData, AIOrderStatus, AIOrder, CreateAIOrderRequest, ApiResponse, AIPortfolioSummary, AITradeAllocation } from '../types/index.js';
export { g as UseForexInvestmentsResult, i as UseForexPoolDataResult, U as UseForexPoolsResult, h as UseForexSimulationResult, j as UseForexTradingResult, e as clearForexAccessToken, s as setForexAccessToken, f as setForexEngineUrl, a as useForexInvestments, c as useForexPoolData, u as useForexPools, b as useForexSimulation, d as useForexTrading } from '../useForexTrading-BB4eUlHO.js';
import { U as AIQuantConsoleOptions, S as StrategyPersonality, a6 as AIAgent$1, a as BotLogEntry, c as BotState, D as AIPosition, G as AIDecision, R as RiskStatus, K as ConsoleMetrics, C as PositionStatus, E as DecisionAction, a7 as RiskLevel, T as TradingStatus, Q as TradingConsoleOptions, t as ForexLogEntry, m as ForexPoolTransaction, j as ForexPool, p as ForexInvestment, N as CombinedLogEntry } from '../console-BoAIxikK.js';

interface UseWalletBalanceOptions {
    chains?: number[];
    autoRefresh?: boolean;
    refreshInterval?: number;
    engineUrl?: string;
    clientId?: string;
}
interface UseWalletBalanceReturn {
    balance: EngineWalletBalance | null;
    tokens: Token[];
    totalUsd: number;
    change24h: number;
    changePercent24h: number;
    isLoading: boolean;
    error: string | null;
    refetch: () => Promise<void>;
}
/**
 * Hook for fetching wallet balance via ONE Engine
 *
 * Note: If using OneProvider, prefer useOneWallet() instead for better integration.
 * This hook is for standalone usage outside of OneProvider.
 */
declare function useWalletBalance(walletAddress: string | null, options?: UseWalletBalanceOptions): UseWalletBalanceReturn;

interface UseTokenPriceOptions {
    autoRefresh?: boolean;
    refreshInterval?: number;
    engineUrl?: string;
    clientId?: string;
}
interface UseTokenPriceReturn {
    price: TokenPrice | null;
    isLoading: boolean;
    error: string | null;
    refetch: () => Promise<void>;
}
/**
 * Hook for fetching token price via ONE Engine
 *
 * Note: If using OneProvider, prefer useOneEngine().getTokenPrices() instead.
 * This hook is for standalone usage outside of OneProvider.
 */
declare function useTokenPrice(symbol: string, options?: UseTokenPriceOptions): UseTokenPriceReturn;
interface UseTokenPricesReturn {
    prices: Record<string, TokenPrice>;
    isLoading: boolean;
    error: string | null;
    refetch: () => Promise<void>;
}
declare function useTokenPrices(symbols: string[], options?: UseTokenPriceOptions): UseTokenPricesReturn;

/**
 * AI Trading Hooks for ONE SDK
 *
 * React hooks for AI quantitative trading features.
 * These hooks provide easy access to AI strategies, orders, and portfolio management.
 */

/**
 * Set the access token for authenticated requests
 */
declare function setAITradingAccessToken(token: string): void;
/**
 * Clear the access token
 */
declare function clearAITradingAccessToken(): void;
interface UseAIStrategiesOptions {
    category?: StrategyCategory;
    riskLevel?: number;
    minTvl?: number;
    isActive?: boolean;
    autoRefresh?: boolean;
    refreshInterval?: number;
}
interface UseAIStrategiesResult {
    strategies: AIStrategy[];
    isLoading: boolean;
    error: string | null;
    refresh: () => Promise<void>;
}
/**
 * Hook to fetch and manage AI trading strategies
 */
declare function useAIStrategies(options?: UseAIStrategiesOptions): UseAIStrategiesResult;
/**
 * Hook to fetch a single AI strategy with performance data
 */
interface UseAIStrategyResult {
    strategy: AIStrategy | null;
    performance: AINavSnapshot[];
    marketData: AIMarketData[];
    isLoading: boolean;
    error: string | null;
    refresh: () => Promise<void>;
}
declare function useAIStrategy(strategyId: string | undefined, include?: ('performance' | 'market' | 'trades')[]): UseAIStrategyResult;
interface UseAIOrdersOptions {
    strategyId?: string;
    status?: AIOrderStatus;
    autoRefresh?: boolean;
    refreshInterval?: number;
}
interface UseAIOrdersResult {
    orders: AIOrder[];
    isLoading: boolean;
    error: string | null;
    refresh: () => Promise<void>;
    createOrder: (request: CreateAIOrderRequest) => Promise<ApiResponse<{
        order: AIOrder;
    }>>;
    pauseOrder: (orderId: string) => Promise<ApiResponse<{
        order: AIOrder;
        message: string;
    }>>;
    resumeOrder: (orderId: string) => Promise<ApiResponse<{
        order: AIOrder;
        message: string;
    }>>;
    redeemOrder: (orderId: string) => Promise<ApiResponse<any>>;
}
/**
 * Hook to manage AI trading orders
 */
declare function useAIOrders(options?: UseAIOrdersOptions): UseAIOrdersResult;
interface UseAIPortfolioResult {
    portfolio: AIPortfolioSummary | null;
    allocations: AITradeAllocation[];
    activeOrders: AIOrder[];
    isLoading: boolean;
    error: string | null;
    refresh: () => Promise<void>;
}
/**
 * Hook to fetch AI trading portfolio summary
 */
declare function useAIPortfolio(autoRefresh?: boolean): UseAIPortfolioResult;
interface UseAIMarketDataResult {
    prices: Record<string, {
        price: number;
        change24h: number;
    }>;
    isLoading: boolean;
    error: string | null;
    refresh: () => Promise<void>;
}
/**
 * Hook to fetch real-time market data for AI trading pairs
 */
declare function useAIMarketData(symbols?: string[], autoRefresh?: boolean): UseAIMarketDataResult;
interface UseAITradingResult {
    strategies: AIStrategy[];
    strategiesLoading: boolean;
    orders: AIOrder[];
    ordersLoading: boolean;
    portfolio: AIPortfolioSummary | null;
    portfolioLoading: boolean;
    prices: Record<string, {
        price: number;
        change24h: number;
    }>;
    createOrder: (request: CreateAIOrderRequest) => Promise<ApiResponse<{
        order: AIOrder;
    }>>;
    pauseOrder: (orderId: string) => Promise<ApiResponse<{
        order: AIOrder;
        message: string;
    }>>;
    resumeOrder: (orderId: string) => Promise<ApiResponse<{
        order: AIOrder;
        message: string;
    }>>;
    redeemOrder: (orderId: string) => Promise<ApiResponse<any>>;
    refreshAll: () => Promise<void>;
    error: string | null;
}
/**
 * Combined hook for all AI trading functionality
 */
declare function useAITrading(): UseAITradingResult;
interface AIAgent {
    id: string;
    name: string;
    name_zh: string;
    description: string;
    description_zh: string;
    category: string;
    risk_level: number;
    icon: string;
    color: string;
    tiers: Array<{
        tier: number;
        amount: number;
        label: string;
        label_zh: string;
    }>;
    supported_cycles: number[];
    default_cycle: number;
    supported_pairs: string[];
    supported_chains: string[];
    is_active: boolean;
    preview?: {
        tier: {
            tier: number;
            amount: number;
            label: string;
        };
        cycle: number;
        dailyLots: number;
        stabilityScore: number;
        roiRange: {
            min: number;
            max: number;
            userMin: number;
            userMax: number;
        };
        shareRate: number;
        profitEstimate: {
            monthlyMin: number;
            monthlyMax: number;
            cycleMin: number;
            cycleMax: number;
        };
    };
}
interface AIAgentParams {
    dailyLots: number;
    effectiveCapital: number;
    stabilityScore: number;
    roiRange: {
        min: number;
        max: number;
        userMin: number;
        userMax: number;
    };
    shareRate: number;
    profitEstimate: {
        monthlyMin: number;
        monthlyMax: number;
        cycleMin: number;
        cycleMax: number;
    };
}
interface UseAIAgentsResult {
    agents: AIAgent[];
    shareRates: Record<number, number>;
    isLoading: boolean;
    error: string | null;
    refresh: () => Promise<void>;
}
/**
 * Hook to fetch all AI agents with their configurations
 */
declare function useAIAgents(includeInactive?: boolean): UseAIAgentsResult;
interface UseAIAgentResult {
    agent: AIAgent | null;
    params: AIAgentParams | null;
    isLoading: boolean;
    error: string | null;
    refresh: () => Promise<void>;
    calculateParams: (amount: number, cycleDays: number) => Promise<AIAgentParams | null>;
}
/**
 * Hook to fetch a single AI agent with detailed parameters
 */
declare function useAIAgent(agentId: string | undefined): UseAIAgentResult;
interface UseAIAgentSubscriptionResult {
    subscribe: (agentId: string, amount: number, cycleDays: number, txHash?: string) => Promise<ApiResponse<{
        order: AIOrder;
    }>>;
    isLoading: boolean;
    error: string | null;
}
/**
 * Hook to subscribe to an AI agent strategy
 */
declare function useAIAgentSubscription(): UseAIAgentSubscriptionResult;

/**
 * ONE SDK - AI Quant Console Hook
 * Combined hook for all AI trading console data
 */

interface UseAIQuantConsoleResult {
    strategies: StrategyPersonality[];
    agents: AIAgent$1[];
    logs: BotLogEntry[];
    logsByStrategy: Map<string, BotLogEntry[]>;
    botStates: Map<string, BotState>;
    positions: AIPosition[];
    openPositions: AIPosition[];
    decisions: AIDecision[];
    recentDecisions: AIDecision[];
    riskStatus: RiskStatus | null;
    metrics: ConsoleMetrics;
    isRunning: boolean;
    isLoading: boolean;
    error: string | null;
    start: (strategyIds?: string[]) => void;
    stop: (strategyIds?: string[]) => void;
    clearLogs: () => void;
    emitBootSequence: () => void;
    refresh: () => Promise<void>;
    getAgent: (strategyId: string) => AIAgent$1 | undefined;
    getAgentLogs: (strategyId: string) => BotLogEntry[];
    getAgentPositions: (strategyId: string) => AIPosition[];
    getAgentDecisions: (strategyId: string) => AIDecision[];
}
declare function useAIQuantConsole(options?: AIQuantConsoleOptions): UseAIQuantConsoleResult;

/**
 * ONE SDK - Bot Simulation Hook
 * Provides React hook for subscribing to BotSimulationEngine events
 */

interface UseBotSimulationOptions {
    maxLogs?: number;
    strategyIds?: string[];
    userPairs?: string[];
    userChains?: string[];
    autoStart?: boolean;
}
interface UseBotSimulationResult {
    /** All log entries from all strategies */
    logs: BotLogEntry[];
    /** Logs grouped by strategy ID */
    logsByStrategy: Map<string, BotLogEntry[]>;
    /** Current state for each strategy */
    botStates: Map<string, BotState>;
    /** Whether simulation is currently running */
    isRunning: boolean;
    /** Available strategies */
    strategies: StrategyPersonality[];
    /** Start the simulation */
    start: (strategyIds?: string[], userPairs?: string[], userChains?: string[]) => void;
    /** Stop the simulation */
    stop: (strategyIds?: string[]) => void;
    /** Clear all logs */
    clearLogs: () => void;
    /** Emit boot sequence messages */
    emitBootSequence: () => void;
    /** Get state for a specific strategy */
    getBotState: (strategyId: string) => BotState | undefined;
}
declare function useBotSimulation(options?: UseBotSimulationOptions): UseBotSimulationResult;

/**
 * ONE SDK - AI Positions Hook
 * Provides React hook for fetching and tracking AI trading positions
 */

declare function setConsoleAccessToken(token: string): void;
declare function clearConsoleAccessToken(): void;
declare function setConsoleEngineUrl(url: string): void;
interface UseAIPositionsOptions {
    strategyId?: string;
    strategyIds?: string[];
    status?: PositionStatus | PositionStatus[];
    pollInterval?: number;
    simulation?: boolean;
}
interface UseAIPositionsResult {
    positions: AIPosition[];
    openPositions: AIPosition[];
    closedPositions: AIPosition[];
    isLoading: boolean;
    error: string | null;
    refresh: () => Promise<void>;
    closePosition: (positionId: string) => Promise<boolean>;
    updateStopLoss: (positionId: string, stopLoss: number) => Promise<boolean>;
    updateTakeProfit: (positionId: string, takeProfit: number) => Promise<boolean>;
    summary: {
        totalPositions: number;
        openCount: number;
        totalExposure: number;
        totalPnl: number;
        unrealizedPnl: number;
        avgLeverage: number;
        byStrategy: Record<string, {
            count: number;
            pnl: number;
            exposure: number;
        }>;
    };
}
declare function useAIPositions(options?: UseAIPositionsOptions): UseAIPositionsResult;

/**
 * ONE SDK - AI Decisions Hook
 * Provides React hook for fetching AI trading decision history with reasoning
 */

interface UseAIDecisionsOptions {
    strategyId?: string;
    strategyIds?: string[];
    actions?: DecisionAction[];
    limit?: number;
    pollInterval?: number;
    simulation?: boolean;
}
interface UseAIDecisionsResult {
    decisions: AIDecision[];
    recentDecisions: AIDecision[];
    executedDecisions: AIDecision[];
    isLoading: boolean;
    error: string | null;
    refresh: () => Promise<void>;
    getByStrategy: (strategyId: string) => AIDecision[];
    getByAction: (action: DecisionAction) => AIDecision[];
    stats: {
        totalDecisions: number;
        executedCount: number;
        executionRate: number;
        byAction: Record<DecisionAction, number>;
        byStrategy: Record<string, number>;
        avgConfidence: number;
    };
}
declare function useAIDecisions(options?: UseAIDecisionsOptions): UseAIDecisionsResult;

/**
 * ONE SDK - AI Risk Status Hook
 * Provides React hook for monitoring trading risk status and limits
 */

interface UseAIRiskStatusOptions {
    strategyId?: string;
    pollInterval?: number;
    simulation?: boolean;
}
interface UseAIRiskStatusResult {
    riskStatus: RiskStatus;
    isLoading: boolean;
    error: string | null;
    refresh: () => Promise<void>;
    isWithinLimits: boolean;
    canTrade: boolean;
    riskLevel: RiskLevel;
    tradingStatus: TradingStatus;
    warnings: string[];
    pauseTrading: () => Promise<boolean>;
    resumeTrading: () => Promise<boolean>;
    resetDailyLimits: () => Promise<boolean>;
}
declare function useAIRiskStatus(options?: UseAIRiskStatusOptions): UseAIRiskStatusResult;

/**
 * ONE SDK - Master Trading Console Hook
 * Orchestrates all AI and Forex trading data in a unified interface
 */

interface UseTradingConsoleResult {
    ai: {
        strategies: StrategyPersonality[];
        agents: AIAgent$1[];
        positions: AIPosition[];
        decisions: AIDecision[];
        riskStatus: RiskStatus | null;
        simulationLogs: BotLogEntry[];
        logsByStrategy: Map<string, BotLogEntry[]>;
        botStates: Map<string, BotState>;
    };
    forex: {
        logs: ForexLogEntry[];
        poolTransactions: ForexPoolTransaction[];
        pools: ForexPool[];
        investments: ForexInvestment[];
        stats: {
            totalPnl: number;
            totalTrades: number;
            totalPips: number;
            totalLots: number;
        };
    };
    combinedLogs: CombinedLogEntry[];
    metrics: ConsoleMetrics;
    controls: {
        startAISimulation: (strategyIds?: string[]) => void;
        stopAISimulation: (strategyIds?: string[]) => void;
        startForexSimulation: () => void;
        stopForexSimulation: () => void;
        startAll: () => void;
        stopAll: () => void;
        clearLogs: () => void;
        emitBootSequence: () => void;
        refreshAll: () => Promise<void>;
    };
    state: {
        isAISimulationRunning: boolean;
        isForexSimulationRunning: boolean;
        isAnyRunning: boolean;
        isLoading: boolean;
        error: string | null;
    };
    getAgent: (strategyId: string) => AIAgent$1 | undefined;
    getAgentLogs: (strategyId: string) => BotLogEntry[];
    getAgentPositions: (strategyId: string) => AIPosition[];
    getAgentDecisions: (strategyId: string) => AIDecision[];
}
declare function useTradingConsole(options?: TradingConsoleOptions): UseTradingConsoleResult;

export { type AIAgent, type AIAgentParams, type UseAIAgentResult, type UseAIAgentSubscriptionResult, type UseAIAgentsResult, type UseAIDecisionsOptions, type UseAIDecisionsResult, type UseAIMarketDataResult, type UseAIOrdersOptions, type UseAIOrdersResult, type UseAIPortfolioResult, type UseAIPositionsOptions, type UseAIPositionsResult, type UseAIQuantConsoleResult, type UseAIRiskStatusOptions, type UseAIRiskStatusResult, type UseAIStrategiesOptions, type UseAIStrategiesResult, type UseAIStrategyResult, type UseAITradingResult, type UseBotSimulationOptions, type UseBotSimulationResult, type UseTradingConsoleResult, clearAITradingAccessToken, clearConsoleAccessToken, setAITradingAccessToken, setConsoleAccessToken, setConsoleEngineUrl, useAIAgent, useAIAgentSubscription, useAIAgents, useAIDecisions, useAIMarketData, useAIOrders, useAIPortfolio, useAIPositions, useAIQuantConsole, useAIRiskStatus, useAIStrategies, useAIStrategy, useAITrading, useBotSimulation, useTokenPrice, useTokenPrices, useTradingConsole, useWalletBalance };
