import * as react_jsx_runtime from 'react/jsx-runtime';
import React, { ReactNode } from 'react';
import { ThirdwebClient } from 'thirdweb';
export { ThirdwebClient } from 'thirdweb';
import { Chain } from 'thirdweb/chains';
export { Chain, arbitrum, base, ethereum, optimism, polygon } from 'thirdweb/chains';
import { OneConfig } from '../config/index.js';
import { O as OneEngineClient, a as EngineWalletBalance, e as OnrampSessionRequest, S as SwapQuoteRequest, i as SwapQuote } from '../engine-DSc1Em4V.js';
import { User, Token, AIStrategy, AIOrder } from '../types/index.js';
export { inAppWallet, smartWallet } from 'thirdweb/wallets';
import '../console-BoAIxikK.js';

interface ThirdwebAuthOptions {
    email?: boolean;
    phone?: boolean;
    google?: boolean;
    apple?: boolean;
    facebook?: boolean;
    discord?: boolean;
    passkey?: boolean;
    guest?: boolean;
}
interface ThirdwebWalletConfig {
    appName?: string;
    appIcon?: string;
    defaultChain?: Chain;
    supportedChains?: Chain[];
    sponsorGas?: boolean;
    authOptions?: ThirdwebAuthOptions;
}
interface AuthContextValue {
    user: User | null;
    isAuthenticated: boolean;
    isLoading: boolean;
    accessToken: string | null;
    sendOtp: (email: string) => Promise<{
        success: boolean;
        error?: string;
    }>;
    verifyOtp: (email: string, otp: string) => Promise<{
        success: boolean;
        error?: string;
    }>;
    signOut: () => Promise<void>;
    refreshUser: () => Promise<void>;
}
interface WalletContextValue {
    address: string | null;
    setAddress: (address: string | null) => void;
    balance: EngineWalletBalance | null;
    tokens: Token[];
    totalUsd: number;
    isLoading: boolean;
    error: string | null;
    fetchBalance: (chains?: number[]) => Promise<void>;
    refreshBalance: () => Promise<void>;
    thirdwebClient: ThirdwebClient | null;
    isThirdwebReady: boolean;
}
interface OnrampContextValue {
    isOpen: boolean;
    widgetUrl: string | null;
    sessionId: string | null;
    openOnramp: (options?: Partial<OnrampSessionRequest>) => Promise<void>;
    closeOnramp: () => void;
    getQuote: (fiatCurrency: string, fiatAmount: number, cryptoCurrency: string) => Promise<any>;
}
interface SwapContextValue {
    getQuote: (request: SwapQuoteRequest) => Promise<SwapQuote | null>;
    executeSwap: (quoteId: string) => Promise<any>;
    getSupportedTokens: (chainId?: number) => Promise<Token[]>;
    getSupportedChains: () => Promise<{
        id: number;
        name: string;
    }[]>;
}
interface TradingContextValue {
    strategies: AIStrategy[];
    orders: AIOrder[];
    portfolioStats: {
        totalInvested: number;
        totalValue: number;
        totalPnl: number;
        totalPnlPercent: number;
        activePositions: number;
    } | null;
    isLoading: boolean;
    fetchStrategies: () => Promise<void>;
    fetchOrders: () => Promise<void>;
    fetchPortfolio: () => Promise<void>;
    createOrder: (strategyId: string, amount: number, currency: string) => Promise<any>;
}
interface OneContextValue {
    isInitialized: boolean;
    config: OneConfig | null;
    engine: OneEngineClient;
    auth: AuthContextValue;
    wallet: WalletContextValue;
    onramp: OnrampContextValue;
    swap: SwapContextValue;
    trading: TradingContextValue;
    thirdwebClient: ThirdwebClient | null;
}
declare const OneContext: React.Context<OneContextValue | null>;
interface OneProviderProps {
    children: ReactNode;
    config: OneConfig;
    thirdweb?: ThirdwebWalletConfig;
    autoFetchBalance?: boolean;
}
declare function OneProvider({ children, config, thirdweb: thirdwebConfig, autoFetchBalance, }: OneProviderProps): react_jsx_runtime.JSX.Element;
declare function useOne(): OneContextValue;
declare function useOneAuth(): AuthContextValue;
declare function useOneWallet(): WalletContextValue;
declare function useOneOnramp(): OnrampContextValue;
declare function useOneSwap(): SwapContextValue;
declare function useOneTrading(): TradingContextValue;
declare function useOneEngine(): OneEngineClient;
declare function useThirdwebClient(): ThirdwebClient | null;

export { OneContext, OneProvider, type ThirdwebWalletConfig as OneThirdwebConfig, OneProvider as OneThirdwebProvider, type ThirdwebAuthOptions, type ThirdwebWalletConfig, useOne, useOneAuth, useOneEngine, useOneOnramp, useOneSwap, useOneTrading, useOneWallet, useThirdwebClient };
