pump-sdk-core

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).

23 stars

Best use case

pump-sdk-core is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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).

Teams using pump-sdk-core should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/pump-sdk-core/SKILL.md --create-dirs "https://raw.githubusercontent.com/jiayaoqijia/cryptoskill/main/skills/defi/pump-sdk-core/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/pump-sdk-core/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How pump-sdk-core Compares

Feature / Agentpump-sdk-coreStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Pump SDK Core — Instruction Building & On-Chain Interaction

Build, extend, and maintain the core Pump SDK — an offline-first TypeScript SDK that constructs Solana `TransactionInstruction`s 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 `@pump-fun/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` — `PumpSdk` class with all instruction builders and account decoders
- `src/onlineSdk.ts` — `OnlinePumpSdk` class extending offline SDK with live RPC fetches
- `src/index.ts` — barrel re-export module defining the public API surface
- `src/state.ts` — TypeScript interfaces for all on-chain account state
- `src/pda.ts` — Program Derived Address derivation for all programs
- `src/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 `Program` instances initialized with a dummy keypair and connection. Exported as a singleton `PUMP_SDK`.
- **Online SDK (`OnlinePumpSdk`)**: Wraps `PumpSdk` with a real `Connection` for fetching account state via `getMultipleAccountsInfo`. 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`, plus `MAYHEM_PROGRAM_ID` for 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

```
maxSolCost = solAmount + (solAmount × slippage × 10 / 1000)
minSolReceived = solAmount - (solAmount × slippage × 10 / 1000)
```

## Patterns to Follow

- Always return `TransactionInstruction[]` from instruction builders, never full `Transaction` objects
- Use `getMultipleAccountsInfo` to batch RPC calls (2–3 accounts per call)
- Support both Token (SPL) and Token-2022 programs via `tokenProgram` parameter
- 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.ts` for validation failures
- Keep the offline SDK connection-free; all RPC calls belong in `OnlinePumpSdk`

## Common Pitfalls

- Circular dependency between `sdk.ts` and `onlineSdk.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 operations
- `BondingCurve.complete === true` means the token has graduated to AMM — bonding curve operations will fail
- The `createInstruction` (v1) is deprecated in favor of `createV2Instruction` (Token-2022)

Related Skills

pumpfun-sniper

23
from jiayaoqijia/cryptoskill

Score any pump.fun token CA for snipe safety (0-100) before buying. Analyzes dev wallet history, social links, liquidity, and holder concentration. Returns SNIPE / CAUTION / AVOID verdict with detailed signal breakdown. Use when the user wants to snipe a new token, check if a pump.fun token is safe, score a new launch, detect rug potential, or analyze a fresh CA before buying. Keywords: pump.fun snipe, rug check, new token score, CA analysis, safe to buy.

pumpfun-heyanon-agent

23
from jiayaoqijia/cryptoskill

Safe execution layer for Pumpfun token launches on Solana with parameter validation and reward eligibility checks.

Pump MCP Server

23
from jiayaoqijia/cryptoskill

Model Context Protocol server exposing 7 tools, 3 resource types, and 3 prompts for AI agent consumption — Solana wallet operations, vanity address generation, message signing, and address validation over stdio transport.

pump-fun

23
from jiayaoqijia/cryptoskill

Buy, sell, and launch tokens on Pump.fun using the PumpPortal API

openpump-solana-mcp

23
from jiayaoqijia/cryptoskill

Solana token launch and trading tools via the OpenPump MCP server. Creates tokens on pump.fun, buys and sells tokens, runs market-making bots, snipes new token launches, sets stop-loss orders, generates vanity addresses, manages custodial wallets, transfers SOL and SPL tokens, checks balances, gets price quotes, monitors portfolio positions and creator fees. Use when the user asks to launch a token, trade a memecoin, buy or sell on pump.fun, check wallet balance, transfer SOL, set up a sniper, run a market maker, create wallets, get a price quote, claim creator fees, or do anything with pump.fun tokens. Also use for bundle launches, Jito bundles, bonding curve queries, and spam launches. Do not use for general Solana RPC queries, non-pump.fun DeFi (Raydium, Jupiter, Orca), NFT operations, or importing external private keys.

8004-skill

23
from jiayaoqijia/cryptoskill

ERC-8004 Trustless Agents - Register and manage AI agent identities on TRON and BSC blockchains with on-chain reputation tracking

8004-MCP - Agent Registry Protocol

23
from jiayaoqijia/cryptoskill

Multi-chain MCP server for ERC-8004 Agent Registry. Query agents, reputation, and feedback across Solana + EVM chains.

supurr

23
from jiayaoqijia/cryptoskill

Backtest, deploy, and monitor trading bots on Hyperliquid. Supports Grid, DCA, and Spot-Perp Arbitrage strategies across Native Perps, Spot markets (USDC/USDH), and HIP-3 sub-DEXes.

senpi-skills

23
from jiayaoqijia/cryptoskill

Agent Skills for autonomous crypto trading on Hyperliquid — trailing stops, market scanning, position management, and more.

sdks

23
from jiayaoqijia/cryptoskill

Official Azex SDKs — TypeScript, Python, MCP Server, CLI for the crypto-native LLM API gateway

perp-cli

23
from jiayaoqijia/cryptoskill

Multi-DEX perpetual futures CLI + MCP server — Pacifica (Solana), Hyperliquid, Lighter (Ethereum). 18 MCP tools for AI-powered trading

okx-exchange-websocket-skill

23
from jiayaoqijia/cryptoskill

Subscribe to OKX public exchange WebSocket channels through UXC raw WebSocket mode for ticker, trade, book, and candle events with explicit subscribe frames.