pumpfun-sdk-client
Off-chain RPC client helpers for Pump.fun: simulate, send, confirm transactions, and fetch on-chain account data.
Features
- BondingCurveClient — Fetch global fee recipient, bonding curve state; simulate/send buy and sell
- PumpswapClient — Simulate/send PumpSwap AMM buy and sell
- No unsafe code —
#![forbid(unsafe_code)]
Installation
[]
= "0.1"
Requires pumpfun-sdk-core for instruction building (included as dependency).
Usage
BondingCurveClient
use ;
use Config;
let client = new;
let cfg = mainnet_create_v2_defaults;
// Fetch fee recipient (needed for buy/sell)
let fee_recipient = client.fetch_fee_recipient?;
// Fetch bonding curve state
let state: BondingCurveState = client.fetch_bonding_curve?;
println!;
// Simulate buy
let result = client.simulate_buy?;
// Send buy (real transaction)
let sig = client.send_buy?;
PumpswapClient
use PumpswapClient;
use pump_amm_min;
let client = new;
// Build accounts and args, then simulate or send
let result = client.simulate_buy?;
let sig = client.send_buy?;
Examples
Dependencies
pumpfun-sdk-core,pumpfun-sdk-idlsolana-client,solana-commitment-config,solana-sdkthiserror
License
MIT OR Apache-2.0