Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

build(pump): move to pump-sdk 4.0 and the October pump and PumpSwap IDLs

nirholas11ef78bb3fba
diff --git a/agent-payments-sdk/package.json b/agent-payments-sdk/package.json
index c022038bc..a8441e804 100644
--- a/agent-payments-sdk/package.json
+++ b/agent-payments-sdk/package.json
@@ -66,7 +66,7 @@
"@bonfida/spl-name-service": "0.1.67",
"@coral-xyz/anchor": "^0.31.1",
"@ethereum-attestation-service/eas-sdk": "2.10.0",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@solana/spl-token": "^0.4.9",
"@solana/web3.js": "^1.98.0",
"agent0-sdk": "^1.7.1",
diff --git a/character-studio/package.json b/character-studio/package.json
index 1d72602dc..b9304956f 100644
--- a/character-studio/package.json
+++ b/character-studio/package.json
@@ -25,7 +25,7 @@
"@metaplex-foundation/umi-bundle-defaults": "^1.6.0",
"@metaplex-foundation/umi-serializers": "^1.6.0",
"@pixiv/three-vrm": "^3.5.5",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@solana/pay": "1.0.16",
"@solana/spl-token": "^0.4.14",
"@solana/web3.js": "^1.98.4",
diff --git a/contracts/idl/pump/pump.json b/contracts/idl/pump/pump.json
index d35d32dce..60d8e09c8 100644
--- a/contracts/idl/pump/pump.json
+++ b/contracts/idl/pump/pump.json
@@ -5286,18 +5286,20 @@
"depth-0 coins only, up to 5 planned), and Q's curve must not be mayhem mode; a depth-0 Q",
"must itself be quoted in SOL, a `Global`-whitelisted mint or a quote-control mint",
"(`QuoteBondingCurveNotEligible`). The new curve's virtual quote reserves are then derived",
- "from Q's live price - the seed a fresh curve in Q's own quote would get for a depth-0 Q, or",
- "Q's own stored `initial_virtual_quote_reserves` for a deeper Q (so every hop below Q is",
- "pinned at its creation price and only Q is read), times Q's curve `virtual_token_reserves`",
- "over `virtual_quote_reserves` while Q's curve trades, or times Q's canonical pump-amm pool",
- "base vault balance over its quote vault balance plus `Pool.virtual_quote_reserves` once it is",
- "migrated (a complete Q not yet migrated fails `QuoteCurveAwaitingMigration`);",
- "a migrated Q requires accounts six to eight: the pool (index 0 under pump's",
- "`pool-authority` PDA for Q, quote seed WSOL for a SOL-quoted Q) and its base and quote",
- "vaults (`QuotePoolAccountsRequired`, `QuotePoolNotFound`, `InvalidQuotePool`). The derived",
- "value must be at least 1 and its graduation raise at most Q's mint supply",
- "(`QuoteReservesOutOfRange`); the new curve stores `depth = Q.depth + 1` and, like a",
- "quote-control coin, cannot be mayhem mode. The Token-2022",
+ "from Q's live reserves: the graduation raise of a Target - the seed a fresh curve in Q's",
+ "own quote would get for a depth-0 Q, or Q's own stored `initial_virtual_quote_reserves`",
+ "for a deeper Q (so every hop below Q is pinned at its creation and only Q is read) - is",
+ "bought on Q's constant product, over Q's curve `virtual_token_reserves` and",
+ "`virtual_quote_reserves` while Q's curve trades, or over Q's canonical pump-amm pool base",
+ "vault balance and its quote vault balance plus `Pool.virtual_quote_reserves` once it is",
+ "migrated (a complete Q not yet migrated fails `QuoteCurveAwaitingMigration`); the Q tokens",
+ "that buy returns are the new curve's graduation raise and its seed is that raise scaled",
+ "back by the curve's raise ratio. A migrated Q requires accounts six to eight: the pool",
+ "(index 0 under pump's `pool-authority` PDA for Q, quote seed WSOL for a SOL-quoted Q) and",
+ "its base and quote vaults (`QuotePoolAccountsRequired`, `QuotePoolNotFound`,",
+ "`InvalidQuotePool`). The derived value must be at least 1 (`QuoteReservesOutOfRange`); its",
+ "raise never exceeds Q's token side, so there is no supply bound. The new curve stores",
+ "`depth = Q.depth + 1` and, like a quote-control coin, cannot be mayhem mode. The Token-2022",
"native mint is rejected, and a Token-2022 quote mint may only carry the xStock operable",
"extension set (metadata pointer/metadata, permanent delegate, initialized default account",
"state, scaled UI amount, pausable, confidential-transfer mint, and a transfer hook with no",
@@ -13203,7 +13205,7 @@
{
"code": 6104,
"name": "QuoteReservesOutOfRange",
- "msg": "Derived quote reserves are zero or their graduation raise exceeds the quote mint supply"
+ "msg": "Derived quote reserves are zero"
},
{
"code": 6105,
@@ -13219,6 +13221,11 @@
"code": 6107,
"name": "QuoteCurveAwaitingMigration",
"msg": "The quote coin's curve is complete but not yet migrated; retry once migrate_v2 creates its pool"
+ },
+ {
+ "code": 6108,
+ "name": "MultiHopMayhemCurveNotSupported",
+ "msg": "multi-hop: mayhem-mode curves are not routable; use the v2 instructions"
}
],
"types": [
diff --git a/data/pump-upstream-baseline.json b/data/pump-upstream-baseline.json
index f570e3b75..b2f71cd96 100644
--- a/data/pump-upstream-baseline.json
+++ b/data/pump-upstream-baseline.json
@@ -1,30 +1,24 @@
{
- "acceptedAt": "2026-09-14T18:47:23.100Z",
+ "acceptedAt": "2026-10-09T03:09:56.522Z",
"packages": {
- "@pump-fun/pump-sdk": {
- "version": "2.0.0",
- "publishedAt": "2026-09-13T09:55:54.743Z"
- },
- "@pump-fun/pump-swap-sdk": {
- "version": "1.20.0",
- "publishedAt": "2026-09-10T13:25:11.154Z"
- },
"@pump-fun/agent-payments-sdk": {
"version": "3.0.3",
"publishedAt": "2026-03-24T07:32:16.786Z"
},
+ "@pump-fun/pump-sdk": {
+ "version": "4.0.0",
+ "publishedAt": "2026-10-08T12:53:48.925Z"
+ },
+ "@pump-fun/pump-swap-sdk": {
+ "version": "2.1.0",
+ "publishedAt": "2026-10-07T19:49:57.700Z"
+ },
"@pump-fun/shared-contracts": {
"version": "0.2.2",
"publishedAt": "2025-06-10T11:14:06.591Z"
}
},
"repositories": {
- "carbon": {
- "pushedAt": "2026-09-13T21:27:02Z",
- "defaultBranch": "main",
- "archived": false,
- "url": "https://github.com/pump-fun/carbon"
- },
"pump-fun-skills": {
"pushedAt": "2026-06-23T09:37:28Z",
"defaultBranch": "main",
@@ -32,7 +26,7 @@
"url": "https://github.com/pump-fun/pump-fun-skills"
},
"pump-public-docs": {
- "pushedAt": "2026-09-14T06:57:49Z",
+ "pushedAt": "2026-10-08T18:33:07Z",
"defaultBranch": "main",
"archived": false,
"url": "https://github.com/pump-fun/pump-public-docs"
diff --git a/docs/ops/pump-upstream-watch.md b/docs/ops/pump-upstream-watch.md
index 850d87c90..4af9e8daf 100644
--- a/docs/ops/pump-upstream-watch.md
+++ b/docs/ops/pump-upstream-watch.md
@@ -36,11 +36,22 @@ npm run pump:refresh-idls
## Current upstream feature boundary
-`@pump-fun/pump-sdk 2.0.0` adds protocol-native holder-reward coins, deprecates
-cashback for new launches, consolidates creator/fee changes into the CTO flow,
-and expands bonding-curve, global, trade, and admin event layouts.
-`@pump-fun/pump-swap-sdk 1.20.0` adds current quote-mint-aware fee collection,
-canonical pool derivation, and pricing/state support.
+`@pump-fun/pump-sdk 4.0.0` and `@pump-fun/pump-swap-sdk 2.1.0` (accepted
+2026-10-09) add the 17-account `buy_v3` / `sell_v3` curve trades and PumpSwap
+`buy_v2` / `sell_v2`, `multi_hop_swap`, pump coins as quote mints, fees kept on
+the curve and pool until a permissionless sweep, and synthetic migration (the
+buy that completes a curve keeps buying from the pool's tokens and reports that
+part in `PostCompleteBuyEvent`). How three.ws absorbed each part, and the vendored
+upstream docs, are in [docs/pumpfun-program/README.md](../pumpfun-program/README.md):
+every creator-fee claim, distribution and fee-sharing change sweeps first, every
+balance counts unswept fees, and the trade readers fold synthetic migration in.
+Our trade builders deliberately stay on `buy_v2` / `sell_v2`, which keep paying
+the creator fee per trade.
+
+Earlier: `pump-sdk 2.0.0` added protocol-native holder-reward coins, deprecated
+cashback for new launches and consolidated creator/fee changes into the CTO
+flow; `pump-swap-sdk 1.20.0` added quote-mint-aware fee collection and canonical
+pool derivation.
three.ws exposes holder-reward creation through connected-wallet, autonomous
agent-wallet, and x402 paid launch paths. Its fee inspector identifies the
diff --git a/docs/pumpfun-program/idl/pump.json b/docs/pumpfun-program/idl/pump.json
index d35d32dce..60d8e09c8 100644
--- a/docs/pumpfun-program/idl/pump.json
+++ b/docs/pumpfun-program/idl/pump.json
@@ -5286,18 +5286,20 @@
"depth-0 coins only, up to 5 planned), and Q's curve must not be mayhem mode; a depth-0 Q",
"must itself be quoted in SOL, a `Global`-whitelisted mint or a quote-control mint",
"(`QuoteBondingCurveNotEligible`). The new curve's virtual quote reserves are then derived",
- "from Q's live price - the seed a fresh curve in Q's own quote would get for a depth-0 Q, or",
- "Q's own stored `initial_virtual_quote_reserves` for a deeper Q (so every hop below Q is",
- "pinned at its creation price and only Q is read), times Q's curve `virtual_token_reserves`",
- "over `virtual_quote_reserves` while Q's curve trades, or times Q's canonical pump-amm pool",
- "base vault balance over its quote vault balance plus `Pool.virtual_quote_reserves` once it is",
- "migrated (a complete Q not yet migrated fails `QuoteCurveAwaitingMigration`);",
- "a migrated Q requires accounts six to eight: the pool (index 0 under pump's",
- "`pool-authority` PDA for Q, quote seed WSOL for a SOL-quoted Q) and its base and quote",
- "vaults (`QuotePoolAccountsRequired`, `QuotePoolNotFound`, `InvalidQuotePool`). The derived",
- "value must be at least 1 and its graduation raise at most Q's mint supply",
- "(`QuoteReservesOutOfRange`); the new curve stores `depth = Q.depth + 1` and, like a",
- "quote-control coin, cannot be mayhem mode. The Token-2022",
+ "from Q's live reserves: the graduation raise of a Target - the seed a fresh curve in Q's",
+ "own quote would get for a depth-0 Q, or Q's own stored `initial_virtual_quote_reserves`",
+ "for a deeper Q (so every hop below Q is pinned at its creation and only Q is read) - is",
+ "bought on Q's constant product, over Q's curve `virtual_token_reserves` and",
+ "`virtual_quote_reserves` while Q's curve trades, or over Q's canonical pump-amm pool base",
+ "vault balance and its quote vault balance plus `Pool.virtual_quote_reserves` once it is",
+ "migrated (a complete Q not yet migrated fails `QuoteCurveAwaitingMigration`); the Q tokens",
+ "that buy returns are the new curve's graduation raise and its seed is that raise scaled",
+ "back by the curve's raise ratio. A migrated Q requires accounts six to eight: the pool",
+ "(index 0 under pump's `pool-authority` PDA for Q, quote seed WSOL for a SOL-quoted Q) and",
+ "its base and quote vaults (`QuotePoolAccountsRequired`, `QuotePoolNotFound`,",
+ "`InvalidQuotePool`). The derived value must be at least 1 (`QuoteReservesOutOfRange`); its",
+ "raise never exceeds Q's token side, so there is no supply bound. The new curve stores",
+ "`depth = Q.depth + 1` and, like a quote-control coin, cannot be mayhem mode. The Token-2022",
"native mint is rejected, and a Token-2022 quote mint may only carry the xStock operable",
"extension set (metadata pointer/metadata, permanent delegate, initialized default account",
"state, scaled UI amount, pausable, confidential-transfer mint, and a transfer hook with no",
@@ -13203,7 +13205,7 @@
{
"code": 6104,
"name": "QuoteReservesOutOfRange",
- "msg": "Derived quote reserves are zero or their graduation raise exceeds the quote mint supply"
+ "msg": "Derived quote reserves are zero"
},
{
"code": 6105,
@@ -13219,6 +13221,11 @@
"code": 6107,
"name": "QuoteCurveAwaitingMigration",
"msg": "The quote coin's curve is complete but not yet migrated; retry once migrate_v2 creates its pool"
+ },
+ {
+ "code": 6108,
+ "name": "MultiHopMayhemCurveNotSupported",
+ "msg": "multi-hop: mayhem-mode curves are not routable; use the v2 instructions"
}
],
"types": [
diff --git a/multiplayer/package.json b/multiplayer/package.json
index a5968ff39..a1ccbc6aa 100644
--- a/multiplayer/package.json
+++ b/multiplayer/package.json
@@ -21,7 +21,7 @@
"@colyseus/schema": "3.0.76",
"@colyseus/ws-transport": "^0.16.5",
"@ethereum-attestation-service/eas-sdk": "2.10.0",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@solana/pay": "1.0.16",
"@upstash/redis": "^1.38.0",
"agent0-sdk": "^1.7.1",
diff --git a/package-lock.json b/package-lock.json
index 435b5d93d..4ec7235aa 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -135,7 +135,7 @@
"@okxweb3/app-x402-core": "^0.2.0",
"@privy-io/js-sdk-core": "^0.75.0",
"@pump-fun/agent-payments-sdk": "^3.0.3",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@pump-fun/pump-swap-sdk": "^2.1.0",
"@pythnetwork/hermes-client": "^3.1.0",
"@ricky0123/vad-web": "^0.0.31",
@@ -288,7 +288,7 @@
"@bonfida/spl-name-service": "0.1.67",
"@coral-xyz/anchor": "^0.31.1",
"@ethereum-attestation-service/eas-sdk": "2.10.0",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@solana/spl-token": "^0.4.9",
"@solana/web3.js": "^1.98.0",
"agent0-sdk": "^1.7.1",
@@ -439,7 +439,7 @@
"@metaplex-foundation/umi-bundle-defaults": "^1.6.0",
"@metaplex-foundation/umi-serializers": "^1.6.0",
"@pixiv/three-vrm": "^3.5.5",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@solana/pay": "1.0.16",
"@solana/spl-token": "^0.4.14",
"@solana/web3.js": "^1.98.4",
@@ -651,7 +651,7 @@
"@colyseus/schema": "3.0.76",
"@colyseus/ws-transport": "^0.16.5",
"@ethereum-attestation-service/eas-sdk": "2.10.0",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@solana/pay": "1.0.16",
"@upstash/redis": "^1.38.0",
"agent0-sdk": "^1.7.1",
@@ -17022,9 +17022,9 @@
"license": "MIT"
},
"node_modules/@pump-fun/pump-sdk": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/@pump-fun/pump-sdk/-/pump-sdk-3.2.0.tgz",
- "integrity": "sha512-K3UcOAFT8l/jUhGwAi9DV9giyShOFcyNWo81xLLaSWT3csnmVgZBJ7q9nT4C+81H7I/gML3KEc98C4JtxqvOig==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@pump-fun/pump-sdk/-/pump-sdk-4.0.0.tgz",
+ "integrity": "sha512-LxFS0Y9bdFfgw3mTqqWg+w/HMna/3zOXm0HdLdBzui1L0htfNLHZy5EhLyod6OMpl2nSjQb2MTeTlzyxWXZwHw==",
"license": "MIT",
"dependencies": {
"@coral-xyz/anchor": "^0.31.1",
@@ -53103,7 +53103,7 @@
"dependencies": {
"@modelcontextprotocol/sdk": "^1.29.0",
"@nirholas/pump-sdk": "^1.30.0",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@pump-fun/pump-swap-sdk": "^2.1.0",
"@solana/spl-token": "^0.4.14",
"@solana/web3.js": "^1.98.4",
diff --git a/package.json b/package.json
index d627b46a9..d45f0ce76 100644
--- a/package.json
+++ b/package.json
@@ -596,7 +596,7 @@
"@okxweb3/app-x402-core": "^0.2.0",
"@privy-io/js-sdk-core": "^0.75.0",
"@pump-fun/agent-payments-sdk": "^3.0.3",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@pump-fun/pump-swap-sdk": "^2.1.0",
"@pythnetwork/hermes-client": "^3.1.0",
"@ricky0123/vad-web": "^0.0.31",
diff --git a/packages/agent-sniper/package.json b/packages/agent-sniper/package.json
index f564d0a2d..372a59fd3 100644
--- a/packages/agent-sniper/package.json
+++ b/packages/agent-sniper/package.json
@@ -59,7 +59,7 @@
"dependencies": {
"@modelcontextprotocol/sdk": "^1.29.0",
"@nirholas/pump-sdk": "^1.30.0",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@pump-fun/pump-swap-sdk": "^2.1.0",
"@solana/spl-token": "^0.4.14",
"@solana/web3.js": "^1.98.4",
diff --git a/pump-fun-skills/coin-fees/package-lock.json b/pump-fun-skills/coin-fees/package-lock.json
index 373a6c9e1..223dd46ab 100644
--- a/pump-fun-skills/coin-fees/package-lock.json
+++ b/pump-fun-skills/coin-fees/package-lock.json
@@ -8,7 +8,7 @@
"name": "@pump-fun-skills/coin-fees",
"version": "1.0.0",
"dependencies": {
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@pump-fun/pump-swap-sdk": "^2.1.0",
"@solana/spl-token": "^0.4.13",
"@solana/web3.js": "^1.98.2",
@@ -118,9 +118,9 @@
}
},
"node_modules/@pump-fun/pump-sdk": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/@pump-fun/pump-sdk/-/pump-sdk-3.2.0.tgz",
- "integrity": "sha512-K3UcOAFT8l/jUhGwAi9DV9giyShOFcyNWo81xLLaSWT3csnmVgZBJ7q9nT4C+81H7I/gML3KEc98C4JtxqvOig==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@pump-fun/pump-sdk/-/pump-sdk-4.0.0.tgz",
+ "integrity": "sha512-LxFS0Y9bdFfgw3mTqqWg+w/HMna/3zOXm0HdLdBzui1L0htfNLHZy5EhLyod6OMpl2nSjQb2MTeTlzyxWXZwHw==",
"license": "MIT",
"dependencies": {
"@coral-xyz/anchor": "^0.31.1",
diff --git a/pump-fun-skills/coin-fees/package.json b/pump-fun-skills/coin-fees/package.json
index f6eb1ec6a..9a3cb28ba 100644
--- a/pump-fun-skills/coin-fees/package.json
+++ b/pump-fun-skills/coin-fees/package.json
@@ -15,7 +15,7 @@
"fetch-distributable-info": "node scripts/fetch-distributable-info.mjs"
},
"dependencies": {
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@pump-fun/pump-swap-sdk": "^2.1.0",
"@solana/spl-token": "^0.4.13",
"@solana/web3.js": "^1.98.2",
diff --git a/pump-fun-skills/create-coin/package-lock.json b/pump-fun-skills/create-coin/package-lock.json
index 6aad4f1dd..d24e20377 100644
--- a/pump-fun-skills/create-coin/package-lock.json
+++ b/pump-fun-skills/create-coin/package-lock.json
@@ -8,7 +8,7 @@
"name": "@pump-fun-skills/create-coin",
"version": "1.0.0",
"dependencies": {
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@pump-fun/pump-swap-sdk": "^2.1.0",
"@solana/spl-token": "^0.4.13",
"@solana/web3.js": "^1.98.2",
@@ -6018,9 +6018,9 @@
}
},
"node_modules/@pump-fun/pump-sdk": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/@pump-fun/pump-sdk/-/pump-sdk-3.2.0.tgz",
- "integrity": "sha512-K3UcOAFT8l/jUhGwAi9DV9giyShOFcyNWo81xLLaSWT3csnmVgZBJ7q9nT4C+81H7I/gML3KEc98C4JtxqvOig==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@pump-fun/pump-sdk/-/pump-sdk-4.0.0.tgz",
+ "integrity": "sha512-LxFS0Y9bdFfgw3mTqqWg+w/HMna/3zOXm0HdLdBzui1L0htfNLHZy5EhLyod6OMpl2nSjQb2MTeTlzyxWXZwHw==",
"license": "MIT",
"dependencies": {
"@coral-xyz/anchor": "^0.31.1",
diff --git a/pump-fun-skills/create-coin/package.json b/pump-fun-skills/create-coin/package.json
index 17c52cdfb..ba414ca66 100644
--- a/pump-fun-skills/create-coin/package.json
+++ b/pump-fun-skills/create-coin/package.json
@@ -13,7 +13,7 @@
},
"dependencies": {
"@three-ws/agent-payments": "^3.2.0",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@pump-fun/pump-swap-sdk": "^2.1.0",
"@solana/spl-token": "^0.4.13",
"@solana/web3.js": "^1.98.2",
diff --git a/pump-fun-skills/swap/package-lock.json b/pump-fun-skills/swap/package-lock.json
index d43b0f436..8ed708cdb 100644
--- a/pump-fun-skills/swap/package-lock.json
+++ b/pump-fun-skills/swap/package-lock.json
@@ -8,7 +8,7 @@
"name": "@pump-fun-skills/swap",
"version": "1.0.0",
"dependencies": {
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@pump-fun/pump-swap-sdk": "^2.1.0",
"@solana/spl-token": "^0.4.13",
"@solana/web3.js": "^1.98.2",
@@ -118,9 +118,9 @@
}
},
"node_modules/@pump-fun/pump-sdk": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/@pump-fun/pump-sdk/-/pump-sdk-3.2.0.tgz",
- "integrity": "sha512-K3UcOAFT8l/jUhGwAi9DV9giyShOFcyNWo81xLLaSWT3csnmVgZBJ7q9nT4C+81H7I/gML3KEc98C4JtxqvOig==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@pump-fun/pump-sdk/-/pump-sdk-4.0.0.tgz",
+ "integrity": "sha512-LxFS0Y9bdFfgw3mTqqWg+w/HMna/3zOXm0HdLdBzui1L0htfNLHZy5EhLyod6OMpl2nSjQb2MTeTlzyxWXZwHw==",
"license": "MIT",
"dependencies": {
"@coral-xyz/anchor": "^0.31.1",
diff --git a/pump-fun-skills/swap/package.json b/pump-fun-skills/swap/package.json
index 984c5adca..6b33a36fb 100644
--- a/pump-fun-skills/swap/package.json
+++ b/pump-fun-skills/swap/package.json
@@ -16,7 +16,7 @@
"print-balances": "node scripts/print-balances.mjs"
},
"dependencies": {
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@pump-fun/pump-swap-sdk": "^2.1.0",
"@solana/spl-token": "^0.4.13",
"@solana/web3.js": "^1.98.2",
diff --git a/satellites/oracle-desk/package-lock.json b/satellites/oracle-desk/package-lock.json
index de9fb0945..dd76e2b86 100644
--- a/satellites/oracle-desk/package-lock.json
+++ b/satellites/oracle-desk/package-lock.json
@@ -10,7 +10,7 @@
"license": "Apache-2.0",
"dependencies": {
"@anthropic-ai/sdk": "^0.129.0",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@pump-fun/pump-swap-sdk": "^2.1.0",
"@solana/spl-token": "^0.4.15",
"@solana/web3.js": "^1.99.0",
@@ -166,9 +166,9 @@
}
},
"node_modules/@pump-fun/pump-sdk": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/@pump-fun/pump-sdk/-/pump-sdk-3.2.0.tgz",
- "integrity": "sha512-K3UcOAFT8l/jUhGwAi9DV9giyShOFcyNWo81xLLaSWT3csnmVgZBJ7q9nT4C+81H7I/gML3KEc98C4JtxqvOig==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@pump-fun/pump-sdk/-/pump-sdk-4.0.0.tgz",
+ "integrity": "sha512-LxFS0Y9bdFfgw3mTqqWg+w/HMna/3zOXm0HdLdBzui1L0htfNLHZy5EhLyod6OMpl2nSjQb2MTeTlzyxWXZwHw==",
"license": "MIT",
"dependencies": {
"@coral-xyz/anchor": "^0.31.1",
diff --git a/satellites/oracle-desk/package.json b/satellites/oracle-desk/package.json
index 569473d56..3e6942b4c 100644
--- a/satellites/oracle-desk/package.json
+++ b/satellites/oracle-desk/package.json
@@ -14,7 +14,7 @@
},
"dependencies": {
"@anthropic-ai/sdk": "^0.129.0",
- "@pump-fun/pump-sdk": "^3.2.0",
+ "@pump-fun/pump-sdk": "^4.0.0",
"@pump-fun/pump-swap-sdk": "^2.1.0",
"@solana/spl-token": "^0.4.15",
"@solana/web3.js": "^1.99.0",
diff --git a/scripts/refresh-pump-idls.mjs b/scripts/refresh-pump-idls.mjs
index f2c2a3244..92ff4df98 100644
--- a/scripts/refresh-pump-idls.mjs
+++ b/scripts/refresh-pump-idls.mjs
@@ -1,5 +1,6 @@
#!/usr/bin/env node
-// Refresh the vendored Pump program IDLs under contracts/idl/pump/.
+// Refresh the vendored Pump program IDLs under contracts/idl/pump/ and the
+// reference mirror under docs/pumpfun-program/idl/.
//
// Source of truth: pump-fun/pump-public-docs (mirrored via nirholas/pumpkit).
// Run after Pump publishes a new IDL version, then commit the diff.
@@ -13,7 +14,16 @@ import { resolve, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
const HERE = dirname(fileURLToPath(import.meta.url));
-const OUT_DIR = resolve(HERE, '..', 'contracts', 'idl', 'pump');
+const OUT_DIRS = [
+ resolve(HERE, '..', 'contracts', 'idl', 'pump'),
+ resolve(HERE, '..', 'docs', 'pumpfun-program', 'idl'),
+];
+
+// Upstream doc strings use em and en dashes, which this repo bans in
+// committed text. Rewrite them to a plain hyphen so a refresh lands clean.
+function scrubDashes(text) {
+ return text.replace(/ ?[\u2014\u2013] ?/g, ' - ');
+}
const SOURCES = [
{
@@ -39,7 +49,7 @@ const SOURCES = [
},
];
-mkdirSync(OUT_DIR, { recursive: true });
+for (const dir of OUT_DIRS) mkdirSync(dir, { recursive: true });
let failures = 0;
for (const { name, urls } of SOURCES) {
@@ -51,7 +61,7 @@ for (const { name, urls } of SOURCES) {
if (!resp.ok) continue;
const text = await resp.text();
JSON.parse(text); // validate structure before writing
- body = text;
+ body = scrubDashes(text);
usedUrl = url;
break;
} catch {
@@ -63,8 +73,7 @@ for (const { name, urls } of SOURCES) {
failures++;
continue;
}
- const outPath = resolve(OUT_DIR, `${name}.json`);
- writeFileSync(outPath, body);
+ for (const dir of OUT_DIRS) writeFileSync(resolve(dir, `${name}.json`), body);
console.log(`✓ ${name} ← ${usedUrl}`);
}