Skip to main content

Crate wp_solana_raydium_clmm_core

Crate wp_solana_raydium_clmm_core 

Source
Expand description

Raydium CLMM Core — pure (non-I/O) crate

Contains all plan-layer code, quote math, PDA derivation utilities, and token-account planning logic. Has zero solana-client and zero tokio dependencies — it can be used in WASM targets, test harnesses without a Solana runtime, or by other protocol SDKs that want to compose plan functions.

§Architecture

  • plan/ — pure plan modules (increase, decrease, open, harvest)
  • quote_math — pure quote computation (was instructions/common.rs)
  • token/ — pure token account planning types and helpers
  • utils/ — PDA derivation, constants, tick array bitmap math
  • metadata — shared mint metadata types (MintInfo, TokenProgram)
  • pool_metrics — pure derived metrics from PoolState
  • position_metrics — pure derived metrics from a frozen PositionAccountBundle
  • error, plan_error — error types

Re-exports§

pub use error::RaydiumClmmError;
pub use quote_math::calculate_decrease_liquidity_quote;
pub use quote_math::calculate_increase_liquidity_quote;
pub use quote_math::collect_fees_quote;
pub use quote_math::collect_rewards_quote;
pub use quote_math::CollectFeesQuote;
pub use quote_math::CollectRewardQuote;
pub use quote_math::CollectRewardsQuote;

Modules§

error
Error types for the Raydium CLMM SDK
metadata
Shared metadata types for mint accounts.
plan
Pure plan-layer modules for Raydium CLMM operations.
plan_error
Error types for the plan / fetch / orchestrate layering.
pool_metrics
Pure derived metrics for a Raydium CLMM pool.
position_metrics
Pure (I/O-free) computation of derived metrics for a Raydium CLMM position.
quote_math
Pure quote computation functions for Raydium CLMM.
token
Token account utilities for waterpump-solana core.
utils
Utility functions for Raydium CLMM core

Structs§

MintAndAta
Per-mint state: the mint account itself, the ATA address, and the ATA account if it currently exists on chain.
TokenAccountState
On-chain state for an owner’s token accounts across a set of mints.

Enums§

FetchError
Errors produced by I/O-bound fetch functions.
OrchestrateError
PlanError
Errors produced by pure planning functions.
TokenAccountStrategy
Strategy for token account creation.

Functions§

get_current_transfer_fee
Get the current transfer fee for a Token-2022 mint at a specific epoch.

Type Aliases§

TokenAccountInstructions
Type alias for solana_token_toolkit::TokenAccountPlan.