"""O2 Exchange SDK for Python.

A complete SDK for trading on the O2 Exchange, a fully on-chain order book
DEX on the Fuel Network.
"""

from .client import MarketActionsBuilder, O2Client
from .config import Network, NetworkConfig, get_config
from .crypto import (
    EvmWallet,
    ExternalEvmSigner,
    ExternalSigner,
    SignDigestFn,
    Signer,
    Wallet,
    evm_personal_sign,
    evm_personal_sign_digest,
    fuel_compact_sign,
    fuel_personal_sign_digest,
    generate_evm_keypair,
    generate_evm_wallet,
    generate_keypair,
    generate_wallet,
    load_evm_wallet,
    load_wallet,
    personal_sign,
    raw_sign,
    to_fuel_compact_signature,
)
from .encoding import (
    GAS_MAX,
    action_to_call,
    build_actions_signing_bytes,
    build_session_signing_bytes,
    build_withdraw_signing_bytes,
    encode_identity,
    encode_option_call_data,
    encode_option_none,
    encode_option_some,
    encode_order_args,
    function_selector,
    u64_be,
)
from .errors import (
    AccountNotFound,
    AlreadySubscribed,
    BlockNotFound,
    EventsNotFound,
    GeoRestricted,
    InternalError,
    InvalidAmount,
    InvalidOrderParams,
    InvalidPagination,
    InvalidRequest,
    InvalidSession,
    InvalidSignature,
    InvalidTimeRange,
    InvalidTradeCount,
    MarketAlreadyExists,
    MarketNotFound,
    MarketPaused,
    NoActionsProvided,
    O2Error,
    OnChainRevert,
    OrderNotActive,
    OrderNotFound,
    ParseError,
    RateLimitExceeded,
    SessionExpired,
    SubscriptionError,
    TooManyActions,
    TooManySubscriptions,
    TradeNotFound,
    WhitelistNotConfigured,
)
from .models import (
    AccountCreateResponse,
    AccountInfo,
    Action,
    ActionsResponse,
    AddressIdentity,
    AggregatedAsset,
    Balance,
    BalanceUpdate,
    Bar,
    BoundedMarketOrder,
    CancelOrderAction,
    CancelOrderRequestAction,
    ChainInt,
    ContractIdentity,
    CreateOrderAction,
    CreateOrderRequestAction,
    DepthLevel,
    DepthSnapshot,
    DepthUpdate,
    FaucetResponse,
    Id,
    Identity,
    LimitOrder,
    Market,
    MarketActionGroup,
    MarketActions,
    MarketAsset,
    MarketsResponse,
    MarketSummary,
    MarketTicker,
    NonceUpdate,
    NumericInput,
    Order,
    OrderBookBalance,
    OrderSide,
    OrdersResponse,
    OrderType,
    OrderUpdate,
    ReferralInfo,
    RegisterRefererAction,
    SessionInfo,
    SessionResponse,
    SettleBalanceAction,
    SettleBalanceRequestAction,
    Trade,
    TradeUpdate,
    WhitelistResponse,
    WithdrawResponse,
)

__all__ = [
    "GAS_MAX",
    "AccountCreateResponse",
    "AccountInfo",
    "AccountNotFound",
    "Action",
    "ActionsResponse",
    "AddressIdentity",
    "AggregatedAsset",
    "AlreadySubscribed",
    "Balance",
    "BalanceUpdate",
    "Bar",
    "BlockNotFound",
    "BoundedMarketOrder",
    "CancelOrderAction",
    "CancelOrderRequestAction",
    "ChainInt",
    "ContractIdentity",
    "CreateOrderAction",
    "CreateOrderRequestAction",
    "DepthLevel",
    "DepthSnapshot",
    "DepthUpdate",
    "EventsNotFound",
    "EvmWallet",
    "ExternalEvmSigner",
    "ExternalSigner",
    "FaucetResponse",
    "GeoRestricted",
    "Id",
    "Identity",
    "InternalError",
    "InvalidAmount",
    "InvalidOrderParams",
    "InvalidPagination",
    "InvalidRequest",
    "InvalidSession",
    "InvalidSignature",
    "InvalidTimeRange",
    "InvalidTradeCount",
    "LimitOrder",
    "Market",
    "MarketActionGroup",
    "MarketActions",
    "MarketActionsBuilder",
    "MarketAlreadyExists",
    "MarketAsset",
    "MarketNotFound",
    "MarketPaused",
    "MarketSummary",
    "MarketTicker",
    "MarketsResponse",
    "Network",
    "NetworkConfig",
    "NoActionsProvided",
    "NonceUpdate",
    "NumericInput",
    "O2Client",
    "O2Error",
    "OnChainRevert",
    "Order",
    "OrderBookBalance",
    "OrderNotActive",
    "OrderNotFound",
    "OrderSide",
    "OrderType",
    "OrderUpdate",
    "OrdersResponse",
    "ParseError",
    "RateLimitExceeded",
    "ReferralInfo",
    "RegisterRefererAction",
    "SessionExpired",
    "SessionInfo",
    "SessionResponse",
    "SettleBalanceAction",
    "SettleBalanceRequestAction",
    "SignDigestFn",
    "Signer",
    "SubscriptionError",
    "TooManyActions",
    "TooManySubscriptions",
    "Trade",
    "TradeNotFound",
    "TradeUpdate",
    "Wallet",
    "WhitelistNotConfigured",
    "WhitelistResponse",
    "WithdrawResponse",
    "action_to_call",
    "build_actions_signing_bytes",
    "build_session_signing_bytes",
    "build_withdraw_signing_bytes",
    "encode_identity",
    "encode_option_call_data",
    "encode_option_none",
    "encode_option_some",
    "encode_order_args",
    "evm_personal_sign",
    "evm_personal_sign_digest",
    "fuel_compact_sign",
    "fuel_personal_sign_digest",
    "function_selector",
    "generate_evm_keypair",
    "generate_evm_wallet",
    "generate_keypair",
    "generate_wallet",
    "get_config",
    "load_evm_wallet",
    "load_wallet",
    "personal_sign",
    "raw_sign",
    "to_fuel_compact_signature",
    "u64_be",
]
