sol-parser-sdk-nodejs 0.4.0 → 0.5.5

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.
Files changed (74) hide show
  1. package/README.md +22 -4
  2. package/README_CN.md +22 -4
  3. package/dist/accounts/mod.d.ts +1 -0
  4. package/dist/accounts/mod.js +53 -6
  5. package/dist/accounts/pumpfun.d.ts +16 -0
  6. package/dist/accounts/pumpfun.js +538 -0
  7. package/dist/accounts/rust_aliases.d.ts +1 -0
  8. package/dist/accounts/rust_aliases.js +3 -1
  9. package/dist/core/account_dispatcher_rpc.js +5 -26
  10. package/dist/core/account_fill_meteora.d.ts +1 -2
  11. package/dist/core/account_fill_meteora.js +0 -2
  12. package/dist/core/account_fill_pumpfun.js +92 -13
  13. package/dist/core/account_fill_pumpswap.js +50 -0
  14. package/dist/core/account_fill_raydium_launchlab.d.ts +4 -0
  15. package/dist/core/account_fill_raydium_launchlab.js +20 -0
  16. package/dist/core/dex_event.d.ts +283 -17
  17. package/dist/core/pumpfun_fee_enrich.d.ts +5 -0
  18. package/dist/core/pumpfun_fee_enrich.js +131 -0
  19. package/dist/core/unified_parser.js +2 -0
  20. package/dist/grpc/client.d.ts +26 -1
  21. package/dist/grpc/client.js +279 -0
  22. package/dist/grpc/log_instr_dedup.d.ts +2 -0
  23. package/dist/grpc/log_instr_dedup.js +378 -0
  24. package/dist/grpc/order_buffer.d.ts +27 -0
  25. package/dist/grpc/order_buffer.js +166 -0
  26. package/dist/grpc/program_ids.d.ts +5 -3
  27. package/dist/grpc/program_ids.js +12 -5
  28. package/dist/grpc/types.d.ts +17 -6
  29. package/dist/grpc/types.js +265 -153
  30. package/dist/grpc/yellowstone_parse.d.ts +3 -1
  31. package/dist/grpc/yellowstone_parse.js +13 -10
  32. package/dist/index.d.ts +9 -7
  33. package/dist/index.js +33 -7
  34. package/dist/instr/meteora_damm_ix.js +4 -1
  35. package/dist/instr/meteora_dlmm_ix.d.ts +2 -0
  36. package/dist/instr/meteora_dlmm_ix.js +134 -0
  37. package/dist/instr/meteora_pools_ix.d.ts +2 -0
  38. package/dist/instr/meteora_pools_ix.js +78 -0
  39. package/dist/instr/mod.d.ts +4 -1
  40. package/dist/instr/mod.js +45 -18
  41. package/dist/instr/program_ids.d.ts +1 -5
  42. package/dist/instr/program_ids.js +4 -6
  43. package/dist/instr/pump_fees_ix.d.ts +2 -0
  44. package/dist/instr/pump_fees_ix.js +166 -0
  45. package/dist/instr/pumpfun_ix.js +272 -1
  46. package/dist/instr/pumpswap_ix.js +36 -2
  47. package/dist/instr/raydium_clmm_ix.js +73 -52
  48. package/dist/instr/raydium_launchlab_ix.d.ts +8 -0
  49. package/dist/instr/raydium_launchlab_ix.js +125 -0
  50. package/dist/instr/rust_aliases.d.ts +3 -0
  51. package/dist/instr/rust_aliases.js +7 -1
  52. package/dist/logs/discriminator_lut.d.ts +1 -1
  53. package/dist/logs/discriminator_lut.js +2 -0
  54. package/dist/logs/optimized_matcher.js +130 -25
  55. package/dist/logs/program_log_discriminators.d.ts +10 -0
  56. package/dist/logs/program_log_discriminators.js +10 -0
  57. package/dist/logs/pump.d.ts +2 -0
  58. package/dist/logs/pump.js +122 -2
  59. package/dist/logs/pump_amm.js +1 -1
  60. package/dist/logs/pump_fees.d.ts +23 -0
  61. package/dist/logs/pump_fees.js +364 -0
  62. package/dist/logs/raydium_launchlab.d.ts +10 -0
  63. package/dist/logs/raydium_launchlab.js +84 -0
  64. package/dist/rpc_transaction.d.ts +2 -0
  65. package/dist/rpc_transaction.js +14 -6
  66. package/dist/shredstream/client.d.ts +4 -1
  67. package/dist/shredstream/client.js +18 -14
  68. package/dist/shredstream/index.d.ts +1 -1
  69. package/dist/shredstream/index.js +1 -1
  70. package/dist/shredstream/instruction_parse.d.ts +3 -3
  71. package/dist/shredstream/instruction_parse.js +38 -13
  72. package/dist/util/market.d.ts +18 -0
  73. package/dist/util/market.js +54 -0
  74. package/package.json +1 -1
