Skip to main content

sol_parser_sdk/core/
mod.rs

1//! Solana DEX 事件解析器核心模块
2//!
3//! 提供纯函数式的 DEX 事件解析能力,支持:
4//! - PumpFun、Bonk、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 mod merger; // 事件合并器 - instruction + inner instruction
17pub mod pumpfun_fee_enrich; // CreateV2 + 同 tx Buy 的 fee recipient 回填
18pub mod unified_parser; // 统一解析器 - 单一入口 // 解析器缓存 - 减少内存分配
19
20// 主要导出 - 核心事件处理功能
21pub use cache::{build_account_pubkeys_with_cache, AccountPubkeyCache};
22pub use clock::{elapsed_micros_since, now_micros, now_nanos};
23pub use events::*;
24pub use unified_parser::{
25    parse_logs_only, parse_logs_streaming, parse_transaction_events,
26    parse_transaction_events_streaming, parse_transaction_with_listener,
27    parse_transaction_with_streaming_listener, EventListener, StreamingEventListener,
28};
29
30pub use crate::accounts::{
31    is_nonce_account, parse_account_unified, parse_nonce_account, parse_token_account, AccountData,
32};
33
34// 兼容性类型
35pub type ParsedEvent = DexEvent;