@pump-fun/pump-sdk 1.27.0-devnet.2 → 1.28.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/dist/esm/index.js +3599 -1738
- package/dist/index.d.mts +6741 -6653
- package/dist/index.d.ts +6741 -6653
- package/dist/index.js +3066 -1217
- package/package.json +18 -3
- package/src/bondingCurve.ts +3 -2
- package/src/errors.ts +11 -4
- package/src/fees.ts +16 -9
- package/src/idl/pump.json +263 -1
- package/src/idl/pump.ts +3271 -3815
- package/src/idl/pump_amm.json +391 -1
- package/src/idl/pump_amm.ts +2899 -3154
- package/src/idl/pump_fees.json +1271 -114
- package/src/idl/pump_fees.ts +2208 -1586
- package/src/index.ts +5 -1
- package/src/onlineSdk.ts +52 -27
- package/src/pda.ts +29 -16
- package/src/sdk.ts +127 -78
- package/src/state.ts +1 -1
- package/src/tokenIncentives.ts +3 -2
package/src/idl/pump_amm.json
CHANGED
|
@@ -290,6 +290,10 @@
|
|
|
290
290
|
},
|
|
291
291
|
{
|
|
292
292
|
"name": "buy",
|
|
293
|
+
"docs": [
|
|
294
|
+
"For cashback coins, optionally pass user_volume_accumulator_wsol_ata as remaining_accounts[0].",
|
|
295
|
+
"If provided and valid, the ATA will be initialized if needed."
|
|
296
|
+
],
|
|
293
297
|
"discriminator": [
|
|
294
298
|
102,
|
|
295
299
|
6,
|
|
@@ -716,7 +720,10 @@
|
|
|
716
720
|
"Make sure the payer has enough SOL to cover creation of the following accounts (unless already created):",
|
|
717
721
|
"- protocol_fee_recipient_token_account: rent.minimum_balance(TokenAccount::LEN)",
|
|
718
722
|
"- coin_creator_vault_ata: rent.minimum_balance(TokenAccount::LEN)",
|
|
719
|
-
"- user_volume_accumulator: rent.minimum_balance(UserVolumeAccumulator::LEN)"
|
|
723
|
+
"- user_volume_accumulator: rent.minimum_balance(UserVolumeAccumulator::LEN)",
|
|
724
|
+
"",
|
|
725
|
+
"For cashback coins, optionally pass user_volume_accumulator_wsol_ata as remaining_accounts[0].",
|
|
726
|
+
"If provided and valid, the ATA will be initialized if needed."
|
|
720
727
|
],
|
|
721
728
|
"discriminator": [
|
|
722
729
|
198,
|
|
@@ -1133,6 +1140,223 @@
|
|
|
1133
1140
|
}
|
|
1134
1141
|
]
|
|
1135
1142
|
},
|
|
1143
|
+
{
|
|
1144
|
+
"name": "claim_cashback",
|
|
1145
|
+
"discriminator": [
|
|
1146
|
+
37,
|
|
1147
|
+
58,
|
|
1148
|
+
35,
|
|
1149
|
+
126,
|
|
1150
|
+
190,
|
|
1151
|
+
53,
|
|
1152
|
+
228,
|
|
1153
|
+
197
|
|
1154
|
+
],
|
|
1155
|
+
"accounts": [
|
|
1156
|
+
{
|
|
1157
|
+
"name": "user",
|
|
1158
|
+
"writable": true
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
"name": "user_volume_accumulator",
|
|
1162
|
+
"writable": true,
|
|
1163
|
+
"pda": {
|
|
1164
|
+
"seeds": [
|
|
1165
|
+
{
|
|
1166
|
+
"kind": "const",
|
|
1167
|
+
"value": [
|
|
1168
|
+
117,
|
|
1169
|
+
115,
|
|
1170
|
+
101,
|
|
1171
|
+
114,
|
|
1172
|
+
95,
|
|
1173
|
+
118,
|
|
1174
|
+
111,
|
|
1175
|
+
108,
|
|
1176
|
+
117,
|
|
1177
|
+
109,
|
|
1178
|
+
101,
|
|
1179
|
+
95,
|
|
1180
|
+
97,
|
|
1181
|
+
99,
|
|
1182
|
+
99,
|
|
1183
|
+
117,
|
|
1184
|
+
109,
|
|
1185
|
+
117,
|
|
1186
|
+
108,
|
|
1187
|
+
97,
|
|
1188
|
+
116,
|
|
1189
|
+
111,
|
|
1190
|
+
114
|
|
1191
|
+
]
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
"kind": "account",
|
|
1195
|
+
"path": "user"
|
|
1196
|
+
}
|
|
1197
|
+
]
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"name": "quote_mint"
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
"name": "quote_token_program"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
"name": "user_volume_accumulator_wsol_token_account",
|
|
1208
|
+
"writable": true,
|
|
1209
|
+
"pda": {
|
|
1210
|
+
"seeds": [
|
|
1211
|
+
{
|
|
1212
|
+
"kind": "account",
|
|
1213
|
+
"path": "user_volume_accumulator"
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
"kind": "account",
|
|
1217
|
+
"path": "quote_token_program"
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
"kind": "account",
|
|
1221
|
+
"path": "quote_mint"
|
|
1222
|
+
}
|
|
1223
|
+
],
|
|
1224
|
+
"program": {
|
|
1225
|
+
"kind": "const",
|
|
1226
|
+
"value": [
|
|
1227
|
+
140,
|
|
1228
|
+
151,
|
|
1229
|
+
37,
|
|
1230
|
+
143,
|
|
1231
|
+
78,
|
|
1232
|
+
36,
|
|
1233
|
+
137,
|
|
1234
|
+
241,
|
|
1235
|
+
187,
|
|
1236
|
+
61,
|
|
1237
|
+
16,
|
|
1238
|
+
41,
|
|
1239
|
+
20,
|
|
1240
|
+
142,
|
|
1241
|
+
13,
|
|
1242
|
+
131,
|
|
1243
|
+
11,
|
|
1244
|
+
90,
|
|
1245
|
+
19,
|
|
1246
|
+
153,
|
|
1247
|
+
218,
|
|
1248
|
+
255,
|
|
1249
|
+
16,
|
|
1250
|
+
132,
|
|
1251
|
+
4,
|
|
1252
|
+
142,
|
|
1253
|
+
123,
|
|
1254
|
+
216,
|
|
1255
|
+
219,
|
|
1256
|
+
233,
|
|
1257
|
+
248,
|
|
1258
|
+
89
|
|
1259
|
+
]
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
"name": "user_wsol_token_account",
|
|
1265
|
+
"writable": true,
|
|
1266
|
+
"pda": {
|
|
1267
|
+
"seeds": [
|
|
1268
|
+
{
|
|
1269
|
+
"kind": "account",
|
|
1270
|
+
"path": "user"
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
"kind": "account",
|
|
1274
|
+
"path": "quote_token_program"
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
"kind": "account",
|
|
1278
|
+
"path": "quote_mint"
|
|
1279
|
+
}
|
|
1280
|
+
],
|
|
1281
|
+
"program": {
|
|
1282
|
+
"kind": "const",
|
|
1283
|
+
"value": [
|
|
1284
|
+
140,
|
|
1285
|
+
151,
|
|
1286
|
+
37,
|
|
1287
|
+
143,
|
|
1288
|
+
78,
|
|
1289
|
+
36,
|
|
1290
|
+
137,
|
|
1291
|
+
241,
|
|
1292
|
+
187,
|
|
1293
|
+
61,
|
|
1294
|
+
16,
|
|
1295
|
+
41,
|
|
1296
|
+
20,
|
|
1297
|
+
142,
|
|
1298
|
+
13,
|
|
1299
|
+
131,
|
|
1300
|
+
11,
|
|
1301
|
+
90,
|
|
1302
|
+
19,
|
|
1303
|
+
153,
|
|
1304
|
+
218,
|
|
1305
|
+
255,
|
|
1306
|
+
16,
|
|
1307
|
+
132,
|
|
1308
|
+
4,
|
|
1309
|
+
142,
|
|
1310
|
+
123,
|
|
1311
|
+
216,
|
|
1312
|
+
219,
|
|
1313
|
+
233,
|
|
1314
|
+
248,
|
|
1315
|
+
89
|
|
1316
|
+
]
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
"name": "system_program",
|
|
1322
|
+
"address": "11111111111111111111111111111111"
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"name": "event_authority",
|
|
1326
|
+
"pda": {
|
|
1327
|
+
"seeds": [
|
|
1328
|
+
{
|
|
1329
|
+
"kind": "const",
|
|
1330
|
+
"value": [
|
|
1331
|
+
95,
|
|
1332
|
+
95,
|
|
1333
|
+
101,
|
|
1334
|
+
118,
|
|
1335
|
+
101,
|
|
1336
|
+
110,
|
|
1337
|
+
116,
|
|
1338
|
+
95,
|
|
1339
|
+
97,
|
|
1340
|
+
117,
|
|
1341
|
+
116,
|
|
1342
|
+
104,
|
|
1343
|
+
111,
|
|
1344
|
+
114,
|
|
1345
|
+
105,
|
|
1346
|
+
116,
|
|
1347
|
+
121
|
|
1348
|
+
]
|
|
1349
|
+
}
|
|
1350
|
+
]
|
|
1351
|
+
}
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
"name": "program",
|
|
1355
|
+
"address": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"
|
|
1356
|
+
}
|
|
1357
|
+
],
|
|
1358
|
+
"args": []
|
|
1359
|
+
},
|
|
1136
1360
|
{
|
|
1137
1361
|
"name": "claim_token_incentives",
|
|
1138
1362
|
"discriminator": [
|
|
@@ -2087,6 +2311,14 @@
|
|
|
2087
2311
|
{
|
|
2088
2312
|
"name": "is_mayhem_mode",
|
|
2089
2313
|
"type": "bool"
|
|
2314
|
+
},
|
|
2315
|
+
{
|
|
2316
|
+
"name": "is_cashback_coin",
|
|
2317
|
+
"type": {
|
|
2318
|
+
"defined": {
|
|
2319
|
+
"name": "OptionBool"
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2090
2322
|
}
|
|
2091
2323
|
]
|
|
2092
2324
|
},
|
|
@@ -3378,6 +3610,70 @@
|
|
|
3378
3610
|
],
|
|
3379
3611
|
"args": []
|
|
3380
3612
|
},
|
|
3613
|
+
{
|
|
3614
|
+
"name": "toggle_cashback_enabled",
|
|
3615
|
+
"discriminator": [
|
|
3616
|
+
115,
|
|
3617
|
+
103,
|
|
3618
|
+
224,
|
|
3619
|
+
255,
|
|
3620
|
+
189,
|
|
3621
|
+
89,
|
|
3622
|
+
86,
|
|
3623
|
+
195
|
|
3624
|
+
],
|
|
3625
|
+
"accounts": [
|
|
3626
|
+
{
|
|
3627
|
+
"name": "admin",
|
|
3628
|
+
"signer": true,
|
|
3629
|
+
"relations": [
|
|
3630
|
+
"global_config"
|
|
3631
|
+
]
|
|
3632
|
+
},
|
|
3633
|
+
{
|
|
3634
|
+
"name": "global_config",
|
|
3635
|
+
"writable": true
|
|
3636
|
+
},
|
|
3637
|
+
{
|
|
3638
|
+
"name": "event_authority",
|
|
3639
|
+
"pda": {
|
|
3640
|
+
"seeds": [
|
|
3641
|
+
{
|
|
3642
|
+
"kind": "const",
|
|
3643
|
+
"value": [
|
|
3644
|
+
95,
|
|
3645
|
+
95,
|
|
3646
|
+
101,
|
|
3647
|
+
118,
|
|
3648
|
+
101,
|
|
3649
|
+
110,
|
|
3650
|
+
116,
|
|
3651
|
+
95,
|
|
3652
|
+
97,
|
|
3653
|
+
117,
|
|
3654
|
+
116,
|
|
3655
|
+
104,
|
|
3656
|
+
111,
|
|
3657
|
+
114,
|
|
3658
|
+
105,
|
|
3659
|
+
116,
|
|
3660
|
+
121
|
|
3661
|
+
]
|
|
3662
|
+
}
|
|
3663
|
+
]
|
|
3664
|
+
}
|
|
3665
|
+
},
|
|
3666
|
+
{
|
|
3667
|
+
"name": "program"
|
|
3668
|
+
}
|
|
3669
|
+
],
|
|
3670
|
+
"args": [
|
|
3671
|
+
{
|
|
3672
|
+
"name": "enabled",
|
|
3673
|
+
"type": "bool"
|
|
3674
|
+
}
|
|
3675
|
+
]
|
|
3676
|
+
},
|
|
3381
3677
|
{
|
|
3382
3678
|
"name": "toggle_mayhem_mode",
|
|
3383
3679
|
"discriminator": [
|
|
@@ -4075,6 +4371,19 @@
|
|
|
4075
4371
|
119
|
|
4076
4372
|
]
|
|
4077
4373
|
},
|
|
4374
|
+
{
|
|
4375
|
+
"name": "ClaimCashbackEvent",
|
|
4376
|
+
"discriminator": [
|
|
4377
|
+
226,
|
|
4378
|
+
214,
|
|
4379
|
+
246,
|
|
4380
|
+
33,
|
|
4381
|
+
7,
|
|
4382
|
+
242,
|
|
4383
|
+
147,
|
|
4384
|
+
229
|
|
4385
|
+
]
|
|
4386
|
+
},
|
|
4078
4387
|
{
|
|
4079
4388
|
"name": "ClaimTokenIncentivesEvent",
|
|
4080
4389
|
"discriminator": [
|
|
@@ -4510,6 +4819,23 @@
|
|
|
4510
4819
|
"code": 6048,
|
|
4511
4820
|
"name": "CreatorVaultMigratedToSharingConfig",
|
|
4512
4821
|
"msg": "creator_vault has been migrated to sharing config, use pump:distribute_creator_fees instead"
|
|
4822
|
+
},
|
|
4823
|
+
{
|
|
4824
|
+
"code": 6049,
|
|
4825
|
+
"name": "CashbackNotEnabled",
|
|
4826
|
+
"msg": "Cashback is disabled"
|
|
4827
|
+
},
|
|
4828
|
+
{
|
|
4829
|
+
"code": 6050,
|
|
4830
|
+
"name": "OnlyPumpPoolsCashback"
|
|
4831
|
+
},
|
|
4832
|
+
{
|
|
4833
|
+
"code": 6051,
|
|
4834
|
+
"name": "CashbackNotInDesiredState"
|
|
4835
|
+
},
|
|
4836
|
+
{
|
|
4837
|
+
"code": 6052,
|
|
4838
|
+
"name": "CashbackEarnedDoesNotMatchTokenInVault"
|
|
4513
4839
|
}
|
|
4514
4840
|
],
|
|
4515
4841
|
"types": [
|
|
@@ -4617,6 +4943,10 @@
|
|
|
4617
4943
|
{
|
|
4618
4944
|
"name": "is_mayhem_mode",
|
|
4619
4945
|
"type": "bool"
|
|
4946
|
+
},
|
|
4947
|
+
{
|
|
4948
|
+
"name": "is_cashback_coin",
|
|
4949
|
+
"type": "bool"
|
|
4620
4950
|
}
|
|
4621
4951
|
]
|
|
4622
4952
|
}
|
|
@@ -4748,6 +5078,42 @@
|
|
|
4748
5078
|
{
|
|
4749
5079
|
"name": "ix_name",
|
|
4750
5080
|
"type": "string"
|
|
5081
|
+
},
|
|
5082
|
+
{
|
|
5083
|
+
"name": "cashback_fee_basis_points",
|
|
5084
|
+
"type": "u64"
|
|
5085
|
+
},
|
|
5086
|
+
{
|
|
5087
|
+
"name": "cashback",
|
|
5088
|
+
"type": "u64"
|
|
5089
|
+
}
|
|
5090
|
+
]
|
|
5091
|
+
}
|
|
5092
|
+
},
|
|
5093
|
+
{
|
|
5094
|
+
"name": "ClaimCashbackEvent",
|
|
5095
|
+
"type": {
|
|
5096
|
+
"kind": "struct",
|
|
5097
|
+
"fields": [
|
|
5098
|
+
{
|
|
5099
|
+
"name": "user",
|
|
5100
|
+
"type": "pubkey"
|
|
5101
|
+
},
|
|
5102
|
+
{
|
|
5103
|
+
"name": "amount",
|
|
5104
|
+
"type": "u64"
|
|
5105
|
+
},
|
|
5106
|
+
{
|
|
5107
|
+
"name": "timestamp",
|
|
5108
|
+
"type": "i64"
|
|
5109
|
+
},
|
|
5110
|
+
{
|
|
5111
|
+
"name": "total_claimed",
|
|
5112
|
+
"type": "u64"
|
|
5113
|
+
},
|
|
5114
|
+
{
|
|
5115
|
+
"name": "total_cashback_earned",
|
|
5116
|
+
"type": "u64"
|
|
4751
5117
|
}
|
|
4752
5118
|
]
|
|
4753
5119
|
}
|
|
@@ -5276,6 +5642,10 @@
|
|
|
5276
5642
|
7
|
|
5277
5643
|
]
|
|
5278
5644
|
}
|
|
5645
|
+
},
|
|
5646
|
+
{
|
|
5647
|
+
"name": "is_cashback_enabled",
|
|
5648
|
+
"type": "bool"
|
|
5279
5649
|
}
|
|
5280
5650
|
]
|
|
5281
5651
|
}
|
|
@@ -5434,6 +5804,10 @@
|
|
|
5434
5804
|
{
|
|
5435
5805
|
"name": "is_mayhem_mode",
|
|
5436
5806
|
"type": "bool"
|
|
5807
|
+
},
|
|
5808
|
+
{
|
|
5809
|
+
"name": "is_cashback_coin",
|
|
5810
|
+
"type": "bool"
|
|
5437
5811
|
}
|
|
5438
5812
|
]
|
|
5439
5813
|
}
|
|
@@ -5559,6 +5933,14 @@
|
|
|
5559
5933
|
{
|
|
5560
5934
|
"name": "coin_creator_fee",
|
|
5561
5935
|
"type": "u64"
|
|
5936
|
+
},
|
|
5937
|
+
{
|
|
5938
|
+
"name": "cashback_fee_basis_points",
|
|
5939
|
+
"type": "u64"
|
|
5940
|
+
},
|
|
5941
|
+
{
|
|
5942
|
+
"name": "cashback",
|
|
5943
|
+
"type": "u64"
|
|
5562
5944
|
}
|
|
5563
5945
|
]
|
|
5564
5946
|
}
|
|
@@ -5798,6 +6180,14 @@
|
|
|
5798
6180
|
{
|
|
5799
6181
|
"name": "has_total_claimed_tokens",
|
|
5800
6182
|
"type": "bool"
|
|
6183
|
+
},
|
|
6184
|
+
{
|
|
6185
|
+
"name": "cashback_earned",
|
|
6186
|
+
"type": "u64"
|
|
6187
|
+
},
|
|
6188
|
+
{
|
|
6189
|
+
"name": "total_cashback_claimed",
|
|
6190
|
+
"type": "u64"
|
|
5801
6191
|
}
|
|
5802
6192
|
]
|
|
5803
6193
|
}
|