"""Sardis Chain - Production-grade multi-chain stablecoin executor.

This package provides the blockchain execution layer for stablecoin operations:
- Multi-chain support (Ethereum, Base, Polygon, Arbitrum)
- MPC custody integration (Turnkey, Fireblocks)
- Transaction execution with gas estimation
- Nonce management and confirmation tracking
- MEV protection and deposit monitoring

Version: 0.2.0
"""

from .config import (
    ChainConfig,
    ChainId,
    TokenConfig,
    GasConfig,
    RPCConfig,
    TurnkeyConfig,
    load_chain_config,
)
from .rpc_client import (
    ProductionRPCClient,
    RPCError,
    AllEndpointsFailedError,
    ChainIDMismatchError,
    get_rpc_client,
    close_all_clients,
)
from .nonce_manager import (
    NonceManager,
    NonceConflictError,
    StuckTransactionError,
    TransactionFailedError,
)
from .redis_nonce_manager import RedisNonceManager
from .confirmation import (
    ConfirmationTracker,
    ConfirmationStatus,
)
from .simulation import (
    TransactionSimulator,
    SimulationResult,
    SimulationError,
    GasEstimation,
)
from .executor import (
    ChainExecutor,
    ChainRPCClient,
    TransactionRequest,
    GasEstimate,
    GasPriceProtection,
    GasPriceSpikeError,
)
from .deposit_monitor import (
    DepositMonitor,
    Deposit,
    MonitorConfig,
)
from .mev_protection import (
    MEVProtectionService,
    FlashbotsProvider,
    MEVConfig,
)
from .wallet_manager import (
    WalletManager,
    WalletInfo,
)
from .logging_utils import (
    get_chain_logger,
    ChainLogger,
    log_operation,
)

__version__ = "0.2.0"

__all__ = [
    # Version
    "__version__",
    # Config
    "ChainConfig",
    "ChainId",
    "TokenConfig",
    "GasConfig",
    "RPCConfig",
    "TurnkeyConfig",
    "load_chain_config",
    # RPC Client
    "ProductionRPCClient",
    "RPCError",
    "AllEndpointsFailedError",
    "ChainIDMismatchError",
    "get_rpc_client",
    "close_all_clients",
    # Nonce Manager
    "NonceManager",
    "NonceConflictError",
    "StuckTransactionError",
    "TransactionFailedError",
    # Redis Nonce Manager
    "RedisNonceManager",
    # Confirmation
    "ConfirmationTracker",
    "ConfirmationStatus",
    # Simulation
    "TransactionSimulator",
    "SimulationResult",
    "SimulationError",
    "GasEstimation",
    # Executor
    "ChainExecutor",
    "ChainRPCClient",
    "TransactionRequest",
    "GasEstimate",
    "GasPriceProtection",
    "GasPriceSpikeError",
    # Deposit Monitor
    "DepositMonitor",
    "Deposit",
    "MonitorConfig",
    # MEV Protection
    "MEVProtectionService",
    "FlashbotsProvider",
    "MEVConfig",
    # Wallet Manager
    "WalletManager",
    "WalletInfo",
    # Logging
    "get_chain_logger",
    "ChainLogger",
    "log_operation",
]
