sol-parser-sdk 0.5.17 → 0.5.18
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/README.md +24 -15
- package/README_CN.md +23 -14
- package/dist/accounts/pumpfun.js +15 -0
- package/dist/accounts/pumpswap.js +2 -0
- package/dist/core/account_dispatcher_rpc.d.ts +2 -1
- package/dist/core/account_dispatcher_rpc.js +94 -9
- package/dist/core/account_fill_pumpfun.js +20 -0
- package/dist/core/account_fill_pumpswap.d.ts +2 -0
- package/dist/core/account_fill_pumpswap.js +55 -6
- package/dist/core/account_fill_raydium.js +4 -0
- package/dist/core/dex_event.d.ts +149 -0
- package/dist/grpc/client.js +2 -0
- package/dist/grpc/log_instr_dedup.js +75 -7
- package/dist/grpc/order_buffer.d.ts +5 -0
- package/dist/grpc/order_buffer.js +53 -17
- package/dist/grpc/types.d.ts +4 -1
- package/dist/grpc/types.js +23 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/instr/inner.js +28 -1
- package/dist/instr/meteora_damm_ix.js +26 -0
- package/dist/instr/meteora_pools_ix.js +17 -9
- package/dist/instr/orca_whirlpool_ix.js +13 -9
- package/dist/instr/pumpfun_ix.js +84 -0
- package/dist/instr/pumpswap_ix.js +85 -10
- package/dist/instr/raydium_clmm_ix.js +5 -3
- package/dist/instr/raydium_cpmm_ix.js +11 -8
- package/dist/logs/meteora_damm.d.ts +7 -0
- package/dist/logs/meteora_damm.js +211 -0
- package/dist/logs/meteora_dbc.d.ts +3 -0
- package/dist/logs/meteora_dbc.js +23 -0
- package/dist/logs/meteora_dlmm.js +16 -4
- package/dist/logs/optimized_matcher.js +93 -10
- package/dist/logs/program_log_discriminators.d.ts +11 -0
- package/dist/logs/program_log_discriminators.js +11 -0
- package/dist/logs/pump.js +6 -3
- package/dist/logs/pump_amm.js +8 -2
- package/dist/logs/pump_upgrade.d.ts +68 -0
- package/dist/logs/pump_upgrade.js +128 -0
- package/dist/logs/raydium_cpmm.js +7 -3
- package/dist/rpc_transaction.js +84 -7
- package/dist/shredstream/alt_cache.d.ts +26 -0
- package/dist/shredstream/alt_cache.js +138 -0
- package/dist/shredstream/client.d.ts +11 -3
- package/dist/shredstream/client.js +76 -72
- package/dist/shredstream/config.d.ts +7 -3
- package/dist/shredstream/index.d.ts +3 -2
- package/dist/shredstream/index.js +5 -3
- package/dist/shredstream/instruction_parse.d.ts +1 -1
- package/dist/shredstream/instruction_parse.js +1 -0
- package/dist/simulation_route.d.ts +1 -1
- package/dist/simulation_route.js +17 -4
- package/dist/transaction_route.js +20 -1
- package/dist/wire_transaction.js +9 -10
- package/docs/USAGE.md +161 -0
- package/package.json +2 -5
- package/NATIVE_ALIGNMENT.md +0 -312
- package/NATIVE_DAMM_FACTORY_ALIGNMENT_20261004.md +0 -16
- package/NATIVE_DAMM_FACTORY_EVIDENCE_20261004.json +0 -55
- package/NATIVE_MIGRATION.md +0 -38
- package/NATIVE_PUMPFUN_NATIVE_DEBIT_ALIGNMENT_20261004.md +0 -18
- package/NATIVE_PUMPFUN_NATIVE_DEBIT_EVIDENCE_20261004.json +0 -57
- package/NATIVE_PUMPFUN_SETTLEMENT_ALIGNMENT_20261004.md +0 -11
- package/NATIVE_PUMPFUN_SETTLEMENT_EVIDENCE_20261004.json +0 -70
package/dist/core/dex_event.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
import type { PumpFunPostCompleteBuyEvent, PumpFunSweepBondingCurveFeeEvent, PumpFunCompleteEvent, PumpSwapSweepPoolFeeEvent } from "../logs/pump_upgrade.js";
|
|
1
2
|
import type { RawAccountSnapshotEvent, LiquidityAccountSnapshotEvent } from '../liquidity_snapshot.js';
|
|
2
3
|
import type { EventMetadata } from "./metadata.js";
|
|
3
4
|
/** 统一 DEX 事件:外部标签 JSON(单键对象);键名清单见 `scripts/dex-event-variant-names.json` */
|
|
4
5
|
export type DexEvent = {
|
|
6
|
+
PumpFunPostCompleteBuy: PumpFunPostCompleteBuyEvent;
|
|
7
|
+
} | {
|
|
8
|
+
PumpFunSweepBondingCurveFee: PumpFunSweepBondingCurveFeeEvent;
|
|
9
|
+
} | {
|
|
10
|
+
PumpFunComplete: PumpFunCompleteEvent;
|
|
11
|
+
} | {
|
|
12
|
+
PumpSwapSweepPoolFee: PumpSwapSweepPoolFeeEvent;
|
|
13
|
+
} | {
|
|
5
14
|
RawAccountSnapshot: RawAccountSnapshotEvent;
|
|
6
15
|
} | {
|
|
7
16
|
LiquidityAccountSnapshot: LiquidityAccountSnapshotEvent;
|
|
@@ -131,6 +140,12 @@ export type DexEvent = {
|
|
|
131
140
|
MeteoraDammV2RemoveLiquidity: MeteoraDammV2RemoveLiquidityEvent;
|
|
132
141
|
} | {
|
|
133
142
|
MeteoraDammV2CreatePosition: MeteoraDammV2CreatePositionEvent;
|
|
143
|
+
} | {
|
|
144
|
+
MeteoraDammV2ClaimPositionFee: MeteoraDammV2ClaimPositionFeeEvent;
|
|
145
|
+
} | {
|
|
146
|
+
MeteoraDammV2ClaimReward: MeteoraDammV2ClaimRewardEvent;
|
|
147
|
+
} | {
|
|
148
|
+
MeteoraDlmmClaimReward: MeteoraDlmmClaimRewardEvent;
|
|
134
149
|
} | {
|
|
135
150
|
MeteoraDammV2InitializePool: MeteoraDammV2InitializePoolEvent;
|
|
136
151
|
} | {
|
|
@@ -139,6 +154,16 @@ export type DexEvent = {
|
|
|
139
154
|
MeteoraDammV2UpdateDelegatePermission: MeteoraDammV2UpdateDelegatePermissionEvent;
|
|
140
155
|
} | {
|
|
141
156
|
MeteoraDammV2WithdrawDeadLiquidityReward: MeteoraDammV2WithdrawDeadLiquidityRewardEvent;
|
|
157
|
+
} | {
|
|
158
|
+
MeteoraDammV2WithdrawIneligibleReward: MeteoraDammV2WithdrawIneligibleRewardEvent;
|
|
159
|
+
} | {
|
|
160
|
+
MeteoraDammV2UpdateRewardFunder: MeteoraDammV2UpdateRewardFunderEvent;
|
|
161
|
+
} | {
|
|
162
|
+
MeteoraDammV2UpdateRewardDuration: MeteoraDammV2UpdateRewardDurationEvent;
|
|
163
|
+
} | {
|
|
164
|
+
MeteoraDammV2InitializeReward: MeteoraDammV2InitializeRewardEvent;
|
|
165
|
+
} | {
|
|
166
|
+
MeteoraDammV2FundReward: MeteoraDammV2FundRewardEvent;
|
|
142
167
|
} | {
|
|
143
168
|
MeteoraDammV2CreateConfig: MeteoraDammV2CreateConfigEvent;
|
|
144
169
|
} | {
|
|
@@ -219,6 +244,7 @@ export type DexEvent = {
|
|
|
219
244
|
Error: string;
|
|
220
245
|
};
|
|
221
246
|
export interface PumpFunCreateTokenEvent {
|
|
247
|
+
depth?: number;
|
|
222
248
|
metadata: EventMetadata;
|
|
223
249
|
name: string;
|
|
224
250
|
symbol: string;
|
|
@@ -259,6 +285,7 @@ export interface PumpFunCreateV2TokenEvent extends PumpFunCreateTokenEvent {
|
|
|
259
285
|
observed_fee_recipient: string;
|
|
260
286
|
}
|
|
261
287
|
export interface PumpFunTradeEvent {
|
|
288
|
+
creator_fee_unclaimed?: bigint;
|
|
262
289
|
metadata: EventMetadata;
|
|
263
290
|
mint: string;
|
|
264
291
|
sol_amount: bigint;
|
|
@@ -469,6 +496,7 @@ export interface PumpSwapTradeEvent {
|
|
|
469
496
|
ix_name: string;
|
|
470
497
|
}
|
|
471
498
|
export interface PumpSwapBuyEvent {
|
|
499
|
+
creator_fee_unclaimed?: bigint;
|
|
472
500
|
metadata: EventMetadata;
|
|
473
501
|
timestamp: bigint;
|
|
474
502
|
base_amount_out: bigint;
|
|
@@ -526,6 +554,7 @@ export interface PumpSwapBuyEvent {
|
|
|
526
554
|
fee_recipient_quote_token_account?: string;
|
|
527
555
|
}
|
|
528
556
|
export interface PumpSwapSellEvent {
|
|
557
|
+
creator_fee_unclaimed?: bigint;
|
|
529
558
|
metadata: EventMetadata;
|
|
530
559
|
timestamp: bigint;
|
|
531
560
|
base_amount_in: bigint;
|
|
@@ -662,6 +691,8 @@ export interface RaydiumClmmSwapEvent {
|
|
|
662
691
|
export interface RaydiumClmmIncreaseLiquidityEvent {
|
|
663
692
|
metadata: EventMetadata;
|
|
664
693
|
pool: string;
|
|
694
|
+
/** Personal position PDA; distinct from the NFT token account and mint. */
|
|
695
|
+
personal_position?: string;
|
|
665
696
|
position_nft_mint: string;
|
|
666
697
|
user: string;
|
|
667
698
|
liquidity: bigint;
|
|
@@ -676,6 +707,8 @@ export interface RaydiumClmmIncreaseLiquidityEvent {
|
|
|
676
707
|
export interface RaydiumClmmDecreaseLiquidityEvent {
|
|
677
708
|
metadata: EventMetadata;
|
|
678
709
|
pool: string;
|
|
710
|
+
/** Personal position PDA; distinct from the NFT token account and mint. */
|
|
711
|
+
personal_position?: string;
|
|
679
712
|
position_nft_mint: string;
|
|
680
713
|
user: string;
|
|
681
714
|
liquidity: bigint;
|
|
@@ -838,6 +871,11 @@ export interface RaydiumCpmmSwapEvent {
|
|
|
838
871
|
input_transfer_fee: bigint;
|
|
839
872
|
output_transfer_fee: bigint;
|
|
840
873
|
base_input: boolean;
|
|
874
|
+
input_mint?: string;
|
|
875
|
+
output_mint?: string;
|
|
876
|
+
trade_fee?: bigint;
|
|
877
|
+
creator_fee?: bigint;
|
|
878
|
+
creator_fee_on_input?: boolean;
|
|
841
879
|
}
|
|
842
880
|
export interface RaydiumCpmmDepositEvent {
|
|
843
881
|
metadata: EventMetadata;
|
|
@@ -1039,6 +1077,9 @@ export interface OrcaWhirlpoolPoolInitializedEvent {
|
|
|
1039
1077
|
}
|
|
1040
1078
|
export interface MeteoraPoolsSwapEvent {
|
|
1041
1079
|
metadata: EventMetadata;
|
|
1080
|
+
/** Instruction intent; executed amounts remain in in_amount/out_amount. */
|
|
1081
|
+
amount_in?: bigint;
|
|
1082
|
+
minimum_out_amount?: bigint;
|
|
1042
1083
|
in_amount: bigint;
|
|
1043
1084
|
out_amount: bigint;
|
|
1044
1085
|
trade_fee: bigint;
|
|
@@ -1210,6 +1251,53 @@ export interface MeteoraDammV2WithdrawDeadLiquidityRewardEvent {
|
|
|
1210
1251
|
reward_mint: string;
|
|
1211
1252
|
amount: bigint;
|
|
1212
1253
|
}
|
|
1254
|
+
/** IDL `EvtWithdrawIneligibleReward` */
|
|
1255
|
+
export interface MeteoraDammV2WithdrawIneligibleRewardEvent {
|
|
1256
|
+
metadata: EventMetadata;
|
|
1257
|
+
pool: string;
|
|
1258
|
+
reward_mint: string;
|
|
1259
|
+
amount: bigint;
|
|
1260
|
+
}
|
|
1261
|
+
/** Official IDL `EvtUpdateRewardFunder`. */
|
|
1262
|
+
export interface MeteoraDammV2UpdateRewardFunderEvent {
|
|
1263
|
+
metadata: EventMetadata;
|
|
1264
|
+
pool: string;
|
|
1265
|
+
reward_index: number;
|
|
1266
|
+
old_funder: string;
|
|
1267
|
+
new_funder: string;
|
|
1268
|
+
}
|
|
1269
|
+
/** Official IDL `EvtUpdateRewardDuration`. */
|
|
1270
|
+
export interface MeteoraDammV2UpdateRewardDurationEvent {
|
|
1271
|
+
metadata: EventMetadata;
|
|
1272
|
+
pool: string;
|
|
1273
|
+
reward_index: number;
|
|
1274
|
+
old_reward_duration: bigint;
|
|
1275
|
+
new_reward_duration: bigint;
|
|
1276
|
+
}
|
|
1277
|
+
/** Official IDL `EvtInitializeReward`. */
|
|
1278
|
+
export interface MeteoraDammV2InitializeRewardEvent {
|
|
1279
|
+
metadata: EventMetadata;
|
|
1280
|
+
pool: string;
|
|
1281
|
+
reward_mint: string;
|
|
1282
|
+
funder: string;
|
|
1283
|
+
creator: string;
|
|
1284
|
+
reward_index: number;
|
|
1285
|
+
reward_duration: bigint;
|
|
1286
|
+
}
|
|
1287
|
+
/** IDL `EvtFundReward`; amount is net new funding plus carried empty rewards.
|
|
1288
|
+
* The post rate also includes unexpired rewards from the previous period. */
|
|
1289
|
+
export interface MeteoraDammV2FundRewardEvent {
|
|
1290
|
+
metadata: EventMetadata;
|
|
1291
|
+
pool: string;
|
|
1292
|
+
funder: string;
|
|
1293
|
+
mint_reward: string;
|
|
1294
|
+
reward_index: number;
|
|
1295
|
+
amount: bigint;
|
|
1296
|
+
transfer_fee_excluded_amount_in: bigint;
|
|
1297
|
+
reward_duration_end: bigint;
|
|
1298
|
+
pre_reward_rate: bigint;
|
|
1299
|
+
post_reward_rate: bigint;
|
|
1300
|
+
}
|
|
1213
1301
|
/** IDL `EvtCreateConfig` (includes DAMM v2 0.2.4 `permission`) */
|
|
1214
1302
|
export interface MeteoraDammV2CreateConfigEvent {
|
|
1215
1303
|
metadata: EventMetadata;
|
|
@@ -1236,6 +1324,17 @@ export interface MeteoraDammV2CreateDynamicConfigEvent {
|
|
|
1236
1324
|
permission: bigint;
|
|
1237
1325
|
}
|
|
1238
1326
|
export interface MeteoraDbcSwapEvent {
|
|
1327
|
+
event_version?: number;
|
|
1328
|
+
swap_mode?: number;
|
|
1329
|
+
amount_0?: bigint;
|
|
1330
|
+
amount_1?: bigint;
|
|
1331
|
+
maximum_amount_in?: bigint;
|
|
1332
|
+
included_fee_input_amount?: bigint;
|
|
1333
|
+
/** Curve remainder uses fee-excluded units with input fees; not gross unspent wallet funding. */
|
|
1334
|
+
amount_left?: bigint;
|
|
1335
|
+
quote_reserve_amount?: bigint;
|
|
1336
|
+
migration_threshold?: bigint;
|
|
1337
|
+
has_transfer_hook?: boolean;
|
|
1239
1338
|
metadata: EventMetadata;
|
|
1240
1339
|
pool: string;
|
|
1241
1340
|
config: string;
|
|
@@ -1288,6 +1387,12 @@ export interface MeteoraDlmmSwapEvent {
|
|
|
1288
1387
|
protocol_fee: bigint;
|
|
1289
1388
|
fee_bps: bigint;
|
|
1290
1389
|
host_fee: bigint;
|
|
1390
|
+
event_version?: number;
|
|
1391
|
+
amount_left?: bigint;
|
|
1392
|
+
mm_fee?: bigint;
|
|
1393
|
+
limit_order_fee?: bigint;
|
|
1394
|
+
fees_on_input?: boolean;
|
|
1395
|
+
fees_on_token_x?: boolean;
|
|
1291
1396
|
}
|
|
1292
1397
|
export interface MeteoraPoolsSetPoolFeesEvent {
|
|
1293
1398
|
metadata: EventMetadata;
|
|
@@ -1448,6 +1553,11 @@ export interface NonceAccountEvent {
|
|
|
1448
1553
|
authority: string;
|
|
1449
1554
|
}
|
|
1450
1555
|
export interface PumpFunGlobal {
|
|
1556
|
+
creator_fee_configurable?: boolean;
|
|
1557
|
+
max_configurable_creator_fee_bps?: bigint;
|
|
1558
|
+
holder_reward_claim_authority?: string;
|
|
1559
|
+
is_holder_reward_enabled?: boolean;
|
|
1560
|
+
max_curve_depth?: number;
|
|
1451
1561
|
initialized: boolean;
|
|
1452
1562
|
authority: string;
|
|
1453
1563
|
fee_recipient: string;
|
|
@@ -1480,6 +1590,12 @@ export interface PumpFunGlobalAccountEvent {
|
|
|
1480
1590
|
global: PumpFunGlobal;
|
|
1481
1591
|
}
|
|
1482
1592
|
export interface PumpFunBondingCurve {
|
|
1593
|
+
creator_fee?: bigint;
|
|
1594
|
+
protocol_fees?: bigint;
|
|
1595
|
+
depth?: number;
|
|
1596
|
+
initial_virtual_quote_reserves?: bigint;
|
|
1597
|
+
post_complete_base_out?: bigint;
|
|
1598
|
+
post_complete_quote_in?: bigint;
|
|
1483
1599
|
virtual_token_reserves: bigint;
|
|
1484
1600
|
virtual_quote_reserves: bigint;
|
|
1485
1601
|
real_token_reserves: bigint;
|
|
@@ -1500,6 +1616,7 @@ export interface PumpFunBondingCurveAccountEvent {
|
|
|
1500
1616
|
bonding_curve: PumpFunBondingCurve;
|
|
1501
1617
|
}
|
|
1502
1618
|
export interface PumpFunFeeConfig {
|
|
1619
|
+
exotic_flat_fees?: PumpFeesFees;
|
|
1503
1620
|
bump: number;
|
|
1504
1621
|
admin: string;
|
|
1505
1622
|
flat_fees: PumpFeesFees;
|
|
@@ -1579,6 +1696,8 @@ export interface PumpSwapGlobalConfigAccountEvent {
|
|
|
1579
1696
|
global_config: PumpSwapGlobalConfig;
|
|
1580
1697
|
}
|
|
1581
1698
|
export interface PumpSwapPool {
|
|
1699
|
+
protocol_fees?: bigint;
|
|
1700
|
+
creator_fees?: bigint;
|
|
1582
1701
|
pool_bump: number;
|
|
1583
1702
|
index: number;
|
|
1584
1703
|
creator: string;
|
|
@@ -1870,3 +1989,33 @@ export type LaunchLabPoolCreateEvent = RaydiumLaunchlabPoolCreateEvent;
|
|
|
1870
1989
|
export type StonkFunPoolCreateEvent = RaydiumLaunchlabPoolCreateEvent;
|
|
1871
1990
|
export type LaunchLabTradeEvent = RaydiumLaunchlabTradeEvent;
|
|
1872
1991
|
export type StonkFunTradeEvent = RaydiumLaunchlabTradeEvent;
|
|
1992
|
+
/** Official gross claim amounts; transfer fees can reduce recipient credit. */
|
|
1993
|
+
export interface MeteoraDammV2ClaimPositionFeeEvent {
|
|
1994
|
+
metadata: EventMetadata;
|
|
1995
|
+
pool: string;
|
|
1996
|
+
position: string;
|
|
1997
|
+
owner: string;
|
|
1998
|
+
fee_a_claimed: bigint;
|
|
1999
|
+
fee_b_claimed: bigint;
|
|
2000
|
+
}
|
|
2001
|
+
/** Official accrued gross reward cleared from the position. A frozen-vault skip
|
|
2002
|
+
* can emit a nonzero total_reward without a transfer; use token transfers and
|
|
2003
|
+
* net balance changes to determine wallet credits. */
|
|
2004
|
+
export interface MeteoraDammV2ClaimRewardEvent {
|
|
2005
|
+
metadata: EventMetadata;
|
|
2006
|
+
pool: string;
|
|
2007
|
+
position: string;
|
|
2008
|
+
owner: string;
|
|
2009
|
+
mint_reward: string;
|
|
2010
|
+
reward_index: number;
|
|
2011
|
+
total_reward: bigint;
|
|
2012
|
+
}
|
|
2013
|
+
export interface MeteoraDlmmClaimRewardEvent {
|
|
2014
|
+
metadata: EventMetadata;
|
|
2015
|
+
pool: string;
|
|
2016
|
+
position: string;
|
|
2017
|
+
owner: string;
|
|
2018
|
+
reward_index: bigint;
|
|
2019
|
+
total_reward: bigint;
|
|
2020
|
+
active_bin_id: number;
|
|
2021
|
+
}
|
package/dist/grpc/client.js
CHANGED
|
@@ -536,6 +536,8 @@ class YellowstoneGrpc {
|
|
|
536
536
|
};
|
|
537
537
|
let flushTimer;
|
|
538
538
|
if (order.needsTimer) {
|
|
539
|
+
// Idle flushes are limited by Node timers (at least 1 ms); arrivals
|
|
540
|
+
// still check the monotonic microsecond window in OrderDispatcher.
|
|
539
541
|
const intervalMs = this.config.order_mode === "MicroBatch"
|
|
540
542
|
? Math.max(1, Math.ceil(this.config.micro_batch_us / 1000))
|
|
541
543
|
: Math.max(1, Math.floor(this.config.order_timeout_ms / 2));
|
|
@@ -48,10 +48,12 @@ function ixLane(ixName) {
|
|
|
48
48
|
switch (ixName) {
|
|
49
49
|
case "sell":
|
|
50
50
|
case "sell_v2":
|
|
51
|
+
case "sell_v3":
|
|
51
52
|
return 1;
|
|
52
53
|
case "buy_exact_sol_in":
|
|
53
54
|
case "buy_exact_quote_in":
|
|
54
55
|
case "buy_exact_quote_in_v2":
|
|
56
|
+
case "buy_exact_quote_in_v3":
|
|
55
57
|
return 2;
|
|
56
58
|
default:
|
|
57
59
|
return 0;
|
|
@@ -74,6 +76,10 @@ function dedupeKey(ev, occurrenceCounts) {
|
|
|
74
76
|
return `PumpFunTrade|${base}|${occurrence}`;
|
|
75
77
|
}
|
|
76
78
|
switch (name) {
|
|
79
|
+
case "PumpFunComplete":
|
|
80
|
+
return `PumpFunComplete|${data.mint}|${data.bonding_curve}|${data.user}`;
|
|
81
|
+
case "PumpFunPostCompleteBuy":
|
|
82
|
+
return `PumpFunPostCompleteBuy|${data.mint}|${data.bonding_curve}|${data.user}|${data.base_out}|${data.quote_in}`;
|
|
77
83
|
case "PumpFunCreate":
|
|
78
84
|
return `PumpFunCreate|${data.mint}`;
|
|
79
85
|
case "PumpFunCreateV2":
|
|
@@ -82,22 +88,35 @@ function dedupeKey(ev, occurrenceCounts) {
|
|
|
82
88
|
return `PumpFunMigrate|${data.mint}|${data.pool}|${data.user}`;
|
|
83
89
|
case "RaydiumLaunchlabTrade":
|
|
84
90
|
return `RaydiumLaunchlabTrade|${data.pool_state}|${data.user}|${Boolean(data.is_buy)}`;
|
|
91
|
+
case "MeteoraPoolsPoolCreated":
|
|
92
|
+
return isDefaultPubkey(data.pool) ? null : `MeteoraPoolsPoolCreated|${data.pool}`;
|
|
85
93
|
case "RaydiumLaunchlabPoolCreate":
|
|
86
94
|
return `RaydiumLaunchlabPoolCreate|${data.pool_state}`;
|
|
87
95
|
case "RaydiumLaunchlabMigrateAmm":
|
|
88
96
|
return `RaydiumLaunchlabMigrateAmm|${data.old_pool}|${data.new_pool}|${data.user}`;
|
|
89
97
|
case "PumpSwapTrade":
|
|
90
98
|
return `PumpSwapTrade|${data.mint}|${data.user}|${Boolean(data.is_buy)}|${ixLane(data.ix_name)}`;
|
|
91
|
-
case "PumpSwapBuy":
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
case "PumpSwapBuy": {
|
|
100
|
+
const base = `PumpSwapBuy|${data.pool}|${data.user}`;
|
|
101
|
+
return `${base}|${nextOccurrence(base, occurrenceCounts)}`;
|
|
102
|
+
}
|
|
103
|
+
case "PumpSwapSell": {
|
|
104
|
+
const base = `PumpSwapSell|${data.pool}|${data.user}`;
|
|
105
|
+
return `${base}|${nextOccurrence(base, occurrenceCounts)}`;
|
|
106
|
+
}
|
|
95
107
|
case "PumpSwapCreatePool":
|
|
96
108
|
return `PumpSwapCreatePool|${data.pool}|${data.base_mint}|${data.quote_mint}`;
|
|
97
109
|
case "PumpSwapLiquidityAdded":
|
|
98
110
|
return `PumpSwapLiquidityAdded|${data.pool}|${data.user}`;
|
|
99
111
|
case "PumpSwapLiquidityRemoved":
|
|
100
112
|
return `PumpSwapLiquidityRemoved|${data.pool}|${data.user}`;
|
|
113
|
+
case "RaydiumClmmIncreaseLiquidity":
|
|
114
|
+
case "RaydiumClmmDecreaseLiquidity": {
|
|
115
|
+
if (isDefaultPubkey(data.personal_position))
|
|
116
|
+
return null;
|
|
117
|
+
const base = `${name}|${data.personal_position}`;
|
|
118
|
+
return `${base}|${nextOccurrence(base, occurrenceCounts)}`;
|
|
119
|
+
}
|
|
101
120
|
case "RaydiumClmmSwap": {
|
|
102
121
|
const base = String(data.pool_state);
|
|
103
122
|
return `RaydiumClmmSwap|${base}|${nextOccurrence(`RaydiumClmm|${base}`, occurrenceCounts)}`;
|
|
@@ -112,6 +131,11 @@ function dedupeKey(ev, occurrenceCounts) {
|
|
|
112
131
|
: `in|${data.amount_in}`;
|
|
113
132
|
return `RaydiumAmmV4Swap|${base}|${nextOccurrence(`RaydiumAmmV4|${base}`, occurrenceCounts)}`;
|
|
114
133
|
}
|
|
134
|
+
case "OrcaWhirlpoolLiquidityIncreased":
|
|
135
|
+
case "OrcaWhirlpoolLiquidityDecreased": {
|
|
136
|
+
const base = `${name}|${data.whirlpool}|${data.position}|${data.liquidity}`;
|
|
137
|
+
return `${base}|${nextOccurrence(base, occurrenceCounts)}`;
|
|
138
|
+
}
|
|
115
139
|
case "OrcaWhirlpoolSwap": {
|
|
116
140
|
const base = String(data.whirlpool);
|
|
117
141
|
return `OrcaWhirlpoolSwap|${base}|${nextOccurrence(`OrcaWhirlpool|${base}`, occurrenceCounts)}`;
|
|
@@ -377,6 +401,13 @@ function mergeGrpcInstructionIntoLog(logEvent, ixEvent) {
|
|
|
377
401
|
if (ixName === "PumpSwapLiquidityRemoved")
|
|
378
402
|
mergePumpSwapLiquidity(log, ix);
|
|
379
403
|
break;
|
|
404
|
+
case "RaydiumClmmIncreaseLiquidity":
|
|
405
|
+
case "RaydiumClmmDecreaseLiquidity":
|
|
406
|
+
for (const key of ["pool", "user", "personal_position"])
|
|
407
|
+
fillString(log, key, ix);
|
|
408
|
+
for (const key of logName === "RaydiumClmmIncreaseLiquidity" ? ["amount0_max", "amount1_max"] : ["amount0_min", "amount1_min"])
|
|
409
|
+
log[key] = ix[key];
|
|
410
|
+
return;
|
|
380
411
|
case "RaydiumClmmSwap":
|
|
381
412
|
if (ixName === "RaydiumClmmSwap")
|
|
382
413
|
mergeRaydiumClmmSwap(log, ix);
|
|
@@ -385,6 +416,11 @@ function mergeGrpcInstructionIntoLog(logEvent, ixEvent) {
|
|
|
385
416
|
if (ixName === "RaydiumAmmV4Swap")
|
|
386
417
|
mergeRaydiumAmmV4Swap(log, ix);
|
|
387
418
|
break;
|
|
419
|
+
case "MeteoraPoolsPoolCreated":
|
|
420
|
+
if (ixName === "MeteoraPoolsPoolCreated")
|
|
421
|
+
for (const key of ["pool", "lp_mint", "token_a_mint", "token_b_mint"])
|
|
422
|
+
fillString(log, key, ix);
|
|
423
|
+
break;
|
|
388
424
|
case "RaydiumLaunchlabPoolCreate":
|
|
389
425
|
if (ixName === "RaydiumLaunchlabPoolCreate")
|
|
390
426
|
mergeRaydiumLaunchlabPoolCreate(log, ix);
|
|
@@ -408,8 +444,17 @@ function dedupeLogInstructionEvents(logEvents, instructionEvents) {
|
|
|
408
444
|
indexByKey.set(key, out.length);
|
|
409
445
|
out.push(ev);
|
|
410
446
|
}
|
|
411
|
-
|
|
412
|
-
|
|
447
|
+
// Ordinal pairing is ambiguous when one source has lost an invocation.
|
|
448
|
+
const instructionKeys = instructionEvents.map(ev => dedupeKey(ev, ixOccurrenceCounts));
|
|
449
|
+
for (const [base, count] of logOccurrenceCounts) {
|
|
450
|
+
if (!/^(PumpFun|PumpSwapBuy|PumpSwapSell|OrcaWhirlpoolLiquidityIncreased|OrcaWhirlpoolLiquidityDecreased|RaydiumClmmIncreaseLiquidity|RaydiumClmmDecreaseLiquidity)\|/.test(base) || count === ixOccurrenceCounts.get(base))
|
|
451
|
+
continue;
|
|
452
|
+
const prefix = `${base.replace(/^PumpFun\|/, 'PumpFunTrade|')}|`;
|
|
453
|
+
for (let occurrence = 0; occurrence < count; occurrence++)
|
|
454
|
+
indexByKey.delete(`${prefix}${occurrence}`);
|
|
455
|
+
}
|
|
456
|
+
for (const [i, ev] of instructionEvents.entries()) {
|
|
457
|
+
const key = instructionKeys[i];
|
|
413
458
|
if (!key) {
|
|
414
459
|
out.push(ev);
|
|
415
460
|
continue;
|
|
@@ -422,5 +467,28 @@ function dedupeLogInstructionEvents(logEvents, instructionEvents) {
|
|
|
422
467
|
}
|
|
423
468
|
mergeGrpcInstructionIntoLog(out[existing], ev);
|
|
424
469
|
}
|
|
425
|
-
return out;
|
|
470
|
+
return preferCurrentDbcEvents(out);
|
|
471
|
+
}
|
|
472
|
+
// Old and current DBC events can describe the same execution. Keep occurrence counts.
|
|
473
|
+
function preferCurrentDbcEvents(events) {
|
|
474
|
+
const groups = new Map();
|
|
475
|
+
for (const [i, event] of events.entries()) {
|
|
476
|
+
if (!('MeteoraDbcSwap' in event))
|
|
477
|
+
continue;
|
|
478
|
+
const e = event.MeteoraDbcSwap;
|
|
479
|
+
const key = [e.pool, e.config, e.trade_direction, e.amount_in, e.output_amount, e.next_sqrt_price, e.trading_fee, e.protocol_fee, e.referral_fee, e.current_timestamp].join('|');
|
|
480
|
+
let group = groups.get(key);
|
|
481
|
+
if (!group) {
|
|
482
|
+
group = [[], []];
|
|
483
|
+
groups.set(key, group);
|
|
484
|
+
}
|
|
485
|
+
group[e.event_version === 2 ? 1 : 0].push(i);
|
|
486
|
+
}
|
|
487
|
+
const removed = new Set();
|
|
488
|
+
for (const [old, current] of groups.values()) {
|
|
489
|
+
if (old.length !== current.length)
|
|
490
|
+
continue;
|
|
491
|
+
old.forEach((index, i) => { events[index] = events[current[i]]; removed.add(current[i]); });
|
|
492
|
+
}
|
|
493
|
+
return removed.size ? events.filter((_, i) => !removed.has(i)) : events;
|
|
426
494
|
}
|
|
@@ -6,11 +6,16 @@ export declare class OrderDispatcher {
|
|
|
6
6
|
private readonly microBatchUs;
|
|
7
7
|
private readonly slots;
|
|
8
8
|
private readonly streamingWatermarks;
|
|
9
|
+
private readonly streamingPending;
|
|
9
10
|
private microBatch;
|
|
10
11
|
private microBatchStartUs;
|
|
11
12
|
private lastFlushMs;
|
|
12
13
|
private currentSlot;
|
|
13
14
|
private seq;
|
|
15
|
+
private orderedWatermark;
|
|
16
|
+
private orderedLateDrops;
|
|
17
|
+
/** Each rejected late transaction marks an Ordered continuity break. */
|
|
18
|
+
get orderedLateTransactions(): number;
|
|
14
19
|
constructor(config: ClientConfig);
|
|
15
20
|
get needsTimer(): boolean;
|
|
16
21
|
pushTransactionEvents(events: DexEvent[], fallbackSlot: number | bigint | string, fallbackTxIndex: number | bigint | string, emit: (event: DexEvent) => void): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OrderDispatcher = void 0;
|
|
4
|
+
const node_perf_hooks_1 = require("node:perf_hooks");
|
|
4
5
|
const metadata_js_1 = require("../core/metadata.js");
|
|
5
6
|
const dex_event_js_1 = require("../core/dex_event.js");
|
|
6
7
|
function eventSlotAndIndex(events, fallbackSlot, fallbackTxIndex) {
|
|
@@ -16,11 +17,16 @@ class OrderDispatcher {
|
|
|
16
17
|
microBatchUs;
|
|
17
18
|
slots = new Map();
|
|
18
19
|
streamingWatermarks = new Map();
|
|
20
|
+
streamingPending = new Set();
|
|
19
21
|
microBatch = [];
|
|
20
22
|
microBatchStartUs = 0;
|
|
21
|
-
lastFlushMs =
|
|
23
|
+
lastFlushMs = node_perf_hooks_1.performance.now();
|
|
22
24
|
currentSlot = 0n;
|
|
23
25
|
seq = 0;
|
|
26
|
+
orderedWatermark = null;
|
|
27
|
+
orderedLateDrops = 0;
|
|
28
|
+
/** Each rejected late transaction marks an Ordered continuity break. */
|
|
29
|
+
get orderedLateTransactions() { return this.orderedLateDrops; }
|
|
24
30
|
constructor(config) {
|
|
25
31
|
this.mode = config.order_mode;
|
|
26
32
|
this.timeoutMs = Math.max(1, config.order_timeout_ms || 100);
|
|
@@ -50,12 +56,12 @@ class OrderDispatcher {
|
|
|
50
56
|
}
|
|
51
57
|
}
|
|
52
58
|
flushDue(emit) {
|
|
53
|
-
const nowMs =
|
|
59
|
+
const nowMs = node_perf_hooks_1.performance.now();
|
|
54
60
|
if ((this.mode === "Ordered" || this.mode === "StreamingOrdered") && nowMs - this.lastFlushMs > this.timeoutMs) {
|
|
55
61
|
this.flushAllSlots(emit);
|
|
56
62
|
}
|
|
57
63
|
if (this.mode === "MicroBatch") {
|
|
58
|
-
const nowUs =
|
|
64
|
+
const nowUs = nowMs * 1000;
|
|
59
65
|
if (this.microBatch.length > 0 && nowUs - this.microBatchStartUs >= this.microBatchUs) {
|
|
60
66
|
this.flushMicroBatch(emit);
|
|
61
67
|
}
|
|
@@ -66,6 +72,16 @@ class OrderDispatcher {
|
|
|
66
72
|
this.flushMicroBatch(emit);
|
|
67
73
|
}
|
|
68
74
|
pushOrdered(batch, emit) {
|
|
75
|
+
const last = this.orderedWatermark;
|
|
76
|
+
if (batch.slot < this.currentSlot || (last && (batch.slot < last.slot ||
|
|
77
|
+
(batch.slot === last.slot && batch.txIndex <= last.txIndex)))) {
|
|
78
|
+
this.orderedLateDrops++;
|
|
79
|
+
const dropped = this.orderedLateDrops;
|
|
80
|
+
if (dropped <= 10 || Number.isInteger(Math.log2(dropped))) {
|
|
81
|
+
console.warn(`Ordered continuity break: dropped late transaction (${batch.slot},${batch.txIndex}); total=${dropped}`);
|
|
82
|
+
}
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
69
85
|
if (batch.slot > this.currentSlot && this.currentSlot > 0) {
|
|
70
86
|
this.flushBefore(batch.slot, emit);
|
|
71
87
|
}
|
|
@@ -74,6 +90,8 @@ class OrderDispatcher {
|
|
|
74
90
|
this.pushSlotBatch(batch);
|
|
75
91
|
}
|
|
76
92
|
pushStreaming(batch, emit) {
|
|
93
|
+
if (batch.slot < this.currentSlot)
|
|
94
|
+
return;
|
|
77
95
|
if (batch.slot > this.currentSlot && this.currentSlot > 0) {
|
|
78
96
|
this.flushBefore(batch.slot, emit);
|
|
79
97
|
for (const slot of [...this.streamingWatermarks.keys()]) {
|
|
@@ -81,8 +99,10 @@ class OrderDispatcher {
|
|
|
81
99
|
this.streamingWatermarks.delete(slot);
|
|
82
100
|
}
|
|
83
101
|
}
|
|
84
|
-
if (batch.slot > this.currentSlot)
|
|
102
|
+
if (batch.slot > this.currentSlot) {
|
|
85
103
|
this.currentSlot = batch.slot;
|
|
104
|
+
this.streamingPending.clear();
|
|
105
|
+
}
|
|
86
106
|
const expected = this.streamingWatermarks.get(batch.slot) ?? 0n;
|
|
87
107
|
if (batch.txIndex === expected) {
|
|
88
108
|
this.emitBatch(batch, emit);
|
|
@@ -90,24 +110,27 @@ class OrderDispatcher {
|
|
|
90
110
|
const buffered = this.slots.get(batch.slot);
|
|
91
111
|
if (buffered) {
|
|
92
112
|
buffered.sort(compareBatch);
|
|
93
|
-
let
|
|
94
|
-
while (
|
|
95
|
-
|
|
96
|
-
this.
|
|
97
|
-
|
|
98
|
-
|
|
113
|
+
let released = 0;
|
|
114
|
+
while (released < buffered.length && buffered[released].txIndex === watermark) {
|
|
115
|
+
this.emitBatch(buffered[released], emit);
|
|
116
|
+
this.streamingPending.delete(watermark);
|
|
117
|
+
released++;
|
|
118
|
+
watermark++;
|
|
99
119
|
}
|
|
100
|
-
if (buffered.length
|
|
120
|
+
if (released === buffered.length)
|
|
101
121
|
this.slots.delete(batch.slot);
|
|
122
|
+
else if (released)
|
|
123
|
+
buffered.splice(0, released);
|
|
102
124
|
}
|
|
103
125
|
this.streamingWatermarks.set(batch.slot, watermark);
|
|
104
126
|
}
|
|
105
|
-
else if (batch.txIndex > expected) {
|
|
127
|
+
else if (batch.txIndex > expected && !this.streamingPending.has(batch.txIndex)) {
|
|
128
|
+
this.streamingPending.add(batch.txIndex);
|
|
106
129
|
this.pushSlotBatch(batch);
|
|
107
130
|
}
|
|
108
131
|
}
|
|
109
132
|
pushMicroBatch(batch, emit) {
|
|
110
|
-
const nowUs =
|
|
133
|
+
const nowUs = node_perf_hooks_1.performance.now() * 1000;
|
|
111
134
|
if (this.microBatch.length === 0)
|
|
112
135
|
this.microBatchStartUs = nowUs;
|
|
113
136
|
this.microBatch.push(batch);
|
|
@@ -133,7 +156,7 @@ class OrderDispatcher {
|
|
|
133
156
|
this.slots.delete(s);
|
|
134
157
|
this.streamingWatermarks.delete(s);
|
|
135
158
|
}
|
|
136
|
-
this.lastFlushMs =
|
|
159
|
+
this.lastFlushMs = node_perf_hooks_1.performance.now();
|
|
137
160
|
}
|
|
138
161
|
flushAllSlots(emit) {
|
|
139
162
|
for (const s of [...this.slots.keys()].sort((a, b) => a < b ? -1 : a > b ? 1 : 0)) {
|
|
@@ -142,9 +165,20 @@ class OrderDispatcher {
|
|
|
142
165
|
for (const batch of batches)
|
|
143
166
|
this.emitBatch(batch, emit);
|
|
144
167
|
this.slots.delete(s);
|
|
145
|
-
this.
|
|
168
|
+
if (this.mode === "StreamingOrdered" && batches.length) {
|
|
169
|
+
const next = batches[batches.length - 1].txIndex + 1n;
|
|
170
|
+
this.streamingWatermarks.set(s, next > (this.streamingWatermarks.get(s) ?? 0n)
|
|
171
|
+
? next : this.streamingWatermarks.get(s));
|
|
172
|
+
}
|
|
173
|
+
else
|
|
174
|
+
this.streamingWatermarks.delete(s);
|
|
175
|
+
}
|
|
176
|
+
this.streamingPending.clear();
|
|
177
|
+
for (const slot of this.streamingWatermarks.keys()) {
|
|
178
|
+
if (this.mode !== "StreamingOrdered" || slot !== this.currentSlot)
|
|
179
|
+
this.streamingWatermarks.delete(slot);
|
|
146
180
|
}
|
|
147
|
-
this.lastFlushMs =
|
|
181
|
+
this.lastFlushMs = node_perf_hooks_1.performance.now();
|
|
148
182
|
}
|
|
149
183
|
flushMicroBatch(emit) {
|
|
150
184
|
if (this.microBatch.length === 0)
|
|
@@ -154,9 +188,11 @@ class OrderDispatcher {
|
|
|
154
188
|
this.emitBatch(batch, emit);
|
|
155
189
|
this.microBatch = [];
|
|
156
190
|
this.microBatchStartUs = 0;
|
|
157
|
-
this.lastFlushMs =
|
|
191
|
+
this.lastFlushMs = node_perf_hooks_1.performance.now();
|
|
158
192
|
}
|
|
159
193
|
emitBatch(batch, emit) {
|
|
194
|
+
if (this.mode === "Ordered")
|
|
195
|
+
this.orderedWatermark = { slot: batch.slot, txIndex: batch.txIndex };
|
|
160
196
|
for (const event of batch.events)
|
|
161
197
|
emit(event);
|
|
162
198
|
}
|
package/dist/grpc/types.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { SubscribeRequestFilterAccountsFilter } from "./protocol/geyser.js";
|
|
2
2
|
import type { DexEvent } from "../core/dex_event.js";
|
|
3
3
|
/** gRPC 订阅顺序模式 */
|
|
4
|
+
/** Ordered sorts buffered transactions until a newer slot or timeout. Late data
|
|
5
|
+
* for a closed slot or at/before the emitted watermark is dropped with a
|
|
6
|
+
* continuity-break warning; upstream completeness cannot be guaranteed. */
|
|
4
7
|
export type OrderMode = "Unordered" | "Ordered" | "StreamingOrdered" | "MicroBatch";
|
|
5
8
|
/** 与 Rust `grpc::types::Protocol` 一致 */
|
|
6
9
|
export type Protocol = "PumpFun" | "PumpSwap" | "PumpFees" | "LaunchLab" | "StonkFun" | "RaydiumLaunchlab" | "RaydiumCpmm" | "RaydiumClmm" | "RaydiumAmmV4" | "OrcaWhirlpool" | "MeteoraPools" | "MeteoraDammV2" | "MeteoraDlmm" | "MeteoraDbc";
|
|
@@ -151,7 +154,7 @@ export declare function accountFilterFromProgramOwners(programIds: string[]): Ac
|
|
|
151
154
|
*/
|
|
152
155
|
export declare function accountFilterMemcmp(offset: number, bytes: Uint8Array): SubscribeRequestFilterAccountsFilter;
|
|
153
156
|
/** 事件类型过滤标签 */
|
|
154
|
-
export type EventType = "AccountRawSnapshot" | "AccountLiquiditySnapshot" | "BlockMeta" | "RaydiumLaunchlabTrade" | "RaydiumLaunchlabPoolCreate" | "RaydiumLaunchlabMigrateAmm" | "PumpFunTrade" | "PumpFunBuy" | "PumpFunSell" | "PumpFunBuyExactSolIn" | "PumpFunCreate" | "PumpFunCreateV2" | "PumpFunComplete" | "PumpFunMigrate" | "PumpFeesCreateFeeSharingConfig" | "PumpFeesInitializeFeeConfig" | "PumpFeesResetFeeSharingConfig" | "PumpFeesRevokeFeeSharingAuthority" | "PumpFeesTransferFeeSharingAuthority" | "PumpFeesUpdateAdmin" | "PumpFeesUpdateFeeConfig" | "PumpFeesUpdateFeeShares" | "PumpFeesUpsertFeeTiers" | "PumpFunMigrateBondingCurveCreator" | "PumpSwapTrade" | "PumpSwapBuy" | "PumpSwapSell" | "PumpSwapCreatePool" | "PumpSwapLiquidityAdded" | "PumpSwapLiquidityRemoved" | "RaydiumCpmmSwap" | "RaydiumCpmmDeposit" | "RaydiumCpmmWithdraw" | "RaydiumCpmmInitialize" | "RaydiumClmmSwap" | "RaydiumClmmCreatePool" | "RaydiumClmmOpenPosition" | "RaydiumClmmClosePosition" | "RaydiumClmmIncreaseLiquidity" | "RaydiumClmmDecreaseLiquidity" | "RaydiumClmmLiquidityChange" | "RaydiumClmmConfigChange" | "RaydiumClmmCreatePersonalPosition" | "RaydiumClmmLiquidityCalculate" | "RaydiumClmmOpenLimitOrder" | "RaydiumClmmIncreaseLimitOrder" | "RaydiumClmmDecreaseLimitOrder" | "RaydiumClmmSettleLimitOrder" | "RaydiumClmmUpdateRewardInfos" | "RaydiumClmmOpenPositionWithTokenExtNft" | "RaydiumClmmCollectFee" | "RaydiumAmmV4Swap" | "RaydiumAmmV4Deposit" | "RaydiumAmmV4Withdraw" | "RaydiumAmmV4Initialize2" | "RaydiumAmmV4WithdrawPnl" | "OrcaWhirlpoolSwap" | "OrcaWhirlpoolLiquidityIncreased" | "OrcaWhirlpoolLiquidityDecreased" | "OrcaWhirlpoolPoolInitialized" | "MeteoraPoolsSwap" | "MeteoraPoolsAddLiquidity" | "MeteoraPoolsRemoveLiquidity" | "MeteoraPoolsBootstrapLiquidity" | "MeteoraPoolsPoolCreated" | "MeteoraPoolsSetPoolFees" | "MeteoraDammV2Swap" | "MeteoraDammV2AddLiquidity" | "MeteoraDammV2RemoveLiquidity" | "MeteoraDammV2InitializePool" | "MeteoraDammV2CreatePosition" | "MeteoraDammV2ClosePosition" | "MeteoraDammV2UpdateDelegatePermission" | "MeteoraDammV2WithdrawDeadLiquidityReward" | "MeteoraDammV2CreateConfig" | "MeteoraDammV2CreateDynamicConfig" | "MeteoraDbcSwap" | "MeteoraDbcInitializePool" | "MeteoraDbcCurveComplete" | "MeteoraDlmmSwap" | "MeteoraDlmmAddLiquidity" | "MeteoraDlmmRemoveLiquidity" | "MeteoraDlmmInitializePool" | "MeteoraDlmmInitializeBinArray" | "MeteoraDlmmCreatePosition" | "MeteoraDlmmClosePosition" | "MeteoraDlmmClaimFee" | "TokenAccount" | "TokenInfo" | "NonceAccount" | "AccountPumpFunGlobal" | "AccountPumpFunBondingCurve" | "AccountPumpFunFeeConfig" | "AccountPumpFunSharingConfig" | "AccountPumpFunGlobalVolumeAccumulator" | "AccountPumpFunUserVolumeAccumulator" | "AccountPumpSwapGlobalConfig" | "AccountPumpSwapPool" | "AccountRaydiumClmmAmmConfig" | "AccountRaydiumClmmPoolState" | "AccountRaydiumClmmTickArrayState" | "AccountRaydiumCpmmAmmConfig" | "AccountRaydiumCpmmPoolState" | "AccountOrcaWhirlpool" | "AccountOrcaPosition" | "AccountOrcaTickArray" | "AccountOrcaFeeTier" | "AccountOrcaWhirlpoolsConfig";
|
|
157
|
+
export type EventType = "AccountRawSnapshot" | "AccountLiquiditySnapshot" | "BlockMeta" | "RaydiumLaunchlabTrade" | "RaydiumLaunchlabPoolCreate" | "RaydiumLaunchlabMigrateAmm" | "PumpFunTrade" | "PumpFunBuy" | "PumpFunSell" | "PumpFunBuyExactSolIn" | "PumpFunCreate" | "PumpFunCreateV2" | "PumpFunComplete" | "PumpFunMigrate" | "PumpFeesCreateFeeSharingConfig" | "PumpFeesInitializeFeeConfig" | "PumpFeesResetFeeSharingConfig" | "PumpFeesRevokeFeeSharingAuthority" | "PumpFeesTransferFeeSharingAuthority" | "PumpFeesUpdateAdmin" | "PumpFeesUpdateFeeConfig" | "PumpFeesUpdateFeeShares" | "PumpFeesUpsertFeeTiers" | "PumpFunPostCompleteBuy" | "PumpFunSweepBondingCurveFee" | "PumpSwapSweepPoolFee" | "PumpFunMigrateBondingCurveCreator" | "PumpSwapTrade" | "PumpSwapBuy" | "PumpSwapSell" | "PumpSwapCreatePool" | "PumpSwapLiquidityAdded" | "PumpSwapLiquidityRemoved" | "RaydiumCpmmSwap" | "RaydiumCpmmDeposit" | "RaydiumCpmmWithdraw" | "RaydiumCpmmInitialize" | "RaydiumClmmSwap" | "RaydiumClmmCreatePool" | "RaydiumClmmOpenPosition" | "RaydiumClmmClosePosition" | "RaydiumClmmIncreaseLiquidity" | "RaydiumClmmDecreaseLiquidity" | "RaydiumClmmLiquidityChange" | "RaydiumClmmConfigChange" | "RaydiumClmmCreatePersonalPosition" | "RaydiumClmmLiquidityCalculate" | "RaydiumClmmOpenLimitOrder" | "RaydiumClmmIncreaseLimitOrder" | "RaydiumClmmDecreaseLimitOrder" | "RaydiumClmmSettleLimitOrder" | "RaydiumClmmUpdateRewardInfos" | "RaydiumClmmOpenPositionWithTokenExtNft" | "RaydiumClmmCollectFee" | "RaydiumAmmV4Swap" | "RaydiumAmmV4Deposit" | "RaydiumAmmV4Withdraw" | "RaydiumAmmV4Initialize2" | "RaydiumAmmV4WithdrawPnl" | "OrcaWhirlpoolSwap" | "OrcaWhirlpoolLiquidityIncreased" | "OrcaWhirlpoolLiquidityDecreased" | "OrcaWhirlpoolPoolInitialized" | "MeteoraPoolsSwap" | "MeteoraPoolsAddLiquidity" | "MeteoraPoolsRemoveLiquidity" | "MeteoraPoolsBootstrapLiquidity" | "MeteoraPoolsPoolCreated" | "MeteoraPoolsSetPoolFees" | "MeteoraDammV2Swap" | "MeteoraDammV2AddLiquidity" | "MeteoraDammV2RemoveLiquidity" | "MeteoraDammV2InitializePool" | "MeteoraDammV2CreatePosition" | "MeteoraDammV2ClaimPositionFee" | "MeteoraDammV2ClaimReward" | "MeteoraDlmmClaimReward" | "MeteoraDammV2ClosePosition" | "MeteoraDammV2UpdateDelegatePermission" | "MeteoraDammV2WithdrawDeadLiquidityReward" | "MeteoraDammV2WithdrawIneligibleReward" | "MeteoraDammV2UpdateRewardFunder" | "MeteoraDammV2UpdateRewardDuration" | "MeteoraDammV2InitializeReward" | "MeteoraDammV2FundReward" | "MeteoraDammV2CreateConfig" | "MeteoraDammV2CreateDynamicConfig" | "MeteoraDbcSwap" | "MeteoraDbcInitializePool" | "MeteoraDbcCurveComplete" | "MeteoraDlmmSwap" | "MeteoraDlmmAddLiquidity" | "MeteoraDlmmRemoveLiquidity" | "MeteoraDlmmInitializePool" | "MeteoraDlmmInitializeBinArray" | "MeteoraDlmmCreatePosition" | "MeteoraDlmmClosePosition" | "MeteoraDlmmClaimFee" | "TokenAccount" | "TokenInfo" | "NonceAccount" | "AccountPumpFunGlobal" | "AccountPumpFunBondingCurve" | "AccountPumpFunFeeConfig" | "AccountPumpFunSharingConfig" | "AccountPumpFunGlobalVolumeAccumulator" | "AccountPumpFunUserVolumeAccumulator" | "AccountPumpSwapGlobalConfig" | "AccountPumpSwapPool" | "AccountRaydiumClmmAmmConfig" | "AccountRaydiumClmmPoolState" | "AccountRaydiumClmmTickArrayState" | "AccountRaydiumCpmmAmmConfig" | "AccountRaydiumCpmmPoolState" | "AccountOrcaWhirlpool" | "AccountOrcaPosition" | "AccountOrcaTickArray" | "AccountOrcaFeeTier" | "AccountOrcaWhirlpoolsConfig";
|
|
155
158
|
/** 与 Rust `grpc::EventType`(由 `StreamingEventType` 导出)一致 */
|
|
156
159
|
export type StreamingEventType = EventType;
|
|
157
160
|
/** 所有事件类型列表 */
|