swap

Construct Solana swap transactions for bonding-curve and AMM pathways.

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/dumebi042/pump-public-docs --skill swap-dumebi042
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swap
Source: https://github.com/dumebi042/pump-public-docs/tree/main/pump-fun-skills/swap
Command: npx skills add https://github.com/dumebi042/pump-public-docs --skill swap-dumebi042

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @pump-fun/pump-sdk, @pump-fun/pump-swap-sdk, @solana/spl-token, @solana/web3.js, bn.js, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the construction, signing, and submission of swap transactions across bonding-curve and AMM platforms for pump.fun tokens on Solana, reducing manual effort and integration risk.

Core Features & Use Cases

  • Bonding-curve buys/sells: build and sign transactions for coins still on the bonding curve.
  • AMM swaps: handle post-graduation swapping via pump.swap pools with optional front-runner protection.
  • Balance and state verification: resolve coin state, determine token programs, and verify pool configurations before tx creation.
  • Use Case: back-end services can expose an endpoint that returns a ready-to-submit transaction for a given mint, user, and amount.

Quick Start

Provide a mint, user wallet, and amount to get a base64-encoded swap transaction ready for signing.

Frequently Asked Questions about swap

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Solana swap transaction for pump.fun bonding-curve tokens?

You can build a Solana swap transaction for pump.fun bonding-curve tokens by providing a mint, user wallet, and amount, which generates a base64-encoded, ready-to-submit VersionedTransaction via automated SDK calls and on-chain state resolution.

What is the difference between bonding-curve and AMM swaps for pump.fun tokens on Solana?

Bonding-curve swaps handle coins still on the curve, while AMM swaps manage post-graduation trading via pump.swap pools with optional front-runner protection, both producing a signed VersionedTransaction.

Can I use this to automate pump.swap AMM transactions with front-runner protection?

Yes, you can automate pump.swap AMM transactions with optional front-runner protection for post-graduation swapping. The Skill coordinates SDK calls and wallet signing to produce a ready-to-submit VersionedTransaction.

Do I need to resolve token programs and pool configurations before creating a Solana swap transaction?

No manual resolution is needed. The Skill automatically resolves coin state, determines token programs, and verifies pool configurations before transaction creation, reducing manual integration effort and risk during end-to-end construction.

What is the best way to expose a backend endpoint for Solana pump.fun token swaps?

The best way to expose a backend endpoint for pump.fun swaps is to return a ready-to-submit transaction for a given mint, user, and amount. The Skill automates state resolution, SDK calls, and wallet signing for this exact workflow.