> ## Documentation Index
> Fetch the complete documentation index at: https://docs.raydium.io/llms.txt
> Use this file to discover all available pages before exploring further.

# CPMM IDL

> CPMM 程式（raydium_cp_swap）的每一個歸檔 IDL，包含下載連結、SHA-256 校驗和、原始碼提交，以及每個版本涵蓋的主網期間。

> [!NOTE]
>
> **本頁內容由 AI 自動翻譯，所有內容以英文版本為準。**
>
> [查看英文版 →](https://docs.raydium.io/reference/idl/cpmm.md)

> [!NOTE]
>
> 程式：`raydium_cp_swap`，程式 ID 見 [`reference/program-addresses`](https://docs.raydium.io/zh-Hant/reference/program-addresses#on-chain-programs)。原始碼：[`github.com/raydium-io/raydium-cp-swap`](https://github.com/raydium-io/raydium-cp-swap)。檔案不可變 — 參見[歸檔如何發佈](https://docs.raydium.io/zh-Hant/reference/idl/index.md#how-the-files-are-published)。

## 最新

> [card] [raydium\_cp\_swap.json](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-10-30/raydium_cp_swap.json)
>
> 版本 **2026-10-30** · 生效中 · 21 個指令、16 個錯誤

> [card] [raydium\_cp\_swap.ts](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-10-30/raydium_cp_swap.ts)
>
> 供 `@anchor-lang/core` 使用的 TypeScript 型別 `RaydiumCpSwap`

## 版本歷程

由新到舊。選擇主網期間涵蓋你正在解碼之交易的版本。每個版本都在其下方版本的基礎上新增；查看其詳細資訊以確切了解變更內容。

### 2026

| 版本 | 主網期間（UTC） | 檔案 | 更新日誌 |
| - | - | - | - |
| **2026-10-30** | 2026-10-30 → | [JSON](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-10-30/raydium_cp_swap.json) · [TS](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-10-30/raydium_cp_swap.ts) | [`InitializeV2`](https://docs.raydium.io/zh-Hant/reference/changelog/2026-10-30-cpmm-initialize-v2) |
| **2026-09-19** | 2026-09-19 → 2026-10-30 | [JSON](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-09-19/raydium_cp_swap.json) · [TS](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-09-19/raydium_cp_swap.ts) | [建立者費用的協議份額](https://docs.raydium.io/zh-Hant/reference/changelog/2026-09-19-cpmm-creator-fee-protocol-share.md) |
| **2026-09-09** | 2026-09-09 → 2026-09-19 | [JSON](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-09-09/raydium_cp_swap.json) · [TS](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-09-09/raydium_cp_swap.ts) | [Anchor 1.0、超額 lamports 回收](https://docs.raydium.io/zh-Hant/reference/changelog/2026-09-09-cpmm-anchor-1-and-excess-lamports.md) |
| **2026-08-17** | 2026-08-17 → 2026-09-09 | [JSON](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-08-17/raydium_cp_swap.json) · [TS](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-08-17/raydium_cp_swap.ts) | [無需許可的建立者費用收取](https://docs.raydium.io/zh-Hant/reference/changelog/2026-08-17-cpmm-permissionless-creator-fee-collection.md) |
| **2026-06-12** | 未記錄 → 2026-08-17 | [JSON](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-06-12/raydium_cp_swap.json) · [TS](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-06-12/raydium_cp_swap.ts) | —（支援鑄幣登錄表；無更新日誌條目） |
| **2026-05-07** | → 支援鑄幣登錄表發佈版本 | [JSON](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-05-07/raydium_cp_swap.json) · [TS](https://raydium-io.github.io/raydium-docs-v1/idl/cpmm/2026-05-07/raydium_cp_swap.ts) | [首次公開發佈](https://docs.raydium.io/zh-Hant/reference/changelog/2026-04-26-initial-publication.md) |

2026-05-07 快照之前的發佈版本未歸檔。

## 版本詳細資訊

除 2026-05-07 外的所有版本都使用 `anchor-cli 1.0.2`（`anchor idl build`）從所列的原始碼提交生成。「建置所用版本」列是該提交的 `anchor-lang` 版本。每個版本在發佈前都對照其更新日誌條目檢查。

> [accordion] 2026-10-30 — 原始碼 3d69122
>
> | | |
> | - | - |
> | 原始碼提交 | `3d69122` — "add initialize v2 instruction (#83)" |
> | 建置所用版本 | `anchor-lang =1.0.2` |
> | 內容 | 21 個指令、6 個帳戶、2 個事件、16 個錯誤（`6000`–`6015`） |
> | `raydium_cp_swap.json` SHA-256 | `e970d765469559c62089c0cf0bdceb6524c36eb9fd1ae7244d1ef85dd3afcaac` |
> | `raydium_cp_swap.ts` SHA-256 | `18852e4953cb18c29f4b938f9d38d0d6151985e4d47ce87e5155479158d78d5b` |
>
> 相對 2026-09-19 的變更：**新增指令** `initialize_v2`。其他內容未改變。

> [accordion] 2026-09-19 — 原始碼 b3187ae
>
> | | |
> | - | - |
> | 原始碼提交 | `b3187ae` — "Feat/creator fee share (#80)" |
> | 建置所用版本 | `anchor-lang =1.0.2` |
> | 內容 | 20 個指令、6 個帳戶、2 個事件、16 個錯誤（`6000`–`6015`） |
> | `raydium_cp_swap.json` SHA-256 | `d86fe11ffc719fee9832f78a1c7374452ee9ebe2c63d51c0b5e5cb383a8fcfdb` |
> | `raydium_cp_swap.ts` SHA-256 | `1e6a0027f271962c24a61c2a64accf34d202f45b52537ef1e1af955114be16fe` |
>
> 相對 2026-09-09 的變更：**新增指令** `create_creator_fee_share`、`close_creator_fee_share`。**新增帳戶** `CreatorFeeShare`。**帳戶清單改變** `collect_creator_fee`、`collect_creator_fee_permissionless`。**型別改變** `AmmConfig`（新增 `creator_fee_share_rate`）。

> [accordion] 2026-09-09 — 原始碼 59fb845
>
> | | |
> | - | - |
> | 原始碼提交 | `59fb845` — "Chore/upgrade anchor (#77)" |
> | 建置所用版本 | `anchor-lang =1.0.2` |
> | 內容 | 18 個指令、5 個帳戶、2 個事件、16 個錯誤（`6000`–`6015`） |
> | `raydium_cp_swap.json` SHA-256 | `5d0bf4ddf92a6c2ede6e10fc56e01fde22527131e5e5779d7fb1183325009728` |
> | `raydium_cp_swap.ts` SHA-256 | `a8c03c2337295dba37cbcab3eb0105f431e33a657740c16c7c92fff03fd37145` |
>
> 相對 2026-08-17 的變更：**新增指令** `collect_excess_lamports`。**帳戶清單改變** `close_permission_pda`。**附加錯誤** `6015` `LamportsCalculateError`。

> [accordion] 2026-08-17 — 原始碼 244e124
>
> | | |
> | - | - |
> | 原始碼提交 | `244e124` — "Feat/permissionless collect creator fee (#76)" |
> | 建置所用版本 | `anchor-lang 0.32.1` |
> | 內容 | 17 個指令、5 個帳戶、2 個事件、15 個錯誤（`6000`–`6014`） |
> | `raydium_cp_swap.json` SHA-256 | `3f4f8c06ff06e013c7f909e841ef4a49cbcf93d26fb7ac324e72c766fc6bb80a` |
> | `raydium_cp_swap.ts` SHA-256 | `cfff301c51442fe833367f811d4122d104287450f1ced0c70f6d5859738fd5d4` |
>
> 相對 2026-06-12 的變更：**新增指令** `collect_creator_fee_permissionless`。**帳戶清單改變** `create_permission_pda`。

> [accordion] 2026-06-12 — 原始碼 78f254e
>
> | | |
> | - | - |
> | 原始碼提交 | `78f254e` — "Feat: support associated mint (#71)", 2026-06-12 |
> | 建置所用版本 | `anchor-lang 0.32.1` |
> | 內容 | 16 個指令、5 個帳戶、2 個事件、15 個錯誤（`6000`–`6014`） |
> | `raydium_cp_swap.json` SHA-256 | `f4a187529f771be8db55b844829297feeb07b3f319ec825ed50409d365809eca` |
> | `raydium_cp_swap.ts` SHA-256 | `1b7407991b254366f7436470cfb12c1d646b486ad168124d73fa25343de1838c` |
>
> 相對 2026-05-07 的變更：**新增指令** `create_support_mint_associated`、`close_support_mint_associated`。**新增帳戶** `SupportMintAssociated`。
>
> 此發佈版本沒有更新日誌條目，因此其主網日期未記錄。此版本以其提交日期為鍵。

> [accordion] 2026-05-07 — 匯入的快照
>
> | | |
> | - | - |
> | 來源 | 從前公開 IDL 儲存庫（`raydium-idl`）原樣匯入，提交 `e7e0c96`，2026-05-07 |
> | 對應原始碼 | `609780f` — "update anchor to version 0.32.1 (#65)"。該提交的建置具有完全相同的介面（文件註解除外）。 |
> | TS 型別 | 使用 `anchor-cli 1.0.2` 的 `anchor idl type` 從 JSON 生成 |
> | 內容 | 14 個指令、4 個帳戶、2 個事件、15 個錯誤（`6000`–`6014`） |
> | `raydium_cp_swap.json` SHA-256 | `1202f6dc8e1c3216598f2ad5c620b9aa8c64ac584563fafed68125c27fb6df81` |
> | `raydium_cp_swap.ts` SHA-256 | `dea2a57c8783cdd3ff369423137e9ec007bc190eeb73ac52fb78820cb4e54810` |

> [!NOTE]
>
> CPMM 的鏈上 IDL 位於程式元資料程式中，而不是舊版 `anchor:idl` 帳戶 — 參見 [`sdk-api/anchor-idl`](https://docs.raydium.io/zh-Hant/sdk-api/anchor-idl#where-to-find-them)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.