@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/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({
@@ -16404,7 +16405,7 @@ var pump_fees_default = {
16404
16405
  {
16405
16406
  name: "reset_fee_sharing_config",
16406
16407
  docs: [
16407
- "Reset Fee Sharing Config, make sure to distribute all the fees before calling this"
16408
+ "Reset Fee Sharing Config and distribute pending fees first"
16408
16409
  ],
16409
16410
  discriminator: [
16410
16411
  10,
@@ -16417,6 +16418,42 @@ var pump_fees_default = {
16417
16418
  186
16418
16419
  ],
16419
16420
  accounts: [
16421
+ {
16422
+ name: "new_admin"
16423
+ },
16424
+ {
16425
+ name: "event_authority",
16426
+ pda: {
16427
+ seeds: [
16428
+ {
16429
+ kind: "const",
16430
+ value: [
16431
+ 95,
16432
+ 95,
16433
+ 101,
16434
+ 118,
16435
+ 101,
16436
+ 110,
16437
+ 116,
16438
+ 95,
16439
+ 97,
16440
+ 117,
16441
+ 116,
16442
+ 104,
16443
+ 111,
16444
+ 114,
16445
+ 105,
16446
+ 116,
16447
+ 121
16448
+ ]
16449
+ }
16450
+ ]
16451
+ }
16452
+ },
16453
+ {
16454
+ name: "program",
16455
+ address: "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"
16456
+ },
16420
16457
  {
16421
16458
  name: "authority",
16422
16459
  signer: true
@@ -16476,9 +16513,6 @@ var pump_fees_default = {
16476
16513
  }
16477
16514
  }
16478
16515
  },
16479
- {
16480
- name: "new_admin"
16481
- },
16482
16516
  {
16483
16517
  name: "mint",
16484
16518
  relations: [
@@ -16517,74 +16551,97 @@ var pump_fees_default = {
16517
16551
  }
16518
16552
  },
16519
16553
  {
16520
- name: "event_authority",
16554
+ name: "bonding_curve",
16521
16555
  pda: {
16522
16556
  seeds: [
16523
16557
  {
16524
16558
  kind: "const",
16525
16559
  value: [
16526
- 95,
16527
- 95,
16528
- 101,
16529
- 118,
16530
- 101,
16560
+ 98,
16561
+ 111,
16531
16562
  110,
16532
- 116,
16533
- 95,
16534
- 97,
16563
+ 100,
16564
+ 105,
16565
+ 110,
16566
+ 103,
16567
+ 45,
16568
+ 99,
16535
16569
  117,
16536
- 116,
16537
- 104,
16538
- 111,
16539
16570
  114,
16540
- 105,
16541
- 116,
16542
- 121
16571
+ 118,
16572
+ 101
16543
16573
  ]
16574
+ },
16575
+ {
16576
+ kind: "account",
16577
+ path: "mint"
16544
16578
  }
16545
- ]
16579
+ ],
16580
+ program: {
16581
+ kind: "const",
16582
+ value: [
16583
+ 1,
16584
+ 86,
16585
+ 224,
16586
+ 246,
16587
+ 147,
16588
+ 102,
16589
+ 90,
16590
+ 207,
16591
+ 68,
16592
+ 219,
16593
+ 21,
16594
+ 104,
16595
+ 191,
16596
+ 23,
16597
+ 91,
16598
+ 170,
16599
+ 81,
16600
+ 137,
16601
+ 203,
16602
+ 151,
16603
+ 245,
16604
+ 210,
16605
+ 255,
16606
+ 59,
16607
+ 101,
16608
+ 93,
16609
+ 43,
16610
+ 182,
16611
+ 253,
16612
+ 109,
16613
+ 24,
16614
+ 176
16615
+ ]
16616
+ }
16546
16617
  }
16547
16618
  },
16548
16619
  {
16549
- name: "program"
16550
- }
16551
- ],
16552
- args: []
16553
- },
16554
- {
16555
- name: "revoke_fee_sharing_authority",
16556
- docs: [
16557
- "Revoke Fee Sharing Authority"
16558
- ],
16559
- discriminator: [
16560
- 18,
16561
- 233,
16562
- 158,
16563
- 39,
16564
- 185,
16565
- 207,
16566
- 58,
16567
- 104
16568
- ],
16569
- accounts: [
16570
- {
16571
- name: "authority",
16572
- signer: true
16573
- },
16574
- {
16575
- name: "global",
16620
+ name: "pump_creator_vault",
16621
+ writable: true,
16576
16622
  pda: {
16577
16623
  seeds: [
16578
16624
  {
16579
16625
  kind: "const",
16580
16626
  value: [
16581
- 103,
16582
- 108,
16627
+ 99,
16628
+ 114,
16629
+ 101,
16630
+ 97,
16631
+ 116,
16583
16632
  111,
16584
- 98,
16633
+ 114,
16634
+ 45,
16635
+ 118,
16585
16636
  97,
16586
- 108
16637
+ 117,
16638
+ 108,
16639
+ 116
16587
16640
  ]
16641
+ },
16642
+ {
16643
+ kind: "account",
16644
+ path: "sharing_config"
16588
16645
  }
16589
16646
  ],
16590
16647
  program: {
@@ -16627,44 +16684,85 @@ var pump_fees_default = {
16627
16684
  }
16628
16685
  },
16629
16686
  {
16630
- name: "mint",
16631
- relations: [
16632
- "sharing_config"
16633
- ]
16687
+ name: "system_program",
16688
+ address: "11111111111111111111111111111111"
16634
16689
  },
16635
16690
  {
16636
- name: "sharing_config",
16637
- writable: true,
16691
+ name: "pump_program",
16692
+ address: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
16693
+ },
16694
+ {
16695
+ name: "pump_event_authority",
16638
16696
  pda: {
16639
16697
  seeds: [
16640
16698
  {
16641
16699
  kind: "const",
16642
16700
  value: [
16643
- 115,
16644
- 104,
16645
- 97,
16646
- 114,
16647
- 105,
16701
+ 95,
16702
+ 95,
16703
+ 101,
16704
+ 118,
16705
+ 101,
16648
16706
  110,
16649
- 103,
16650
- 45,
16651
- 99,
16707
+ 116,
16708
+ 95,
16709
+ 97,
16710
+ 117,
16711
+ 116,
16712
+ 104,
16652
16713
  111,
16653
- 110,
16654
- 102,
16714
+ 114,
16655
16715
  105,
16656
- 103
16716
+ 116,
16717
+ 121
16657
16718
  ]
16658
- },
16659
- {
16660
- kind: "account",
16661
- path: "mint"
16662
16719
  }
16663
- ]
16720
+ ],
16721
+ program: {
16722
+ kind: "const",
16723
+ value: [
16724
+ 1,
16725
+ 86,
16726
+ 224,
16727
+ 246,
16728
+ 147,
16729
+ 102,
16730
+ 90,
16731
+ 207,
16732
+ 68,
16733
+ 219,
16734
+ 21,
16735
+ 104,
16736
+ 191,
16737
+ 23,
16738
+ 91,
16739
+ 170,
16740
+ 81,
16741
+ 137,
16742
+ 203,
16743
+ 151,
16744
+ 245,
16745
+ 210,
16746
+ 255,
16747
+ 59,
16748
+ 101,
16749
+ 93,
16750
+ 43,
16751
+ 182,
16752
+ 253,
16753
+ 109,
16754
+ 24,
16755
+ 176
16756
+ ]
16757
+ }
16664
16758
  }
16665
16759
  },
16666
16760
  {
16667
- name: "event_authority",
16761
+ name: "pump_amm_program",
16762
+ address: "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"
16763
+ },
16764
+ {
16765
+ name: "amm_event_authority",
16668
16766
  pda: {
16669
16767
  seeds: [
16670
16768
  {
@@ -16689,15 +16787,150 @@ var pump_fees_default = {
16689
16787
  121
16690
16788
  ]
16691
16789
  }
16692
- ]
16790
+ ],
16791
+ program: {
16792
+ kind: "const",
16793
+ value: [
16794
+ 12,
16795
+ 20,
16796
+ 222,
16797
+ 252,
16798
+ 130,
16799
+ 94,
16800
+ 198,
16801
+ 118,
16802
+ 148,
16803
+ 37,
16804
+ 8,
16805
+ 24,
16806
+ 187,
16807
+ 101,
16808
+ 64,
16809
+ 101,
16810
+ 244,
16811
+ 41,
16812
+ 141,
16813
+ 49,
16814
+ 86,
16815
+ 213,
16816
+ 113,
16817
+ 180,
16818
+ 212,
16819
+ 248,
16820
+ 9,
16821
+ 12,
16822
+ 24,
16823
+ 233,
16824
+ 168,
16825
+ 99
16826
+ ]
16827
+ }
16828
+ }
16829
+ },
16830
+ {
16831
+ name: "wsol_mint",
16832
+ address: "So11111111111111111111111111111111111111112"
16833
+ },
16834
+ {
16835
+ name: "token_program",
16836
+ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
16837
+ },
16838
+ {
16839
+ name: "associated_token_program",
16840
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
16841
+ },
16842
+ {
16843
+ name: "coin_creator_vault_authority",
16844
+ writable: true,
16845
+ pda: {
16846
+ seeds: [
16847
+ {
16848
+ kind: "const",
16849
+ value: [
16850
+ 99,
16851
+ 114,
16852
+ 101,
16853
+ 97,
16854
+ 116,
16855
+ 111,
16856
+ 114,
16857
+ 95,
16858
+ 118,
16859
+ 97,
16860
+ 117,
16861
+ 108,
16862
+ 116
16863
+ ]
16864
+ },
16865
+ {
16866
+ kind: "account",
16867
+ path: "sharing_config"
16868
+ }
16869
+ ],
16870
+ program: {
16871
+ kind: "const",
16872
+ value: [
16873
+ 12,
16874
+ 20,
16875
+ 222,
16876
+ 252,
16877
+ 130,
16878
+ 94,
16879
+ 198,
16880
+ 118,
16881
+ 148,
16882
+ 37,
16883
+ 8,
16884
+ 24,
16885
+ 187,
16886
+ 101,
16887
+ 64,
16888
+ 101,
16889
+ 244,
16890
+ 41,
16891
+ 141,
16892
+ 49,
16893
+ 86,
16894
+ 213,
16895
+ 113,
16896
+ 180,
16897
+ 212,
16898
+ 248,
16899
+ 9,
16900
+ 12,
16901
+ 24,
16902
+ 233,
16903
+ 168,
16904
+ 99
16905
+ ]
16906
+ }
16693
16907
  }
16694
16908
  },
16695
16909
  {
16696
- name: "program"
16910
+ name: "coin_creator_vault_ata",
16911
+ writable: true
16697
16912
  }
16698
16913
  ],
16699
16914
  args: []
16700
16915
  },
16916
+ {
16917
+ name: "revoke_fee_sharing_authority",
16918
+ docs: [
16919
+ "Revoke Fee Sharing Authority"
16920
+ ],
16921
+ discriminator: [
16922
+ 18,
16923
+ 233,
16924
+ 158,
16925
+ 39,
16926
+ 185,
16927
+ 207,
16928
+ 58,
16929
+ 104
16930
+ ],
16931
+ accounts: [],
16932
+ args: []
16933
+ },
16701
16934
  {
16702
16935
  name: "set_authority",
16703
16936
  discriminator: [
@@ -17081,139 +17314,7 @@ var pump_fees_default = {
17081
17314
  210,
17082
17315
  96
17083
17316
  ],
17084
- accounts: [
17085
- {
17086
- name: "authority",
17087
- signer: true
17088
- },
17089
- {
17090
- name: "global",
17091
- pda: {
17092
- seeds: [
17093
- {
17094
- kind: "const",
17095
- value: [
17096
- 103,
17097
- 108,
17098
- 111,
17099
- 98,
17100
- 97,
17101
- 108
17102
- ]
17103
- }
17104
- ],
17105
- program: {
17106
- kind: "const",
17107
- value: [
17108
- 1,
17109
- 86,
17110
- 224,
17111
- 246,
17112
- 147,
17113
- 102,
17114
- 90,
17115
- 207,
17116
- 68,
17117
- 219,
17118
- 21,
17119
- 104,
17120
- 191,
17121
- 23,
17122
- 91,
17123
- 170,
17124
- 81,
17125
- 137,
17126
- 203,
17127
- 151,
17128
- 245,
17129
- 210,
17130
- 255,
17131
- 59,
17132
- 101,
17133
- 93,
17134
- 43,
17135
- 182,
17136
- 253,
17137
- 109,
17138
- 24,
17139
- 176
17140
- ]
17141
- }
17142
- }
17143
- },
17144
- {
17145
- name: "mint",
17146
- relations: [
17147
- "sharing_config"
17148
- ]
17149
- },
17150
- {
17151
- name: "sharing_config",
17152
- writable: true,
17153
- pda: {
17154
- seeds: [
17155
- {
17156
- kind: "const",
17157
- value: [
17158
- 115,
17159
- 104,
17160
- 97,
17161
- 114,
17162
- 105,
17163
- 110,
17164
- 103,
17165
- 45,
17166
- 99,
17167
- 111,
17168
- 110,
17169
- 102,
17170
- 105,
17171
- 103
17172
- ]
17173
- },
17174
- {
17175
- kind: "account",
17176
- path: "mint"
17177
- }
17178
- ]
17179
- }
17180
- },
17181
- {
17182
- name: "new_admin"
17183
- },
17184
- {
17185
- name: "event_authority",
17186
- pda: {
17187
- seeds: [
17188
- {
17189
- kind: "const",
17190
- value: [
17191
- 95,
17192
- 95,
17193
- 101,
17194
- 118,
17195
- 101,
17196
- 110,
17197
- 116,
17198
- 95,
17199
- 97,
17200
- 117,
17201
- 116,
17202
- 104,
17203
- 111,
17204
- 114,
17205
- 105,
17206
- 116,
17207
- 121
17208
- ]
17209
- }
17210
- ]
17211
- }
17212
- },
17213
- {
17214
- name: "program"
17215
- }
17216
- ],
17317
+ accounts: [],
17217
17318
  args: []
17218
17319
  },
17219
17320
  {
@@ -18183,19 +18284,6 @@ var pump_fees_default = {
18183
18284
  243
18184
18285
  ]
18185
18286
  },
18186
- {
18187
- name: "RevokeFeeSharingAuthorityEvent",
18188
- discriminator: [
18189
- 114,
18190
- 23,
18191
- 101,
18192
- 60,
18193
- 14,
18194
- 190,
18195
- 153,
18196
- 62
18197
- ]
18198
- },
18199
18287
  {
18200
18288
  name: "SetAuthorityEvent",
18201
18289
  discriminator: [
@@ -18274,19 +18362,6 @@ var pump_fees_default = {
18274
18362
  169
18275
18363
  ]
18276
18364
  },
18277
- {
18278
- name: "TransferFeeSharingAuthorityEvent",
18279
- discriminator: [
18280
- 124,
18281
- 143,
18282
- 198,
18283
- 245,
18284
- 77,
18285
- 184,
18286
- 8,
18287
- 236
18288
- ]
18289
- },
18290
18365
  {
18291
18366
  name: "UpdateAdminEvent",
18292
18367
  discriminator: [
@@ -18389,7 +18464,7 @@ var pump_fees_default = {
18389
18464
  {
18390
18465
  code: 6009,
18391
18466
  name: "SharingConfigAdminRevoked",
18392
- msg: "Sharing config admin has been revoked"
18467
+ msg: "Sharing config authority has been revoked - sharing config can only be updated once"
18393
18468
  },
18394
18469
  {
18395
18470
  code: 6010,
@@ -18455,6 +18530,16 @@ var pump_fees_default = {
18455
18530
  code: 6022,
18456
18531
  name: "UserIdTooLong",
18457
18532
  msg: "User ID exceeds maximum length"
18533
+ },
18534
+ {
18535
+ code: 6023,
18536
+ name: "DeprecatedInstruction",
18537
+ msg: "Instruction is deprecated"
18538
+ },
18539
+ {
18540
+ code: 6024,
18541
+ name: "FeeSharesAlreadyUpdated",
18542
+ msg: "Reward split can only be updated once"
18458
18543
  }
18459
18544
  ],
18460
18545
  types: [
@@ -18929,30 +19014,14 @@ var pump_fees_default = {
18929
19014
  }
18930
19015
  }
18931
19016
  }
18932
- }
18933
- ]
18934
- }
18935
- },
18936
- {
18937
- name: "RevokeFeeSharingAuthorityEvent",
18938
- type: {
18939
- kind: "struct",
18940
- fields: [
18941
- {
18942
- name: "timestamp",
18943
- type: "i64"
18944
- },
18945
- {
18946
- name: "mint",
18947
- type: "pubkey"
18948
19017
  },
18949
19018
  {
18950
- name: "sharing_config",
18951
- type: "pubkey"
19019
+ name: "old_version",
19020
+ type: "u8"
18952
19021
  },
18953
19022
  {
18954
- name: "admin",
18955
- type: "pubkey"
19023
+ name: "new_version",
19024
+ type: "u8"
18956
19025
  }
18957
19026
  ]
18958
19027
  }
@@ -19215,34 +19284,6 @@ var pump_fees_default = {
19215
19284
  ]
19216
19285
  }
19217
19286
  },
19218
- {
19219
- name: "TransferFeeSharingAuthorityEvent",
19220
- type: {
19221
- kind: "struct",
19222
- fields: [
19223
- {
19224
- name: "timestamp",
19225
- type: "i64"
19226
- },
19227
- {
19228
- name: "mint",
19229
- type: "pubkey"
19230
- },
19231
- {
19232
- name: "sharing_config",
19233
- type: "pubkey"
19234
- },
19235
- {
19236
- name: "old_admin",
19237
- type: "pubkey"
19238
- },
19239
- {
19240
- name: "new_admin",
19241
- type: "pubkey"
19242
- }
19243
- ]
19244
- }
19245
- },
19246
19287
  {
19247
19288
  name: "UpdateAdminEvent",
19248
19289
  type: {
@@ -19331,6 +19372,10 @@ var pump_fees_default = {
19331
19372
  }
19332
19373
  }
19333
19374
  }
19375
+ },
19376
+ {
19377
+ name: "version",
19378
+ type: "u8"
19334
19379
  }
19335
19380
  ]
