Skip to main content

wp_solana_orca_whirlpool_client/
lib.rs

1//! Orca Whirlpool client library.
2//!
3//! Low-level client for the Orca Whirlpool concentrated liquidity program,
4//! providing account types, GPA filters, PDA derivation, and constants.
5
6#![allow(ambiguous_glob_reexports)]
7#![allow(clippy::io_other_error)]
8// Codama's generated/mod.rs emits `pub(crate) use programs::*;` defensively;
9// we re-export the same symbols via `pub use generated::programs::*` below,
10// so the inner `pub(crate)` form is unused. Suppress the warning crate-wide
11// rather than editing the auto-generated file.
12#![allow(unused_imports)]
13
14pub mod constants;
15pub mod error;
16#[cfg(feature = "fetch")]
17pub mod gpa;
18pub mod pda;
19pub mod state;
20
21// Generated code from Codama
22pub mod generated;
23
24// Re-export commonly used items
25pub use constants::*;
26pub use error::{Result, WhirlpoolError};
27// Re-export generated items for convenience
28pub use generated::accounts::*;
29#[cfg(feature = "fetch")]
30pub use generated::shared::*;
31#[cfg(feature = "fetch")]
32pub(crate) use generated::*;
33pub use generated::{
34    // `errors::*` would only re-add `WhirlpoolError`, already exposed via
35    // `pub use error::{Result, WhirlpoolError}` above — omit to avoid the
36    // unused-import warning.
37    instructions::*,
38    programs::{WHIRLPOOL_ID as ID, *},
39    types::*,
40};
41#[cfg(feature = "fetch")]
42pub use gpa::*;
43pub use pda::*;
44pub use state::*;