A TypeScript SDK for Pump.fun built on Solana Kit 5.0. Designed for high-performance applications including launch bots, bundlers, and low-latency trading systems using latest Solana best practices.
- Solana Kit 5.0 – Built on the latest Solana development framework
- Modern transaction patterns – Optimized for speed and reliability
- Unified swaps –
buy/sellauto-route between bonding curves and AMM pools - Curve helpers – Direct access to bonding-curve instructions when you need them (
curveBuy,curveSell) - AMM helpers – Deterministic AMM operations with percentage-aware selling (
ammBuy,ammSell) - Automatic slippage protection – Built-in guards for buy/sell operations
- Full TypeScript support – Strongly typed throughout with complete type coverage
These are the next actions we need to make happen:
- create pump fun curve launch helpers with dev buy
- provide/remove liquidity in existing pool
- create new liquidity pool
bun add pump-kitimport { createSolanaRpc } from "@solana/kit";
const rpc = createSolanaRpc("https://api.mainnet-beta.solana.com");import { curveBuy } from "pump-kit";
await curveBuy({
user: myWallet,
mint: "TokenMintAddress",
solAmount: 0.5, // 0.5 SOL
slippageBps: 50, // 0.5% slippage (optional)
rpc,
});import { curveSell } from "pump-kit";
// Sell specific amount
await curveSell({
user: myWallet,
mint: "TokenMintAddress",
tokenAmount: 125_000,
rpc,
});
// Sell percentage of wallet
await curveSell({
user: myWallet,
mint: "TokenMintAddress",
useWalletPercentage: true,
walletPercentage: 40, // Sell 40% of holdings
rpc,
});import { ammBuy } from "pump-kit";
await ammBuy({
user: myWallet,
mint: "TokenMintAddress",
solAmount: 0.5,
poolCreator: "CreatorAddress", // optional if auto detection works
rpc,
});import { ammSell } from "pump-kit";
await ammSell({
user: myWallet,
mint: "TokenMintAddress",
useWalletPercentage: true,
walletPercentage: 100,
poolCreator: "CreatorAddress",
rpc,
});// Buy tokens on the bonding curve
curveBuy({ user, mint, solAmount, slippageBps?, rpc, ... })
// Sell tokens on the bonding curve
curveSell({ user, mint, tokenAmount?, useWalletPercentage?, walletPercentage?, rpc, ... })// Buy tokens from the AMM pool using a SOL budget
ammBuy({ user, mint, solAmount, rpc, quoteMint?, poolCreator?, poolAddress? })
// Sell tokens into the AMM pool (supports percentage-based selling)
ammSell({
user,
mint,
tokenAmount?,
useWalletPercentage?,
walletPercentage?,
rpc,
quoteMint?,
poolCreator?,
poolAddress?,
})// Build transaction
buildTransaction({ instructions, payer, prependInstructions?, appendInstructions?, rpc })
// Send and confirm
sendAndConfirmTransaction({ instructions, payer, rpc, rpcSubscriptions, ... })
// Simulate transaction
simulateTransaction({ instructions, payer, rpc, options? })MIT