@pump-fun/pump-sdk 1.31.0 → 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- package/dist/esm/index.js +368 -285
- package/dist/index.d.mts +1973 -1353
- package/dist/index.d.ts +1973 -1353
- package/dist/index.js +368 -285
- package/package.json +1 -1
- package/src/idl/pump_fees.json +348 -284
- package/src/idl/pump_fees.ts +2496 -1897
- package/src/index.ts +1 -0
- package/src/sdk.ts +35 -1
package/README.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
Official Pump program SDK
|
|
4
4
|
|
|
5
|
+
# Updates
|
|
6
|
+
|
|
7
|
+
## One-Time Creator Reward Distribution Policy
|
|
8
|
+
|
|
9
|
+
This update only affects fee-sharing configuration. Trading instructions are unchanged and do not require an upgrade.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
**TLDR:** After the first configuration, reward distribution is locked and cannot be changed.
|
|
13
|
+
|
|
14
|
+
What changed:
|
|
15
|
+
- Reward distribution can be configured **only once**.
|
|
16
|
+
- You can configure it using either `updateFeeShares` or `updateSharingConfigWithSocialRecipients`.
|
|
17
|
+
- After it is configured, it is **locked** and cannot be changed again.
|
|
18
|
+
|
|
19
|
+
What did **not** change:
|
|
20
|
+
- Buy and sell instructions are unchanged.
|
|
21
|
+
|
|
22
|
+
Migration/compatibility notes:
|
|
23
|
+
- Reward distributions created before this policy are treated as final (locked).
|
|
24
|
+
- `RevokeFeeSharingAuthority` and `TransferFeeSharingAuthority` are no longer supported.
|
|
25
|
+
- If you are unsure whether a reward distribution is still editable, call `isSharingConfigEditable`.
|
|
26
|
+
|
|
27
|
+
```Typescript
|
|
28
|
+
import { isSharingConfigEditable } from "@pump-fun/pump-sdk";
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
# Usage
|
|
32
|
+
|
|
5
33
|
```Typescript
|
|
6
34
|
const connection = new Connection(
|
|
7
35
|
"https://api.devnet.solana.com",
|
|
@@ -106,6 +134,8 @@ const instructions = await sdk.collectCoinCreatorFeeInstructions(user);
|
|
|
106
134
|
|
|
107
135
|
Fee sharing allows token creators to set up fee distribution to multiple shareholders. The `OnlinePumpSdk` provides methods to check distributable fees and distribute them.
|
|
108
136
|
|
|
137
|
+
> **Important:** Reward split can be setup once and once only by calling either `updateFeeShares` or `updateSharingConfigWithSocialRecipients`. Double-check final recipients and `shareBps` before submitting.
|
|
138
|
+
|
|
109
139
|
```Typescript
|
|
110
140
|
import { OnlinePumpSdk } from "@pump-fun/pump-sdk";
|
|
111
141
|
|
|
@@ -202,6 +232,10 @@ Method selection:
|
|
|
202
232
|
- `updateSharingConfigWithSocialRecipients`: use when sharing config already exists.
|
|
203
233
|
- `createSharingConfigWithSocialRecipients`: use for first-time setup (creates config, then updates shares).
|
|
204
234
|
|
|
235
|
+
Important:
|
|
236
|
+
- Social fee PDA creation is a one-time initialization per `(userId, platform)` and can be reused across coins once created.
|
|
237
|
+
- Reward split can be setup once and once only by calling either `updateFeeShares` or `updateSharingConfigWithSocialRecipients`. Double-check final recipients and `shareBps` before submitting.
|
|
238
|
+
|
|
205
239
|
✅ Checklist
|
|
206
240
|
|
|
207
241
|
- [ ] The GitHub user must be able to log in to claim fees. **GitHub organizations are not supported** for social fee recipients; adding an organization account can result in fees being permanently lost.
|