What is Pump SDK?
Pump SDK is the community TypeScript SDK for the Pump.fun protocol on Solana. It provides offline-first instruction builders for every on-chain operation — token creation, bonding curve trading, AMM pool management, tiered fee configuration, creator fee sharing, volume-based token incentives, and social referral fees.
The SDK never sends transactions itself. It returns TransactionInstruction[] that you compose into transactions with your preferred signing and sending strategy.
📋 Table of Contents
- Quick Start
- The
pump CLI
- 50 Runnable Examples
- Usage Examples
- Create a Token
- Create a Token With a
...pump Vanity Mint
- Buy Tokens on the Bonding Curve
- Sell Tokens
- Check Graduation Progress
- Set Up Fee Sharing
- API Reference
- On-Chain Programs
- Configuration
- Error Handling
- FAQ
- Architecture
- Contributing
- License
- Acknowledgments
🚀 Live Demos & Resources
A GitHub social-fee withdrawal is real on-chain activity, not automatic proof
that a developer created or endorses a coin. Claim cards distinguish verified
repository/creator-wallet relationships, identity mismatches, unverified
links, and unresolved pooled withdrawals. See the notification rules above.
📈 Proof & Virality
Proof the GitHub Claim Tracker bot is profitable to monitor
→ View tweet
Went mega viral
→ View tweet
just shipped a real-time PumpFun intelligence bot on Telegram
17 commands. zero cost. fully on-chain.
/price → instant token price & bonding curve
/monitor → live token launch feed
/cto → creator takeover alerts
/watch → wallet fee claim tracking
/quote → buy/sell estimates
/graduated → AMM graduation status
/alerts → customize your notifications
all powered by the open-source pump-fun-sdk
→ View original post
The post that started it all
→ View tweet
Looking for more? Check out PumpKit 💊💚
Open-source framework for building PumpFun Telegram bots on Solana. Claim monitors, channel feeds, group trackers, whale alerts — build your own or use ours.
PumpKit Web App + Documentation
🚀 Quick Start
Installation
# npm
npm install @nirholas/pump-sdk
# yarn
yarn add @nirholas/pump-sdk
# pnpm
pnpm add @nirholas/pump-sdk
Peer Dependencies
The SDK requires these Solana packages (install them if not already present):
npm install @solana/web3.js @solana/spl-token @coral-xyz/anchor bn.js
Minimal Example
import { Connection, PublicKey } from "@solana/web3.js";
import { OnlinePumpSdk } from "@nirholas/pump-sdk";
// 1. Create an online SDK instance
const connection = new Connection("https://api.mainnet-beta.solana.com");
const sdk = new OnlinePumpSdk(connection);
// 2. Fetch current token state
const mint = new PublicKey("YourTokenMintAddress...");
const summary = await sdk.fetchBondingCurveSummary(mint);
console.log("Market Cap:", summary.marketCap.toString(), "lamports");
console.log("Graduated:", summary.isGraduated);
console.log("Progress:", summary.progressBps / 100, "%");
💻 The pump CLI
The SDK ships with a binary. No wallet, no API key, and no configuration are needed for anything that reads the chain.
npm install -g @nirholas/pump-sdk
pump curve <mint> # price, market cap, graduation meter, fee tier
pump quote buy <mint> --sol 1 # what 1 SOL really buys, after fees and impact
pump watch <mint> # live dashboard
pump doctor # check your RPC, wallet, and balance in one shot
Or without installing anything: npx -p @nirholas/pump-sdk pump curve <mint>.
FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump live on the bonding curve
────────────────────────────────────────────────────────────
Market cap 93.705347 SOL
Buy price 0.000000096 SOL per token
Sell price 0.000000091 SOL per token
Trading fee 1.25% 0.95% protocol + 0.3% creator
Graduation ███████████████░░░░░░░░░ 61.39%
SOL to graduate 60.684661 SOL
SOL in curve 24.921536 SOL
Tokens left 306.21M of 793.1M
| Command | What it does |
|---|
pump curve / price / pool / global | Read curve, price, AMM pool, and protocol state |
pump quote buy|sell | Price a trade offline: output, fees, effective price, impact |
pump buy / sell | Trade, auto-routing between the bonding curve and PumpAMM |
pump create | Launch a token, optionally with an atomic first buy |
pump vanity | Grind a ...pump mint address |
pump fees / incentives | Check and claim creator fees and volume rewards |
pump watch | Live-refreshing dashboard, or a JSON price feed |
pump events | Decode the Pump events in any transaction |
pump pda | Derive any Pump program address |
pump doctor / config | Diagnose and configure |
Safe by construction. Reads never load a keypair. Every trade is simulated before anything is sent, prints exactly what is about to happen, and waits for an explicit yes. --simulate sends nothing; --yes is the scripting escape hatch; a piped command with neither refuses rather than spending funds unattended.
Scriptable. Every command takes --json and writes nothing else to stdout in that mode:
pump curve <mint> --json | jq .marketCapSol
pump watch <mint> --json --interval 10 | jq -r '"\(.at) \(.marketCapSol) SOL"'
pump events <sig> --json | jq '.events[] | select(.type=="trade")'
Full reference: docs/cli.md. Ten-minute walkthrough: tutorial 45.
🧪 50 Runnable Examples
The repo ships fifty tested, runnable examples covering the entire SDK surface. Each one runs with a single command, exports its logic for offline testing, and has a matching step-by-step tutorial.
git clone https://github.com/nirholas/pump-fun-sdk && cd pump-fun-sdk && npm install
npm run example # list all 50
npm run example 11 # offline buy quotes
npm run test:examples # run every example's test suite offline
| Range | Category |
|---|
| 01-10 | Token Lifecycle: create, buy, sell, mayhem mode, cashback |
| 11-20 | Curve Math & Fees: offline quotes, tiers, price impact |
| 21-30 | Accounts & Events: every PDA, every decoder |
| 31-40 | Live Data: mainnet reads, batching, WebSocket feeds |
| 41-50 | AMM & Advanced: pools, liquidity, fee sharing, incentives, vanity mints |
Full catalog: docs/examples.md · Browse: examples/ · Tutorials: tutorials/examples/
📖 Usage Examples
Create a Token
import { Keypair } from "@solana/web3.js";
import { PUMP_SDK } from "@nirholas/pump-sdk";
const mintKeypair = Keypair.generate();
const creator = wallet.publicKey;
const createIx = await PUMP_SDK.createV2Instruction({
mint: mintKeypair.publicKey,
name: "My Token",
symbol: "MYTKN",
uri: "https://arweave.net/metadata.json",
creator,
user: creator,
mayhemMode: false,
});
// createIx is a TransactionInstruction — add to a Transaction and send
Warning: Do NOT use createInstruction — it is deprecated (v1). Always use createV2Instruction.
Create a Holder-Reward Token
Set holderReward: true to direct creator fees to the protocol-derived holder
rewards PDA. Pump.fun distributes those fees to holders automatically; holders
do not need to submit claims.
const createIx = await PUMP_SDK.createV2Instruction({
mint: mintKeypair.publicKey,
name: "Holder Helper",
symbol: "HOLD",
uri: "https://example.com/holder-helper.json",
creator: wallet.publicKey,
user: wallet.publicKey,
mayhemMode: false,
holderReward: true,
});
For an atomic launch and initial buy, pass the same flag to
createV2AndBuyInstructions; the SDK routes the buy through
creatorVaultPda(holderRewardsPda(mint)). Run the complete broadcast-free demo
with npm run example 51.
New cashback launches are deprecated and rejected. Existing cashback coins
remain tradeable and accrued cashback remains claimable.
Create a Token With a ...pump Vanity Mint
Mint addresses ending in pump (like the ones on pump.fun) are produced by
grinding keypairs off-chain. The SDK exposes this as a first-class helper —
swap Keypair.generate() for generateVanityMint() and the rest of the
flow is unchanged.
import { generateVanityMint, PUMP_SDK } from "@nirholas/pump-sdk";
// Grind until we find a mint whose address ends in "pump" (~11M attempts, ~1–4 min in Node)
const { keypair: mintKeypair } = await generateVanityMint({ suffix: "pump" });
const createIx = await PUMP_SDK.createV2Instruction({
mint: mintKeypair.publicKey, // ← ends in "pump"
name: "My Token",
symbol: "MYTKN",
uri: "https://arweave.net/metadata.json",
creator: wallet.publicKey,
user: wallet.publicKey,
mayhemMode: false,
});
// Sign the transaction with BOTH the payer and the mint keypair.
// tx.sign([wallet, mintKeypair]);
Supports prefix, suffix, caseInsensitive, maxAttempts, onProgress,
and AbortSignal. For patterns longer than 4 characters, use the
multi-threaded Rust generator at rust/. See
Tutorial 13: Vanity Mints for the full