19336
19381
  }
@@ -19371,6 +19416,16 @@ var pump_fees_default = {
19371
19416
  }
19372
19417
  ],
19373
19418
  constants: [
19419
+ {
19420
+ name: "AMM_CREATOR_VAULT_AUTHORITY_SEED",
19421
+ type: {
19422
+ array: [
19423
+ "u8",
19424
+ 13
19425
+ ]
19426
+ },
19427
+ value: "[99, 114, 101, 97, 116, 111, 114, 95, 118, 97, 117, 108, 116]"
19428
+ },
19374
19429
  {
19375
19430
  name: "FEE_CONFIG_SEED",
19376
19431
  type: "bytes",
@@ -19386,6 +19441,16 @@ var pump_fees_default = {
19386
19441
  },
19387
19442
  value: "[102, 101, 101, 45, 112, 114, 111, 103, 114, 97, 109, 45, 103, 108, 111, 98, 97, 108]"
19388
19443
  },
19444
+ {
19445
+ name: "PUMP_CREATOR_VAULT_SEED",
19446
+ type: {
19447
+ array: [
19448
+ "u8",
19449
+ 13
19450
+ ]
19451
+ },
19452
+ value: "[99, 114, 101, 97, 116, 111, 114, 45, 118, 97, 117, 108, 116]"
19453
+ },
19389
19454
  {
19390
19455
  name: "PUMP_GLOBAL_SEED",
19391
19456
  docs: [
@@ -19523,6 +19588,9 @@ var OnlinePumpSdk = class {
19523
19588
  async fetchFeeConfig() {
19524
19589
  return await this.pumpProgram.account.feeConfig.fetch(PUMP_FEE_CONFIG_PDA);
19525
19590
  }
19591
+ /**
19592
+ * @deprecated use PumpSdk.decodeBondingCurveNullable instead.
19593
+ */
19526
19594
  async fetchBondingCurve(mint) {
19527
19595
  return await this.pumpProgram.account.bondingCurve.fetch(
19528
19596
  bondingCurvePda(mint)
@@ -20008,8 +20076,8 @@ var PumpSdk = class {
20008
20076
  decodeBondingCurveNullable(accountInfo) {
20009
20077
  try {
20010
20078
  const data = accountInfo.data;
20011
- if (data.length < 82) {
20012
- const padded = Buffer.alloc(82);
20079
+ if (data.length < 83) {
20080
+ const padded = Buffer.alloc(83);
20013
20081
  data.copy(padded);
20014
20082
  accountInfo = {
20015
20083
  ...accountInfo,
@@ -20502,7 +20570,10 @@ var PumpSdk = class {
20502
20570
  /**
20503
20571
  * Updates the fee shares for a token's creator fee distribution.
20504
20572
  *
20505
- * @param params - Parameters for updating fee shares
20573
+ * Important:
20574
+ * - Reward split updates are effectively one-time. Treat this as a single allowed
20575
+ * modification and verify the final split before submitting.
20576
+ *
20506
20577
  * @param params.authority - The current authority that can modify the fee sharing config
20507
20578
  * @param params.mint - The mint address of the token
20508
20579
  * @param params.curShareholders - Array of current shareholders
@@ -20709,6 +20780,10 @@ var PumpSdk = class {
20709
20780
  * Wrapper around `updateSharingConfig` that resolves social recipients and
20710
20781
  * initializes any missing social recipient PDAs before updating fee shares.
20711
20782
  *
20783
+ * Important:
20784
+ * - Reward split updates are effectively one-time. Treat this call as a single
20785
+ * allowed modification and verify the final split before submitting.
20786
+ *
20712
20787
  * Requirements:
20713
20788
  * - `authority` must sign the transaction.
20714
20789
  *
@@ -20793,6 +20868,17 @@ function isCreatorUsingSharingConfig({
20793
20868
  }) {
20794
20869
  return feeSharingConfigPda(mint).equals(creator);
20795
20870
  }
20871
+ function isSharingConfigEditable({
20872
+ sharingConfig
20873
+ }) {
20874
+ if (sharingConfig.version === 1) {
20875
+ return false;
20876
+ }
20877
+ if (sharingConfig.version === 2 && sharingConfig.adminRevoked) {
20878
+ return false;
20879
+ }
20880
+ return true;
20881
+ }
20796
20882
 
20797
20883
  // src/pda.ts
20798
20884
  var GLOBAL_PDA = pumpPda([import_buffer.Buffer.from("global")]);
@@ -20935,6 +21021,7 @@ export {
20935
21021
  getSolVaultPda,
20936
21022
  getTokenVaultPda,
20937
21023
  isCreatorUsingSharingConfig,
21024
+ isSharingConfigEditable,
20938
21025
  newBondingCurve,
20939
21026
  platformToString,
20940
21027
  pump_default as pumpIdl,