Skip to content
Business
Skill

/pump-sdk-typescript

Write TypeScript that builds Pump protocol instructions on Solana with @nirholas/pump-sdk, covering OnlinePumpSdk, PUMP_SDK, bonding curve quotes, routed buys and creator fee collection. Use when adding Pump trading or token creation to an app.

From plugin
pump-fun-sdk
15022 skills1 MCP

Claude Code

$ npx -y skills add nirholas/pump-fun-sdk --skill pump-sdk-typescript --agent claude-code

SKILL.md

pump-sdk-typescript.SKILL.md
name: pump-sdk-typescript
description: Write TypeScript that builds Pump protocol instructions on Solana with @nirholas/pump-sdk, covering OnlinePumpSdk, PUMP_SDK, bonding curve quotes, routed buys and creator fee collection. Use when adding Pump trading or token creation to an app.

@nirholas/pump-sdk in TypeScript

Install the package and its peers:

npm install @nirholas/pump-sdk @solana/web3.js @solana/spl-token @coral-xyz/anchor bn.js

The SDK builds `TransactionInstruction[]`. It never signs or sends; you put the instructions in a transaction, sign with your own wallet and send. It covers three on-chain programs (Pump, PumpAMM, PumpFees).

Two entry points

  • `PUMP_SDK` (class `PumpSdk`): offline builders and decoders, no connection needed.
  • `new OnlinePumpSdk(connection)`: the same plus live RPC fetches. Use this by default.

Read state

import { Connection, PublicKey } from "@solana/web3.js";
import { OnlinePumpSdk } from "@nirholas/pump-sdk";

const sdk = new OnlinePumpSdk(new Connection(process.env.SOLANA_RPC_URL!));
const summary = await sdk.fetchBondingCurveSummary(new PublicKey(mint));
console.log(summary.marketCap.toString(), summary.isGraduated, summary.progressBps / 100);

`BondingCurve.complete === true` means the token graduated to the AMM and curve trades fail.

Build a buy

`buyBySolAmount` computes the expected token output for you:

const ixs = await sdk.buyBySolAmount({ mint, user, solAmount, slippage: 1 }); // BN lamports

`routedBuyInstructions({ mint, user, quoteAmountIn, slippage })` picks the bonding curve or the AMM pool depending on graduation. The matching sell builders are `sellInstructions` and `routedSellInstructions`. `slippage` is a percent in the instruction math of `src/sdk.ts` (`1` means 1 percent), even though some JSDoc says decimal; quote first and check.

Lower level: `fetchBuyState(mint, user)` returns `bondingCurveAccountInfo`, `bondingCurve`, `associatedUserAccountInfo` and `tokenProgram`; spread it into `sdk.buyInstructions({ ...state, mint, user, amount, solAmount, slippage })`. Use `getBuyTokenAmountFromSolAmount`, `getSellSolAmountFromTokenAmount` and `bondingCurveMarketCap` from the package root for offline quotes.

Create a token and collect fees

`PUMP_SDK.createV2Instruction({ mint, name, symbol, uri, creator, user, mayhemMode, ... })` creates a Token-2022 token (`createInstruction` v1 is deprecated). `uri` points at the metadata JSON. `sdk.collectCoinCreatorFeeInstructions(creator, feePayer?)` collects creator fees from both programs, and `sdk.getCreatorVaultBalanceBothPrograms(creator)` reads the balance first.

Rules

  • Confirm the mint, amount and network with the user before any transaction is signed or sent.
  • Fee sharing allows at most 10 shareholders whose shares total 10,000 bps, with no duplicates or zero shares.
  • Read `src/index.ts` for the exported surface and `src/sdk.ts` / `src/onlineSdk.ts` for exact parameters before relying on a method not listed here.
Read more
@nirholas
Ships withpump-fun-sdk

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

15022 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
150
Star history of nirholas/pump-fun-sdk on GitHub, a chart by star-history.com

Other skills on pump-fun-sdk.

pump-cli

pump-cli

Inspect Pump protocol tokens, quote trades and read creator fees on Solana with the pump CLI from @nirholas/pump-sdk, or use the…

pump-admin-ops

pump-admin-ops

Admin and authority operations for the Pump protocol — set coin creator, update token incentives, set IDL authority, claim…

pump-ai-agents

pump-ai-agents

AI agent integration layer for the Pump SDK — agent instruction files, .well-known discovery, LLM context documents, 15+ skill…

pump-build-release

pump-build-release

Build and release pipeline for the Pump SDK — tsup TypeScript builds, Cargo release profiles, semantic release with commitizen,…

pump-claims-readonly

pump-claims-readonly

Read-only query methods for PumpFun claims — unclaimed token rewards, creator vault balances, volume accumulators, distributable…

More skills from other plugins.

opc-asset-ops

opc-asset-ops

Turn repeatable outputs of a one-person company into compounding assets. Use when Codex needs to explain asset-compounding…

@easychen@easychenInstall Skill
dbs

dbs

dontbesilent 商业工具箱的技能调度台,根据当前问题和反馈选择下一步,在对话中直接执行、澄清、组合或对照尝试 Skill。用户不知道从哪里开始、需要调整处理方法、第一次使用…

dbs4d11k
@dontbesilent2025@dontbesilent2025Install Skill

Questions about pump-sdk-typescript.

Which coding agents can use pump-sdk-typescript?
pump-sdk-typescript installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.