{
  "schemaVersion": "1.0",
  "item": {
    "slug": "pump-sdk-core",
    "name": "Pump Sdk Core",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/speraxos/pump-sdk-core",
    "canonicalUrl": "https://clawhub.ai/speraxos/pump-sdk-core",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/pump-sdk-core",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pump-sdk-core",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/pump-sdk-core"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/pump-sdk-core",
    "agentPageUrl": "https://openagent3.xyz/skills/pump-sdk-core/agent",
    "manifestUrl": "https://openagent3.xyz/skills/pump-sdk-core/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/pump-sdk-core/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Pump SDK Core — Instruction Building & On-Chain Interaction",
        "body": "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."
      },
      {
        "title": "Context",
        "body": "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."
      },
      {
        "title": "Key Files",
        "body": "src/sdk.ts — PumpSdk class with all instruction builders and account decoders\nsrc/onlineSdk.ts — OnlinePumpSdk class extending offline SDK with live RPC fetches\nsrc/index.ts — barrel re-export module defining the public API surface\nsrc/state.ts — TypeScript interfaces for all on-chain account state\nsrc/pda.ts — Program Derived Address derivation for all programs\nsrc/idl/pump.ts, src/idl/pump_amm.ts, src/idl/pump_fees.ts — Anchor IDL definitions"
      },
      {
        "title": "Architecture",
        "body": "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.\nOnline 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.\nThree program IDs: PUMP_PROGRAM_ID, PUMP_AMM_PROGRAM_ID, PUMP_FEE_PROGRAM_ID, plus MAYHEM_PROGRAM_ID for mayhem-mode tokens."
      },
      {
        "title": "Instruction Builder Pattern",
        "body": "Every instruction method returns TransactionInstruction[] (not transactions), allowing callers to compose them into transactions freely. Methods follow a naming convention:\n\n*Instruction — single instruction\n*Instructions — multiple instructions (e.g., ATA creation + buy)"
      },
      {
        "title": "Account Decoders",
        "body": "The SDK decodes raw AccountInfo<Buffer> into typed interfaces using the Anchor coder:\n\ndecodeGlobal, decodeBondingCurve, decodeFeeConfig, decodeSharingConfig, etc.\nNullable variants (e.g., decodeBondingCurveNullable) handle missing or undersized accounts gracefully."
      },
      {
        "title": "Slippage Calculation",
        "body": "maxSolCost = solAmount + (solAmount × slippage × 10 / 1000)\nminSolReceived = solAmount - (solAmount × slippage × 10 / 1000)"
      },
      {
        "title": "Patterns to Follow",
        "body": "Always return TransactionInstruction[] from instruction builders, never full Transaction objects\nUse getMultipleAccountsInfo to batch RPC calls (2–3 accounts per call)\nSupport both Token (SPL) and Token-2022 programs via tokenProgram parameter\nHandle account extension (extendAccountInstruction) for bonding curves that need more space\nValidate shareholder arrays: max 10 shareholders, shares must total 10,000 bps, no duplicates, no zero shares\nUse typed error classes from src/errors.ts for validation failures\nKeep the offline SDK connection-free; all RPC calls belong in OnlinePumpSdk"
      },
      {
        "title": "Common Pitfalls",
        "body": "Circular dependency between sdk.ts and onlineSdk.ts\nBuy instruction passes { 0: true } as a flags argument — this is intentional, not a bug\nBONDING_CURVE_NEW_SIZE = 151 — accounts may need extension before certain operations\nBondingCurve.complete === true means the token has graduated to AMM — bonding curve operations will fail\nThe createInstruction (v1) is deprecated in favor of createV2Instruction (Token-2022)"
      }
    ],
    "body": "Pump SDK Core — Instruction Building & On-Chain Interaction\n\nBuild, 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.\n\nContext\n\nThe 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.\n\nKey Files\nsrc/sdk.ts — PumpSdk class with all instruction builders and account decoders\nsrc/onlineSdk.ts — OnlinePumpSdk class extending offline SDK with live RPC fetches\nsrc/index.ts — barrel re-export module defining the public API surface\nsrc/state.ts — TypeScript interfaces for all on-chain account state\nsrc/pda.ts — Program Derived Address derivation for all programs\nsrc/idl/pump.ts, src/idl/pump_amm.ts, src/idl/pump_fees.ts — Anchor IDL definitions\nArchitecture\nOffline 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.\nOnline 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.\nThree program IDs: PUMP_PROGRAM_ID, PUMP_AMM_PROGRAM_ID, PUMP_FEE_PROGRAM_ID, plus MAYHEM_PROGRAM_ID for mayhem-mode tokens.\nInstruction Builder Pattern\n\nEvery instruction method returns TransactionInstruction[] (not transactions), allowing callers to compose them into transactions freely. Methods follow a naming convention:\n\n*Instruction — single instruction\n*Instructions — multiple instructions (e.g., ATA creation + buy)\nAccount Decoders\n\nThe SDK decodes raw AccountInfo<Buffer> into typed interfaces using the Anchor coder:\n\ndecodeGlobal, decodeBondingCurve, decodeFeeConfig, decodeSharingConfig, etc.\nNullable variants (e.g., decodeBondingCurveNullable) handle missing or undersized accounts gracefully.\nSlippage Calculation\nmaxSolCost = solAmount + (solAmount × slippage × 10 / 1000)\nminSolReceived = solAmount - (solAmount × slippage × 10 / 1000)\n\nPatterns to Follow\nAlways return TransactionInstruction[] from instruction builders, never full Transaction objects\nUse getMultipleAccountsInfo to batch RPC calls (2–3 accounts per call)\nSupport both Token (SPL) and Token-2022 programs via tokenProgram parameter\nHandle account extension (extendAccountInstruction) for bonding curves that need more space\nValidate shareholder arrays: max 10 shareholders, shares must total 10,000 bps, no duplicates, no zero shares\nUse typed error classes from src/errors.ts for validation failures\nKeep the offline SDK connection-free; all RPC calls belong in OnlinePumpSdk\nCommon Pitfalls\nCircular dependency between sdk.ts and onlineSdk.ts\nBuy instruction passes { 0: true } as a flags argument — this is intentional, not a bug\nBONDING_CURVE_NEW_SIZE = 151 — accounts may need extension before certain operations\nBondingCurve.complete === true means the token has graduated to AMM — bonding curve operations will fail\nThe createInstruction (v1) is deprecated in favor of createV2Instruction (Token-2022)"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/speraxos/pump-sdk-core",
    "publisherUrl": "https://clawhub.ai/speraxos/pump-sdk-core",
    "owner": "speraxos",
    "version": "0.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/pump-sdk-core",
    "downloadUrl": "https://openagent3.xyz/downloads/pump-sdk-core",
    "agentUrl": "https://openagent3.xyz/skills/pump-sdk-core/agent",
    "manifestUrl": "https://openagent3.xyz/skills/pump-sdk-core/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/pump-sdk-core/agent.md"
  }
}