@pump-fun/pump-sdk 1.30.0 → 1.31.0-devnet.2

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/index.js CHANGED
@@ -1856,6 +1856,7 @@ __export(index_exports, {
1856
1856
  getSolVaultPda: () => getSolVaultPda,
1857
1857
  getTokenVaultPda: () => getTokenVaultPda,
1858
1858
  isCreatorUsingSharingConfig: () => isCreatorUsingSharingConfig,
1859
+ isSharingConfigEditable: () => isSharingConfigEditable,
1859
1860
  newBondingCurve: () => newBondingCurve,
1860
1861
  platformToString: () => platformToString,
1861
1862
  pumpIdl: () => pump_default,
@@ -9061,7 +9062,8 @@ function newBondingCurve(global) {
9061
9062
  tokenTotalSupply: global.tokenTotalSupply,
9062
9063
  complete: false,
9063
9064
  creator: import_web32.PublicKey.default,
9064
- isMayhemMode: global.mayhemModeEnabled
9065
+ isMayhemMode: global.mayhemModeEnabled,
9066
+ isCashbackCoin: false
9065
9067
  };
9066
9068
  }
9067
9069
  function getBuySolAmountFromTokenAmountQuote({
@@ -16450,7 +16452,7 @@ var pump_fees_default = {
16450
16452
  {
16451
16453
  name: "reset_fee_sharing_config",
16452
16454
  docs: [
16453
- "Reset Fee Sharing Config, make sure to distribute all the fees before calling this"
16455
+ "Reset Fee Sharing Config and distribute pending fees first"
16454
16456
  ],
16455
16457
  discriminator: [
16456
16458
  10,
@@ -16463,6 +16465,42 @@ var pump_fees_default = {
16463
16465
  186
16464
16466
  ],
16465
16467
  accounts: [
16468
+ {
16469
+ name: "new_admin"
16470
+ },
16471
+ {
16472
+ name: "event_authority",
16473
+ pda: {
16474
+ seeds: [
16475
+ {
16476
+ kind: "const",
16477
+ value: [
16478
+ 95,
16479
+ 95,
16480
+ 101,
16481
+ 118,
16482
+ 101,
16483
+ 110,
16484
+ 116,
16485
+ 95,
16486
+ 97,
16487
+ 117,
16488
+ 116,
16489
+ 104,
16490
+ 111,
16491
+ 114,
16492
+ 105,
16493
+ 116,
16494
+ 121
16495
+ ]
16496
+ }
16497
+ ]
16498
+ }
16499
+ },
16500
+ {
16501
+ name: "program",
16502
+ address: "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"
16503
+ },
16466
16504
  {
16467
16505
  name: "authority",
16468
16506
  signer: true
@@ -16522,9 +16560,6 @@ var pump_fees_default = {
16522
16560
  }
16523
16561
  }
16524
16562
  },
16525
- {
16526
- name: "new_admin"
16527
- },
16528
16563
  {
16529
16564
  name: "mint",
16530
16565
  relations: [
@@ -16563,74 +16598,97 @@ var pump_fees_default = {
16563
16598
  }
16564
16599
  },
16565
16600
  {
16566
- name: "event_authority",
16601
+ name: "bonding_curve",
16567
16602
  pda: {
16568
16603
  seeds: [
16569
16604
  {
16570
16605
  kind: "const",
16571
16606
  value: [
16572
- 95,
16573
- 95,
16574
- 101,
16575
- 118,
16576
- 101,
16607
+ 98,
16608
+ 111,
16577
16609
  110,
16578
- 116,
16579
- 95,
16580
- 97,
16610
+ 100,
16611
+ 105,
16612
+ 110,
16613
+ 103,
16614
+ 45,
16615
+ 99,
16581
16616
  117,
16582
- 116,
16583
- 104,
16584
- 111,
16585
16617
  114,
16586
- 105,
16587
- 116,
16588
- 121
16618
+ 118,
16619
+ 101
16589
16620
  ]
16621
+ },
16622
+ {
16623
+ kind: "account",
16624
+ path: "mint"
16590
16625
  }
16591
- ]
16626
+ ],
16627
+ program: {
16628
+ kind: "const",
16629
+ value: [
16630
+ 1,
16631
+ 86,
16632
+ 224,
16633
+ 246,
16634
+ 147,
16635
+ 102,
16636
+ 90,
16637
+ 207,
16638
+ 68,
16639
+ 219,
16640
+ 21,
16641
+ 104,
16642
+ 191,
16643
+ 23,
16644
+ 91,
16645
+ 170,
16646
+ 81,
16647
+ 137,
16648
+ 203,
16649
+ 151,
16650
+ 245,
16651
+ 210,
16652
+ 255,
16653
+ 59,
16654
+ 101,
16655
+ 93,
16656
+ 43,
16657
+ 182,
16658
+ 253,
16659
+ 109,
16660
+ 24,
16661
+ 176
16662
+ ]
16663
+ }
16592
16664
  }
16593
16665
  },
16594
16666
  {
16595
- name: "program"
16596
- }
16597
- ],
16598
- args: []
16599
- },
16600
- {
16601
- name: "revoke_fee_sharing_authority",
16602
- docs: [
16603
- "Revoke Fee Sharing Authority"
16604
- ],
16605
- discriminator: [
16606
- 18,
16607
- 233,
16608
- 158,
16609
- 39,
16610
- 185,
16611
- 207,
16612
- 58,
16613
- 104
16614
- ],
16615
- accounts: [
16616
- {
16617
- name: "authority",
16618
- signer: true
16619
- },
16620
- {
16621
- name: "global",
16667
+ name: "pump_creator_vault",
16668
+ writable: true,
16622
16669
  pda: {
16623
16670
  seeds: [
16624
16671
  {
16625
16672
  kind: "const",
16626
16673
  value: [
16627
- 103,
16628
- 108,
16674
+ 99,
16675
+ 114,
16676
+ 101,
16677
+ 97,
16678
+ 116,
16629
16679
  111,
16630
- 98,
16680
+ 114,
16681
+ 45,
16682
+ 118,
16631
16683
  97,
16632
- 108
16684
+ 117,
16685
+ 108,
16686
+ 116
16633
16687
  ]
16688
+ },
16689
+ {
16690
+ kind: "account",
16691
+ path: "sharing_config"
16634
16692
  }
16635
16693
  ],
16636
16694
  program: {
@@ -16673,44 +16731,85 @@ var pump_fees_default = {
16673
16731
  }
16674
16732
  },
16675
16733
  {
16676
- name: "mint",
16677
- relations: [
16678
- "sharing_config"
16679
- ]
16734
+ name: "system_program",
16735
+ address: "11111111111111111111111111111111"
16680
16736
  },
16681
16737
  {
16682
- name: "sharing_config",
16683
- writable: true,
16738
+ name: "pump_program",
16739
+ address: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
16740
+ },
16741
+ {
16742
+ name: "pump_event_authority",
16684
16743
  pda: {
16685
16744
  seeds: [
16686
16745
  {
16687
16746
  kind: "const",
16688
16747
  value: [
16689
- 115,
16690
- 104,
16691
- 97,
16692
- 114,
16693
- 105,
16748
+ 95,
16749
+ 95,
16750
+ 101,
16751
+ 118,
16752
+ 101,
16694
16753
  110,
16695
- 103,
16696
- 45,
16697
- 99,
16754
+ 116,
16755
+ 95,
16756
+ 97,
16757
+ 117,
16758
+ 116,
16759
+ 104,
16698
16760
  111,
16699
- 110,
16700
- 102,
16761
+ 114,
16701
16762
  105,
16702
- 103
16763
+ 116,
16764
+ 121
16703
16765
  ]
16704
- },
16705
- {
16706
- kind: "account",
16707
- path: "mint"
16708
16766
  }
16709
- ]
16767
+ ],
16768
+ program: {
16769
+ kind: "const",
16770
+ value: [
16771
+ 1,
16772
+ 86,
16773
+ 224,
16774
+ 246,
16775
+ 147,
16776
+ 102,
16777
+ 90,
16778
+ 207,
16779
+ 68,
16780
+ 219,
16781
+ 21,
16782
+ 104,
16783
+ 191,
16784
+ 23,
16785
+ 91,
16786
+ 170,
16787
+ 81,
16788
+ 137,
16789
+ 203,
16790
+ 151,
16791
+ 245,
16792
+ 210,
16793
+ 255,
16794
+ 59,
16795
+ 101,
16796
+ 93,
16797
+ 43,
16798
+ 182,
16799
+ 253,
16800
+ 109,
16801
+ 24,
16802
+ 176
16803
+ ]
16804
+ }
16710
16805
  }
16711
16806
  },
16712
16807
  {
16713
- name: "event_authority",
16808
+ name: "pump_amm_program",
16809
+ address: "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"
16810
+ },
16811
+ {
16812
+ name: "amm_event_authority",
16714
16813
  pda: {
16715
16814
  seeds: [
16716
16815
  {
@@ -16735,15 +16834,150 @@ var pump_fees_default = {
16735
16834
  121
16736
16835
  ]
16737
16836
  }
16738
- ]
16837
+ ],
16838
+ program: {
16839
+ kind: "const",
16840
+ value: [
16841
+ 12,
16842
+ 20,
16843
+ 222,
16844
+ 252,
16845
+ 130,
16846
+ 94,
16847
+ 198,
16848
+ 118,
16849
+ 148,
16850
+ 37,
16851
+ 8,
16852
+ 24,
16853
+ 187,
16854
+ 101,
16855
+ 64,
16856
+ 101,
16857
+ 244,
16858
+ 41,
16859
+ 141,
16860
+ 49,
16861
+ 86,
16862
+ 213,
16863
+ 113,
16864
+ 180,
16865
+ 212,
16866
+ 248,
16867
+ 9,
16868
+ 12,
16869
+ 24,
16870
+ 233,
16871
+ 168,
16872
+ 99
16873
+ ]
16874
+ }
16875
+ }
16876
+ },
16877
+ {
16878
+ name: "wsol_mint",
16879
+ address: "So11111111111111111111111111111111111111112"
16880
+ },
16881
+ {
16882
+ name: "token_program",
16883
+ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
16884
+ },
16885
+ {
16886
+ name: "associated_token_program",
16887
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
16888
+ },
16889
+ {
16890
+ name: "coin_creator_vault_authority",
16891
+ writable: true,
16892
+ pda: {
16893
+ seeds: [
16894
+ {
16895
+ kind: "const",
16896
+ value: [
16897
+ 99,
16898
+ 114,
16899
+ 101,
16900
+ 97,
16901
+ 116,
16902
+ 111,
16903
+ 114,
16904
+ 95,
16905
+ 118,
16906
+ 97,
16907
+ 117,
16908
+ 108,
16909
+ 116
16910
+ ]
16911
+ },
16912
+ {
16913
+ kind: "account",
16914
+ path: "sharing_config"
16915
+ }
16916
+ ],
16917
+ program: {
16918
+ kind: "const",
16919
+ value: [
16920
+ 12,
16921
+ 20,
16922
+ 222,
16923
+ 252,
16924
+ 130,
16925
+ 94,
16926
+ 198,
16927
+ 118,
16928
+ 148,
16929
+ 37,
16930
+ 8,
16931
+ 24,
16932
+ 187,
16933
+ 101,
16934
+ 64,
16935
+ 101,
16936
+ 244,
16937
+ 41,
16938
+ 141,
16939
+ 49,
16940
+ 86,
16941
+ 213,
16942
+ 113,
16943
+ 180,
16944
+ 212,
16945
+ 248,
16946
+ 9,
16947
+ 12,
16948
+ 24,
16949
+ 233,
16950
+ 168,
16951
+ 99
16952
+ ]
16953
+ }
16739
16954
  }
16740
16955
  },
16741
16956
  {
16742
- name: "program"
16957
+ name: "coin_creator_vault_ata",
16958
+ writable: true
16743
16959
  }
16744
16960
  ],
16745
16961
  args: []
16746
16962
  },
16963
+ {
16964
+ name: "revoke_fee_sharing_authority",
16965
+ docs: [
16966
+ "Revoke Fee Sharing Authority"
16967
+ ],
16968
+ discriminator: [
16969
+ 18,
16970
+ 233,
16971
+ 158,
16972
+ 39,
16973
+ 185,
16974
+ 207,
16975
+ 58,
16976
+ 104
16977
+ ],
16978
+ accounts: [],
16979
+ args: []
16980
+ },
16747
16981
  {
16748
16982
  name: "set_authority",
16749
16983
  discriminator: [
@@ -17127,139 +17361,7 @@ var pump_fees_default = {
17127
17361
  210,
17128
17362
  96
17129
17363
  ],
17130
- accounts: [
17131
- {
17132
- name: "authority",
17133
- signer: true
17134
- },
17135
- {
17136
- name: "global",
17137
- pda: {
17138
- seeds: [
17139
- {
17140
- kind: "const",
17141
- value: [
17142
- 103,
17143
- 108,
17144
- 111,
17145
- 98,
17146
- 97,
17147
- 108
17148
- ]
17149
- }
17150
- ],
17151
- program: {
17152
- kind: "const",
17153
- value: [
17154
- 1,
17155
- 86,
17156
- 224,
17157
- 246,
17158
- 147,
17159
- 102,
17160
- 90,
17161
- 207,
17162
- 68,
17163
- 219,
17164
- 21,
17165
- 104,
17166
- 191,
17167
- 23,
17168
- 91,
17169
- 170,
17170
- 81,
17171
- 137,
17172
- 203,
17173
- 151,
17174
- 245,
17175
- 210,
17176
- 255,
17177
- 59,
17178
- 101,
17179
- 93,
17180
- 43,
17181
- 182,
17182
- 253,
17183
- 109,
17184
- 24,
17185
- 176
17186
- ]
17187
- }
17188
- }
17189
- },
17190
- {
17191
- name: "mint",
17192
- relations: [
17193
- "sharing_config"
17194
- ]
17195
- },
17196
- {
17197
- name: "sharing_config",
17198
- writable: true,
17199
- pda: {
17200
- seeds: [
17201
- {
17202
- kind: "const",
17203
- value: [
17204
- 115,
17205
- 104,
17206
- 97,
17207
- 114,
17208
- 105,
17209
- 110,
17210
- 103,
17211
- 45,
17212
- 99,
17213
- 111,
17214
- 110,
17215
- 102,
17216
- 105,
17217
- 103
17218
- ]
17219
- },
17220
- {
17221
- kind: "account",
17222
- path: "mint"
17223
- }
17224
- ]
17225
- }
17226
- },
17227
- {
17228
- name: "new_admin"
17229
- },
17230
- {
17231
- name: "event_authority",
17232
- pda: {
17233
- seeds: [
17234
- {
17235
- kind: "const",
17236
- value: [
17237
- 95,
17238
- 95,
17239
- 101,
17240
- 118,
17241
- 101,
17242
- 110,
17243
- 116,
17244
- 95,
17245
- 97,
17246
- 117,
17247
- 116,
17248
- 104,
17249
- 111,
17250
- 114,
17251
- 105,
17252
- 116,
17253
- 121
17254
- ]
17255
- }
17256
- ]
17257
- }
17258
- },
17259
- {
17260
- name: "program"
17261
- }
17262
- ],
17364
+ accounts: [],
17263
17365
  args: []
17264
17366
  },
17265
17367
  {
@@ -18229,19 +18331,6 @@ var pump_fees_default = {
18229
18331
  243
18230
18332
  ]
18231
18333
  },
18232
- {
18233
- name: "RevokeFeeSharingAuthorityEvent",
18234
- discriminator: [
18235
- 114,
18236
- 23,
18237
- 101,
18238
- 60,
18239
- 14,
18240
- 190,
18241
- 153,
18242
- 62
18243
- ]
18244
- },
18245
18334
  {
18246
18335
  name: "SetAuthorityEvent",
18247
18336
  discriminator: [
@@ -18320,19 +18409,6 @@ var pump_fees_default = {
18320
18409
  169
18321
18410
  ]
18322
18411
  },
18323
- {
18324
- name: "TransferFeeSharingAuthorityEvent",
18325
- discriminator: [
18326
- 124,
18327
- 143,
18328
- 198,
18329
- 245,
18330
- 77,
18331
- 184,
18332
- 8,
18333
- 236
18334
- ]
18335
- },
18336
18412
  {
18337
18413
  name: "UpdateAdminEvent",
18338
18414
  discriminator: [
@@ -18435,7 +18511,7 @@ var pump_fees_default = {
18435
18511
  {
18436
18512
  code: 6009,
18437
18513
  name: "SharingConfigAdminRevoked",
18438
- msg: "Sharing config admin has been revoked"
18514
+ msg: "Sharing config authority has been revoked - sharing config can only be updated once"
18439
18515
  },
18440
18516
  {
18441
18517
  code: 6010,
@@ -18501,6 +18577,16 @@ var pump_fees_default = {
18501
18577
  code: 6022,
18502
18578
  name: "UserIdTooLong",
18503
18579
  msg: "User ID exceeds maximum length"
18580
+ },
18581
+ {
18582
+ code: 6023,
18583
+ name: "DeprecatedInstruction",
18584
+ msg: "Instruction is deprecated"
18585
+ },
18586
+ {
18587
+ code: 6024,
18588
+ name: "FeeSharesAlreadyUpdated",
18589
+ msg: "Reward split can only be updated once"
18504
18590
  }
18505
18591
  ],
18506
18592
  types: [
@@ -18975,30 +19061,14 @@ var pump_fees_default = {
18975
19061
  }
18976
19062
  }
18977
19063
  }
18978
- }
18979
- ]
18980
- }
18981
- },
18982
- {
18983
- name: "RevokeFeeSharingAuthorityEvent",
18984
- type: {
18985
- kind: "struct",
18986
- fields: [
18987
- {
18988
- name: "timestamp",
18989
- type: "i64"
18990
- },
18991
- {
18992
- name: "mint",
18993
- type: "pubkey"
18994
19064
  },
18995
19065
  {
18996
- name: "sharing_config",
18997
- type: "pubkey"
19066
+ name: "old_version",
19067
+ type: "u8"
18998
19068
  },
18999
19069
  {
19000
- name: "admin",
19001
- type: "pubkey"
19070
+ name: "new_version",
19071
+ type: "u8"
19002
19072
  }
19003
19073
  ]
19004
19074
  }
@@ -19261,34 +19331,6 @@ var pump_fees_default = {
19261
19331
  ]
19262
19332
  }
19263
19333
  },
19264
- {
19265
- name: "TransferFeeSharingAuthorityEvent",
19266
- type: {
19267
- kind: "struct",
19268
- fields: [
19269
- {
19270
- name: "timestamp",
19271
- type: "i64"
19272
- },
19273
- {
19274
- name: "mint",
19275
- type: "pubkey"
19276
- },
19277
- {
19278
- name: "sharing_config",
19279
- type: "pubkey"
19280
- },
19281
- {
19282
- name: "old_admin",
19283
- type: "pubkey"
19284
- },
19285
- {
19286
- name: "new_admin",
19287
- type: "pubkey"
19288
- }
19289
- ]
19290
- }
19291
- },
19292
19334
  {
19293
19335
  name: "UpdateAdminEvent",
19294
19336
  type: {
@@ -19377,6 +19419,10 @@ var pump_fees_default = {
19377
19419
  }
19378
19420
  }
19379
19421
  }
19422
+ },
19423
+ {
19424
+ name: "version",
19425
+ type: "u8"
19380
19426
  }
19381
19427
  ]
19382
19428
  }
