๐Ÿš€ Pump SDK v2 is live โ€” createV2, Token2022, mayhem mode, social fees & more Get Started โ†’
Community SDK โ€ข Open Source โ€ข Solana

Build on Pump.fun

The unofficial TypeScript SDK for creating, buying, and selling tokens on the Solana blockchain. Bonding curve pricing, AMM migration, tiered fees, creator fee sharing & more.

npm install @nirholas/pump-sdk
3 On-Chain Programs
55 MCP Tools
19 Tutorials
39+ Doc Pages
100K+ Keys/sec (Rust)

๐Ÿ‘‘ King of the Hill

Core features that make Pump SDK the go-to toolkit

๐Ÿ“š Documentation

Everything you need to build on Pump

๐Ÿ”— On-Chain Programs

Three programs powering the Pump protocol

๐ŸŸข

Pump Program

6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P

Bonding curve operations โ€” create tokens, buy, sell, with virtual and real reserves. Supports create_v2, Token2022, and mayhem mode.

CreateBuySellMigrate
๐Ÿ”ต

PumpSwap AMM

pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA

Graduated AMM pools โ€” constant-product swap, deposit liquidity, withdraw. Post-graduation trading with protocol fees.

SwapDepositWithdrawPools
๐ŸŸฃ

PumpFees

pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ

Fee sharing and distribution โ€” dynamic tiers based on market cap, creator fee configs with shareholders summing to 10,000 BPS.

Fee TiersSharingCashbackClaims

๐Ÿš€ Quick Start

Go from zero to building in under a minute

// Install the SDK
npm install @nirholas/pump-sdk

// Peer dependencies
npm install @solana/web3.js @solana/spl-token @coral-xyz/anchor bn.js
import { PUMP_SDK } from "@nirholas/pump-sdk";

// Create a new token (v2 โ€” never use v1)
const ix = await PUMP_SDK.createV2Instruction({
  mint,          // Keypair for new token mint
  name,          // Token name
  symbol,        // Token symbol
  uri,           // Metadata URI
  creator,       // Creator public key
  user,          // Transaction payer
  mayhemMode: false,
  cashback: false,
});
import { PUMP_SDK, OnlinePumpSdk } from "@nirholas/pump-sdk";
import { TOKEN_PROGRAM_ID } from "@solana/spl-token";

const online = new OnlinePumpSdk(connection);
const global = await online.fetchGlobal();
const state = await online.fetchBuyState(mint, user);

const ixs = await PUMP_SDK.buyInstructions({
  global,
  bondingCurveAccountInfo: state.bondingCurveAccountInfo,
  bondingCurve: state.bondingCurve,
  associatedUserAccountInfo: state.associatedUserAccountInfo,
  mint, user, solAmount, amount,
  slippage: 1,
  tokenProgram: TOKEN_PROGRAM_ID,
});
import { PUMP_SDK, OnlinePumpSdk } from "@nirholas/pump-sdk";

const online = new OnlinePumpSdk(connection);
const global = await online.fetchGlobal();
const bc = await online.fetchBondingCurve(mint);

const ixs = await PUMP_SDK.sellInstructions({
  global,
  bondingCurve: bc,
  mint, user, amount,
  slippage: 1,
  tokenProgram: TOKEN_PROGRAM_ID,
});
import { PUMP_SDK } from "@nirholas/pump-sdk";

// Shares MUST total exactly 10,000 BPS
const ix = await PUMP_SDK.createFeeSharingConfig({
  mint,
  shareholders: [
    { address: creator, shareBps: 7000 },  // 70%
    { address: partner, shareBps: 3000 },  // 30%
  ],
  user,
});

Architecture

PumpSdk offline

  • decode*() โ€” Deserialize accounts
  • *Instruction() โ€” Build single IX
  • *Instructions() โ€” Build IX arrays
Singleton: PUMP_SDK
extends โ–ผ

OnlinePumpSdk online

  • fetch*() โ€” RPC account fetches
  • fetchBuyState() โ€” All state for buying
  • fetchGlobal() โ€” Protocol global config
new OnlinePumpSdk(connection)

Key Types

BondingCurve

{
  virtualTokenReserves: BN
  virtualSolReserves: BN
  realTokenReserves: BN
  realSolReserves: BN
  tokenTotalSupply: BN
  complete: boolean
  creator: PublicKey
  isMayhemMode: boolean
}

Global

{
  initialized: boolean
  authority: PublicKey
  feeRecipient: PublicKey
  initialVirtualTokenReserves: BN
  initialVirtualSolReserves: BN
  initialRealTokenReserves: BN
  tokenTotalSupply: BN
  feeBasisPoints: BN
}

Shareholder

{
  address: PublicKey
  shareBps: number
  // All shareholders must
  // sum to exactly 10,000 BPS
}

FeeConfig

{
  feeRecipient: PublicKey
  feeBasisPoints: BN
  // Dynamic tiers based
  // on market cap
}

Import Map

// Core SDK
import { PUMP_SDK, PumpSdk, OnlinePumpSdk } from "@nirholas/pump-sdk";

// Constants
import { PUMP_PROGRAM_ID, PUMP_AMM_PROGRAM_ID, PUMP_FEE_PROGRAM_ID } from "@nirholas/pump-sdk";

