Skip to main content

sol_parser_sdk/core/
mod.rs

1//! Solana DEX 事件解析器核心模块
2//!
3//! 提供纯函数式的 DEX 事件解析能力,支持:
4//! - PumpFun、RaydiumLaunchlab、PumpSwap、Raydium CLMM/CPMM
5//! - 指令+日志数据的智能合并
6//! - 零拷贝、高性能解析
7//! - 统一的事件格式
8
9// 核心模块
10pub mod account_dispatcher; // 账户填充调度器 - 主入口,路由到各协议
11pub mod account_fillers; // 账户填充器实现 - 按协议拆分的具体实现
12pub mod cache;
13pub mod clock; // 高性能时钟 - 微秒级时间戳获取
14pub mod common_filler;
15pub mod events; // 事件定义
16pub(crate) mod invoke_context;
17pub mod merger; // 事件合并器 - instruction + inner instruction
18pub mod pumpfun_fee_enrich; // 同 tx Pump 后处理:CreateV2 fee 回填、Create→Trade cashback/mayhem(零 RPC)
19pub mod unified_parser; // 统一解析器 - 单一入口 // 解析器缓存 - 减少内存分配
20
21// 主要导出 - 核心事件处理功能
22pub use cache::{build_account_pubkeys_with_cache, AccountPubkeyCache};
23pub use clock::{elapsed_micros_since, now_micros, now_nanos};
24pub use events::*;
25pub use unified_parser::{
26    parse_logs_only, parse_logs_streaming, parse_transaction_events,
27    parse_transaction_events_streaming, parse_transaction_with_listener,
28    parse_transaction_with_streaming_listener, EventListener, StreamingEventListener,
29};
30
31pub use crate::accounts::{
32    is_nonce_account, parse_account_unified, parse_nonce_account, parse_token_account, AccountData,
33};
34
35// 兼容性类型
36pub type ParsedEvent = DexEvent;