TypeScript SDK for the Pump Swap AMM on Solana, synced to @pump-fun/pump-swap-sdk 2.1.0 and the October 2026 program.
npm install @pump-fun/pump-swap-sdkThe October 2026 PumpSwap upgrade, covered end to end.
buy_v2, buy_exact_quote_in_v2 and sell_v2: 17 accounts, no remaining accounts. Pass { v2: true } to any swap builder.
sweepProtocolFeeInstruction and sweepCreatorFeeInstruction move the pool's fee buckets out. Sweep before a creator claim, CTO or fee-share change.
multiHopSwapQuote and multiHopSwapInstructions route an exact input across up to six pools and bonding curves with one slippage check.
virtualQuoteReserves is a signed i128 and often negative. Every quote path adds it with full precision.
protocolFees, creatorFees, creatorFeeBps, canEditCreatorFee and isHolderReward, decoded from any pool length.
Collect, configure and share coin-creator fees, including holder-reward pools.
Install it, then run your first command.
npm install @pump-fun/pump-swap-sdk
| Command | Runs |
|---|---|
npm run test | jest over src/__tests__ |
npm run lint | eslint src --ext .ts |
npm run typecheck | tsc --noEmit |
A v2 buy, and a creator-fee sweep composed with the claim it feeds.
const state = await onlineSdk.swapSolanaState(poolKey, user);
const buy = await PUMP_AMM_SDK.buyQuoteInput(state, quoteAmount, 1, { v2: true });
const sweep = await onlineSdk.sweepCreatorFeeInstruction(poolKey, coinCreator);
const collectState = await onlineSdk.collectCoinCreatorFeeSolanaState(
coinCreator, undefined, state.pool.quoteMint,
);
const claim = await PUMP_AMM_SDK.collectCoinCreatorFee(collectState, coinCreator);
const tx = new Transaction().add(sweep, ...claim);