@@ -19417,6 +19463,16 @@ var pump_fees_default = {
19417
19463
  }
19418
19464
  ],
19419
19465
  constants: [
19466
+ {
19467
+ name: "AMM_CREATOR_VAULT_AUTHORITY_SEED",
19468
+ type: {
19469
+ array: [
19470
+ "u8",
19471
+ 13
19472
+ ]
19473
+ },
19474
+ value: "[99, 114, 101, 97, 116, 111, 114, 95, 118, 97, 117, 108, 116]"
19475
+ },
19420
19476
  {
19421
19477
  name: "FEE_CONFIG_SEED",
19422
19478
  type: "bytes",
@@ -19432,6 +19488,16 @@ var pump_fees_default = {
19432
19488
  },
19433
19489
  value: "[102, 101, 101, 45, 112, 114, 111, 103, 114, 97, 109, 45, 103, 108, 111, 98, 97, 108]"
19434
19490
  },
19491
+ {
19492
+ name: "PUMP_CREATOR_VAULT_SEED",
19493
+ type: {
19494
+ array: [
19495
+ "u8",
19496
+ 13
19497
+ ]
19498
+ },
19499
+ value: "[99, 114, 101, 97, 116, 111, 114, 45, 118, 97, 117, 108, 116]"
19500
+ },
19435
19501
  {
19436
19502
  name: "PUMP_GLOBAL_SEED",
19437
19503
  docs: [
@@ -19554,6 +19620,9 @@ var OnlinePumpSdk = class {
19554
19620
  async fetchFeeConfig() {
19555
19621
  return await this.pumpProgram.account.feeConfig.fetch(PUMP_FEE_CONFIG_PDA);
19556
19622
  }
19623
+ /**
19624
+ * @deprecated use PumpSdk.decodeBondingCurveNullable instead.
19625
+ */
19557
19626
  async fetchBondingCurve(mint) {
19558
19627
  return await this.pumpProgram.account.bondingCurve.fetch(
19559
19628
  bondingCurvePda(mint)
@@ -20039,8 +20108,8 @@ var PumpSdk = class {
20039
20108
  decodeBondingCurveNullable(accountInfo) {
20040
20109
  try {
20041
20110
  const data = accountInfo.data;
20042
- if (data.length < 82) {
20043
- const padded = Buffer.alloc(82);
20111
+ if (data.length < 83) {
20112
+ const padded = Buffer.alloc(83);
20044
20113
  data.copy(padded);
20045
20114
  accountInfo = {
20046
20115
  ...accountInfo,
@@ -20533,7 +20602,10 @@ var PumpSdk = class {
20533
20602
  /**
20534
20603
  * Updates the fee shares for a token's creator fee distribution.
20535
20604
  *
20536
- * @param params - Parameters for updating fee shares
20605
+ * Important:
20606
+ * - Reward split updates are effectively one-time. Treat this as a single allowed
20607
+ * modification and verify the final split before submitting.
20608
+ *
20537
20609
  * @param params.authority - The current authority that can modify the fee sharing config
20538
20610
  * @param params.mint - The mint address of the token
20539
20611
  * @param params.curShareholders - Array of current shareholders
@@ -20740,6 +20812,10 @@ var PumpSdk = class {
20740
20812
  * Wrapper around `updateSharingConfig` that resolves social recipients and
20741
20813
  * initializes any missing social recipient PDAs before updating fee shares.
20742
20814
  *
20815
+ * Important:
20816
+ * - Reward split updates are effectively one-time. Treat this call as a single
20817
+ * allowed modification and verify the final split before submitting.
20818
+ *
20743
20819
  * Requirements:
20744
20820
  * - `authority` must sign the transaction.
20745
20821
  *
@@ -20824,6 +20900,17 @@ function isCreatorUsingSharingConfig({
20824
20900
  }) {
20825
20901
  return feeSharingConfigPda(mint).equals(creator);
20826
20902
  }
20903
+ function isSharingConfigEditable({
20904
+ sharingConfig
20905
+ }) {
20906
+ if (sharingConfig.version === 1) {
20907
+ return false;
20908
+ }
20909
+ if (sharingConfig.version === 2 && sharingConfig.adminRevoked) {
20910
+ return false;
20911
+ }
20912
+ return true;
20913
+ }
20827
20914
 
20828
20915
  // src/pda.ts
20829
20916
  var GLOBAL_PDA = (0, import_pump_swap_sdk3.pumpPda)([import_buffer.Buffer.from("global")]);