@pump-fun/pump-sdk 1.30.0-devnet.1 → 1.31.0-devnet.1
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 +1 -2
- package/dist/esm/index.js +7 -3
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +7 -3
- package/package.json +1 -1
- package/src/bondingCurve.ts +1 -0
- package/src/onlineSdk.ts +3 -0
- package/src/sdk.ts +4 -4
- package/src/state.ts +1 -0
package/README.md
CHANGED
|
@@ -186,8 +186,7 @@ await PUMP_SDK.updateSharingConfigWithSocialRecipients({
|
|
|
186
186
|
});
|
|
187
187
|
|
|
188
188
|
// 2) Create sharing config + set social recipients in one flow
|
|
189
|
-
// - Use pool for graduated coins
|
|
190
|
-
// - Use null for ungraduated coins
|
|
189
|
+
// - Use pool for graduated coins or null for ungraduated
|
|
191
190
|
await PUMP_SDK.createSharingConfigWithSocialRecipients({
|
|
192
191
|
creator,
|
|
193
192
|
mint,
|
package/dist/esm/index.js
CHANGED
|
@@ -8995,7 +8995,8 @@ function newBondingCurve(global) {
|
|
|
8995
8995
|
tokenTotalSupply: global.tokenTotalSupply,
|
|
8996
8996
|
complete: false,
|
|
8997
8997
|
creator: PublicKey2.default,
|
|
8998
|
-
isMayhemMode: global.mayhemModeEnabled
|
|
8998
|
+
isMayhemMode: global.mayhemModeEnabled,
|
|
8999
|
+
isCashbackCoin: false
|
|
8999
9000
|
};
|
|
9000
9001
|
}
|
|
9001
9002
|
function getBuySolAmountFromTokenAmountQuote({
|
|
@@ -19523,6 +19524,9 @@ var OnlinePumpSdk = class {
|
|
|
19523
19524
|
async fetchFeeConfig() {
|
|
19524
19525
|
return await this.pumpProgram.account.feeConfig.fetch(PUMP_FEE_CONFIG_PDA);
|
|
19525
19526
|
}
|
|
19527
|
+
/**
|
|
19528
|
+
* @deprecated use PumpSdk.decodeBondingCurveNullable instead.
|
|
19529
|
+
*/
|
|
19526
19530
|
async fetchBondingCurve(mint) {
|
|
19527
19531
|
return await this.pumpProgram.account.bondingCurve.fetch(
|
|
19528
19532
|
bondingCurvePda(mint)
|
|
@@ -20008,8 +20012,8 @@ var PumpSdk = class {
|
|
|
20008
20012
|
decodeBondingCurveNullable(accountInfo) {
|
|
20009
20013
|
try {
|
|
20010
20014
|
const data = accountInfo.data;
|
|
20011
|
-
if (data.length <
|
|
20012
|
-
const padded = Buffer.alloc(
|
|
20015
|
+
if (data.length < 83) {
|
|
20016
|
+
const padded = Buffer.alloc(83);
|
|
20013
20017
|
data.copy(padded);
|
|
20014
20018
|
accountInfo = {
|
|
20015
20019
|
...accountInfo,
|
package/dist/index.d.mts
CHANGED
|
@@ -16856,6 +16856,7 @@ interface BondingCurve {
|
|
|
16856
16856
|
complete: boolean;
|
|
16857
16857
|
creator: PublicKey;
|
|
16858
16858
|
isMayhemMode: boolean;
|
|
16859
|
+
isCashbackCoin: boolean;
|
|
16859
16860
|
}
|
|
16860
16861
|
interface GlobalVolumeAccumulator {
|
|
16861
16862
|
startTime: BN;
|
|
@@ -22936,6 +22937,9 @@ declare class OnlinePumpSdk {
|
|
|
22936
22937
|
constructor(connection: Connection);
|
|
22937
22938
|
fetchGlobal(): Promise<Global>;
|
|
22938
22939
|
fetchFeeConfig(): Promise<FeeConfig>;
|
|
22940
|
+
/**
|
|
22941
|
+
* @deprecated use PumpSdk.decodeBondingCurveNullable instead.
|
|
22942
|
+
*/
|
|
22939
22943
|
fetchBondingCurve(mint: PublicKeyInitData): Promise<BondingCurve>;
|
|
22940
22944
|
fetchBuyState(mint: PublicKey, user: PublicKey, tokenProgram?: PublicKey): Promise<{
|
|
22941
22945
|
bondingCurveAccountInfo: _solana_web3_js.AccountInfo<Buffer<ArrayBufferLike>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -16856,6 +16856,7 @@ interface BondingCurve {
|
|
|
16856
16856
|
complete: boolean;
|
|
16857
16857
|
creator: PublicKey;
|
|
16858
16858
|
isMayhemMode: boolean;
|
|
16859
|
+
isCashbackCoin: boolean;
|
|
16859
16860
|
}
|
|
16860
16861
|
interface GlobalVolumeAccumulator {
|
|
16861
16862
|
startTime: BN;
|
|
@@ -22936,6 +22937,9 @@ declare class OnlinePumpSdk {
|
|
|
22936
22937
|
constructor(connection: Connection);
|
|
22937
22938
|
fetchGlobal(): Promise<Global>;
|
|
22938
22939
|
fetchFeeConfig(): Promise<FeeConfig>;
|
|
22940
|
+
/**
|
|
22941
|
+
* @deprecated use PumpSdk.decodeBondingCurveNullable instead.
|
|
22942
|
+
*/
|
|
22939
22943
|
fetchBondingCurve(mint: PublicKeyInitData): Promise<BondingCurve>;
|
|
22940
22944
|
fetchBuyState(mint: PublicKey, user: PublicKey, tokenProgram?: PublicKey): Promise<{
|
|
22941
22945
|
bondingCurveAccountInfo: _solana_web3_js.AccountInfo<Buffer<ArrayBufferLike>>;
|
package/dist/index.js
CHANGED
|
@@ -9061,7 +9061,8 @@ function newBondingCurve(global) {
|
|
|
9061
9061
|
tokenTotalSupply: global.tokenTotalSupply,
|
|
9062
9062
|
complete: false,
|
|
9063
9063
|
creator: import_web32.PublicKey.default,
|
|
9064
|
-
isMayhemMode: global.mayhemModeEnabled
|
|
9064
|
+
isMayhemMode: global.mayhemModeEnabled,
|
|
9065
|
+
isCashbackCoin: false
|
|
9065
9066
|
};
|
|
9066
9067
|
}
|
|
9067
9068
|
function getBuySolAmountFromTokenAmountQuote({
|
|
@@ -19554,6 +19555,9 @@ var OnlinePumpSdk = class {
|
|
|
19554
19555
|
async fetchFeeConfig() {
|
|
19555
19556
|
return await this.pumpProgram.account.feeConfig.fetch(PUMP_FEE_CONFIG_PDA);
|
|
19556
19557
|
}
|
|
19558
|
+
/**
|
|
19559
|
+
* @deprecated use PumpSdk.decodeBondingCurveNullable instead.
|
|
19560
|
+
*/
|
|
19557
19561
|
async fetchBondingCurve(mint) {
|
|
19558
19562
|
return await this.pumpProgram.account.bondingCurve.fetch(
|
|
19559
19563
|
bondingCurvePda(mint)
|
|
@@ -20039,8 +20043,8 @@ var PumpSdk = class {
|
|
|
20039
20043
|
decodeBondingCurveNullable(accountInfo) {
|
|
20040
20044
|
try {
|
|
20041
20045
|
const data = accountInfo.data;
|
|
20042
|
-
if (data.length <
|
|
20043
|
-
const padded = Buffer.alloc(
|
|
20046
|
+
if (data.length < 83) {
|
|
20047
|
+
const padded = Buffer.alloc(83);
|
|
20044
20048
|
data.copy(padded);
|
|
20045
20049
|
accountInfo = {
|
|
20046
20050
|
...accountInfo,
|
package/package.json
CHANGED
package/src/bondingCurve.ts
CHANGED
package/src/onlineSdk.ts
CHANGED
|
@@ -80,6 +80,9 @@ export class OnlinePumpSdk {
|
|
|
80
80
|
return await this.pumpProgram.account.feeConfig.fetch(PUMP_FEE_CONFIG_PDA);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated use PumpSdk.decodeBondingCurveNullable instead.
|
|
85
|
+
*/
|
|
83
86
|
async fetchBondingCurve(mint: PublicKeyInitData): Promise<BondingCurve> {
|
|
84
87
|
return await this.pumpProgram.account.bondingCurve.fetch(
|
|
85
88
|
bondingCurvePda(mint),
|
package/src/sdk.ts
CHANGED
|
@@ -45,8 +45,8 @@ import {
|
|
|
45
45
|
pumpPoolAuthorityPda,
|
|
46
46
|
feeSharingConfigPda,
|
|
47
47
|
userVolumeAccumulatorPda,
|
|
48
|
-
socialFeePda,
|
|
49
48
|
bondingCurveV2Pda,
|
|
49
|
+
socialFeePda,
|
|
50
50
|
} from "./pda";
|
|
51
51
|
import {
|
|
52
52
|
BondingCurve,
|
|
@@ -152,9 +152,9 @@ export class PumpSdk {
|
|
|
152
152
|
): BondingCurve | null {
|
|
153
153
|
try {
|
|
154
154
|
const data = accountInfo.data;
|
|
155
|
-
// Ensure buffer is at least
|
|
156
|
-
if (data.length <
|
|
157
|
-
const padded = Buffer.alloc(
|
|
155
|
+
// Ensure buffer is at least 83 bytes
|
|
156
|
+
if (data.length < 83) {
|
|
157
|
+
const padded = Buffer.alloc(83);
|
|
158
158
|
data.copy(padded);
|
|
159
159
|
accountInfo = {
|
|
160
160
|
...accountInfo,
|