Files
khadhroony-bobobot/kb_lib/src/lib.rs
2026-05-14 07:52:36 +02:00

1177 lines
56 KiB
Rust

// file: kb_lib/src/lib.rs
//! Core library of the `khadhroony-bobobot` workspace.
//!
//! This crate contains the reusable backend logic shared by the desktop
//! application and future clients.
#![deny(unreachable_pub)]
#![warn(missing_docs)]
/// JSON configuration structures and loading helpers for `kb_lib`.
mod config;
/// Solana program and mint constants reused by the project.
mod constants;
/// Database facade.
/// This module centralizes the database layer and exposes a storage API that is
/// intentionally structured to remain evolutive across backends.
mod db;
/// Detection pipeline facade.
/// This module sits between transport/connectors and persistence.
/// It centralizes how technical observations, analysis signals and
/// candidate tokens are persisted before richer detection logic is added.
mod detect;
/// DEX-specific transaction decoders.
mod dex;
/// Internal known DEX catalog.
mod dex_catalog;
/// Persistence-oriented DEX decoding service.
mod dex_decode;
/// Transaction context loading for DEX decoding.
mod dex_decode_context;
/// Decoded DEX event materialization helpers.
mod dex_decoded_event_materialization;
/// Business-level detection built from decoded DEX events.
mod dex_detect;
/// Decoded DEX event to business-detection routing.
mod dex_detection_route;
/// Shared DEX event classification and decoded-payload enrichment helpers.
mod dex_event_classification;
/// Shared DEX pool materialization helpers.
mod dex_pool_materialization;
/// Shared DEX support matrix.
mod dex_support_matrix;
/// Shared error type for `kb_lib`.
mod error;
/// Generic asynchronous HTTP JSON-RPC client.
/// This module provides a reusable `HttpClient` built on top of `reqwest` for
/// Solana RPC HTTP endpoints.
mod http_client;
/// HTTP endpoint pool and routing.
mod http_pool;
/// Generic JSON-RPC 2.0 WebSocket helpers.
mod json_rpc_ws;
/// Launch surface attribution service.
mod launch_origin;
/// Local pipeline diagnostics service.
mod local_pipeline_diagnostics;
/// Local pipeline replay from already persisted raw transaction data.
mod local_pipeline_replay;
/// Local pipeline validation helpers for non-regression runs.
mod local_pipeline_validation;
/// Useful non-trade DEX event materialization service.
mod non_trade_event_materialization;
/// Pair analytic signal service.
mod pair_analytic_signal;
/// Pair-candle aggregation service.
mod pair_candle_aggregation;
/// Pair-candle query service.
mod pair_candle_query;
/// Pair display-symbol derivation.
mod pair_symbol;
/// Cross-DEX pool-origin recording service.
mod pool_origin;
/// Protocol candidate recording.
mod protocol_candidate_recording;
/// Typed Solana WebSocket PubSub helpers built on top of the generic JSON-RPC transport.
mod solana_pubsub_ws;
/// Historical token backfill service.
mod token_backfill;
/// Token metadata resolution and backfill.
mod token_metadata;
/// Tracing initialization helpers for `kb_lib`.
mod tracing;
/// Cross-DEX trade aggregation service.
mod trade_aggregation;
/// Database context loading for trade aggregation.
mod trade_aggregation_context;
/// Trade amount resolution orchestration.
mod trade_amount_resolution;
/// Trade-event materialization.
mod trade_event_materialization;
/// Trade metric update and pricing helpers.
mod trade_metric_update;
/// PumpSwap trade amount recovery helpers.
mod trade_pump_swap_amounts;
/// Trade-side resolution helpers.
mod trade_side_resolution;
/// Solana transaction/meta trade amount extraction helpers.
mod trade_solana_amounts;
/// Transaction classification service.
mod transaction_classification;
/// Projection of resolved transactions into normalized internal DB tables.
mod tx_model;
/// Transaction resolution pipeline.
mod tx_resolution;
/// Shared generic types for `kb_lib`.
mod types;
/// Wallet-holding observation service.
mod wallet_holding_observation;
/// Wallet-observation service.
mod wallet_observation;
/// Generic asynchronous WebSocket transport client.
mod ws_client;
/// Hybrid WebSocket technical observation service.
mod ws_hybrid_observation;
/// Hybrid WebSocket runtime facade.
mod ws_hybrid_runtime;
/// Hybrid WebSocket watch-target collection service.
mod ws_hybrid_watch;
/// Multi-client WebSocket orchestration.
mod ws_manager;
/// Generic application settings.
pub use config::AppConfig;
/// Root application configuration loaded from `config.json`.
pub use config::Config;
/// Local data paths used by the application.
pub use config::DataConfig;
/// Database configuration.
pub use config::DatabaseConfig;
/// HTTP endpoint configuration.
pub use config::HttpEndpointConfig;
/// Logging and tracing configuration.
pub use config::LoggingConfig;
/// Solana transport configuration.
pub use config::SolanaConfig;
/// SQLite configuration.
pub use config::SqliteDatabaseConfig;
/// WebSocket endpoint configuration.
pub use config::WsEndpointConfig;
/// Address Lookup Table program identifier. ("AddressLookupTab1e1111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::address_lookup_table::ID
pub use constants::ADDRESS_LOOKUP_TABLE_PROGRAM_ID;
/// Arbitrage Bot (6MWVT) / Arbitrage or Sandwich Bot. ("6MWVTis8rmmk6Vt9zmAJJbmb3VuLpzoQ1aHH4N6wQEGh").
pub use constants::ARBITRAGE_BOT_6MWVT_PROGRAM_ID;
/// Associated Token Account program identifier. ("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL").
/// @see solana_sdk::pubkey::Pubkey = spl_associated_token_account_interface::program::ID
pub use constants::ASSOCIATED_TOKEN_PROGRAM_ID;
/// BPF Loader program identifier. ("BPFLoader1111111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::bpf_loader_deprecated::ID
pub use constants::BPF_LOADER_DEPRECATED_PROGRAM_ID;
/// BPF Loader program identifier. ("BPFLoaderUpgradeab1e11111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::bpf_loader_upgradeable::ID
pub use constants::BPF_LOADER_UPGRADEABLE_PROGRAM_ID;
/// Compute Budget program identifier. ("ComputeBudget111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::compute_budget::ID
pub use constants::COMPUTE_BUDGET_PROGRAM_ID;
/// Config program identifier. ("Config1111111111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::config::ID
pub use constants::CONFIG_PROGRAM_ID;
/// DexLab Swap/Pool program id. ("DSwpgjMvXhtGn6BsbqmacdBZyfLj6jSWf3HJpdJtmg6N").
pub use constants::DEXLAB_PROGRAM_ID;
/// ED25519 program identifier. ("Ed25519SigVerify111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::ed25519_program::ID
pub use constants::ED25519_PROGRAM_ID;
/// Feature program identifier. ("Feature111111111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::feature::ID
pub use constants::FEATURE_PROGRAM_ID;
/// FluxBeam program id. ("FLUXubRmkEi2q6K3Y9kBPg9248ggaZVsoSFhtJHSrm1X").
pub use constants::FLUXBEAM_PROGRAM_ID;
/// Incinerator program identifier. ("1nc1nerator11111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::incinerator::ID
pub use constants::INCINERATOR_PROGRAM_ID;
/// Loader V4 program identifier. ("LoaderV411111111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::loader_v4::ID
pub use constants::LOADER_V4_PROGRAM_ID;
/// Meteora DAMM v1 program id. ("Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB").
pub use constants::METEORA_DAMM_V1_PROGRAM_ID;
/// Meteora DAMM v2 program id. ("cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG").
pub use constants::METEORA_DAMM_V2_PROGRAM_ID;
/// Meteora DBC program id. ("dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN").
pub use constants::METEORA_DBC_PROGRAM_ID;
/// Meteora DLMM program id. ("LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo").
pub use constants::METEORA_DLMM_PROGRAM_ID;
/// Native Loader program identifier. ("NativeLoader1111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::native_loader::ID
pub use constants::NATIVE_LOADER_PROGRAM_ID;
/// Orca Whirlpools program id. ("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc").
pub use constants::ORCA_WHIRLPOOLS_PROGRAM_ID;
/// Pump.fun program id. ("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P").
pub use constants::PUMP_FUN_PROGRAM_ID;
/// PumpSwap / PumpAMM program id. ("pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA").
pub use constants::PUMP_SWAP_PROGRAM_ID;
/// Raydium AMM routing program id. ("routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS").
pub use constants::RAYDIUM_AMM_ROUTING_PROGRAM_ID;
/// Raydium AmmV4 program id. ("675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8").
pub use constants::RAYDIUM_AMM_V4_PROGRAM_ID;
/// Raydium CLMM program id. ("CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK").
pub use constants::RAYDIUM_CLMM_PROGRAM_ID;
/// Raydium CPMM mainnet program id. ("CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C").
pub use constants::RAYDIUM_CPMM_PROGRAM_ID;
/// Raydium LaunchLab program id. ("LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj").
pub use constants::RAYDIUM_LAUNCHLAB_PROGRAM_ID;
/// Raydium Stable Swap AMM program id, deprecated. ("5quBtoiQqxF9Jv6KYKctB59NT3gtJD2Y65kdnB1Uev3h").
pub use constants::RAYDIUM_STABLE_SWAP_AMM_PROGRAM_ID;
/// Secp256k1 program identifier. ("KeccakSecp256k11111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::secp256k1_program::ID
pub use constants::SECP256K1_PROGRAM_ID;
/// Secp256r1 program identifier. ("Secp256r1SigVerify1111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::secp256r1_program::ID
pub use constants::SECP256R1_PROGRAM_ID;
/// SPL Token-2022 program identifier. ("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb").
/// @see solana_sdk::pubkey::Pubkey = spl_token_2022_interface::ID
pub use constants::SPL_TOKEN_2022_PROGRAM_ID;
/// SPL Token program identifier. ("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA").
/// @see solana_sdk::pubkey::Pubkey = spl_token_interface::ID
pub use constants::SPL_TOKEN_PROGRAM_ID;
/// Stake Config program identifier. ("StakeConfig11111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::stake::config::ID
pub use constants::STAKE_CONFIG_PROGRAM_ID;
/// Stake program identifier. ("Stake11111111111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::stake::ID
pub use constants::STAKE_PROGRAM_ID;
/// System program identifier. ("11111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::system_program::ID
pub use constants::SYSTEM_PROGRAM_ID;
/// Sysvar Clock program identifier. ("SysvarC1ock11111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::clock::ID
pub use constants::SYSVAR_CLOCK_PROGRAM_ID;
/// Sysvar Epoch Rewards program identifier. ("SysvarEpochRewards1111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::epoch_rewards::ID
pub use constants::SYSVAR_EPOCH_REWARDS_PROGRAM_ID;
/// Sysvar Epoch Schedule program identifier. ("SysvarEpochSchedu1e111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::epoch_schedule::ID
pub use constants::SYSVAR_EPOCH_SCHEDULE_PROGRAM_ID;
/// Sysvar Fees program identifier. ("SysvarFees111111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::fees::ID
pub use constants::SYSVAR_FEES_PROGRAM_ID;
/// Sysvar Instructions program identifier. ("Sysvar1nstructions1111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::instructions::ID
pub use constants::SYSVAR_INSTRUCTIONS_PROGRAM_ID;
/// Sysvar Last Restart Slot program identifier. ("SysvarLastRestartS1ot1111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::last_restart_slot::ID
pub use constants::SYSVAR_LAST_RESTART_SLOT_PROGRAM_ID;
/// Sysvar program identifier. ("Sysvar1111111111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::ID
pub use constants::SYSVAR_PROGRAM_ID;
/// Sysvar Recent Blockhashes program identifier. ("SysvarRecentB1ockHashes11111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::recent_blockhashes::ID
pub use constants::SYSVAR_RECENT_BLOCKHASHES_PROGRAM_ID;
/// Sysvar Rent program identifier. ("SysvarRent111111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::rent::ID
pub use constants::SYSVAR_RENT_PROGRAM_ID;
/// Sysvar Rewards program identifier. ("SysvarRewards111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::rewards::ID
pub use constants::SYSVAR_REWARDS_PROGRAM_ID;
/// Sysvar Slot Hashes program identifier. ("SysvarS1otHashes111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::slot_hashes::ID
pub use constants::SYSVAR_SLOT_HASHES_PROGRAM_ID;
/// Sysvar Slot History program identifier. ("SysvarS1otHistory11111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::slot_history::ID
pub use constants::SYSVAR_SLOT_HISTORY_PROGRAM_ID;
/// Sysvar Stake History program identifier. ("SysvarStakeHistory1111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::sysvar::stake_history::ID
pub use constants::SYSVAR_STAKE_HISTORY_PROGRAM_ID;
/// Vote program identifier. ("Vote111111111111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::vote::ID
pub use constants::VOTE_PROGRAM_ID;
/// Wrapped SOL mint identifier. ("So11111111111111111111111111111111111111112").
/// @see solana_sdk::pubkey::Pubkey = spl_token_interface::native_mint::ID
pub use constants::WSOL_MINT_ID;
/// Zk El Gamal Proof program identifier. ("ZkE1Gama1Proof11111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::zk_elgamal_proof_program::ID
pub use constants::ZK_ELGAMAL_PROOF_PROGRAM_ID;
/// Zk Token Proof program identifier. ("ZkTokenProof1111111111111111111111111111111").
/// @see solana_sdk::pubkey::Pubkey = solana_sdk_ids::zk_token_proof_program::ID
pub use constants::ZK_TOKEN_PROOF_PROGRAM_ID;
/// Application-facing analysis signal DTO.
pub use db::AnalysisSignalDto;
/// Persisted analysis signal row.
pub use db::AnalysisSignalEntity;
/// Severity for one analysis signal.
pub use db::AnalysisSignalSeverity;
/// Application-facing normalized chain instruction DTO.
pub use db::ChainInstructionDto;
/// Persisted Solana instruction row.
pub use db::ChainInstructionEntity;
/// Application-facing normalized chain slot DTO.
pub use db::ChainSlotDto;
/// Persisted Solana slot row.
pub use db::ChainSlotEntity;
/// Application-facing normalized chain transaction DTO.
pub use db::ChainTransactionDto;
/// Persisted Solana transaction row.
pub use db::ChainTransactionEntity;
/// Database facade.
pub use db::Database;
/// Supported database backends.
pub use db::DatabaseBackend;
/// Concrete database connection.
pub use db::DatabaseConnection;
/// Metadata DTO used by the application layer.
pub use db::DbMetadataDto;
/// Persisted metadata row.
pub use db::DbMetadataEntity;
/// Application-facing runtime event DTO.
pub use db::DbRuntimeEventDto;
/// Persisted runtime event row.
pub use db::DbRuntimeEventEntity;
/// Runtime event level used by the local database layer.
pub use db::DbRuntimeEventLevel;
/// Application-facing decoded DEX event DTO.
pub use db::DexDecodedEventDto;
/// Persisted decoded DEX event row.
pub use db::DexDecodedEventEntity;
/// Application-facing normalized DEX DTO.
pub use db::DexDto;
/// Persisted normalized DEX row.
pub use db::DexEntity;
/// Normalized fee event persisted from useful non-trade DEX events.
pub use db::FeeEventDto;
/// Persisted fee event row.
pub use db::FeeEventEntity;
/// Application-facing known HTTP endpoint DTO.
pub use db::KnownHttpEndpointDto;
/// Application-facing known WebSocket endpoint DTO.
pub use db::KnownHttpEndpointEntity;
/// Application-facing known WebSocket endpoint DTO.
pub use db::KnownWsEndpointDto;
/// Persisted known WebSocket endpoint row.
pub use db::KnownWsEndpointEntity;
/// Application-facing launch attribution DTO.
pub use db::LaunchAttributionDto;
/// Persisted launch attribution row.
pub use db::LaunchAttributionEntity;
/// Application-facing launch surface DTO.
pub use db::LaunchSurfaceDto;
/// Persisted launch surface row.
pub use db::LaunchSurfaceEntity;
/// Application-facing launch surface key DTO.
pub use db::LaunchSurfaceKeyDto;
/// Persisted launch surface matching key row.
pub use db::LaunchSurfaceKeyEntity;
/// Application-facing normalized liquidity event DTO.
pub use db::LiquidityEventDto;
/// Persisted normalized liquidity event row.
pub use db::LiquidityEventEntity;
/// Normalized liquidity event kind.
pub use db::LiquidityEventKind;
/// Local decoded-event diagnostics summary.
pub use db::LocalDecodedEventDiagnosticSummaryDto;
/// Local DEX diagnostics summary.
pub use db::LocalDexDiagnosticSummaryDto;
/// Sample of duplicated trade rows grouped by decoded event id.
pub use db::LocalDuplicateDecodedEventTradeDiagnosticSampleDto;
/// Local decoded-event classification diagnostics summary.
pub use db::LocalEventClassificationDiagnosticSummaryDto;
/// Sample of a decoded trade candidate without linked trade event.
pub use db::LocalMissingTradeEventDiagnosticSampleDto;
/// Missing trade event diagnostics grouped by reason.
pub use db::LocalMissingTradeEventReasonSummaryDto;
/// Sample of multi-trade groups sharing the same signature and pair id.
pub use db::LocalMultiTradeSignaturePairDiagnosticSampleDto;
/// Local pair diagnostics for pairs whose missing trade events are non-actionable.
pub use db::LocalNonActionablePairDiagnosticSummaryDto;
/// Local pair diagnostics grouped by materialization/actionability class.
pub use db::LocalPairActionabilityDiagnosticSummaryDto;
/// Local pair diagnostics summary.
pub use db::LocalPairDiagnosticSummaryDto;
/// Sample of a pair gap.
pub use db::LocalPairGapDiagnosticSampleDto;
/// Local pair diagnostics grouped by trading readiness class.
pub use db::LocalPairTradingReadinessDiagnosticSummaryDto;
/// Internal flat counter row for local diagnostics.
pub use db::LocalPipelineDiagnosticCountersDto;
/// Local pipeline diagnostics summary.
pub use db::LocalPipelineDiagnosticSummaryDto;
/// Source family for one on-chain observation.
pub use db::ObservationSourceKind;
/// Application-facing observed token DTO.
pub use db::ObservedTokenDto;
/// Persisted observed token row.
pub use db::ObservedTokenEntity;
/// Local status of one observed token.
pub use db::ObservedTokenStatus;
/// Application-facing on-chain observation DTO.
pub use db::OnchainObservationDto;
/// Persisted on-chain observation row.
pub use db::OnchainObservationEntity;
/// Application-facing pair-analytic-signal DTO.
pub use db::PairAnalyticSignalDto;
/// Persisted pair-analytic-signal row.
pub use db::PairAnalyticSignalEntity;
/// Application-facing pair-candle DTO.
pub use db::PairCandleDto;
/// Persisted pair-candle row.
pub use db::PairCandleEntity;
/// Application-facing normalized pair DTO.
pub use db::PairDto;
/// Persisted normalized pair row.
pub use db::PairEntity;
/// Application-facing pair-metric DTO.
pub use db::PairMetricDto;
/// Persisted pair-metric row.
pub use db::PairMetricEntity;
/// Normalized pool administration event persisted from useful non-trade DEX events.
pub use db::PoolAdminEventDto;
/// Persisted pool administration event row.
pub use db::PoolAdminEventEntity;
/// Application-facing normalized pool DTO.
pub use db::PoolDto;
/// Persisted normalized pool row.
pub use db::PoolEntity;
/// Normalized pool kind.
pub use db::PoolKind;
/// Application-facing normalized pool lifecycle event DTO.
pub use db::PoolLifecycleEventDto;
/// Persisted normalized pool lifecycle event row.
pub use db::PoolLifecycleEventEntity;
/// Application-facing normalized pool listing DTO.
pub use db::PoolListingDto;
/// Persisted normalized pool listing row.
pub use db::PoolListingEntity;
/// Application-facing pool-origin DTO.
pub use db::PoolOriginDto;
/// Persisted pool-origin row.
pub use db::PoolOriginEntity;
/// Normalized pool status.
pub use db::PoolStatus;
/// Application-facing normalized pool token DTO.
pub use db::PoolTokenDto;
/// Persisted normalized pool token composition row.
pub use db::PoolTokenEntity;
/// Role of one token inside a normalized pool.
pub use db::PoolTokenRole;
/// Diagnostic row for instructions of one Solana program.
pub use db::ProgramInstructionDiagnosticDto;
/// Raw diagnostic row for instructions of one Solana program.
pub use db::ProgramInstructionDiagnosticEntity;
/// Raw row used to summarize instruction discriminators for one Solana program.
pub use db::ProgramInstructionDiscriminatorRowEntity;
/// Aggregated instruction discriminator diagnostic row.
pub use db::ProgramInstructionDiscriminatorSummaryDto;
/// Application-facing protocol candidate DTO.
///
/// A protocol candidate records a program/instruction that should be inspected
/// later because it may correspond to an unsupported DEX, launch surface,
/// migration path or protocol-specific non-trade event.
pub use db::ProtocolCandidateDto;
/// Persisted protocol candidate row.
pub use db::ProtocolCandidateEntity;
/// Aggregated protocol candidate diagnostic row.
pub use db::ProtocolCandidateSummaryDto;
/// Aggregated protocol candidate diagnostic row.
pub use db::ProtocolCandidateSummaryEntity;
/// Normalized reward event persisted from useful non-trade DEX events.
pub use db::RewardEventDto;
/// Persisted reward event row.
pub use db::RewardEventEntity;
/// Application-facing normalized swap DTO.
pub use db::SwapDto;
/// Persisted normalized swap row.
pub use db::SwapEntity;
/// Swap side relative to the normalized base token of the pair.
pub use db::SwapTradeSide;
/// Application-facing normalized token burn event DTO.
pub use db::TokenBurnEventDto;
/// Persisted normalized token burn event row.
pub use db::TokenBurnEventEntity;
/// Application-facing normalized token DTO.
pub use db::TokenDto;
/// Persisted normalized token row.
pub use db::TokenEntity;
/// Application-facing normalized token mint event DTO.
pub use db::TokenMintEventDto;
/// Persisted normalized token mint event row.
pub use db::TokenMintEventEntity;
/// Application-facing trade-event DTO.
pub use db::TradeEventDto;
/// Persisted trade-event row.
pub use db::TradeEventEntity;
/// Application-facing transaction classification DTO.
pub use db::TransactionClassificationDto;
/// Persisted transaction classification row.
pub use db::TransactionClassificationEntity;
/// Application-facing wallet DTO.
pub use db::WalletDto;
/// Persisted wallet row.
pub use db::WalletEntity;
/// Application-facing wallet-holding DTO.
pub use db::WalletHoldingDto;
/// Persisted wallet-holding row.
pub use db::WalletHoldingEntity;
/// Application-facing wallet-participation DTO.
pub use db::WalletParticipationDto;
/// Persisted wallet-participation row.
pub use db::WalletParticipationEntity;
/// Inserts one analysis signal row and returns its numeric id.
pub use db::query_analysis_signals_insert;
/// Lists recent analysis signals ordered from newest to oldest.
pub use db::query_analysis_signals_list;
/// Deletes all instructions for one transaction id.
pub use db::query_chain_instructions_delete_by_transaction_id;
/// Reads one chain instruction by its internal id.
pub use db::query_chain_instructions_get_by_id;
/// Inserts one normalized chain instruction row.
pub use db::query_chain_instructions_insert;
/// Lists instructions for one transaction ordered from outer to inner.
pub use db::query_chain_instructions_list_by_transaction_id;
/// Reads one chain slot row by slot number.
pub use db::query_chain_slots_get;
/// Lists recent chain slots ordered from newest to oldest.
pub use db::query_chain_slots_list_recent;
/// Inserts or updates one normalized chain slot row.
pub use db::query_chain_slots_upsert;
/// Reads one chain transaction row by signature.
pub use db::query_chain_transactions_get_by_signature;
/// Lists recent chain transactions ordered from newest to oldest.
pub use db::query_chain_transactions_list_recent;
/// Lists persisted chain transaction signatures for local pipeline replay.
pub use db::query_chain_transactions_list_signatures_for_replay;
/// Inserts or updates one normalized chain transaction row.
pub use db::query_chain_transactions_upsert;
/// Reads one metadata row by key.
pub use db::query_db_metadatas_get;
/// Lists all metadata rows.
pub use db::query_db_metadatas_list;
/// Inserts or updates one metadata row.
pub use db::query_db_metadatas_upsert;
/// Inserts one runtime event row and returns its numeric id.
pub use db::query_db_runtime_events_insert;
/// Lists recent runtime events ordered from newest to oldest.
pub use db::query_db_runtime_events_list_recent;
/// Reads one decoded DEX event by its natural key.
pub use db::query_dex_decoded_events_get_by_key;
/// Returns the latest Pump.fun create payload associated with a token mint.
pub use db::query_dex_decoded_events_get_latest_pump_fun_create_payload_by_mint;
/// Lists decoded DEX events for one transaction.
pub use db::query_dex_decoded_events_list_by_transaction_id;
/// Inserts or updates one decoded DEX event row.
pub use db::query_dex_decoded_events_upsert;
/// Reads one normalized DEX row by code.
pub use db::query_dexs_get_by_code;
/// Lists normalized DEX rows.
pub use db::query_dexs_list;
/// Inserts or updates one normalized DEX row by code.
pub use db::query_dexs_upsert;
/// Returns one fee event by decoded-event id.
pub use db::query_fee_events_get_by_decoded_event_id;
/// Lists recent fee events ordered from newest to oldest.
pub use db::query_fee_events_list_recent;
/// Inserts or updates one normalized fee event row.
pub use db::query_fee_events_upsert;
/// Reads one known HTTP endpoint by name.
pub use db::query_known_http_endpoints_get;
/// Lists all known HTTP endpoints.
pub use db::query_known_http_endpoints_list;
/// Inserts or updates one known HTTP endpoint row.
pub use db::query_known_http_endpoints_upsert;
/// Reads one known WS endpoint by name.
pub use db::query_known_ws_endpoints_get;
/// Lists all known WS endpoints.
pub use db::query_known_ws_endpoints_list;
/// Inserts or updates one known WS endpoint row.
pub use db::query_known_ws_endpoints_upsert;
/// Returns one launch attribution identified by its decoded-event id, if it exists.
pub use db::query_launch_attributions_get_by_decoded_event_id;
/// Lists all launch attributions attached to one pool id.
pub use db::query_launch_attributions_list_by_pool_id;
/// Inserts or updates one launch attribution row and returns its stable internal id.
pub use db::query_launch_attributions_upsert;
/// Returns one launch-surface matching key identified by its kind and value, if it exists.
pub use db::query_launch_surface_keys_get_by_match;
/// Lists all launch-surface matching keys attached to one launch surface id.
pub use db::query_launch_surface_keys_list_by_surface_id;
/// Inserts or updates one launch-surface matching key and returns its stable internal id.
pub use db::query_launch_surface_keys_upsert;
/// Returns one launch surface identified by its stable short code, if it exists.
pub use db::query_launch_surfaces_get_by_code;
/// Lists all persisted launch surfaces ordered by code.
pub use db::query_launch_surfaces_list;
/// Inserts or updates one launch surface row and returns its stable internal id.
pub use db::query_launch_surfaces_upsert;
/// Lists recent liquidity events ordered from newest to oldest.
pub use db::query_liquidity_events_list_recent;
/// Inserts or updates one normalized liquidity event row.
pub use db::query_liquidity_events_upsert;
/// Lists local decoded-event diagnostic summaries.
pub use db::query_local_decoded_event_diagnostic_list_summaries;
/// Lists samples of duplicated trade rows by decoded event id.
pub use db::query_local_duplicate_decoded_event_trade_diagnostic_list_samples;
/// Lists local decoded-event classification diagnostic summaries.
pub use db::query_local_event_classification_diagnostic_list_summaries;
/// Lists samples of decoded trade candidates without linked trade event.
pub use db::query_local_missing_trade_event_diagnostic_list_samples;
/// Lists missing trade events grouped by diagnostic reason.
pub use db::query_local_missing_trade_event_reason_list_summaries;
/// Lists samples of multi-trade signature/pair groups.
pub use db::query_local_multi_trade_signature_pair_diagnostic_list_samples;
/// Lists pair summaries for non-actionable missing trade events.
pub use db::query_local_non_actionable_pair_diagnostic_list_summaries;
/// Lists local pair materialization/actionability summaries.
pub use db::query_local_pair_actionability_diagnostic_list_summaries;
/// Lists local pair diagnostic summaries.
pub use db::query_local_pair_diagnostic_list_summaries;
/// Lists local pair trading-readiness summaries.
pub use db::query_local_pair_trading_readiness_diagnostic_list_summaries;
/// Lists samples of pairs without candles.
pub use db::query_local_pair_without_candle_diagnostic_list_samples;
/// Lists samples of pairs without trade events.
pub use db::query_local_pair_without_trade_diagnostic_list_samples;
/// Returns global local-pipeline diagnostic counters.
pub use db::query_local_pipeline_diagnostic_get_counters;
/// Lists local DEX diagnostic summaries.
pub use db::query_local_pipeline_diagnostic_list_summaries;
/// Reads one observed token by mint.
pub use db::query_observed_tokens_get_by_mint;
/// Lists observed tokens ordered by newest first.
pub use db::query_observed_tokens_list;
/// Inserts or updates one observed token by mint.
pub use db::query_observed_tokens_upsert;
/// Inserts one on-chain observation row and returns its numeric id.
pub use db::query_onchain_observations_insert;
/// Lists recent on-chain observations ordered from newest to oldest.
pub use db::query_onchain_observations_list_recent;
/// Returns one pair-analytic-signal row identified by its key, if it exists.
pub use db::query_pair_analytic_signals_get_by_key;
/// Lists all pair-analytic signals for one pair ordered by key.
pub use db::query_pair_analytic_signals_list_by_pair_id;
/// Inserts or updates one pair-analytic-signal row and returns its stable internal id.
pub use db::query_pair_analytic_signals_upsert;
/// Returns one pair-candle row identified by `(pair_id, timeframe_seconds, bucket_start_unix)`.
pub use db::query_pair_candles_get_by_key;
/// Lists candles for one pair and one timeframe ordered by bucket start.
pub use db::query_pair_candles_list_by_pair_and_timeframe;
/// Inserts or updates one pair-candle row and returns its stable internal id.
pub use db::query_pair_candles_upsert;
/// Returns one pair-metric row identified by its pair id, if it exists.
pub use db::query_pair_metrics_get_by_pair_id;
/// Lists all pair-metric rows ordered by pair id.
pub use db::query_pair_metrics_list;
/// Inserts or updates one pair-metric row and returns its stable internal id.
pub use db::query_pair_metrics_upsert;
/// Reads one normalized pair row by pool id.
pub use db::query_pairs_get_by_pool_id;
/// Lists normalized pairs ordered by id ascending.
pub use db::query_pairs_list;
/// Updates the display symbol of one normalized pair row.
pub use db::query_pairs_update_symbol;
/// Inserts or updates one normalized pair row by pool id.
pub use db::query_pairs_upsert;
/// Returns one pool administration event by decoded-event id.
pub use db::query_pool_admin_events_get_by_decoded_event_id;
/// Lists recent pool administration events ordered from newest to oldest.
pub use db::query_pool_admin_events_list_recent;
/// Inserts or updates one normalized pool administration event row.
pub use db::query_pool_admin_events_upsert;
/// Returns one pool lifecycle event by decoded event id.
pub use db::query_pool_lifecycle_events_get_by_decoded_event_id;
/// Lists recent pool lifecycle events ordered from newest to oldest.
pub use db::query_pool_lifecycle_events_list_recent;
/// Inserts or updates one normalized pool lifecycle event row.
pub use db::query_pool_lifecycle_events_upsert;
/// Reads one normalized pool listing row by pool id.
pub use db::query_pool_listings_get_by_pool_id;
/// Lists normalized pool listings ordered by detected date then id.
pub use db::query_pool_listings_list;
/// Inserts or updates one normalized pool listing row by pool id.
pub use db::query_pool_listings_upsert;
/// Reads one normalized token row by internal id.
pub use db::query_pool_origins_get_by_pool_id;
/// Lists all pool-origin rows ordered by creation time then id.
pub use db::query_pool_origins_list;
/// Inserts or updates one pool-origin row and returns its stable internal id.
pub use db::query_pool_origins_upsert;
/// Lists normalized pool token rows by pool id.
pub use db::query_pool_tokens_list_by_pool_id;
/// Inserts or updates one normalized pool token composition row.
pub use db::query_pool_tokens_upsert;
/// Reads one normalized pool row by address.
pub use db::query_pools_get_by_address;
/// Lists normalized pools ordered by id ascending.
pub use db::query_pools_list;
/// Inserts or updates one normalized pool row by address.
pub use db::query_pools_upsert;
/// Lists diagnostic instruction rows for one program id.
pub use db::query_program_instruction_diagnostics_list_by_program_id;
/// Lists instruction discriminator summaries for one program id.
pub use db::query_program_instruction_discriminator_summaries_list_by_program_id;
/// Lists protocol candidate summaries ordered by investigation priority.
pub use db::query_protocol_candidate_summaries_list_by_priority;
/// Deletes protocol candidates for one transaction.
///
/// This is useful before recomputing candidates for a replayed transaction.
pub use db::query_protocol_candidates_delete_by_transaction_id;
/// Inserts one protocol candidate row.
pub use db::query_protocol_candidates_insert;
/// Lists protocol candidates for one program id.
pub use db::query_protocol_candidates_list_by_program_id;
/// Lists protocol candidates for one transaction.
pub use db::query_protocol_candidates_list_by_transaction_id;
/// Lists recent protocol candidates ordered from newest to oldest.
pub use db::query_protocol_candidates_list_recent;
/// Returns one reward event by decoded-event id.
pub use db::query_reward_events_get_by_decoded_event_id;
/// Lists recent reward events ordered from newest to oldest.
pub use db::query_reward_events_list_recent;
/// Inserts or updates one normalized reward event row.
pub use db::query_reward_events_upsert;
/// Lists recent swaps ordered from newest to oldest.
pub use db::query_swaps_list_recent;
/// Inserts or updates one normalized swap row.
pub use db::query_swaps_upsert;
/// Lists recent token burn events ordered from newest to oldest.
pub use db::query_token_burn_events_list_recent;
/// Inserts or updates one normalized token burn event row.
pub use db::query_token_burn_events_upsert;
/// Lists recent token mint events ordered from newest to oldest.
pub use db::query_token_mint_events_list_recent;
/// Inserts or updates one normalized token mint event row.
pub use db::query_token_mint_events_upsert;
/// Reads one normalized token row by internal id.
pub use db::query_tokens_get_by_id;
/// Reads one normalized token row by mint.
pub use db::query_tokens_get_by_mint;
/// Lists all normalized token rows ordered by mint.
pub use db::query_tokens_list;
/// Lists token rows whose display or mint metadata is incomplete.
pub use db::query_tokens_list_missing_metadata;
/// Inserts or updates one normalized token row by mint.
pub use db::query_tokens_upsert;
/// Returns one trade-event row identified by its decoded-event id, if it exists.
pub use db::query_trade_events_get_by_decoded_event_id;
/// Lists trade-event rows for one pair id ordered by creation time then id.
pub use db::query_trade_events_list_by_pair_id;
/// Lists trade-event rows for one transaction id ordered by id.
pub use db::query_trade_events_list_by_transaction_id;
/// Inserts or updates one trade-event row and returns its stable internal id.
pub use db::query_trade_events_upsert;
/// Deletes all local market materialization rows rebuilt from trade events.
pub use db::query_trade_market_materialization_delete_all;
/// Reads one transaction classification by signature.
pub use db::query_transaction_classifications_get_by_signature;
/// Reads one transaction classification by transaction id.
pub use db::query_transaction_classifications_get_by_transaction_id;
/// Lists recent transaction classifications ordered from newest to oldest.
pub use db::query_transaction_classifications_list_recent;
/// Inserts or updates one transaction classification row.
pub use db::query_transaction_classifications_upsert;
/// Returns one wallet-holding row identified by `(wallet_id, token_id)`, if it exists.
pub use db::query_wallet_holdings_get_by_wallet_and_token;
/// Lists wallet-holding rows for one wallet id.
pub use db::query_wallet_holdings_list_by_wallet_id;
/// Inserts or updates one wallet-holding row and returns its stable internal id.
pub use db::query_wallet_holdings_upsert;
/// Returns one wallet-participation identified by its unique key, if it exists.
pub use db::query_wallet_participations_get_by_unique_key;
/// Lists wallet-participation rows for one pool id.
pub use db::query_wallet_participations_list_by_pool_id;
/// Lists wallet-participation rows for one wallet id.
pub use db::query_wallet_participations_list_by_wallet_id;
/// Inserts or updates one wallet-participation row and returns its stable internal id.
pub use db::query_wallet_participations_upsert;
/// Returns one wallet identified by its address, if it exists.
pub use db::query_wallets_get_by_address;
/// Lists all persisted wallets ordered by address.
pub use db::query_wallets_list;
/// Inserts or updates one wallet row and returns its stable internal id.
pub use db::query_wallets_upsert;
/// One normalized observation ready to be persisted.
pub use detect::DetectionObservationInput;
/// Persistence façade between technical detection and database storage.
pub use detect::DetectionPersistenceService;
/// One pool candidate detected from a technical source.
pub use detect::DetectionPoolCandidateInput;
/// Result of one pool candidate persistence operation.
pub use detect::DetectionPoolCandidateResult;
/// One normalized signal ready to be persisted.
pub use detect::DetectionSignalInput;
/// One token candidate detected from a technical source.
pub use detect::DetectionTokenCandidateInput;
/// Result of one token candidate persistence operation.
pub use detect::DetectionTokenCandidateResult;
/// Result of one Solana WebSocket detection pass.
pub use detect::SolanaWsDetectionOutcome;
/// Detection service for Solana WebSocket notifications.
pub use detect::SolanaWsDetectionService;
/// One forwarded WebSocket notification ready for detection.
pub use detect::WsDetectionNotificationEnvelope;
/// Asynchronous relay between `WsClient` notifications and the detection service.
pub use detect::WsDetectionRelay;
/// Runtime statistics for one relay worker.
pub use detect::WsDetectionRelayStats;
/// Decoded DexLab create-pool event.
pub use dex::DexlabCreatePoolDecoded;
/// Decoded DexLab event.
pub use dex::DexlabDecodedEvent;
/// DexLab decoder.
pub use dex::DexlabDecoder;
/// Decoded DexLab swap event.
pub use dex::DexlabSwapDecoded;
/// Decoded FluxBeam create-pool event.
pub use dex::FluxbeamCreatePoolDecoded;
/// Decoded FluxBeam event.
pub use dex::FluxbeamDecodedEvent;
/// FluxBeam decoder.
pub use dex::FluxbeamDecoder;
/// Decoded FluxBeam swap event.
pub use dex::FluxbeamSwapDecoded;
/// Decoded Meteora DAMM v1 create-pool event.
pub use dex::MeteoraDammV1CreatePoolDecoded;
/// Decoded Meteora DAMM v1 event.
pub use dex::MeteoraDammV1DecodedEvent;
/// Meteora DAMM v1 decoder.
pub use dex::MeteoraDammV1Decoder;
/// Decoded Meteora DAMM v1 swap event.
pub use dex::MeteoraDammV1SwapDecoded;
/// Decoded Meteora DAMM v2 create-pool event.
pub use dex::MeteoraDammV2CreatePoolDecoded;
/// Decoded Meteora DAMM v2 event.
pub use dex::MeteoraDammV2DecodedEvent;
/// Meteora DAMM v2 decoder.
pub use dex::MeteoraDammV2Decoder;
/// Decoded Meteora DAMM v2 swap event.
pub use dex::MeteoraDammV2SwapDecoded;
/// Decoded Meteora DBC create-pool event.
pub use dex::MeteoraDbcCreatePoolDecoded;
/// Decoded Meteora DBC event.
pub use dex::MeteoraDbcDecodedEvent;
/// Meteora DBC decoder.
pub use dex::MeteoraDbcDecoder;
/// Decoded Meteora DBC swap event.
pub use dex::MeteoraDbcSwapDecoded;
/// Decoded Meteora DLMM create-pool event.
pub use dex::MeteoraDlmmCreatePoolDecoded;
/// Decoded Meteora DLMM event.
pub use dex::MeteoraDlmmDecodedEvent;
/// Meteora DLMM decoder.
pub use dex::MeteoraDlmmDecoder;
/// Decoded Meteora DLMM liquidity lifecycle event.
pub use dex::MeteoraDlmmLiquidityDecoded;
/// Decoded Meteora DLMM pool lifecycle event.
pub use dex::MeteoraDlmmPoolLifecycleDecoded;
/// Decoded Meteora DLMM swap event.
pub use dex::MeteoraDlmmSwapDecoded;
/// Decoded Orca Whirlpools create-pool event.
pub use dex::OrcaWhirlpoolsCreatePoolDecoded;
/// Decoded Orca Whirlpools event.
pub use dex::OrcaWhirlpoolsDecodedEvent;
/// Orca Whirlpools decoder.
pub use dex::OrcaWhirlpoolsDecoder;
/// Decoded Orca Whirlpools swap event.
pub use dex::OrcaWhirlpoolsSwapDecoded;
/// Decoded Pump.fun `create_v2` token event.
pub use dex::PumpFunCreateV2TokenDecoded;
/// Decoded Pump.fun event.
pub use dex::PumpFunDecodedEvent;
/// Pump.fun decoder.
pub use dex::PumpFunDecoder;
/// Decoded Pump.fun bonding-curve trade event.
pub use dex::PumpFunTradeDecoded;
/// Decoded PumpSwap event.
pub use dex::PumpSwapDecodedEvent;
/// PumpSwap decoder.
pub use dex::PumpSwapDecoder;
/// Decoded PumpSwap trade event.
pub use dex::PumpSwapTradeDecoded;
/// Decoded Raydium AmmV4 event.
pub use dex::RaydiumAmmV4DecodedEvent;
/// Raydium AmmV4 decoder.
pub use dex::RaydiumAmmV4Decoder;
/// Decoded Raydium AmmV4 initialize2 pool event.
pub use dex::RaydiumAmmV4Initialize2PoolDecoded;
/// Decoded Raydium CLMM event.
pub use dex::RaydiumClmmDecodedEvent;
/// Decoded Raydium CLMM swap_v2 instruction.
pub use dex::RaydiumClmmSwapV2Decoded;
/// Raydium CPMM decoded event.
pub use dex::RaydiumCpmmDecodedEvent;
/// Raydium CPMM decoded swap.
pub use dex::RaydiumCpmmSwapDecoded;
/// Raydium CPMM swap mode.
pub use dex::RaydiumCpmmSwapMode;
/// Decodes a Raydium CLMM instruction.
pub use dex::decode_raydium_clmm_instruction;
/// Decodes one Raydium CPMM instruction from projected instruction fields.
pub use dex::decode_raydium_cpmm_instruction;
/// DEX decode service.
pub use dex_decode::DexDecodeService;
/// Business-level DEX detection service.
pub use dex_detect::DexDetectService;
/// Result of one business-level DEX pool detection.
pub use dex_detect::DexPoolDetectionResult;
/// Stable DEX event actionability class.
pub use dex_event_classification::DexEventActionability;
/// Stable DEX event business category.
pub use dex_event_classification::DexEventCategory;
/// Fine-grained DEX event lifecycle kind.
pub use dex_event_classification::DexEventLifecycleKind;
/// Classifies a DEX event into an actionability class.
pub use dex_event_classification::classify_dex_event_actionability;
/// Classifies a DEX event into an actionability class and returns its persisted code.
pub use dex_event_classification::classify_dex_event_actionability_code;
/// Classifies a DEX event kind into a stable category.
pub use dex_event_classification::classify_dex_event_category;
/// Classifies a DEX event kind and returns its persisted category code.
pub use dex_event_classification::classify_dex_event_category_code;
/// Classifies a DEX event kind into a fine-grained lifecycle kind.
pub use dex_event_classification::classify_dex_event_lifecycle_kind;
/// Classifies a DEX event kind into a fine-grained lifecycle kind code.
pub use dex_event_classification::classify_dex_event_lifecycle_kind_code;
/// Enriches and serializes a decoded DEX payload.
pub use dex_event_classification::enrich_and_serialize_dex_decoded_payload;
/// Enriches a decoded DEX payload with classification metadata.
pub use dex_event_classification::enrich_dex_decoded_payload;
/// Parses, enriches and serializes a decoded DEX payload.
pub use dex_event_classification::enrich_serialized_dex_decoded_payload;
/// Returns true when a decoded payload is a candle candidate.
pub use dex_event_classification::is_decoded_event_candle_candidate;
/// Returns true when a decoded payload is a trade candidate.
pub use dex_event_classification::is_decoded_event_trade_candidate;
/// Returns true for admin/config/permission DEX events.
pub use dex_event_classification::is_dex_admin_event_kind;
/// Returns true when a DEX event kind can directly feed candle materialization.
pub use dex_event_classification::is_dex_candle_candidate_event_kind;
/// Returns true for fee collection DEX events.
pub use dex_event_classification::is_dex_fee_event_kind;
/// Returns true for launch or bonding-curve creation DEX events.
pub use dex_event_classification::is_dex_launch_event_kind;
/// Returns true for liquidity add-like DEX events.
pub use dex_event_classification::is_dex_liquidity_add_event_kind;
/// Returns true for liquidity lifecycle DEX events.
pub use dex_event_classification::is_dex_liquidity_event_kind;
/// Returns true for liquidity remove-like DEX events.
pub use dex_event_classification::is_dex_liquidity_remove_event_kind;
/// Returns true for migration DEX events.
pub use dex_event_classification::is_dex_migration_event_kind;
/// Returns true for pair creation DEX events.
pub use dex_event_classification::is_dex_pair_creation_event_kind;
/// Returns true for pool creation DEX events.
pub use dex_event_classification::is_dex_pool_creation_event_kind;
/// Returns true for pool lifecycle DEX events.
pub use dex_event_classification::is_dex_pool_lifecycle_event_kind;
/// Returns true for position close DEX events.
pub use dex_event_classification::is_dex_position_close_event_kind;
/// Returns true for position open DEX events.
pub use dex_event_classification::is_dex_position_open_event_kind;
/// Returns true for reward or emission DEX events.
pub use dex_event_classification::is_dex_reward_event_kind;
/// Returns true for token burn DEX events.
pub use dex_event_classification::is_dex_token_burn_event_kind;
/// Returns true for token mint DEX events.
pub use dex_event_classification::is_dex_token_mint_event_kind;
/// Returns true for swap-like DEX events.
pub use dex_event_classification::is_dex_trade_event_kind;
/// Static DEX support matrix entry.
pub use dex_support_matrix::DexSupportMatrixEntry;
/// Owned DEX support matrix entry DTO.
pub use dex_support_matrix::DexSupportMatrixEntryDto;
/// Returns all static DEX support matrix entries.
pub use dex_support_matrix::dex_support_matrix_entries;
/// Looks up one DEX support matrix entry by internal code.
pub use dex_support_matrix::dex_support_matrix_entry_by_code;
/// Looks up one DEX support matrix entry by primary or router program id.
pub use dex_support_matrix::dex_support_matrix_entry_by_program_id;
/// Returns all DEX support matrix entries as owned DTOs.
pub use dex_support_matrix::dex_support_matrix_entry_dtos;
/// Global error type used by the `kb_lib` crate.
///
/// The project intentionally avoids `anyhow` and `thiserror`, so this
/// enum centralizes the main error families with explicit textual messages.
pub use error::Error;
/// Generic asynchronous HTTP client.
pub use http_client::HttpClient;
/// Local endpoint status.
pub use http_client::HttpEndpointStatus;
/// Local HTTP method class used for independent limit buckets.
pub use http_client::HttpMethodClass;
/// JSON-RPC 2.0 error object.
pub use http_client::JsonRpcHttpErrorObject;
/// JSON-RPC 2.0 error response.
pub use http_client::JsonRpcHttpErrorResponse;
/// JSON-RPC 2.0 request envelope for HTTP.
pub use http_client::JsonRpcHttpRequest;
/// Parsed HTTP JSON-RPC response envelope.
pub use http_client::JsonRpcHttpResponse;
/// JSON-RPC 2.0 success response.
pub use http_client::JsonRpcHttpSuccessResponse;
/// Parses one JSON-RPC HTTP response text.
pub use http_client::parse_json_rpc_http_response_text;
/// Parses one JSON-RPC HTTP response value.
pub use http_client::parse_json_rpc_http_response_value;
/// Pool of HTTP endpoints.
pub use http_pool::HttpEndpointPool;
/// Snapshot of one pooled HTTP endpoint.
pub use http_pool::HttpPoolClientSnapshot;
/// JSON-RPC 2.0 error object.
pub use json_rpc_ws::JsonRpcWsErrorObject;
/// JSON-RPC 2.0 error response.
pub use json_rpc_ws::JsonRpcWsErrorResponse;
/// Parsed incoming JSON-RPC WebSocket message.
pub use json_rpc_ws::JsonRpcWsIncomingMessage;
/// JSON-RPC 2.0 notification message.
pub use json_rpc_ws::JsonRpcWsNotification;
/// JSON-RPC 2.0 notification parameter object.
pub use json_rpc_ws::JsonRpcWsNotificationParams;
/// Generic JSON-RPC 2.0 request sent over WebSocket.
pub use json_rpc_ws::JsonRpcWsRequest;
/// JSON-RPC 2.0 success response.
pub use json_rpc_ws::JsonRpcWsSuccessResponse;
/// Parses a JSON value into a JSON-RPC incoming message.
///
/// This parser accepts only server-originating incoming message shapes:
/// success responses, error responses, and notifications.
pub use json_rpc_ws::is_probable_json_rpc_object_text;
/// Parses a raw text message into a JSON-RPC incoming message.
///
/// This parser accepts only server-originating incoming message shapes:
/// success responses, error responses, and notifications.
pub use json_rpc_ws::parse_json_rpc_ws_incoming_text;
/// Parses a JSON value into a JSON-RPC incoming message.
///
/// This parser accepts only server-originating incoming message shapes:
/// success responses, error responses, and notifications.
pub use json_rpc_ws::parse_json_rpc_ws_incoming_value;
/// Result of one launch surface attribution.
pub use launch_origin::LaunchAttributionResult;
/// Launch surface attribution service.
pub use launch_origin::LaunchOriginService;
/// Local pipeline diagnostics service.
pub use local_pipeline_diagnostics::LocalPipelineDiagnosticsService;
/// Configuration for a local pipeline replay pass.
pub use local_pipeline_replay::LocalPipelineReplayConfig;
/// Summary of a local pipeline replay pass.
pub use local_pipeline_replay::LocalPipelineReplayResult;
/// Local pipeline replay service.
pub use local_pipeline_replay::LocalPipelineReplayService;
/// Replays the local pipeline from persisted raw chain transaction rows.
pub use local_pipeline_replay::replay_local_pipeline;
/// Configuration for a local pipeline validation pass.
pub use local_pipeline_validation::LocalPipelineValidationConfig;
/// A single local pipeline validation issue.
pub use local_pipeline_validation::LocalPipelineValidationIssueDto;
/// Result of a local pipeline validation pass.
pub use local_pipeline_validation::LocalPipelineValidationReportDto;
/// Complete local pipeline validation run result.
pub use local_pipeline_validation::LocalPipelineValidationRunDto;
/// Local pipeline validation service.
pub use local_pipeline_validation::LocalPipelineValidationService;
/// Validates a diagnostics summary without performing database access.
pub use local_pipeline_validation::validate_local_pipeline_diagnostics_summary;
/// One pair-analytic-signal recording result.
pub use pair_analytic_signal::PairAnalyticSignalResult;
/// Pair analytic signal service.
pub use pair_analytic_signal::PairAnalyticSignalService;
/// One pair-candle aggregation result.
pub use pair_candle_aggregation::PairCandleAggregationResult;
/// Pair-candle aggregation service.
///
/// This service materializes a small set of standard timeframes in base storage.
/// Arbitrary timeframes are rebuilt on demand through `PairCandleQueryService`.
pub use pair_candle_aggregation::PairCandleAggregationService;
/// Pair-candle query service.
///
/// Standard materialized timeframes are served from base storage.
/// Arbitrary timeframes are rebuilt on demand from `trade_events`.
pub use pair_candle_query::PairCandleQueryService;
/// Summary produced by a pair-symbol refresh pass.
pub use pair_symbol::PairSymbolRefreshResult;
/// Service that refreshes `k_sol_pairs.symbol` from base and quote token metadata.
pub use pair_symbol::PairSymbolRefreshService;
/// Builds a readable pair symbol from token symbols with mint fallback.
pub use pair_symbol::build_pair_symbol;
/// Refreshes all persisted pair display symbols.
pub use pair_symbol::refresh_pair_symbols;
/// One recorded pool-origin result.
pub use pool_origin::PoolOriginResult;
/// Pool-origin consolidation service.
pub use pool_origin::PoolOriginService;
/// Typed Solana PubSub notification payload.
pub use solana_pubsub_ws::SolanaWsTypedNotification;
/// Parses a Solana JSON-RPC notification into an official typed payload.
pub use solana_pubsub_ws::parse_solana_ws_typed_notification;
/// Parses a typed Solana PubSub notification from a generic websocket event.
///
/// This returns:
/// - `Ok(Some(...))` for JSON-RPC notification-bearing events
/// - `Ok(None)` for events that do not carry a notification
/// - `Err(...)` when a notification is present but cannot be decoded
pub use solana_pubsub_ws::parse_solana_ws_typed_notification_from_event;
/// One pool-backfill result summary.
pub use token_backfill::PoolBackfillResult;
/// One token-backfill result summary.
pub use token_backfill::TokenBackfillResult;
/// Historical token backfill service.
///
/// This service reuses the existing transaction projection and downstream
/// DEX pipeline instead of introducing a separate historical code path.
pub use token_backfill::TokenBackfillService;
/// Summary produced by a token metadata backfill pass.
pub use token_metadata::TokenMetadataBackfillResult;
/// Service that enriches persisted token rows with mint and display metadata.
pub use token_metadata::TokenMetadataBackfillService;
/// Guard keeping non-blocking tracing workers alive.
///
/// The guard must remain alive during the whole application lifetime so that
/// buffered log records are flushed correctly.
pub use tracing::TracingGuard;
/// Initializes the global tracing subscriber.
///
/// This function is expected to be called once at application startup.
pub use tracing::init_tracing;
/// One trade-aggregation result.
pub use trade_aggregation::TradeAggregationResult;
/// Trade-aggregation service.
pub use trade_aggregation::TradeAggregationService;
/// Service used to classify projected Solana transactions.
pub use transaction_classification::TransactionClassificationService;
/// Service projecting resolved transaction JSON into internal chain tables.
pub use tx_model::TransactionModelService;
/// Result of one transaction resolution pass.
pub use tx_resolution::TransactionResolutionOutcome;
/// One transaction resolution request built from a WebSocket notification.
pub use tx_resolution::TransactionResolutionRequest;
/// Transaction resolution service.
pub use tx_resolution::TransactionResolutionService;
/// One forwarded WebSocket notification envelope for transaction resolution.
pub use tx_resolution::WsTransactionResolutionEnvelope;
/// Relay that consumes forwarded WS notifications and resolves matching
/// signatures through HTTP `getTransaction`.
pub use tx_resolution::WsTransactionResolutionRelay;
/// Runtime statistics for one transaction resolution relay worker.
pub use tx_resolution::WsTransactionResolutionRelayStats;
/// Generic connection state used by transport clients.
pub use types::ConnectionState;
/// One wallet-holding observation result.
pub use wallet_holding_observation::WalletHoldingObservationResult;
/// Wallet-holding observation service.
pub use wallet_holding_observation::WalletHoldingObservationService;
/// One wallet-observation result.
pub use wallet_observation::WalletObservationResult;
/// Wallet-observation service.
pub use wallet_observation::WalletObservationService;
/// Generic asynchronous WebSocket client.
pub use ws_client::WsClient;
/// Incoming WebSocket transport event emitted by [`crate::WsClient`].
pub use ws_client::WsEvent;
/// Outgoing transport-level WebSocket message.
pub use ws_client::WsOutgoingMessage;
/// Active subscription metadata tracked by the client runtime.
pub use ws_client::WsSubscriptionInfo;
/// One hybrid WebSocket observation result.
pub use ws_hybrid_observation::WsHybridObservationResult;
/// Hybrid WebSocket technical observation service.
pub use ws_hybrid_observation::WsHybridObservationService;
/// hybrid technical observation recording.
pub use ws_hybrid_runtime::WsHybridRuntimeService;
/// Snapshot of hybrid WebSocket watch targets.
pub use ws_hybrid_watch::WsHybridWatchService;
/// Snapshot of hybrid WebSocket watch targets.
pub use ws_hybrid_watch::WsHybridWatchSnapshot;
/// One hybrid WebSocket watch target.
pub use ws_hybrid_watch::WsWatchTarget;
/// Kind of hybrid WebSocket watch target.
pub use ws_hybrid_watch::WsWatchTargetKind;
/// Snapshot of one managed endpoint.
pub use ws_manager::WsManagedEndpointSnapshot;
/// Multi-client WebSocket orchestrator.
pub use ws_manager::WsManager;
/// Snapshot of the whole manager state.
pub use ws_manager::WsManagerSnapshot;
/// Result of non-trade event materialization for one transaction.
pub use non_trade_event_materialization::NonTradeEventMaterializationResult;
/// Materializes useful non-trade decoded DEX events.
pub use non_trade_event_materialization::NonTradeEventMaterializationService;