sol-parser-sdk-nodejs 0.4.4 → 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 (52) hide show
  1. package/README.md +16 -4
  2. package/README_CN.md +16 -4
  3. package/dist/accounts/mod.d.ts +1 -1
  4. package/dist/accounts/mod.js +43 -9
  5. package/dist/accounts/pumpfun.d.ts +10 -0
  6. package/dist/accounts/pumpfun.js +384 -3
  7. package/dist/core/account_dispatcher_rpc.js +5 -26
  8. package/dist/core/account_fill_meteora.d.ts +1 -2
  9. package/dist/core/account_fill_meteora.js +0 -2
  10. package/dist/core/account_fill_pumpfun.js +86 -24
  11. package/dist/core/account_fill_pumpswap.js +50 -0
  12. package/dist/core/account_fill_raydium_launchlab.d.ts +4 -0
  13. package/dist/core/account_fill_raydium_launchlab.js +20 -0
  14. package/dist/core/dex_event.d.ts +136 -17
  15. package/dist/core/pumpfun_fee_enrich.d.ts +1 -0
  16. package/dist/core/pumpfun_fee_enrich.js +51 -0
  17. package/dist/grpc/log_instr_dedup.js +62 -14
  18. package/dist/grpc/program_ids.d.ts +4 -3
  19. package/dist/grpc/program_ids.js +11 -5
  20. package/dist/grpc/types.d.ts +13 -6
  21. package/dist/grpc/types.js +250 -239
  22. package/dist/index.d.ts +6 -5
  23. package/dist/index.js +21 -7
  24. package/dist/instr/meteora_damm_ix.js +4 -1
  25. package/dist/instr/meteora_dlmm_ix.d.ts +2 -0
  26. package/dist/instr/meteora_dlmm_ix.js +134 -0
  27. package/dist/instr/meteora_pools_ix.d.ts +2 -0
  28. package/dist/instr/meteora_pools_ix.js +78 -0
  29. package/dist/instr/mod.d.ts +3 -1
  30. package/dist/instr/mod.js +38 -19
  31. package/dist/instr/program_ids.d.ts +1 -5
  32. package/dist/instr/program_ids.js +3 -6
  33. package/dist/instr/pumpfun_ix.js +219 -5
  34. package/dist/instr/pumpswap_ix.js +36 -2
  35. package/dist/instr/raydium_launchlab_ix.d.ts +8 -0
  36. package/dist/instr/raydium_launchlab_ix.js +125 -0
  37. package/dist/instr/rust_aliases.d.ts +2 -0
  38. package/dist/instr/rust_aliases.js +5 -1
  39. package/dist/logs/optimized_matcher.js +14 -9
  40. package/dist/logs/pump.js +76 -3
  41. package/dist/logs/pump_amm.js +1 -1
  42. package/dist/logs/raydium_launchlab.d.ts +10 -0
  43. package/dist/logs/raydium_launchlab.js +84 -0
  44. package/dist/shredstream/client.d.ts +4 -1
  45. package/dist/shredstream/client.js +18 -14
  46. package/dist/shredstream/index.d.ts +1 -1
  47. package/dist/shredstream/index.js +1 -1
  48. package/dist/shredstream/instruction_parse.d.ts +3 -3
  49. package/dist/shredstream/instruction_parse.js +36 -13
  50. package/dist/util/market.d.ts +18 -0
  51. package/dist/util/market.js +54 -0
  52. package/package.json +1 -1
@@ -25,6 +25,12 @@ function fillString(to, key, from) {
25
25
  to[key] = value;
26
26
  }
27
27
  }
