x402agent/solana-clawd/pump-sdk-core
Claude Code and agent skill by x402agent/solana-clawd
- community
Checking that the SKILL.md file is still in the repository.
Build and extend the core Pump SDK — an offline-first TypeScript SDK that constructs Solana TransactionInstructions for token creation, buying, selling, migration, and creator fee collection across three on-chain programs (Pump, PumpAMM, PumpFees).
Install
npx vskill@latest install x402agent/solana-clawd/pump-sdk-coreSKILL.md
The same SKILL.md was published earlier as x402agent/solana-clawd/pump-sdk-core.
Pump SDK Core — Instruction Building & On-Chain Interaction
Build, extend, and maintain the core Pump SDK — an offline-first TypeScript SDK that constructs Solana TransactionInstructions for token creation, buying, selling, migration, and creator fee collection across three on-chain programs (Pump, PumpAMM, PumpFees) plus the Mayhem program.
Context
The SDK is published as @solana-clawd/pump-sdk (npm) and powers the Pump protocol — a Solana-based token launchpad with bonding curve pricing, automatic AMM migration after graduation, tiered fees, and creator fee sharing. The codebase uses Anchor for IDL-based instruction building and supports both Token (SPL) and Token-2022 token programs.
Key Files
src/sdk.ts—PumpSdkclass with all instruction builders and account decoderssrc/onlineSdk.ts—OnlinePumpSdkclass extending offline SDK with live RPC fetchessrc/index.ts— barrel re-export module defining the public API surfacesrc/state.ts— TypeScript interfaces for all on-chain account statesrc/pda.ts— Program Derived Address derivation for all programssrc/idl/pump.ts,src/idl/pump_amm.ts,src/idl/pump_fees.ts— Anchor IDL definitions
Architecture
- Offline SDK (`PumpSdk`): Builds instructions without a live connection. Uses Anchor
Programinstances initialized with a dummy keypair and connection. Exported as a singletonPUMP_SDK. - Online SDK (`OnlinePumpSdk`): Wraps
PumpSdkwith a realConnectionfor fetching account state viagetMultipleAccountsInfo. Provides "BothPrograms" methods that aggregate data across bonding curve (Pump) and AMM (PumpAMM) programs. - Three program IDs:
PUMP_PROGRAM_ID,PUMP_AMM_PROGRAM_ID,PUMP_FEE_PROGRAM_ID, plusMAYHEM_PROGRAM_IDfor mayhem-mode tokens.
Instruction Builder Pattern
Every instruction method returns TransactionInstruction[] (not transactions), allowing callers to compose them into transactions freely. Methods follow a naming convention:
*Instruction— single instruction*Instructions— multiple instructions (e.g., ATA creation + buy)
Account Decoders
The SDK decodes raw AccountInfo<Buffer> into typed interfaces using the Anchor coder:
decodeGlobal,decodeBondingCurve,decodeFeeConfig,decodeSharingConfig, etc.- Nullable variants (e.g.,
decodeBondingCurveNullable) handle missing or undersized accounts gracefully.
Slippage Calculation
Patterns to Follow
- Always return
TransactionInstruction[]from instruction builders, never fullTransactionobjects - Use
getMultipleAccountsInfoto batch RPC calls (2–3 accounts per call) - Support both Token (SPL) and Token-2022 programs via
tokenProgramparameter - Handle account extension (
extendAccountInstruction) for bonding curves that need more space - Validate shareholder arrays: max 10 shareholders, shares must total 10,000 bps, no duplicates, no zero shares
- Use typed error classes from
src/errors.tsfor validation failures - Keep the offline SDK connection-free; all RPC calls belong in
OnlinePumpSdk
Common Pitfalls
- Circular dependency between
sdk.tsandonlineSdk.ts - Buy instruction passes
{ 0: true }as a flags argument — this is intentional, not a bug BONDING_CURVE_NEW_SIZE = 151— accounts may need extension before certain operationsBondingCurve.complete === truemeans the token has graduated to AMM — bonding curve operations will fail- The
createInstruction(v1) is deprecated in favor ofcreateV2Instruction(Token-2022)
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagents/skills/pump-sdk-core/SKILL.md
Popularity
- Repository stars
- 23
- Repository forks
- 20
- Repository npm downloads, 7 days
- 13
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 7 Jun 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/x402agent/solana-clawd/pump-sdk-core)