@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/src/index.ts
CHANGED
package/src/sdk.ts
CHANGED
|
@@ -854,7 +854,10 @@ export class PumpSdk {
|
|
|
854
854
|
/**
|
|
855
855
|
* Updates the fee shares for a token's creator fee distribution.
|
|
856
856
|
*
|
|
857
|
-
*
|
|
857
|
+
* Important:
|
|
858
|
+
* - Reward split updates are effectively one-time. Treat this as a single allowed
|
|
859
|
+
* modification and verify the final split before submitting.
|
|
860
|
+
*
|
|
858
861
|
* @param params.authority - The current authority that can modify the fee sharing config
|
|
859
862
|
* @param params.mint - The mint address of the token
|
|
860
863
|
* @param params.curShareholders - Array of current shareholders
|
|
@@ -1137,6 +1140,10 @@ export class PumpSdk {
|
|
|
1137
1140
|
* Wrapper around `updateSharingConfig` that resolves social recipients and
|
|
1138
1141
|
* initializes any missing social recipient PDAs before updating fee shares.
|
|
1139
1142
|
*
|
|
1143
|
+
* Important:
|
|
1144
|
+
* - Reward split updates are effectively one-time. Treat this call as a single
|
|
1145
|
+
* allowed modification and verify the final split before submitting.
|
|
1146
|
+
*
|
|
1140
1147
|
* Requirements:
|
|
1141
1148
|
* - `authority` must sign the transaction.
|
|
1142
1149
|
*
|
|
@@ -1294,3 +1301,30 @@ export function isCreatorUsingSharingConfig({
|
|
|
1294
1301
|
}): boolean {
|
|
1295
1302
|
return feeSharingConfigPda(mint).equals(creator);
|
|
1296
1303
|
}
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* Checks whether a sharing config reward split is editable.
|
|
1307
|
+
*
|
|
1308
|
+
* Reward split is NOT editable when:
|
|
1309
|
+
* - sharing config version is 1
|
|
1310
|
+
* - sharing config version is 2 but the admin authority has been revoked
|
|
1311
|
+
*
|
|
1312
|
+
* @param params - Parameters for editability check
|
|
1313
|
+
* @param params.sharingConfig - Sharing config account state
|
|
1314
|
+
* @returns true if reward split can be edited, false otherwise
|
|
1315
|
+
*/
|
|
1316
|
+
export function isSharingConfigEditable({
|
|
1317
|
+
sharingConfig,
|
|
1318
|
+
}: {
|
|
1319
|
+
sharingConfig: SharingConfig;
|
|
1320
|
+
}): boolean {
|
|
1321
|
+
if (sharingConfig.version === 1) {
|
|
1322
|
+
return false;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
if (sharingConfig.version === 2 && sharingConfig.adminRevoked) {
|
|
1326
|
+
return false;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
return true;
|
|
1330
|
+
}
|