@@ -8,22 +8,101 @@ const dex_event_js_1 = require("./dex_event.js");
8
8
  const Z = () => (0, dex_event_js_1.defaultPubkey)();
9
9
  function fillPumpfunTradeAccounts(e, get) {
10
10
  const zero = Z();
11
- if (!e.user || e.user === zero)
12
- e.user = get(6);
13
- if (!e.bonding_curve || e.bonding_curve === zero)
14
- e.bonding_curve = get(3);
15
- if (!e.associated_bonding_curve || e.associated_bonding_curve === zero) {
16
- e.associated_bonding_curve = get(4);
11
+ const accountAtMatchesMint = (idx) => Boolean(e.mint && e.mint !== zero && get(idx) === e.mint);
12
+ const set = (key, idx) => {
13
+ const current = e[key];
14
+ if (!current || current === zero) {
15
+ e[key] = get(idx);
16
+ }
17
+ };
18
+ const isV2 = e.ix_name === "buy_v2" ||
19
+ e.ix_name === "sell_v2" ||
20
+ e.ix_name === "buy_exact_quote_in_v2" ||
21
+ accountAtMatchesMint(1);
22
+ if (isV2) {
23
+ set("global", 0);
24
+ set("quote_mint", 2);
25
+ set("fee_recipient", 6);
26
+ set("bonding_curve", 10);
27
+ set("associated_bonding_curve", 11);
28
+ set("associated_quote_bonding_curve", 12);
29
+ set("user", 13);
30
+ set("associated_user", 14);
31
+ set("associated_quote_user", 15);
32
+ set("token_program", 3);
33
+ set("quote_token_program", 4);
34
+ set("associated_token_program", 5);
35
+ set("creator_vault", 16);
36
+ set("associated_quote_fee_recipient", 7);
37
+ set("buyback_fee_recipient", 8);
38
+ set("associated_quote_buyback_fee_recipient", 9);
39
+ set("associated_creator_vault", 17);
40
+ set("sharing_config", 18);
41
+ if (e.ix_name === "sell_v2" || (!e.is_buy && e.ix_name === "sell")) {
42
+ set("user_volume_accumulator", 19);
43
+ set("associated_user_volume_accumulator", 20);
44
+ set("fee_config", 21);
45
+ set("fee_program", 22);
46
+ set("system_program", 23);
47
+ set("event_authority", 24);
48
+ set("program", 25);
49
+ }
50
+ else {
51
+ set("global_volume_accumulator", 19);
52
+ set("user_volume_accumulator", 20);
53
+ set("associated_user_volume_accumulator", 21);
54
+ set("fee_config", 22);
55
+ set("fee_program", 23);
56
+ set("system_program", 24);
57
+ set("event_authority", 25);
58
+ set("program", 26);
59
+ }
60
+ return;
61
+ }
62
+ set("global", 0);
63
+ set("fee_recipient", 1);
64
+ set("bonding_curve", 3);
65
+ set("associated_bonding_curve", 4);
66
+ set("associated_user", 5);
67
+ set("user", 6);
68
+ set("system_program", 7);
69
+ set("creator_vault", e.is_buy ? 9 : 8);
70
+ set("token_program", e.is_buy ? 8 : 9);
71
+ set("event_authority", 10);
72
+ set("program", 11);
73
+ if (e.is_buy) {
74
+ set("global_volume_accumulator", 12);
75
+ set("user_volume_accumulator", 13);
76
+ set("fee_config", 14);
77
+ set("fee_program", 15);
78
+ set("bonding_curve_v2", 16);
79
+ set("buyback_fee_recipient", 17);
80
+ const a17 = get(17);
81
+ if (a17 && a17 !== zero && e.account == null)
82
+ e.account = a17;
83
+ return;
17
84
  }
18
- if (!e.creator_vault || e.creator_vault === zero) {
19
- e.creator_vault = e.is_buy ? get(9) : get(8);
85
+ set("fee_config", 12);
86
+ set("fee_program", 13);
87
+ const a16 = get(16);
88
+ if (a16 && a16 !== zero) {
89
+ set("user_volume_accumulator", 14);
90
+ set("bonding_curve_v2", 15);
91
+ set("buyback_fee_recipient", 16);
92
+ if (e.account == null)
93
+ e.account = a16;
94
+ return;
20
95
  }
21
- if (!e.token_program || e.token_program === zero) {
22
- e.token_program = e.is_buy ? get(8) : get(9);
96
+ if (e.is_cashback_coin) {
97
+ set("user_volume_accumulator", 14);
98
+ set("bonding_curve_v2", 15);
99
+ return;
23
100
  }
24
- const a17 = get(16);
25
- if (a17 !== zero)
26
- e.account = a17;
101
+ set("bonding_curve_v2", 14);
102
+ set("buyback_fee_recipient", 15);
103
+ const a15 = get(15);
104
+ if (a15 && a15 !== zero && e.account == null)
105
+ e.account = a15;
27
106
  }
28
107
  function fillPumpfunCreateAccounts(e, get) {
29
108
  const zero = Z();
@@ -48,9 +48,59 @@ function fillPumpswapTradeCommon(e, get) {
48
48
  }
49
49
  function fillPumpswapBuyAccounts(e, get) {
50
50
  fillPumpswapTradeCommon(e, get);
51
+ const zero = Z();
52
+ const a26 = get(26);
53
+ if (a26 && a26 !== zero) {
54
+ if (!e.pool_v2 || e.pool_v2 === zero)
55
+ e.pool_v2 = get(24);
56
+ if (!e.fee_recipient || e.fee_recipient === zero)
57
+ e.fee_recipient = get(25);
58
+ if (!e.fee_recipient_quote_token_account || e.fee_recipient_quote_token_account === zero) {
59
+ e.fee_recipient_quote_token_account = a26;
60
+ }
61
+ return;
62
+ }
63
+ const a25 = get(25);
64
+ if (a25 && a25 !== zero) {
65
+ if (!e.pool_v2 || e.pool_v2 === zero)
66
+ e.pool_v2 = get(23);
67
+ if (!e.fee_recipient || e.fee_recipient === zero)
68
+ e.fee_recipient = get(24);
69
+ if (!e.fee_recipient_quote_token_account || e.fee_recipient_quote_token_account === zero) {
70
+ e.fee_recipient_quote_token_account = a25;
71
+ }
72
+ return;
73
+ }
74
+ if (!e.pool_v2 || e.pool_v2 === zero)
75
+ e.pool_v2 = get(23);
51
76
  }
52
77
  function fillPumpswapSellAccounts(e, get) {
53
78
  fillPumpswapTradeCommon(e, get);
79
+ const zero = Z();
80
+ const a25 = get(25);
81
+ if (a25 && a25 !== zero) {
82
+ if (!e.pool_v2 || e.pool_v2 === zero)
83
+ e.pool_v2 = get(23);
84
+ if (!e.fee_recipient || e.fee_recipient === zero)
85
+ e.fee_recipient = get(24);
86
+ if (!e.fee_recipient_quote_token_account || e.fee_recipient_quote_token_account === zero) {
87
+ e.fee_recipient_quote_token_account = a25;
88
+ }
89
+ return;
90
+ }
91
+ const a23 = get(23);
92
+ if (a23 && a23 !== zero) {
93
+ if (!e.pool_v2 || e.pool_v2 === zero)
94
+ e.pool_v2 = get(21);
95
+ if (!e.fee_recipient || e.fee_recipient === zero)
96
+ e.fee_recipient = get(22);
97
+ if (!e.fee_recipient_quote_token_account || e.fee_recipient_quote_token_account === zero) {
98
+ e.fee_recipient_quote_token_account = a23;
99
+ }
100
+ return;
101
+ }
102
+ if (!e.pool_v2 || e.pool_v2 === zero)
103
+ e.pool_v2 = get(21);
54
104
  }
55
105
  function fillPumpswapCreatePoolAccounts(e, get) {
56
106
  const zero = Z();
@@ -0,0 +1,4 @@
1
+ /** RaydiumLaunchlab(LaunchLab)账户填充 */
2
+ import type { RaydiumLaunchlabPoolCreateEvent, RaydiumLaunchlabTradeEvent } from "./dex_event.js";
3
+ export declare function fillRaydiumLaunchlabTradeAccounts(e: RaydiumLaunchlabTradeEvent, get: (i: number) => string): void;
4
+ export declare function fillRaydiumLaunchlabPoolCreateAccounts(e: RaydiumLaunchlabPoolCreateEvent, get: (i: number) => string): void;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fillRaydiumLaunchlabTradeAccounts = fillRaydiumLaunchlabTradeAccounts;
4
+ exports.fillRaydiumLaunchlabPoolCreateAccounts = fillRaydiumLaunchlabPoolCreateAccounts;
5
+ const dex_event_js_1 = require("./dex_event.js");
6
+ const Z = () => (0, dex_event_js_1.defaultPubkey)();
7
+ function fillRaydiumLaunchlabTradeAccounts(e, get) {
8
+ const zero = Z();
9
+ if (!e.user || e.user === zero)
10
+ e.user = get(0);
11
+ if (!e.pool_state || e.pool_state === zero)
12
+ e.pool_state = get(4);
13
+ }
14
+ function fillRaydiumLaunchlabPoolCreateAccounts(e, get) {
15
+ const zero = Z();
16
+ if (!e.pool_state || e.pool_state === zero)
17
+ e.pool_state = get(5);
18
+ if (!e.creator || e.creator === zero)
19
+ e.creator = get(1);
20
+ }
@@ -14,6 +14,26 @@ export type DexEvent = {
14
14
  PumpFunBuyExactSolIn: PumpFunTradeEvent;
15
15
  } | {
16
16
  PumpFunMigrate: PumpFunMigrateEvent;
17
+ } | {
18
+ PumpFeesCreateFeeSharingConfig: PumpFeesCreateFeeSharingConfigEvent;
19
+ } | {
20
+ PumpFeesInitializeFeeConfig: PumpFeesInitializeFeeConfigEvent;
21
+ } | {
22
+ PumpFeesResetFeeSharingConfig: PumpFeesResetFeeSharingConfigEvent;
23
+ } | {
24
+ PumpFeesRevokeFeeSharingAuthority: PumpFeesRevokeFeeSharingAuthorityEvent;
25
+ } | {
26
+ PumpFeesTransferFeeSharingAuthority: PumpFeesTransferFeeSharingAuthorityEvent;
27
+ } | {
28
+ PumpFeesUpdateAdmin: PumpFeesUpdateAdminEvent;
29
+ } | {
30
+ PumpFeesUpdateFeeConfig: PumpFeesUpdateFeeConfigEvent;
31
+ } | {
32
+ PumpFeesUpdateFeeShares: PumpFeesUpdateFeeSharesEvent;
33
+ } | {
34
+ PumpFeesUpsertFeeTiers: PumpFeesUpsertFeeTiersEvent;
35
+ } | {
36
+ PumpFunMigrateBondingCurveCreator: PumpFunMigrateBondingCurveCreatorEvent;
17
37
  } | {
18
38
  PumpSwapTrade: PumpSwapTradeEvent;
19
39
  } | {
@@ -86,8 +106,6 @@ export type DexEvent = {
86
106
  MeteoraDammV2AddLiquidity: MeteoraDammV2AddLiquidityEvent;
87
107
  } | {
88
108
  MeteoraDammV2RemoveLiquidity: MeteoraDammV2RemoveLiquidityEvent;
89
- } | {
90
- MeteoraDammV2RemoveAllLiquidity: MeteoraDammV2RemoveAllLiquidityEvent;
91
109
  } | {
92
110
  MeteoraDammV2CreatePosition: MeteoraDammV2CreatePositionEvent;
93
111
  } | {
@@ -111,17 +129,29 @@ export type DexEvent = {
111
129
  } | {
112
130
  MeteoraDlmmClaimFee: MeteoraDlmmClaimFeeEvent;
113
131
  } | {
114
- BonkTrade: BonkTradeEvent;
132
+ RaydiumLaunchlabTrade: RaydiumLaunchlabTradeEvent;
115
133
  } | {
116
- BonkPoolCreate: BonkPoolCreateEvent;
134
+ RaydiumLaunchlabPoolCreate: RaydiumLaunchlabPoolCreateEvent;
117
135
  } | {
118
- BonkMigrateAmm: BonkMigrateAmmEvent;
136
+ RaydiumLaunchlabMigrateAmm: RaydiumLaunchlabMigrateAmmEvent;
119
137
  } | {
120
138
  TokenInfo: TokenInfoEvent;
121
139
  } | {
122
140
  TokenAccount: TokenAccountEvent;
123
141
  } | {
124
142
  NonceAccount: NonceAccountEvent;
143
+ } | {
144
+ PumpFunGlobalAccount: PumpFunGlobalAccountEvent;
145
+ } | {
146
+ PumpFunBondingCurveAccount: PumpFunBondingCurveAccountEvent;
147
+ } | {
148
+ PumpFunFeeConfigAccount: PumpFunFeeConfigAccountEvent;
149
+ } | {
150
+ PumpFunSharingConfigAccount: PumpFunSharingConfigAccountEvent;
151
+ } | {
152
+ PumpFunGlobalVolumeAccumulatorAccount: PumpFunGlobalVolumeAccumulatorAccountEvent;
153
+ } | {
154
+ PumpFunUserVolumeAccumulatorAccount: PumpFunUserVolumeAccumulatorAccountEvent;
125
155
  } | {
126
156
  PumpSwapGlobalConfigAccount: PumpSwapGlobalConfigAccountEvent;
127
157
  } | {
@@ -148,6 +178,8 @@ export interface PumpFunCreateTokenEvent {
148
178
  token_program: string;
149
179
  is_mayhem_mode: boolean;
150
180
  is_cashback_enabled: boolean;
181
+ quote_mint: string;
182
+ virtual_quote_reserves: bigint;
151
183
  }
152
184
  export interface PumpFunCreateV2TokenEvent extends PumpFunCreateTokenEvent {
153
185
  mint_authority: string;
@@ -162,6 +194,7 @@ export interface PumpFunCreateV2TokenEvent extends PumpFunCreateTokenEvent {
162
194
  mayhem_token_vault: string;
163
195
  event_authority: string;
164
196
  program: string;
197
+ observed_fee_recipient: string;
165
198
  }
166
199
  export interface PumpFunTradeEvent {
167
200
  metadata: EventMetadata;
@@ -191,11 +224,44 @@ export interface PumpFunTradeEvent {
191
224
  mayhem_mode: boolean;
192
225
  cashback_fee_basis_points: bigint;
193
226
  cashback: bigint;
227
+ buyback_fee_basis_points?: bigint;
228
+ buyback_fee?: bigint;
229
+ shareholders?: PumpFeesShareholder[];
230
+ quote_mint?: string;
231
+ quote_amount?: bigint;
232
+ virtual_quote_reserves?: bigint;
233
+ real_quote_reserves?: bigint;
194
234
  is_cashback_coin: boolean;
235
+ amount?: bigint;
236
+ max_sol_cost?: bigint;
237
+ min_sol_output?: bigint;
238
+ spendable_sol_in?: bigint;
239
+ spendable_quote_in?: bigint;
240
+ min_tokens_out?: bigint;
241
+ global?: string;
195
242
  bonding_curve: string;
243
+ bonding_curve_v2?: string;
196
244
  associated_bonding_curve: string;
245
+ associated_user?: string;
246
+ system_program?: string;
197
247
  token_program: string;
248
+ quote_token_program?: string;
249
+ associated_token_program?: string;
198
250
  creator_vault: string;
251
+ associated_quote_fee_recipient?: string;
252
+ buyback_fee_recipient?: string;
253
+ associated_quote_buyback_fee_recipient?: string;
254
+ associated_quote_bonding_curve?: string;
255
+ associated_quote_user?: string;
256
+ associated_creator_vault?: string;
257
+ sharing_config?: string;
258
+ event_authority?: string;
259
+ program?: string;
260
+ global_volume_accumulator?: string;
261
+ user_volume_accumulator?: string;
262
+ associated_user_volume_accumulator?: string;
263
+ fee_config?: string;
264
+ fee_program?: string;
199
265
  account?: string;
200
266
  }
201
267
  export interface PumpFunMigrateEvent {
@@ -209,6 +275,103 @@ export interface PumpFunMigrateEvent {
209
275
  timestamp: bigint;
210
276
  pool: string;
211
277
  }
278
+ export interface PumpFeesShareholder {
279
+ address: string;
280
+ share_bps: number;
281
+ }
282
+ export type PumpFeesConfigStatus = "Paused" | "Active";
283
+ export interface PumpFeesFees {
284
+ lp_fee_bps: bigint;
285
+ protocol_fee_bps: bigint;
286
+ creator_fee_bps: bigint;
287
+ }
288
+ export interface PumpFeesFeeTier {
289
+ market_cap_lamports_threshold: bigint;
290
+ fees: PumpFeesFees;
291
+ }
292
+ export interface PumpFeesCreateFeeSharingConfigEvent {
293
+ metadata: EventMetadata;
294
+ timestamp: bigint;
295
+ mint: string;
296
+ bonding_curve: string;
297
+ pool?: string;
298
+ sharing_config: string;
299
+ admin: string;
300
+ initial_shareholders: PumpFeesShareholder[];
301
+ status: PumpFeesConfigStatus;
302
+ }
303
+ export interface PumpFeesInitializeFeeConfigEvent {
304
+ metadata: EventMetadata;
305
+ timestamp: bigint;
306
+ admin: string;
307
+ fee_config: string;
308
+ }
309
+ export interface PumpFeesResetFeeSharingConfigEvent {
310
+ metadata: EventMetadata;
311
+ timestamp: bigint;
312
+ mint: string;
313
+ sharing_config: string;
314
+ old_admin: string;
315
+ old_shareholders: PumpFeesShareholder[];
316
+ new_admin: string;
317
+ new_shareholders: PumpFeesShareholder[];
318
+ }
319
+ export interface PumpFeesRevokeFeeSharingAuthorityEvent {
320
+ metadata: EventMetadata;
321
+ timestamp: bigint;
322
+ mint: string;
323
+ sharing_config: string;
324
+ admin: string;
325
+ }
326
+ export interface PumpFeesTransferFeeSharingAuthorityEvent {
327
+ metadata: EventMetadata;
328
+ timestamp: bigint;
329
+ mint: string;
330
+ sharing_config: string;
331
+ old_admin: string;
332
+ new_admin: string;
333
+ }
334
+ export interface PumpFeesUpdateAdminEvent {
335
+ metadata: EventMetadata;
336
+ timestamp: bigint;
337
+ old_admin: string;
338
+ new_admin: string;
339
+ }
340
+ export interface PumpFeesUpdateFeeConfigEvent {
341
+ metadata: EventMetadata;
342
+ timestamp: bigint;
343
+ admin: string;
344
+ fee_config: string;
345
+ fee_tiers: PumpFeesFeeTier[];
346
+ flat_fees: PumpFeesFees;
347
+ }
348
+ export interface PumpFeesUpdateFeeSharesEvent {
349
+ metadata: EventMetadata;
350
+ timestamp: bigint;
351
+ mint: string;
352
+ sharing_config: string;
353
+ admin: string;
354
+ bonding_curve: string;
355
+ pump_creator_vault: string;
356
+ new_shareholders: PumpFeesShareholder[];
357
+ }
358
+ export interface PumpFeesUpsertFeeTiersEvent {
359
+ metadata: EventMetadata;
360
+ timestamp: bigint;
361
+ admin: string;
362
+ fee_config: string;
363
+ fee_tiers: PumpFeesFeeTier[];
364
+ offset: number;
365
+ }
366
+ export interface PumpFunMigrateBondingCurveCreatorEvent {
367
+ metadata: EventMetadata;
368
+ timestamp: bigint;
369
+ mint: string;
370
+ bonding_curve: string;
371
+ sharing_config: string;
372
+ old_creator: string;
373
+ new_creator: string;
374
+ }
212
375
  /** 与 `PumpSwapTradeEvent`(IDL TradeEvent)对齐 */
213
376
  export interface PumpSwapTradeEvent {
214
377
  metadata: EventMetadata;
@@ -281,6 +444,9 @@ export interface PumpSwapBuyEvent {
281
444
  coin_creator_vault_authority: string;
282
445
  base_token_program: string;
283
446
  quote_token_program: string;
447
+ pool_v2?: string;
448
+ fee_recipient?: string;
449
+ fee_recipient_quote_token_account?: string;
284
450
  }
285
451
  export interface PumpSwapSellEvent {
286
452
  metadata: EventMetadata;
@@ -318,6 +484,9 @@ export interface PumpSwapSellEvent {
318
484
  coin_creator_vault_authority: string;
319
485
  base_token_program: string;
320
486
  quote_token_program: string;
487
+ pool_v2?: string;
488
+ fee_recipient?: string;
489
+ fee_recipient_quote_token_account?: string;
321
490
  }
322
491
  export interface PumpSwapCreatePoolEvent {
323
492
  metadata: EventMetadata;
@@ -763,15 +932,6 @@ export interface MeteoraDammV2RemoveLiquidityEvent {
763
932
  token_a_amount_threshold: bigint;
764
933
  token_b_amount_threshold: bigint;
765
934
  }
766
- /** 外层 `remove_all_liquidity`;指令仅含两 u64 阈值,无 `liquidity_delta`。 */
767
- export interface MeteoraDammV2RemoveAllLiquidityEvent {
768
- metadata: EventMetadata;
769
- pool: string;
770
- position: string;
771
- owner: string;
772
- token_a_amount_threshold: bigint;
773
- token_b_amount_threshold: bigint;
774
- }
775
935
  /** 与 `MeteoraDammV2CreatePositionEvent` 对齐 */
776
936
  export interface MeteoraDammV2CreatePositionEvent {
777
937
  metadata: EventMetadata;
@@ -879,7 +1039,7 @@ export interface MeteoraDlmmClaimFeeEvent {
879
1039
  fee_y: bigint;
880
1040
  }
881
1041
  export type TradeDirection = "Buy" | "Sell";
882
- export interface BonkTradeEvent {
1042
+ export interface RaydiumLaunchlabTradeEvent {
883
1043
  metadata: EventMetadata;
884
1044
  pool_state: string;
885
1045
  user: string;
@@ -895,13 +1055,13 @@ export interface BaseMintParam {
895
1055
  uri: string;
896
1056
  decimals: number;
897
1057
  }
898
- export interface BonkPoolCreateEvent {
1058
+ export interface RaydiumLaunchlabPoolCreateEvent {
899
1059
  metadata: EventMetadata;
900
1060
  base_mint_param: BaseMintParam;
901
1061
  pool_state: string;
902
1062
  creator: string;
903
1063
  }
904
- export interface BonkMigrateAmmEvent {
1064
+ export interface RaydiumLaunchlabMigrateAmmEvent {
905
1065
  metadata: EventMetadata;
906
1066
  old_pool: string;
907
1067
  new_pool: string;
@@ -938,6 +1098,112 @@ export interface NonceAccountEvent {
938
1098
  nonce: string;
939
1099
  authority: string;
940
1100
  }
1101
+ export interface PumpFunGlobal {
1102
+ initialized: boolean;
1103
+ authority: string;
1104
+ fee_recipient: string;
1105
+ initial_virtual_token_reserves: bigint;
1106
+ initial_virtual_sol_reserves: bigint;
1107
+ initial_real_token_reserves: bigint;
1108
+ token_total_supply: bigint;
1109
+ fee_basis_points: bigint;
1110
+ withdraw_authority: string;
1111
+ enable_migrate: boolean;
1112
+ pool_migration_fee: bigint;
1113
+ creator_fee_basis_points: bigint;
1114
+ fee_recipients: string[];
1115
+ set_creator_authority: string;
1116
+ admin_set_creator_authority: string;
1117
+ create_v2_enabled: boolean;
1118
+ whitelist_pda: string;
1119
+ reserved_fee_recipient: string;
1120
+ mayhem_mode_enabled: boolean;
1121
+ reserved_fee_recipients: string[];
1122
+ is_cashback_enabled: boolean;
1123
+ buyback_fee_recipients: string[];
1124
+ buyback_basis_points: bigint;
1125
+ initial_virtual_quote_reserves: bigint;
1126
+ whitelisted_quote_mints: string[];
1127
+ }
1128
+ export interface PumpFunGlobalAccountEvent {
1129
+ metadata: EventMetadata;
1130
+ pubkey: string;
1131
+ global: PumpFunGlobal;
1132
+ }
1133
+ export interface PumpFunBondingCurve {
1134
+ virtual_token_reserves: bigint;
1135
+ virtual_quote_reserves: bigint;
1136
+ real_token_reserves: bigint;
1137
+ real_quote_reserves: bigint;
1138
+ token_total_supply: bigint;
1139
+ complete: boolean;
1140
+ creator: string;
1141
+ is_mayhem_mode: boolean;
1142
+ is_cashback_coin: boolean;
1143
+ quote_mint: string;
1144
+ }
1145
+ export interface PumpFunBondingCurveAccountEvent {
1146
+ metadata: EventMetadata;
1147
+ pubkey: string;
1148
+ bonding_curve: PumpFunBondingCurve;
1149
+ }
1150
+ export interface PumpFunFeeConfig {
1151
+ bump: number;
1152
+ admin: string;
1153
+ flat_fees: PumpFeesFees;
1154
+ fee_tiers: PumpFeesFeeTier[];
1155
+ stable_fee_tiers: PumpFeesFeeTier[];
1156
+ }
1157
+ export interface PumpFunFeeConfigAccountEvent {
1158
+ metadata: EventMetadata;
1159
+ pubkey: string;
1160
+ fee_config: PumpFunFeeConfig;
1161
+ }
1162
+ export interface PumpFunSharingConfig {
1163
+ bump: number;
1164
+ version: number;
1165
+ status: PumpFeesConfigStatus;
1166
+ mint: string;
1167
+ admin: string;
1168
+ admin_revoked: boolean;
1169
+ shareholders: PumpFeesShareholder[];
1170
+ }
1171
+ export interface PumpFunSharingConfigAccountEvent {
1172
+ metadata: EventMetadata;
1173
+ pubkey: string;
1174
+ sharing_config: PumpFunSharingConfig;
1175
+ }
1176
+ export interface PumpFunGlobalVolumeAccumulator {
1177
+ start_time: bigint;
1178
+ end_time: bigint;
1179
+ seconds_in_a_day: bigint;
1180
+ mint: string;
1181
+ total_token_supply: bigint[];
1182
+ sol_volumes: bigint[];
1183
+ }
1184
+ export interface PumpFunGlobalVolumeAccumulatorAccountEvent {
1185
+ metadata: EventMetadata;
1186
+ pubkey: string;
1187
+ global_volume_accumulator: PumpFunGlobalVolumeAccumulator;
1188
+ }
1189
+ export interface PumpFunUserVolumeAccumulator {
1190
+ user: string;
1191
+ needs_claim: boolean;
1192
+ total_unclaimed_tokens: bigint;
1193
+ total_claimed_tokens: bigint;
1194
+ current_sol_volume: bigint;
1195
+ last_update_timestamp: bigint;
1196
+ has_total_claimed_tokens: boolean;
1197
+ cashback_earned: bigint;
1198
+ total_cashback_claimed: bigint;
1199
+ stable_cashback_earned: bigint;
1200
+ total_stable_cashback_claimed: bigint;
1201
+ }
1202
+ export interface PumpFunUserVolumeAccumulatorAccountEvent {
1203
+ metadata: EventMetadata;
1204
+ pubkey: string;
1205
+ user_volume_accumulator: PumpFunUserVolumeAccumulator;
1206
+ }
941
1207
  export interface PumpSwapGlobalConfig {
942
1208
  admin: string;
943
1209
  lp_fee_basis_points: bigint;
@@ -0,0 +1,5 @@
1
+ import type { DexEvent } from "./dex_event.js";
2
+ export declare function enrichCreateV2FromCreateEvents(events: DexEvent[]): void;
3
+ export declare function enrichCreateV2ObservedFeeRecipient(events: DexEvent[]): void;
4
+ export declare function enrichPumpfunTradesFromCreateInstructions(events: DexEvent[]): void;
5
+ export declare function enrichPumpfunSameTxPostMerge(events: DexEvent[]): void;