// Bonding curve math
import { getBuyTokenAmountFromSolAmount, getSellSolAmountFromTokenAmount } from "@nirholas/pump-sdk";

// PDAs
import { bondingCurvePda, globalPda, feeSharingConfigPda } from "@nirholas/pump-sdk";

// State types
import type { BondingCurve, Global, FeeConfig, Pool } from "@nirholas/pump-sdk";

// Analytics
import { calculateBuyPriceImpact, getGraduationProgress, getTokenPrice } from "@nirholas/pump-sdk";

// Fees
import { getFee, computeFeesBps, calculateFeeTier } from "@nirholas/pump-sdk";

โš ๏ธ Common Pitfalls

๐Ÿšซ

Using createInstruction (v1)

DEPRECATED. Always use createV2Instruction.

๐Ÿšซ

Using number for amounts

WRONG. Use new BN(...) for all financial math. Always.

โš ๏ธ

Trading a graduated curve

Check bondingCurve.complete. If true, use AMM methods instead.

โš ๏ธ

Shares not summing to 10,000

Fee sharing config requires exactly 10,000 BPS total.

๐Ÿšซ

Returning Transaction objects

SDK returns TransactionInstruction[], never Transaction.

โš ๏ธ

Importing from internal paths

Import from @nirholas/pump-sdk, not .../dist/...

๐Ÿ“ก

Live Token Launches

Real-time token launch feed via WebSocket. GitHub detection, metadata fetching, auto-reconnect.

WebSocket Real-time
๐Ÿ“Š

Live Trades Dashboard

Buy/sell/create/migrate feed with volume charts, whale alerts, top tokens, and analytics sidebar.

Charts Analytics
๐Ÿ”‘

Vanity Address Generator

Client-side Solana vanity address generation. Multi-threaded, difficulty estimation, export keypairs.

Ed25519 Client-side
๐Ÿฆ€

Rust Vanity Generator

High-performance vanity generator with rayon + solana-sdk. 100K+ keys/sec multi-threaded.

100K+ keys/sec Rayon
๐Ÿ’ฌ

Telegram Bot

PumpFun activity monitor with 10 commands. Fee claims, CTO alerts, whale trades, graduation tracking.

10 Commands 50 TX/sec
๐ŸŒŠ

WebSocket Relay

Real-time token launch broadcasting server. 10K connections, 50K msg/sec per vCPU.

10K Conn 50K msg/sec
๐Ÿ“ฑ

Channel Bot

Telegram channel bot for broadcasting token launches and graduation events to your community.

Broadcasting Docker
๐Ÿ’ธ

Claim Bot

Automated fee claiming bot. Monitors and claims creator fees from bonding curves and AMM pools.

Auto-claim Railway
๐Ÿ–ฅ๏ธ

PumpOS Desktop

Full web desktop environment with app store, file system, window manager. 169 Pump-Store apps.

169 Apps Desktop OS
๐Ÿ’ณ

x402 Payments

HTTP 402 micropayment protocol with Solana USDC. Pay-per-request API monetization.

USDC HTTP 402
๐Ÿ

Swarm Agents

Multi-agent DeFi intelligence swarm. Coordinated agents for token analysis and trading strategies.

Multi-agent DeFi

Project Structure

๐Ÿ“ฆ src/ Core SDK โ€” instruction builders, bonding curve math, PDAs, state, events, analytics
๐Ÿฆ€ rust/ Rust vanity address generator โ€” rayon + solana-sdk, 100K+ keys/sec
๐Ÿ“˜ typescript/ TypeScript vanity generator โ€” educational @solana/web3.js implementation
๐Ÿค– mcp-server/ MCP server โ€” 55 tools, 4 resources, 5 prompts for AI agents
๐Ÿ’ฌ telegram-bot/ PumpFun Telegram monitor โ€” 10 commands, fee claims, whale alerts
๐Ÿ“ก channel-bot/ Telegram channel bot โ€” broadcasting launches and graduations
๐Ÿ’ธ claim-bot/ Automated fee claiming โ€” monitors and claims creator fees
๐ŸŒŠ websocket-server/ WebSocket relay โ€” real-time token launch broadcasting
๐Ÿ“Š live/ Browser dashboards โ€” token launches, trades, vanity generator
๐Ÿ“ tutorials/ 19 hands-on guides covering the full SDK
๐Ÿ“š docs/ 39+ documentation pages โ€” architecture, math, fees, security
๐Ÿ swarm/ Multi-agent DeFi intelligence swarm
๐Ÿ’ณ x402/ HTTP 402 micropayments with Solana USDC
๐Ÿ” security/ Security audits, checklists, and practices
๐Ÿงช tests/ Integration tests and verification suites

Performance

<1ms
SDK offline instructions
Pure functions, no async
50โ€“500ms
SDK online (RPC)
Batch with getMultipleAccountsInfo
100K+
Rust vanity keys/sec
Multi-threaded rayon
~1K
TS vanity keys/sec
Educational only
10K
WebSocket connections
Per vCPU
50K
Messages/sec
WebSocket relay

๐Ÿ” Security

โœ… ONLY official Solana Labs crypto: solana-sdk, @solana/web3.js, solana-keygen
โœ… Zeroize all key material after use
โœ… Keypair file permissions set to 0600
โœ… No network calls for key generation โ€” fully offline
โœ… 60+ item security checklist in security/SECURITY_CHECKLIST.md