| Crates.io | raydium-launchlab-sdk |
| lib.rs | raydium-launchlab-sdk |
| version | 0.1.7 |
| created_at | 2026-01-06 10:27:11.041432+00 |
| updated_at | 2026-01-13 09:54:06.111385+00 |
| description | Rust SDK for Raydium LaunchLab program |
| homepage | |
| repository | https://github.com/anuragnegi000/raydium-launchlab-rust-sdk |
| max_upload_size | |
| id | 2025557 |
| size | 424,009 |
A Rust SDK for interacting with the Raydium LaunchLab program on Solana.
Program ID: LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj
Add to your Cargo.toml:
[dependencies]
raydium-launchlab-sdk = { path = "../raydiumlaunchlab-rust-sdk" }
use raydium_launchlab::{instructions, pda, accounts::PoolState};
use solana_sdk::pubkey::Pubkey;
// Derive pool state PDA
let (pool_state, _) = pda::get_pool_state_pda(&base_mint, "e_mint);
// Fetch pool state
let pool_data = client.get_account_data(&pool_state)?;
let pool = PoolState::try_from_bytes(&pool_data)?;
// Build buy instruction
let buy_ix = instructions::buy_exact_in(
&payer,
&pool.global_config,
&pool.platform_config,
&pool_state,
&user_base_token,
&user_quote_token,
&base_vault,
"e_vault,
&base_mint,
"e_mint,
&token_program,
amount_in, // Amount of quote tokens to spend
minimum_amount_out, // Slippage protection
0, // Share fee rate (referral)
);
let sell_ix = instructions::sell_exact_in(
&payer,
&pool.global_config,
&pool.platform_config,
&pool_state,
&user_base_token,
&user_quote_token,
&base_vault,
"e_vault,
&base_mint,
"e_mint,
&token_program,
amount_in, // Amount of base tokens to sell
minimum_amount_out, // Slippage protection
0, // Share fee rate
);
// Auto-derive all accounts
let buy_ix = instructions::create_buy_instruction(
&payer,
&base_mint,
"e_mint,
&global_config,
&platform_config,
amount_in,
minimum_amount_out,
share_fee_rate,
false, // is_token_2022
);
use raydium_launchlab::pda;
// Pool State
let (pool_state, _) = pda::get_pool_state_pda(&base_mint, "e_mint);
// Pool Vaults
let (base_vault, _) = pda::get_pool_vault_pda(&pool_state, &base_mint);
let (quote_vault, _) = pda::get_pool_vault_pda(&pool_state, "e_mint);
// Authority
let (authority, _) = pda::get_authority_pda();
// Global Config
let (global_config, _) = pda::get_global_config_pda("e_mint, curve_type, index);
// Platform Config
let (platform_config, _) = pda::get_platform_config_pda(&platform_admin);
// Vesting Record
let (vesting_record, _) = pda::get_vesting_record_pda(&pool_state, &beneficiary);
use raydium_launchlab::accounts::PoolState;
let pool = PoolState::try_from_bytes(&data)?;
// Status checks
pool.is_funding(); // Pool accepting funds
pool.is_migrate(); // Waiting for migration
pool.is_trading(); // Migration complete
// Pool info
pool.get_current_price(); // Quote per base
pool.get_funding_progress(); // Percentage funded
// Token program detection
pool.is_base_token_2022(); // Base uses Token-2022
pool.is_quote_token_2022(); // Quote uses Token-2022
| Instruction | Description |
|---|---|
buy_exact_in |
Buy base tokens with specified quote amount |
buy_exact_out |
Buy specified amount of base tokens |
sell_exact_in |
Sell specified amount of base tokens |
sell_exact_out |
Sell to receive specified quote amount |
initialize |
Create new launchpad pool |
initialize_v2 |
Create pool with AMM fee option |
claim_creator_fee |
Claim creator trading fees |
claim_platform_fee |
Claim platform fees |
claim_vested_token |
Claim vested tokens |
create_vesting_account |
Create vesting for beneficiary |
migrate_to_amm |
Migrate to Raydium AMM |
migrate_to_cpswap |
Migrate to CPSwap |
Run the examples:
cargo run --example buy
cargo run --example sell
MIT