Skip to main content

Crate wp_solana_raydium_clmm_sdk

Crate wp_solana_raydium_clmm_sdk 

Source
Expand description

Raydium CLMM SDK

High-level SDK for interacting with Raydium Concentrated Liquidity Market Maker (CLMM). This SDK provides a convenient interface similar to Orca Whirlpools SDK.

§Architecture

  • Core (wp-solana-raydium-clmm-core): Pure plan layer, quote math, PDA derivation, tick utilities — zero I/O dependencies.
  • SDK (this crate): I/O layer — RPC fetching, orchestration, trait impls.

All pure types and functions are re-exported from core for backward compatibility so existing import paths continue to work.

Re-exports§

pub use harvester::RaydiumClmmHarvester;
pub use infuser::RaydiumClmmInfuser;
pub use position::fetch_positions_for_owner;
pub use position::fetch_positions_in_pool;
pub use position::PositionInfo;
pub use position_viewer::common as position_viewer_common;
pub use position_viewer::RaydiumClmmMultiPositionViewer;
pub use position_viewer::RaydiumClmmPositionViewer;

Modules§

discriminators
Discriminator constants for Raydium CLMM events
error
Error types for the Raydium CLMM SDK
fetch
I/O-bound fetch modules: build plan-layer Snapshot structs by reading on-chain state via wp_solana_rpc::RpcContext.
harvester
Raydium CLMM fee and reward harvester
infuser
Raydium CLMM Infuser implementation
instructions
Backward-compatible re-exports from wp_solana_raydium_clmm_core::quote_math.
orchestrate
Thin orchestrate-layer glue: fetch → plan → assemble → send.
plan
Pure plan-layer modules for Raydium CLMM operations.
plan_error
Error types for the plan / fetch / orchestrate layering.
position
Position fetching utilities for Raydium CLMM
position_viewer
Position viewer for Raydium CLMM positions
quote_math
Pure quote computation functions for Raydium CLMM.
token
Token account utilities for Raydium CLMM SDK.
utils
Utility functions for Raydium CLMM SDK.

Structs§

CollectFeesQuote
Result of fee calculation for a position
CollectRewardQuote
Result of reward calculation for a position
CollectRewardsQuote
Result of reward calculation for all rewards in a position
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.
RaydiumClmmError
Errors that can occur when interacting with the Raydium CLMM SDK
TokenAccountStrategy
Strategy for token account creation.

Functions§

calculate_decrease_liquidity_quote
Calculates the liquidity quote for decreasing liquidity in a position.
calculate_increase_liquidity_quote
Calculates the liquidity quote for increasing liquidity in a position or opening a new position.
collect_fees_quote
Calculate fees owed for a position
collect_rewards_quote
Calculate rewards owed for a position
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.