28
+ function fillNonZero(to, key, from) {
29
+ const value = from[key];
30
+ if ((to[key] == null || to[key] === 0n || to[key] === 0) && value != null && value !== 0n && value !== 0) {
31
+ to[key] = value;
32
+ }
33
+ }
28
34
  function fillNestedString(to, parent, key, from) {
29
35
  const srcParent = from[parent];
30
36
  if (!srcParent || typeof srcParent !== "object")
@@ -41,8 +47,11 @@ function fillIxName(to, from) {
41
47
  function ixLane(ixName) {
42
48
  switch (ixName) {
43
49
  case "sell":
50
+ case "sell_v2":
44
51
  return 1;
45
52
  case "buy_exact_sol_in":
53
+ case "buy_exact_quote_in":
54
+ case "buy_exact_quote_in_v2":
46
55
  return 2;
47
56
  default:
48
57
  return 0;
@@ -71,12 +80,12 @@ function dedupeKey(ev, pumpfunLaneCounts) {
71
80
  return `PumpFunCreateV2|${data.mint}`;
72
81
  case "PumpFunMigrate":
73
82
  return `PumpFunMigrate|${data.mint}|${data.pool}|${data.user}`;
74
- case "BonkTrade":
75
- return `BonkTrade|${data.pool_state}|${data.user}|${Boolean(data.is_buy)}`;
76
- case "BonkPoolCreate":
77
- return `BonkPoolCreate|${data.pool_state}`;
78
- case "BonkMigrateAmm":
79
- return `BonkMigrateAmm|${data.old_pool}|${data.new_pool}|${data.user}`;
83
+ case "RaydiumLaunchlabTrade":
84
+ return `RaydiumLaunchlabTrade|${data.pool_state}|${data.user}|${Boolean(data.is_buy)}`;
85
+ case "RaydiumLaunchlabPoolCreate":
86
+ return `RaydiumLaunchlabPoolCreate|${data.pool_state}`;
87
+ case "RaydiumLaunchlabMigrateAmm":
88
+ return `RaydiumLaunchlabMigrateAmm|${data.old_pool}|${data.new_pool}|${data.user}`;
80
89
  case "PumpSwapTrade":
81
90
  return `PumpSwapTrade|${data.mint}|${data.user}|${Boolean(data.is_buy)}|${ixLane(data.ix_name)}`;
82
91
  case "PumpSwapBuy":
@@ -102,16 +111,50 @@ function dedupeKey(ev, pumpfunLaneCounts) {
102
111
  function mergePumpfunTrade(log, ix) {
103
112
  for (const key of [
104
113
  "bonding_curve",
114
+ "bonding_curve_v2",
105
115
  "associated_bonding_curve",
116
+ "associated_user",
117
+ "system_program",
106
118
  "token_program",
119
+ "quote_token_program",
120
+ "associated_token_program",
107
121
  "creator_vault",
108
122
  "fee_recipient",
123
+ "associated_quote_fee_recipient",
124
+ "buyback_fee_recipient",
125
+ "associated_quote_buyback_fee_recipient",
126
+ "associated_quote_bonding_curve",
127
+ "associated_quote_user",
128
+ "associated_creator_vault",
129
+ "sharing_config",
130
+ "event_authority",
131
+ "program",
132
+ "global_volume_accumulator",
133
+ "user_volume_accumulator",
134
+ "associated_user_volume_accumulator",
135
+ "fee_config",
136
+ "fee_program",
137
+ "global",
138
+ "quote_mint",
109
139
  "creator",
110
140
  ]) {
111
141
  fillString(log, key, ix);
112
142
  }
113
143
  if (log.account == null && ix.account != null)
114
144
  log.account = ix.account;
145
+ for (const key of [
146
+ "amount",
147
+ "max_sol_cost",
148
+ "min_sol_output",
149
+ "spendable_sol_in",
150
+ "spendable_quote_in",
151
+ "min_tokens_out",
152
+ "quote_amount",
153
+ "virtual_quote_reserves",
154
+ "real_quote_reserves",
155
+ ]) {
156
+ fillNonZero(log, key, ix);
157
+ }
115
158
  fillIxName(log, ix);
116
159
  log.is_created_buy = Boolean(log.is_created_buy) || Boolean(ix.is_created_buy);
117
160
  }
@@ -124,9 +167,11 @@ function mergePumpfunCreate(log, ix) {
124
167
  "user",
125
168
  "creator",
126
169
  "token_program",
170
+ "quote_mint",
127
171
  ]) {
128
172
  fillString(log, key, ix);
129
173
  }
174
+ fillNonZero(log, "virtual_quote_reserves", ix);
130
175
  }
131
176
  function mergePumpfunCreateV2(log, ix) {
132
177
  mergePumpfunCreate(log, ix);
@@ -168,6 +213,9 @@ function mergePumpSwapBuySell(log, ix, includeIxName) {
168
213
  "coin_creator_vault_authority",
169
214
  "base_token_program",
170
215
  "quote_token_program",
216
+ "pool_v2",
217
+ "fee_recipient",
218
+ "fee_recipient_quote_token_account",
171
219
  ]) {
172
220
  fillString(log, key, ix);
173
221
  }
@@ -222,13 +270,13 @@ function mergeRaydiumAmmV4Swap(log, ix) {
222
270
  fillString(log, key, ix);
223
271
  }
224
272
  }
225
- function mergeBonkPoolCreate(log, ix) {
273
+ function mergeRaydiumLaunchlabPoolCreate(log, ix) {
226
274
  fillString(log, "creator", ix);
227
275
  for (const key of ["name", "symbol", "uri"]) {
228
276
  fillNestedString(log, "base_mint_param", key, ix);
229
277
  }
230
278
  }
231
- function mergeBonkMigrateAmm(log, ix) {
279
+ function mergeRaydiumLaunchlabMigrateAmm(log, ix) {
232
280
  for (const key of ["old_pool", "new_pool", "user"]) {
233
281
  fillString(log, key, ix);
234
282
  }
@@ -289,13 +337,13 @@ function mergeGrpcInstructionIntoLog(logEvent, ixEvent) {
289
337
  if (ixName === "RaydiumAmmV4Swap")
290
338
  mergeRaydiumAmmV4Swap(log, ix);
291
339
  break;
292
- case "BonkPoolCreate":
293
- if (ixName === "BonkPoolCreate")
294
- mergeBonkPoolCreate(log, ix);
340
+ case "RaydiumLaunchlabPoolCreate":
341
+ if (ixName === "RaydiumLaunchlabPoolCreate")
342
+ mergeRaydiumLaunchlabPoolCreate(log, ix);
295
343
  break;
296
- case "BonkMigrateAmm":
297
- if (ixName === "BonkMigrateAmm")
298
- mergeBonkMigrateAmm(log, ix);
344
+ case "RaydiumLaunchlabMigrateAmm":
345
+ if (ixName === "RaydiumLaunchlabMigrateAmm")
346
+ mergeRaydiumLaunchlabMigrateAmm(log, ix);
299
347
  break;
300
348
  default:
301
349
  break;
@@ -7,15 +7,16 @@ export declare const PUMPFUN_PROGRAM_ID = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5u
7
7
  export declare const PUMPSWAP_PROGRAM_ID = "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA";
8
8
  export declare const PUMPSWAP_FEES_PROGRAM_ID = "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ";
9
9
  export declare const PUMP_FEES_PROGRAM_ID = "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ";
10
- /** Rust `BONK_PROGRAM_ID`(`Protocol::Bonk`)一致 */
11
- export declare const BONK_PROGRAM_ID = "BSwp6bEBihVLdqJRKS58NaebUBSDNjN7MdpFwNaR6gn3";
10
+ /** Raydium LaunchLab program id. */
11
+ export declare const RAYDIUM_LAUNCHLAB_PROGRAM_ID = "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj";
12
12
  export declare const RAYDIUM_CPMM_PROGRAM_ID = "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C";
13
- export declare const RAYDIUM_CLMM_PROGRAM_ID = "CAMMCzo5YL8w4VFF8KVHrK22GGUQtcaMpgYqJPXBDvfE";
13
+ export declare const RAYDIUM_CLMM_PROGRAM_ID = "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK";
14
14
  export declare const RAYDIUM_AMM_V4_PROGRAM_ID = "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8";
15
15
  export declare const ORCA_WHIRLPOOL_PROGRAM_ID = "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc";
16
16
  export declare const METEORA_POOLS_PROGRAM_ID = "Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB";
17
17
  export declare const METEORA_DAMM_V2_PROGRAM_ID = "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG";
18
18
  export declare const METEORA_DLMM_PROGRAM_ID = "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo";
19
+ export declare const METEORA_DBC_PROGRAM_ID = "dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN";
19
20
  /** 与 Rust `PROTOCOL_PROGRAM_IDS` 一致(仅含 Rust 中存在的协议) */
20
21
  export declare const PROTOCOL_PROGRAM_IDS: Record<Protocol, readonly string[]>;
21
22
  /** 与 Rust `get_program_ids_for_protocols` 一致 */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PROTOCOL_PROGRAM_IDS = exports.METEORA_DLMM_PROGRAM_ID = exports.METEORA_DAMM_V2_PROGRAM_ID = exports.METEORA_POOLS_PROGRAM_ID = exports.ORCA_WHIRLPOOL_PROGRAM_ID = exports.RAYDIUM_AMM_V4_PROGRAM_ID = exports.RAYDIUM_CLMM_PROGRAM_ID = exports.RAYDIUM_CPMM_PROGRAM_ID = exports.BONK_PROGRAM_ID = exports.PUMP_FEES_PROGRAM_ID = exports.PUMPSWAP_FEES_PROGRAM_ID = exports.PUMPSWAP_PROGRAM_ID = exports.PUMPFUN_PROGRAM_ID = void 0;
3
+ exports.PROTOCOL_PROGRAM_IDS = exports.METEORA_DBC_PROGRAM_ID = exports.METEORA_DLMM_PROGRAM_ID = exports.METEORA_DAMM_V2_PROGRAM_ID = exports.METEORA_POOLS_PROGRAM_ID = exports.ORCA_WHIRLPOOL_PROGRAM_ID = exports.RAYDIUM_AMM_V4_PROGRAM_ID = exports.RAYDIUM_CLMM_PROGRAM_ID = exports.RAYDIUM_CPMM_PROGRAM_ID = exports.RAYDIUM_LAUNCHLAB_PROGRAM_ID = exports.PUMP_FEES_PROGRAM_ID = exports.PUMPSWAP_FEES_PROGRAM_ID = exports.PUMPSWAP_PROGRAM_ID = exports.PUMPFUN_PROGRAM_ID = void 0;
4
4
  exports.getProgramIdsForProtocols = getProgramIdsForProtocols;
5
5
  exports.transactionFilterForProtocols = transactionFilterForProtocols;
6
6
  exports.accountFilterForProtocols = accountFilterForProtocols;
@@ -8,24 +8,30 @@ exports.PUMPFUN_PROGRAM_ID = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P";
8
8
  exports.PUMPSWAP_PROGRAM_ID = "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA";
9
9
  exports.PUMPSWAP_FEES_PROGRAM_ID = "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ";
10
10
  exports.PUMP_FEES_PROGRAM_ID = exports.PUMPSWAP_FEES_PROGRAM_ID;
11
- /** Rust `BONK_PROGRAM_ID`(`Protocol::Bonk`)一致 */
12
- exports.BONK_PROGRAM_ID = "BSwp6bEBihVLdqJRKS58NaebUBSDNjN7MdpFwNaR6gn3";
11
+ /** Raydium LaunchLab program id. */
12
+ exports.RAYDIUM_LAUNCHLAB_PROGRAM_ID = "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj";
13
13
  exports.RAYDIUM_CPMM_PROGRAM_ID = "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C";
14
- exports.RAYDIUM_CLMM_PROGRAM_ID = "CAMMCzo5YL8w4VFF8KVHrK22GGUQtcaMpgYqJPXBDvfE";
14
+ exports.RAYDIUM_CLMM_PROGRAM_ID = "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK";
15
15
  exports.RAYDIUM_AMM_V4_PROGRAM_ID = "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8";
16
16
  exports.ORCA_WHIRLPOOL_PROGRAM_ID = "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc";
17
17
  exports.METEORA_POOLS_PROGRAM_ID = "Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB";
18
18
  exports.METEORA_DAMM_V2_PROGRAM_ID = "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG";
19
19
  exports.METEORA_DLMM_PROGRAM_ID = "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo";
20
+ exports.METEORA_DBC_PROGRAM_ID = "dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN";
20
21
  /** 与 Rust `PROTOCOL_PROGRAM_IDS` 一致(仅含 Rust 中存在的协议) */
21
22
  exports.PROTOCOL_PROGRAM_IDS = {
22
23
  PumpFun: [exports.PUMPFUN_PROGRAM_ID],
23
24
  PumpSwap: [exports.PUMPSWAP_PROGRAM_ID],
24
- Bonk: [exports.BONK_PROGRAM_ID],
25
+ PumpFees: [exports.PUMP_FEES_PROGRAM_ID],
26
+ RaydiumLaunchlab: [exports.RAYDIUM_LAUNCHLAB_PROGRAM_ID],
25
27
  RaydiumCpmm: [exports.RAYDIUM_CPMM_PROGRAM_ID],
26
28
  RaydiumClmm: [exports.RAYDIUM_CLMM_PROGRAM_ID],
27
29
  RaydiumAmmV4: [exports.RAYDIUM_AMM_V4_PROGRAM_ID],
30
+ OrcaWhirlpool: [exports.ORCA_WHIRLPOOL_PROGRAM_ID],
31
+ MeteoraPools: [exports.METEORA_POOLS_PROGRAM_ID],
28
32
  MeteoraDammV2: [exports.METEORA_DAMM_V2_PROGRAM_ID],
33
+ MeteoraDlmm: [exports.METEORA_DLMM_PROGRAM_ID],
34
+ MeteoraDbc: [exports.METEORA_DBC_PROGRAM_ID],
29
35
  };
30
36
  /** 与 Rust `get_program_ids_for_protocols` 一致 */
31
37
  function getProgramIdsForProtocols(protocols) {
@@ -1,8 +1,9 @@
1
1
  import type { SubscribeRequestFilterAccountsFilter } from "@triton-one/yellowstone-grpc";
2
+ import type { DexEvent } from "../core/dex_event.js";
2
3
  /** gRPC 订阅顺序模式 */
3
4
  export type OrderMode = "Unordered" | "Ordered" | "StreamingOrdered" | "MicroBatch";
4
5
  /** 与 Rust `grpc::types::Protocol` 一致 */
5
- export type Protocol = "PumpFun" | "PumpSwap" | "Bonk" | "RaydiumCpmm" | "RaydiumClmm" | "RaydiumAmmV4" | "MeteoraDammV2";
6
+ export type Protocol = "PumpFun" | "PumpSwap" | "PumpFees" | "RaydiumLaunchlab" | "RaydiumCpmm" | "RaydiumClmm" | "RaydiumAmmV4" | "OrcaWhirlpool" | "MeteoraPools" | "MeteoraDammV2" | "MeteoraDlmm" | "MeteoraDbc";
6
7
  export type SlotStatus = "Processed" | "Confirmed" | "Finalized" | "FirstShredReceived" | "Completed" | "CreatedBank" | "Dead";
7
8
  export interface SubscribeUpdateAccountInfo {
8
9
  pubkey: Uint8Array;
@@ -148,11 +149,13 @@ export declare function accountFilterFromProgramOwners(programIds: string[]): Ac
148
149
  */
149
150
  export declare function accountFilterMemcmp(offset: number, bytes: Uint8Array): SubscribeRequestFilterAccountsFilter;
150
151
  /** 事件类型过滤标签 */
151
- export type EventType = "BlockMeta" | "PumpFunTrade" | "PumpFunBuy" | "PumpFunSell" | "PumpFunBuyExactSolIn" | "PumpFunCreate" | "PumpFunCreateV2" | "PumpFunComplete" | "PumpFunMigrate" | "PumpFeesCreateFeeSharingConfig" | "PumpFeesInitializeFeeConfig" | "PumpFeesResetFeeSharingConfig" | "PumpFeesRevokeFeeSharingAuthority" | "PumpFeesTransferFeeSharingAuthority" | "PumpFeesUpdateAdmin" | "PumpFeesUpdateFeeConfig" | "PumpFeesUpdateFeeShares" | "PumpFeesUpsertFeeTiers" | "PumpFunMigrateBondingCurveCreator" | "PumpSwapTrade" | "PumpSwapBuy" | "PumpSwapSell" | "PumpSwapCreatePool" | "PumpSwapLiquidityAdded" | "PumpSwapLiquidityRemoved" | "RaydiumClmmSwap" | "RaydiumClmmIncreaseLiquidity" | "RaydiumClmmDecreaseLiquidity" | "RaydiumClmmCreatePool" | "RaydiumClmmOpenPosition" | "RaydiumClmmOpenPositionWithTokenExtNft" | "RaydiumClmmClosePosition" | "RaydiumClmmCollectFee" | "RaydiumCpmmSwap" | "RaydiumCpmmDeposit" | "RaydiumCpmmWithdraw" | "RaydiumCpmmInitialize" | "RaydiumAmmV4Swap" | "RaydiumAmmV4Deposit" | "RaydiumAmmV4Withdraw" | "RaydiumAmmV4WithdrawPnl" | "RaydiumAmmV4Initialize2" | "OrcaWhirlpoolSwap" | "OrcaWhirlpoolLiquidityIncreased" | "OrcaWhirlpoolLiquidityDecreased" | "OrcaWhirlpoolPoolInitialized" | "MeteoraPoolsSwap" | "MeteoraPoolsAddLiquidity" | "MeteoraPoolsRemoveLiquidity" | "MeteoraPoolsBootstrapLiquidity" | "MeteoraPoolsPoolCreated" | "MeteoraPoolsSetPoolFees" | "MeteoraDammV2Swap" | "MeteoraDammV2AddLiquidity" | "MeteoraDammV2RemoveLiquidity" | "MeteoraDammV2RemoveAllLiquidity" | "MeteoraDammV2CreatePosition" | "MeteoraDammV2InitializePool" | "MeteoraDammV2ClosePosition" | "MeteoraDlmmSwap" | "MeteoraDlmmAddLiquidity" | "MeteoraDlmmRemoveLiquidity" | "MeteoraDlmmInitializePool" | "MeteoraDlmmInitializeBinArray" | "MeteoraDlmmCreatePosition" | "MeteoraDlmmClosePosition" | "MeteoraDlmmClaimFee" | "BonkTrade" | "BonkPoolCreate" | "BonkMigrateAmm" | "TokenAccount" | "TokenInfo" | "NonceAccount" | "AccountPumpFunGlobal" | "AccountPumpSwapGlobalConfig" | "AccountPumpSwapPool";
152
+ export type EventType = "BlockMeta" | "PumpFunTrade" | "PumpFunBuy" | "PumpFunSell" | "PumpFunBuyExactSolIn" | "PumpFunCreate" | "PumpFunCreateV2" | "PumpFunComplete" | "PumpFunMigrate" | "PumpFeesCreateFeeSharingConfig" | "PumpFeesInitializeFeeConfig" | "PumpFeesResetFeeSharingConfig" | "PumpFeesRevokeFeeSharingAuthority" | "PumpFeesTransferFeeSharingAuthority" | "PumpFeesUpdateAdmin" | "PumpFeesUpdateFeeConfig" | "PumpFeesUpdateFeeShares" | "PumpFeesUpsertFeeTiers" | "PumpFunMigrateBondingCurveCreator" | "PumpSwapTrade" | "PumpSwapBuy" | "PumpSwapSell" | "PumpSwapCreatePool" | "PumpSwapLiquidityAdded" | "PumpSwapLiquidityRemoved" | "RaydiumClmmSwap" | "RaydiumClmmIncreaseLiquidity" | "RaydiumClmmDecreaseLiquidity" | "RaydiumClmmCreatePool" | "RaydiumClmmOpenPosition" | "RaydiumClmmOpenPositionWithTokenExtNft" | "RaydiumClmmClosePosition" | "RaydiumClmmCollectFee" | "RaydiumCpmmSwap" | "RaydiumCpmmDeposit" | "RaydiumCpmmWithdraw" | "RaydiumCpmmInitialize" | "RaydiumAmmV4Swap" | "RaydiumAmmV4Deposit" | "RaydiumAmmV4Withdraw" | "RaydiumAmmV4WithdrawPnl" | "RaydiumAmmV4Initialize2" | "OrcaWhirlpoolSwap" | "OrcaWhirlpoolLiquidityIncreased" | "OrcaWhirlpoolLiquidityDecreased" | "OrcaWhirlpoolPoolInitialized" | "MeteoraPoolsSwap" | "MeteoraPoolsAddLiquidity" | "MeteoraPoolsRemoveLiquidity" | "MeteoraPoolsBootstrapLiquidity" | "MeteoraPoolsPoolCreated" | "MeteoraPoolsSetPoolFees" | "MeteoraDammV2Swap" | "MeteoraDammV2AddLiquidity" | "MeteoraDammV2RemoveLiquidity" | "MeteoraDammV2CreatePosition" | "MeteoraDammV2InitializePool" | "MeteoraDammV2ClosePosition" | "MeteoraDbcSwap" | "MeteoraDbcInitializePool" | "MeteoraDbcCurveComplete" | "MeteoraDlmmSwap" | "MeteoraDlmmAddLiquidity" | "MeteoraDlmmRemoveLiquidity" | "MeteoraDlmmInitializePool" | "MeteoraDlmmInitializeBinArray" | "MeteoraDlmmCreatePosition" | "MeteoraDlmmClosePosition" | "MeteoraDlmmClaimFee" | "RaydiumLaunchlabTrade" | "RaydiumLaunchlabPoolCreate" | "RaydiumLaunchlabMigrateAmm" | "TokenAccount" | "TokenInfo" | "NonceAccount" | "AccountPumpFunGlobal" | "AccountPumpFunBondingCurve" | "AccountPumpFunFeeConfig" | "AccountPumpFunSharingConfig" | "AccountPumpFunGlobalVolumeAccumulator" | "AccountPumpFunUserVolumeAccumulator" | "AccountPumpSwapGlobalConfig" | "AccountPumpSwapPool" | "AccountRaydiumClmmAmmConfig" | "AccountRaydiumClmmPoolState" | "AccountRaydiumClmmTickArrayState" | "AccountRaydiumCpmmAmmConfig" | "AccountRaydiumCpmmPoolState" | "AccountOrcaWhirlpool" | "AccountOrcaPosition" | "AccountOrcaTickArray" | "AccountOrcaFeeTier" | "AccountOrcaWhirlpoolsConfig";
152
153
  /** 与 Rust `grpc::EventType`(由 `StreamingEventType` 导出)一致 */
153
154
  export type StreamingEventType = EventType;
154
155
  /** 所有事件类型列表 */
155
156
  export declare const ALL_EVENT_TYPES: EventType[];
157
+ export declare function eventTypeFromDexEvent(event: DexEvent): EventType | null;
158
+ export declare function eventTypeFilterShouldIncludeDexEvent(filter: EventTypeFilter, event: DexEvent): boolean;
156
159
  export interface EventTypeFilter {
157
160
  include_only?: EventType[];
158
161
  exclude_types?: EventType[];
@@ -168,6 +171,12 @@ export declare function eventTypeFilterIncludesPumpFees(filter: EventTypeFilter)
168
171
  export declare function eventTypeFilterIncludesPumpswap(filter: EventTypeFilter): boolean;
169
172
  /** 过滤器是否包含 Meteora DAMM V2 相关类型 */
170
173
  export declare function eventTypeFilterIncludesMeteoraDammV2(filter: EventTypeFilter): boolean;
174
+ /** 过滤器是否包含 Meteora DBC 相关类型 */
175
+ export declare function eventTypeFilterIncludesMeteoraDbc(filter: EventTypeFilter): boolean;
176
+ /** 过滤器是否包含 Meteora Pools 相关类型 */
177
+ export declare function eventTypeFilterIncludesMeteoraPools(filter: EventTypeFilter): boolean;
178
+ /** 过滤器是否包含 Meteora DLMM 相关类型 */
179
+ export declare function eventTypeFilterIncludesMeteoraDlmm(filter: EventTypeFilter): boolean;
171
180
  /** 过滤器是否包含 Raydium CLMM 相关类型 */
172
181
  export declare function eventTypeFilterIncludesRaydiumClmm(filter: EventTypeFilter): boolean;
173
182
  /** 过滤器是否包含 Raydium CPMM 相关类型 */
@@ -176,10 +185,8 @@ export declare function eventTypeFilterIncludesRaydiumCpmm(filter: EventTypeFilt
176
185
  export declare function eventTypeFilterIncludesRaydiumAmmV4(filter: EventTypeFilter): boolean;
177
186
  /** 过滤器是否包含 Orca Whirlpool 相关类型 */
178
187
  export declare function eventTypeFilterIncludesOrcaWhirlpool(filter: EventTypeFilter): boolean;
179
- /** 过滤器是否包含 Bonk Launchpad 相关类型(与 Rust `includes_raydium_launchpad` / Bonk 集合一致) */
180
- export declare function eventTypeFilterIncludesBonk(filter: EventTypeFilter): boolean;
181
- /** 与 Rust `EventTypeFilter::includes_raydium_launchpad` 同名语义 */
182
- export declare function eventTypeFilterIncludesRaydiumLaunchpad(filter: EventTypeFilter): boolean;
188
+ /** 过滤器是否包含 Raydium LaunchLab 相关类型(与 Rust `includes_raydium_launchlab` 集合一致) */
189
+ export declare function eventTypeFilterIncludesRaydiumLaunchlab(filter: EventTypeFilter): boolean;
183
190
  /**
184
191
  * `parseInstructionUnified` 前置白名单:仅当 `include_only` 与下列指令相关类型有交集时才解析指令。
185
192
  * 若白名单中不含下列任一类型,则整条指令解析入口返回 null。