@pump-fun/pump-sdk 1.28.0 → 1.29.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/dist/esm/index.js +26 -2
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +26 -2
- package/package.json +1 -1
- package/src/pda.ts +7 -0
- package/src/sdk.ts +20 -1
package/dist/esm/index.js
CHANGED
|
@@ -20378,7 +20378,13 @@ var PumpSdk = class {
|
|
|
20378
20378
|
user,
|
|
20379
20379
|
creatorVault: creatorVaultPda(creator),
|
|
20380
20380
|
tokenProgram
|
|
20381
|
-
}).
|
|
20381
|
+
}).remainingAccounts([
|
|
20382
|
+
{
|
|
20383
|
+
pubkey: bondingCurveV2Pda(mint),
|
|
20384
|
+
isWritable: false,
|
|
20385
|
+
isSigner: false
|
|
20386
|
+
}
|
|
20387
|
+
]).instruction();
|
|
20382
20388
|
}
|
|
20383
20389
|
async getSellInstructionRaw({
|
|
20384
20390
|
user,
|
|
@@ -20430,8 +20436,19 @@ var PumpSdk = class {
|
|
|
20430
20436
|
pubkey: userVolumeAccumulator,
|
|
20431
20437
|
isWritable: true,
|
|
20432
20438
|
isSigner: false
|
|
20439
|
+
},
|
|
20440
|
+
{
|
|
20441
|
+
pubkey: bondingCurveV2Pda(mint),
|
|
20442
|
+
isWritable: false,
|
|
20443
|
+
isSigner: false
|
|
20444
|
+
}
|
|
20445
|
+
] : [
|
|
20446
|
+
{
|
|
20447
|
+
pubkey: bondingCurveV2Pda(mint),
|
|
20448
|
+
isWritable: false,
|
|
20449
|
+
isSigner: false
|
|
20433
20450
|
}
|
|
20434
|
-
]
|
|
20451
|
+
]
|
|
20435
20452
|
).instruction();
|
|
20436
20453
|
}
|
|
20437
20454
|
/**
|
|
@@ -20628,6 +20645,12 @@ function bondingCurvePda(mint) {
|
|
|
20628
20645
|
new PublicKey5(mint).toBuffer()
|
|
20629
20646
|
]);
|
|
20630
20647
|
}
|
|
20648
|
+
function bondingCurveV2Pda(mint) {
|
|
20649
|
+
return pumpPda([
|
|
20650
|
+
import_buffer.Buffer.from("bonding-curve-v2"),
|
|
20651
|
+
new PublicKey5(mint).toBuffer()
|
|
20652
|
+
]);
|
|
20653
|
+
}
|
|
20631
20654
|
function creatorVaultPda(creator) {
|
|
20632
20655
|
return pumpPda([import_buffer.Buffer.from("creator-vault"), creator.toBuffer()]);
|
|
20633
20656
|
}
|
|
@@ -20709,6 +20732,7 @@ export {
|
|
|
20709
20732
|
ammCreatorVaultPda,
|
|
20710
20733
|
bondingCurveMarketCap,
|
|
20711
20734
|
bondingCurvePda,
|
|
20735
|
+
bondingCurveV2Pda,
|
|
20712
20736
|
canonicalPumpPoolPda,
|
|
20713
20737
|
creatorVaultPda,
|
|
20714
20738
|
currentDayTokens,
|
package/dist/index.d.mts
CHANGED
|
@@ -16944,6 +16944,7 @@ declare const PUMP_AMM_EVENT_AUTHORITY_PDA: PublicKey;
|
|
|
16944
16944
|
declare const PUMP_FEE_EVENT_AUTHORITY_PDA: PublicKey;
|
|
16945
16945
|
declare function getEventAuthorityPda(programId: PublicKey): PublicKey;
|
|
16946
16946
|
declare function bondingCurvePda(mint: PublicKeyInitData): PublicKey;
|
|
16947
|
+
declare function bondingCurveV2Pda(mint: PublicKeyInitData): PublicKey;
|
|
16947
16948
|
declare function creatorVaultPda(creator: PublicKey): PublicKey;
|
|
16948
16949
|
declare function pumpPoolAuthorityPda(mint: PublicKey): PublicKey;
|
|
16949
16950
|
declare const CANONICAL_POOL_INDEX = 0;
|
|
@@ -22937,4 +22938,4 @@ declare class PoolRequiredForGraduatedError extends Error {
|
|
|
22937
22938
|
constructor();
|
|
22938
22939
|
}
|
|
22939
22940
|
|
|
22940
|
-
export { AMM_GLOBAL_PDA, AMM_GLOBAL_VOLUME_ACCUMULATOR_PDA, BONDING_CURVE_NEW_SIZE, type BondingCurve, CANONICAL_POOL_INDEX, type DistributeCreatorFeeResult, type DistributeCreatorFeesEvent, DuplicateShareholderError, type FeeConfig, GLOBAL_PDA, GLOBAL_VOLUME_ACCUMULATOR_PDA, type Global, type GlobalVolumeAccumulator, InvalidShareTotalError, MAYHEM_PROGRAM_ID, type MinimumDistributableFeeEvent, type MinimumDistributableFeeResult, NoShareholdersError, OnlinePumpSdk, PUMP_AMM_EVENT_AUTHORITY_PDA, PUMP_AMM_PROGRAM_ID, PUMP_EVENT_AUTHORITY_PDA, PUMP_FEE_CONFIG_PDA, PUMP_FEE_EVENT_AUTHORITY_PDA, PUMP_FEE_PROGRAM_ID, PUMP_PROGRAM_ID, PUMP_SDK, PoolRequiredForGraduatedError, type Pump, type PumpFees, PumpSdk, ShareCalculationOverflowError, type Shareholder, type SharingConfig, TooManyShareholdersError, type UserVolumeAccumulator, type UserVolumeAccumulatorTotalStats, ZeroShareError, ammCreatorVaultPda, bondingCurveMarketCap, bondingCurvePda, canonicalPumpPoolPda, creatorVaultPda, currentDayTokens, feeSharingConfigPda, getBuySolAmountFromTokenAmount, getBuyTokenAmountFromSolAmount, getEventAuthorityPda, getGlobalParamsPda, getMayhemStatePda, getPumpAmmProgram, getPumpFeeProgram, getPumpProgram, getSellSolAmountFromTokenAmount, getSolVaultPda, getTokenVaultPda, isCreatorUsingSharingConfig, newBondingCurve, pump as pumpIdl, pumpPoolAuthorityPda, totalUnclaimedTokens, userVolumeAccumulatorPda };
|
|
22941
|
+
export { AMM_GLOBAL_PDA, AMM_GLOBAL_VOLUME_ACCUMULATOR_PDA, BONDING_CURVE_NEW_SIZE, type BondingCurve, CANONICAL_POOL_INDEX, type DistributeCreatorFeeResult, type DistributeCreatorFeesEvent, DuplicateShareholderError, type FeeConfig, GLOBAL_PDA, GLOBAL_VOLUME_ACCUMULATOR_PDA, type Global, type GlobalVolumeAccumulator, InvalidShareTotalError, MAYHEM_PROGRAM_ID, type MinimumDistributableFeeEvent, type MinimumDistributableFeeResult, NoShareholdersError, OnlinePumpSdk, PUMP_AMM_EVENT_AUTHORITY_PDA, PUMP_AMM_PROGRAM_ID, PUMP_EVENT_AUTHORITY_PDA, PUMP_FEE_CONFIG_PDA, PUMP_FEE_EVENT_AUTHORITY_PDA, PUMP_FEE_PROGRAM_ID, PUMP_PROGRAM_ID, PUMP_SDK, PoolRequiredForGraduatedError, type Pump, type PumpFees, PumpSdk, ShareCalculationOverflowError, type Shareholder, type SharingConfig, TooManyShareholdersError, type UserVolumeAccumulator, type UserVolumeAccumulatorTotalStats, ZeroShareError, ammCreatorVaultPda, bondingCurveMarketCap, bondingCurvePda, bondingCurveV2Pda, canonicalPumpPoolPda, creatorVaultPda, currentDayTokens, feeSharingConfigPda, getBuySolAmountFromTokenAmount, getBuyTokenAmountFromSolAmount, getEventAuthorityPda, getGlobalParamsPda, getMayhemStatePda, getPumpAmmProgram, getPumpFeeProgram, getPumpProgram, getSellSolAmountFromTokenAmount, getSolVaultPda, getTokenVaultPda, isCreatorUsingSharingConfig, newBondingCurve, pump as pumpIdl, pumpPoolAuthorityPda, totalUnclaimedTokens, userVolumeAccumulatorPda };
|
package/dist/index.d.ts
CHANGED
|
@@ -16944,6 +16944,7 @@ declare const PUMP_AMM_EVENT_AUTHORITY_PDA: PublicKey;
|
|
|
16944
16944
|
declare const PUMP_FEE_EVENT_AUTHORITY_PDA: PublicKey;
|
|
16945
16945
|
declare function getEventAuthorityPda(programId: PublicKey): PublicKey;
|
|
16946
16946
|
declare function bondingCurvePda(mint: PublicKeyInitData): PublicKey;
|
|
16947
|
+
declare function bondingCurveV2Pda(mint: PublicKeyInitData): PublicKey;
|
|
16947
16948
|
declare function creatorVaultPda(creator: PublicKey): PublicKey;
|
|
16948
16949
|
declare function pumpPoolAuthorityPda(mint: PublicKey): PublicKey;
|
|
16949
16950
|
declare const CANONICAL_POOL_INDEX = 0;
|
|
@@ -22937,4 +22938,4 @@ declare class PoolRequiredForGraduatedError extends Error {
|
|
|
22937
22938
|
constructor();
|
|
22938
22939
|
}
|
|
22939
22940
|
|
|
22940
|
-
export { AMM_GLOBAL_PDA, AMM_GLOBAL_VOLUME_ACCUMULATOR_PDA, BONDING_CURVE_NEW_SIZE, type BondingCurve, CANONICAL_POOL_INDEX, type DistributeCreatorFeeResult, type DistributeCreatorFeesEvent, DuplicateShareholderError, type FeeConfig, GLOBAL_PDA, GLOBAL_VOLUME_ACCUMULATOR_PDA, type Global, type GlobalVolumeAccumulator, InvalidShareTotalError, MAYHEM_PROGRAM_ID, type MinimumDistributableFeeEvent, type MinimumDistributableFeeResult, NoShareholdersError, OnlinePumpSdk, PUMP_AMM_EVENT_AUTHORITY_PDA, PUMP_AMM_PROGRAM_ID, PUMP_EVENT_AUTHORITY_PDA, PUMP_FEE_CONFIG_PDA, PUMP_FEE_EVENT_AUTHORITY_PDA, PUMP_FEE_PROGRAM_ID, PUMP_PROGRAM_ID, PUMP_SDK, PoolRequiredForGraduatedError, type Pump, type PumpFees, PumpSdk, ShareCalculationOverflowError, type Shareholder, type SharingConfig, TooManyShareholdersError, type UserVolumeAccumulator, type UserVolumeAccumulatorTotalStats, ZeroShareError, ammCreatorVaultPda, bondingCurveMarketCap, bondingCurvePda, canonicalPumpPoolPda, creatorVaultPda, currentDayTokens, feeSharingConfigPda, getBuySolAmountFromTokenAmount, getBuyTokenAmountFromSolAmount, getEventAuthorityPda, getGlobalParamsPda, getMayhemStatePda, getPumpAmmProgram, getPumpFeeProgram, getPumpProgram, getSellSolAmountFromTokenAmount, getSolVaultPda, getTokenVaultPda, isCreatorUsingSharingConfig, newBondingCurve, pump as pumpIdl, pumpPoolAuthorityPda, totalUnclaimedTokens, userVolumeAccumulatorPda };
|
|
22941
|
+
export { AMM_GLOBAL_PDA, AMM_GLOBAL_VOLUME_ACCUMULATOR_PDA, BONDING_CURVE_NEW_SIZE, type BondingCurve, CANONICAL_POOL_INDEX, type DistributeCreatorFeeResult, type DistributeCreatorFeesEvent, DuplicateShareholderError, type FeeConfig, GLOBAL_PDA, GLOBAL_VOLUME_ACCUMULATOR_PDA, type Global, type GlobalVolumeAccumulator, InvalidShareTotalError, MAYHEM_PROGRAM_ID, type MinimumDistributableFeeEvent, type MinimumDistributableFeeResult, NoShareholdersError, OnlinePumpSdk, PUMP_AMM_EVENT_AUTHORITY_PDA, PUMP_AMM_PROGRAM_ID, PUMP_EVENT_AUTHORITY_PDA, PUMP_FEE_CONFIG_PDA, PUMP_FEE_EVENT_AUTHORITY_PDA, PUMP_FEE_PROGRAM_ID, PUMP_PROGRAM_ID, PUMP_SDK, PoolRequiredForGraduatedError, type Pump, type PumpFees, PumpSdk, ShareCalculationOverflowError, type Shareholder, type SharingConfig, TooManyShareholdersError, type UserVolumeAccumulator, type UserVolumeAccumulatorTotalStats, ZeroShareError, ammCreatorVaultPda, bondingCurveMarketCap, bondingCurvePda, bondingCurveV2Pda, canonicalPumpPoolPda, creatorVaultPda, currentDayTokens, feeSharingConfigPda, getBuySolAmountFromTokenAmount, getBuyTokenAmountFromSolAmount, getEventAuthorityPda, getGlobalParamsPda, getMayhemStatePda, getPumpAmmProgram, getPumpFeeProgram, getPumpProgram, getSellSolAmountFromTokenAmount, getSolVaultPda, getTokenVaultPda, isCreatorUsingSharingConfig, newBondingCurve, pump as pumpIdl, pumpPoolAuthorityPda, totalUnclaimedTokens, userVolumeAccumulatorPda };
|
package/dist/index.js
CHANGED
|
@@ -1837,6 +1837,7 @@ __export(index_exports, {
|
|
|
1837
1837
|
ammCreatorVaultPda: () => ammCreatorVaultPda,
|
|
1838
1838
|
bondingCurveMarketCap: () => bondingCurveMarketCap,
|
|
1839
1839
|
bondingCurvePda: () => bondingCurvePda,
|
|
1840
|
+
bondingCurveV2Pda: () => bondingCurveV2Pda,
|
|
1840
1841
|
canonicalPumpPoolPda: () => canonicalPumpPoolPda,
|
|
1841
1842
|
creatorVaultPda: () => creatorVaultPda,
|
|
1842
1843
|
currentDayTokens: () => currentDayTokens,
|
|
@@ -20403,7 +20404,13 @@ var PumpSdk = class {
|
|
|
20403
20404
|
user,
|
|
20404
20405
|
creatorVault: creatorVaultPda(creator),
|
|
20405
20406
|
tokenProgram
|
|
20406
|
-
}).
|
|
20407
|
+
}).remainingAccounts([
|
|
20408
|
+
{
|
|
20409
|
+
pubkey: bondingCurveV2Pda(mint),
|
|
20410
|
+
isWritable: false,
|
|
20411
|
+
isSigner: false
|
|
20412
|
+
}
|
|
20413
|
+
]).instruction();
|
|
20407
20414
|
}
|
|
20408
20415
|
async getSellInstructionRaw({
|
|
20409
20416
|
user,
|
|
@@ -20455,8 +20462,19 @@ var PumpSdk = class {
|
|
|
20455
20462
|
pubkey: userVolumeAccumulator,
|
|
20456
20463
|
isWritable: true,
|
|
20457
20464
|
isSigner: false
|
|
20465
|
+
},
|
|
20466
|
+
{
|
|
20467
|
+
pubkey: bondingCurveV2Pda(mint),
|
|
20468
|
+
isWritable: false,
|
|
20469
|
+
isSigner: false
|
|
20470
|
+
}
|
|
20471
|
+
] : [
|
|
20472
|
+
{
|
|
20473
|
+
pubkey: bondingCurveV2Pda(mint),
|
|
20474
|
+
isWritable: false,
|
|
20475
|
+
isSigner: false
|
|
20458
20476
|
}
|
|
20459
|
-
]
|
|
20477
|
+
]
|
|
20460
20478
|
).instruction();
|
|
20461
20479
|
}
|
|
20462
20480
|
/**
|
|
@@ -20653,6 +20671,12 @@ function bondingCurvePda(mint) {
|
|
|
20653
20671
|
new import_web35.PublicKey(mint).toBuffer()
|
|
20654
20672
|
]);
|
|
20655
20673
|
}
|
|
20674
|
+
function bondingCurveV2Pda(mint) {
|
|
20675
|
+
return (0, import_pump_swap_sdk3.pumpPda)([
|
|
20676
|
+
import_buffer.Buffer.from("bonding-curve-v2"),
|
|
20677
|
+
new import_web35.PublicKey(mint).toBuffer()
|
|
20678
|
+
]);
|
|
20679
|
+
}
|
|
20656
20680
|
function creatorVaultPda(creator) {
|
|
20657
20681
|
return (0, import_pump_swap_sdk3.pumpPda)([import_buffer.Buffer.from("creator-vault"), creator.toBuffer()]);
|
|
20658
20682
|
}
|
package/package.json
CHANGED
package/src/pda.ts
CHANGED
|
@@ -56,6 +56,13 @@ export function bondingCurvePda(mint: PublicKeyInitData): PublicKey {
|
|
|
56
56
|
]);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
export function bondingCurveV2Pda(mint: PublicKeyInitData): PublicKey {
|
|
60
|
+
return pumpPda([
|
|
61
|
+
Buffer.from("bonding-curve-v2"),
|
|
62
|
+
new PublicKey(mint).toBuffer(),
|
|
63
|
+
]);
|
|
64
|
+
}
|
|
65
|
+
|
|
59
66
|
export function creatorVaultPda(creator: PublicKey) {
|
|
60
67
|
return pumpPda([Buffer.from("creator-vault"), creator.toBuffer()]);
|
|
61
68
|
}
|
package/src/sdk.ts
CHANGED
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
pumpPoolAuthorityPda,
|
|
46
46
|
feeSharingConfigPda,
|
|
47
47
|
userVolumeAccumulatorPda,
|
|
48
|
+
bondingCurveV2Pda,
|
|
48
49
|
} from "./pda";
|
|
49
50
|
import {
|
|
50
51
|
BondingCurve,
|
|
@@ -718,6 +719,13 @@ export class PumpSdk {
|
|
|
718
719
|
creatorVault: creatorVaultPda(creator),
|
|
719
720
|
tokenProgram,
|
|
720
721
|
})
|
|
722
|
+
.remainingAccounts([
|
|
723
|
+
{
|
|
724
|
+
pubkey: bondingCurveV2Pda(mint),
|
|
725
|
+
isWritable: false,
|
|
726
|
+
isSigner: false,
|
|
727
|
+
},
|
|
728
|
+
])
|
|
721
729
|
.instruction();
|
|
722
730
|
}
|
|
723
731
|
|
|
@@ -795,8 +803,19 @@ export class PumpSdk {
|
|
|
795
803
|
isWritable: true,
|
|
796
804
|
isSigner: false,
|
|
797
805
|
},
|
|
806
|
+
{
|
|
807
|
+
pubkey: bondingCurveV2Pda(mint),
|
|
808
|
+
isWritable: false,
|
|
809
|
+
isSigner: false,
|
|
810
|
+
},
|
|
798
811
|
]
|
|
799
|
-
: [
|
|
812
|
+
: [
|
|
813
|
+
{
|
|
814
|
+
pubkey: bondingCurveV2Pda(mint),
|
|
815
|
+
isWritable: false,
|
|
816
|
+
isSigner: false,
|
|
817
|
+
},
|
|
818
|
+
],
|
|
800
819
|
)
|
|
801
820
|
.instruction();
|
|
802
821
|
}
|