Skip to main content

solana_pipkit/
lib.rs

1//! # solana-pipkit
2//!
3//! Pragmatic Rust utilities for Solana program and client development.
4//!
5//! ## Modules
6//!
7//! - **Core**: Account utils, PDA helpers, rent cleaning, token utilities
8//! - **Safety**: Transaction validation, address verification, token safety, MEV protection
9//! - **Speed**: Multi-RPC pooling, blockhash caching, sniper module, Jito bundles
10//! - **Analytics**: Wallet profiling, holder analysis, pattern detection, PnL tracking
11//! - **DeFi**: Pool interactions, liquidity provision, yield farming, LP token parsing
12//! - **Multi-Agent**: Agent coordination, messaging, encryption, task marketplace
13//! - **Agent Registry**: On-chain agent registration, discovery, and peer coordination
14//! - **Agent Analytics**: Agent classification, interaction graphs, risk scoring
15//!
16//! ## Feature Flags
17//!
18//! - `jupiter` - Jupiter aggregator integration
19//! - `jito` - Jito bundle support for MEV protection
20//! - `anchor` - Anchor framework utilities
21//! - `analytics` - Wallet and token analytics
22//! - `defi` - DeFi protocol integrations
23//! - `safety` - Transaction safety validation
24//! - `speed` - Performance optimizations
25//! - `multi-agent` - Multi-agent coordination primitives
26//! - `agent-registry` - On-chain agent registration and discovery
27//! - `agent-analytics` - Agent-specific analytics and profiling
28//! - `all` - Enable all features
29
30pub mod account_utils;
31pub mod error;
32pub mod pda;
33pub mod rent_cleaner;
34pub mod token_utils;
35pub mod mev_protection;
36pub mod nft_safety;
37pub mod program_safety;
38pub mod simulation;
39pub mod transaction;
40pub mod anchor_helpers;
41pub mod account_graph;
42
43#[cfg(feature = "jupiter")]
44pub mod jupiter;
45
46#[cfg(feature = "safety")]
47pub mod safety;
48
49#[cfg(feature = "speed")]
50pub mod speed;
51
52#[cfg(feature = "analytics")]
53pub mod analytics;
54
55#[cfg(feature = "defi")]
56pub mod defi;
57
58#[cfg(feature = "multi-agent")]
59pub mod multi_agent;
60
61#[cfg(feature = "agent-registry")]
62pub mod agent_registry;
63
64#[cfg(feature = "agent-analytics")]
65pub mod agent_analytics;
66
67pub use error::{Result, ToolkitError};
68
69/// Common imports for quick access
70pub mod prelude {
71    pub use crate::account_utils::*;
72    pub use crate::pda::*;
73    pub use crate::rent_cleaner::*;
74    pub use crate::token_utils::*;
75    pub use crate::{Result, ToolkitError};
76
77    #[cfg(feature = "jupiter")]
78    pub use crate::jupiter::*;
79
80    #[cfg(feature = "safety")]
81    pub use crate::safety::*;
82
83    #[cfg(feature = "speed")]
84    pub use crate::speed::*;
85
86    #[cfg(feature = "analytics")]
87    pub use crate::analytics::*;
88
89    #[cfg(feature = "defi")]
90    pub use crate::defi::*;
91
92    #[cfg(feature = "multi-agent")]
93    pub use crate::multi_agent::*;
94
95    #[cfg(feature = "agent-registry")]
96    pub use crate::agent_registry::*;
97
98    #[cfg(feature = "agent-analytics")]
99    pub use crate::agent_analytics::*;
100}