sol-parser-sdk 0.5.9
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/.env.example +24 -0
- package/LICENSE +21 -0
- package/README.md +236 -0
- package/README_CN.md +236 -0
- package/dist/accounts/mod.d.ts +15 -0
- package/dist/accounts/mod.js +173 -0
- package/dist/accounts/nonce.d.ts +5 -0
- package/dist/accounts/nonce.js +32 -0
- package/dist/accounts/pumpfun.d.ts +16 -0
- package/dist/accounts/pumpfun.js +538 -0
- package/dist/accounts/pumpswap.d.ts +8 -0
- package/dist/accounts/pumpswap.js +192 -0
- package/dist/accounts/raydium_orca.d.ts +26 -0
- package/dist/accounts/raydium_orca.js +453 -0
- package/dist/accounts/rpc_wallet.d.ts +5 -0
- package/dist/accounts/rpc_wallet.js +18 -0
- package/dist/accounts/rust_aliases.d.ts +10 -0
- package/dist/accounts/rust_aliases.js +21 -0
- package/dist/accounts/token.d.ts +5 -0
- package/dist/accounts/token.js +98 -0
- package/dist/accounts/types.d.ts +9 -0
- package/dist/accounts/types.js +2 -0
- package/dist/accounts/utils.d.ts +1 -0
- package/dist/accounts/utils.js +12 -0
- package/dist/accounts/wallet_resolve.d.ts +1 -0
- package/dist/accounts/wallet_resolve.js +28 -0
- package/dist/common/constants.d.ts +10 -0
- package/dist/common/constants.js +13 -0
- package/dist/core/account_dispatcher_rpc.d.ts +11 -0
- package/dist/core/account_dispatcher_rpc.js +155 -0
- package/dist/core/account_fill_bonk.d.ts +4 -0
- package/dist/core/account_fill_bonk.js +20 -0
- package/dist/core/account_fill_meteora.d.ts +15 -0
- package/dist/core/account_fill_meteora.js +27 -0
- package/dist/core/account_fill_orca.d.ts +5 -0
- package/dist/core/account_fill_orca.js +18 -0
- package/dist/core/account_fill_pumpfun.d.ts +7 -0
- package/dist/core/account_fill_pumpfun.js +167 -0
- package/dist/core/account_fill_pumpswap.d.ts +10 -0
- package/dist/core/account_fill_pumpswap.js +128 -0
- package/dist/core/account_fill_raydium.d.ts +20 -0
- package/dist/core/account_fill_raydium.js +104 -0
- package/dist/core/account_fill_raydium_launchlab.d.ts +4 -0
- package/dist/core/account_fill_raydium_launchlab.js +20 -0
- package/dist/core/account_pubkey_cache.d.ts +12 -0
- package/dist/core/account_pubkey_cache.js +26 -0
- package/dist/core/clock.d.ts +8 -0
- package/dist/core/clock.js +20 -0
- package/dist/core/common_filler_rpc.d.ts +6 -0
- package/dist/core/common_filler_rpc.js +21 -0
- package/dist/core/dex_event.d.ts +1704 -0
- package/dist/core/dex_event.js +14 -0
- package/dist/core/error.d.ts +43 -0
- package/dist/core/error.js +16 -0
- package/dist/core/json_utils.d.ts +8 -0
- package/dist/core/json_utils.js +18 -0
- package/dist/core/metadata.d.ts +11 -0
- package/dist/core/metadata.js +13 -0
- package/dist/core/pumpfun_fee_enrich.d.ts +6 -0
- package/dist/core/pumpfun_fee_enrich.js +159 -0
- package/dist/core/rpc_invoke_map.d.ts +23 -0
- package/dist/core/rpc_invoke_map.js +157 -0
- package/dist/core/unified_parser.d.ts +19 -0
- package/dist/core/unified_parser.js +50 -0
- package/dist/grpc/client.d.ts +83 -0
- package/dist/grpc/client.js +645 -0
- package/dist/grpc/client_stub.d.ts +5 -0
- package/dist/grpc/client_stub.js +5 -0
- package/dist/grpc/event_parser.d.ts +6 -0
- package/dist/grpc/event_parser.js +15 -0
- package/dist/grpc/geyser_connect.d.ts +30 -0
- package/dist/grpc/geyser_connect.js +40 -0
- package/dist/grpc/log_instr_dedup.d.ts +2 -0
- package/dist/grpc/log_instr_dedup.js +402 -0
- package/dist/grpc/order_buffer.d.ts +27 -0
- package/dist/grpc/order_buffer.js +166 -0
- package/dist/grpc/program_ids.d.ts +27 -0
- package/dist/grpc/program_ids.js +61 -0
- package/dist/grpc/rpc_to_grpc.d.ts +18 -0
- package/dist/grpc/rpc_to_grpc.js +127 -0
- package/dist/grpc/subscribe_builder.d.ts +13 -0
- package/dist/grpc/subscribe_builder.js +66 -0
- package/dist/grpc/transaction_meta.d.ts +29 -0
- package/dist/grpc/transaction_meta.js +208 -0
- package/dist/grpc/types.d.ts +195 -0
- package/dist/grpc/types.js +551 -0
- package/dist/grpc/yellowstone_parse.d.ts +16 -0
- package/dist/grpc/yellowstone_parse.js +62 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +298 -0
- package/dist/instr/bonk_ix.d.ts +8 -0
- package/dist/instr/bonk_ix.js +131 -0
- package/dist/instr/inner.d.ts +4 -0
- package/dist/instr/inner.js +453 -0
- package/dist/instr/meteora_damm_ix.d.ts +8 -0
- package/dist/instr/meteora_damm_ix.js +601 -0
- package/dist/instr/meteora_dlmm_ix.d.ts +2 -0
- package/dist/instr/meteora_dlmm_ix.js +134 -0
- package/dist/instr/meteora_pools_ix.d.ts +2 -0
- package/dist/instr/meteora_pools_ix.js +78 -0
- package/dist/instr/mod.d.ts +18 -0
- package/dist/instr/mod.js +129 -0
- package/dist/instr/orca_whirlpool_ix.d.ts +8 -0
- package/dist/instr/orca_whirlpool_ix.js +119 -0
- package/dist/instr/program_ids.d.ts +4 -0
- package/dist/instr/program_ids.js +20 -0
- package/dist/instr/pump_fees_ix.d.ts +2 -0
- package/dist/instr/pump_fees_ix.js +168 -0
- package/dist/instr/pumpfun_ix.d.ts +6 -0
- package/dist/instr/pumpfun_ix.js +448 -0
- package/dist/instr/pumpswap_ix.d.ts +5 -0
- package/dist/instr/pumpswap_ix.js +270 -0
- package/dist/instr/raydium_amm_v4_ix.d.ts +6 -0
- package/dist/instr/raydium_amm_v4_ix.js +112 -0
- package/dist/instr/raydium_clmm_ix.d.ts +5 -0
- package/dist/instr/raydium_clmm_ix.js +184 -0
- package/dist/instr/raydium_cpmm_ix.d.ts +5 -0
- package/dist/instr/raydium_cpmm_ix.js +109 -0
- package/dist/instr/raydium_launchlab_ix.d.ts +8 -0
- package/dist/instr/raydium_launchlab_ix.js +125 -0
- package/dist/instr/rust_aliases.d.ts +10 -0
- package/dist/instr/rust_aliases.js +20 -0
- package/dist/instr/utils.d.ts +10 -0
- package/dist/instr/utils.js +35 -0
- package/dist/logs/discriminator_lut.d.ts +19 -0
- package/dist/logs/discriminator_lut.js +62 -0
- package/dist/logs/meteora_amm.d.ts +8 -0
- package/dist/logs/meteora_amm.js +113 -0
- package/dist/logs/meteora_damm.d.ts +5 -0
- package/dist/logs/meteora_damm.js +367 -0
- package/dist/logs/meteora_dbc.d.ts +11 -0
- package/dist/logs/meteora_dbc.js +142 -0
- package/dist/logs/meteora_dlmm.d.ts +6 -0
- package/dist/logs/meteora_dlmm.js +201 -0
- package/dist/logs/optimized_matcher.d.ts +11 -0
- package/dist/logs/optimized_matcher.js +941 -0
- package/dist/logs/orca.d.ts +6 -0
- package/dist/logs/orca.js +148 -0
- package/dist/logs/program_data.d.ts +2 -0
- package/dist/logs/program_data.js +20 -0
- package/dist/logs/program_log_discriminators.d.ts +80 -0
- package/dist/logs/program_log_discriminators.js +88 -0
- package/dist/logs/pump.d.ts +14 -0
- package/dist/logs/pump.js +378 -0
- package/dist/logs/pump_amm.d.ts +9 -0
- package/dist/logs/pump_amm.js +418 -0
- package/dist/logs/pump_fees.d.ts +23 -0
- package/dist/logs/pump_fees.js +364 -0
- package/dist/logs/raydium_amm.d.ts +9 -0
- package/dist/logs/raydium_amm.js +224 -0
- package/dist/logs/raydium_clmm.d.ts +17 -0
- package/dist/logs/raydium_clmm.js +624 -0
- package/dist/logs/raydium_cpmm.d.ts +7 -0
- package/dist/logs/raydium_cpmm.js +121 -0
- package/dist/logs/raydium_launchlab.d.ts +10 -0
- package/dist/logs/raydium_launchlab.js +84 -0
- package/dist/logs/raydium_launchpad.d.ts +12 -0
- package/dist/logs/raydium_launchpad.js +92 -0
- package/dist/logs/rust_aliases.d.ts +7 -0
- package/dist/logs/rust_aliases.js +16 -0
- package/dist/parser_alias.d.ts +3 -0
- package/dist/parser_alias.js +2 -0
- package/dist/rpc_parser.d.ts +17 -0
- package/dist/rpc_parser.js +39 -0
- package/dist/rpc_transaction.d.ts +27 -0
- package/dist/rpc_transaction.js +416 -0
- package/dist/shredstream/alt_lookup.d.ts +9 -0
- package/dist/shredstream/alt_lookup.js +70 -0
- package/dist/shredstream/client.d.ts +65 -0
- package/dist/shredstream/client.js +403 -0
- package/dist/shredstream/config.d.ts +30 -0
- package/dist/shredstream/config.js +34 -0
- package/dist/shredstream/entries_decode.d.ts +28 -0
- package/dist/shredstream/entries_decode.js +251 -0
- package/dist/shredstream/index.d.ts +17 -0
- package/dist/shredstream/index.js +33 -0
- package/dist/shredstream/instruction_parse.d.ts +34 -0
- package/dist/shredstream/instruction_parse.js +79 -0
- package/dist/shredstream/proto_types.d.ts +9 -0
- package/dist/shredstream/proto_types.js +2 -0
- package/dist/shredstream/shredstream.proto +15 -0
- package/dist/shredstream/wire_to_shred_tx.d.ts +2 -0
- package/dist/shredstream/wire_to_shred_tx.js +59 -0
- package/dist/util/binary.d.ts +14 -0
- package/dist/util/binary.js +82 -0
- package/dist/util/market.d.ts +18 -0
- package/dist/util/market.js +54 -0
- package/dist/warmup.d.ts +3 -0
- package/dist/warmup.js +23 -0
- package/package.json +61 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type { SubscribeRequestFilterAccountsFilter } from "@triton-one/yellowstone-grpc";
|
|
2
|
+
import type { DexEvent } from "../core/dex_event.js";
|
|
3
|
+
/** gRPC 订阅顺序模式 */
|
|
4
|
+
export type OrderMode = "Unordered" | "Ordered" | "StreamingOrdered" | "MicroBatch";
|
|
5
|
+
/** 与 Rust `grpc::types::Protocol` 一致 */
|
|
6
|
+
export type Protocol = "PumpFun" | "PumpSwap" | "PumpFees" | "RaydiumLaunchlab" | "RaydiumCpmm" | "RaydiumClmm" | "RaydiumAmmV4" | "OrcaWhirlpool" | "MeteoraPools" | "MeteoraDammV2" | "MeteoraDlmm" | "MeteoraDbc";
|
|
7
|
+
export type SlotStatus = "Processed" | "Confirmed" | "Finalized" | "FirstShredReceived" | "Completed" | "CreatedBank" | "Dead";
|
|
8
|
+
export interface SubscribeUpdateAccountInfo {
|
|
9
|
+
pubkey: Uint8Array;
|
|
10
|
+
lamports: string | bigint;
|
|
11
|
+
owner: Uint8Array;
|
|
12
|
+
executable: boolean;
|
|
13
|
+
rentEpoch: string | bigint;
|
|
14
|
+
data: Uint8Array;
|
|
15
|
+
writeVersion: string | bigint;
|
|
16
|
+
txnSignature?: Uint8Array;
|
|
17
|
+
}
|
|
18
|
+
export interface SubscribeUpdateAccount {
|
|
19
|
+
slot: string | bigint;
|
|
20
|
+
isStartup: boolean;
|
|
21
|
+
account?: SubscribeUpdateAccountInfo;
|
|
22
|
+
}
|
|
23
|
+
export interface SubscribeUpdateSlot {
|
|
24
|
+
slot: string | bigint;
|
|
25
|
+
parent?: string | bigint;
|
|
26
|
+
status: SlotStatus;
|
|
27
|
+
deadError?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SubscribeUpdateTransactionInfo {
|
|
30
|
+
signature: Uint8Array;
|
|
31
|
+
isVote: boolean;
|
|
32
|
+
/** 原始 proto Transaction 对象 */
|
|
33
|
+
transactionRaw?: unknown;
|
|
34
|
+
/** 原始 proto TransactionStatusMeta 对象(含 logMessages) */
|
|
35
|
+
metaRaw?: {
|
|
36
|
+
logMessages?: string[];
|
|
37
|
+
logMessagesNone?: boolean;
|
|
38
|
+
err?: unknown;
|
|
39
|
+
preBalances?: string[];
|
|
40
|
+
postBalances?: string[];
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
};
|
|
43
|
+
index: string | bigint;
|
|
44
|
+
}
|
|
45
|
+
export interface SubscribeUpdateTransaction {
|
|
46
|
+
slot: string | bigint;
|
|
47
|
+
transaction?: SubscribeUpdateTransactionInfo;
|
|
48
|
+
}
|
|
49
|
+
export interface SubscribeUpdateBlock {
|
|
50
|
+
slot: string | bigint;
|
|
51
|
+
blockhash: string;
|
|
52
|
+
parentSlot: string | bigint;
|
|
53
|
+
parentBlockhash: string;
|
|
54
|
+
executedTransactionCount: string | bigint;
|
|
55
|
+
}
|
|
56
|
+
export interface SubscribeUpdateBlockMeta {
|
|
57
|
+
slot: string | bigint;
|
|
58
|
+
blockhash: string;
|
|
59
|
+
parentSlot: string | bigint;
|
|
60
|
+
parentBlockhash: string;
|
|
61
|
+
executedTransactionCount: string | bigint;
|
|
62
|
+
}
|
|
63
|
+
export interface SubscribeUpdatePing {
|
|
64
|
+
}
|
|
65
|
+
export interface SubscribeUpdatePong {
|
|
66
|
+
id: number;
|
|
67
|
+
}
|
|
68
|
+
export interface SubscribeUpdate {
|
|
69
|
+
filters: string[];
|
|
70
|
+
account?: SubscribeUpdateAccount;
|
|
71
|
+
slot?: SubscribeUpdateSlot;
|
|
72
|
+
transaction?: SubscribeUpdateTransaction;
|
|
73
|
+
block?: SubscribeUpdateBlock;
|
|
74
|
+
blockMeta?: SubscribeUpdateBlockMeta;
|
|
75
|
+
ping?: SubscribeUpdatePing;
|
|
76
|
+
pong?: SubscribeUpdatePong;
|
|
77
|
+
/** Yellowstone SubscribeUpdate.created_at, Unix timestamp in microseconds. */
|
|
78
|
+
createdAtUs?: number;
|
|
79
|
+
}
|
|
80
|
+
export interface SubscribeCallbacks {
|
|
81
|
+
onUpdate?: (update: SubscribeUpdate) => void;
|
|
82
|
+
onError?: (err: Error) => void;
|
|
83
|
+
onEnd?: () => void;
|
|
84
|
+
/**
|
|
85
|
+
* 是否在流断开后自动重连(指数退避,与 Rust `subscribe_dex_events` 一致)。
|
|
86
|
+
* 默认 `true`。为 `false` 时保持单次连接的旧行为。
|
|
87
|
+
*/
|
|
88
|
+
autoReconnect?: boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface ClientConfig {
|
|
91
|
+
enable_metrics: boolean;
|
|
92
|
+
connection_timeout_ms: number;
|
|
93
|
+
request_timeout_ms: number;
|
|
94
|
+
enable_tls: boolean;
|
|
95
|
+
max_retries: number;
|
|
96
|
+
retry_delay_ms: number;
|
|
97
|
+
max_concurrent_streams: number;
|
|
98
|
+
keep_alive_interval_ms: number;
|
|
99
|
+
keep_alive_timeout_ms: number;
|
|
100
|
+
buffer_size: number;
|
|
101
|
+
order_mode: OrderMode;
|
|
102
|
+
order_timeout_ms: number;
|
|
103
|
+
micro_batch_us: number;
|
|
104
|
+
}
|
|
105
|
+
/** 与 Rust `grpc::config` 中 `StreamingConfig` 别名(即 `ClientConfig`)一致 */
|
|
106
|
+
export type StreamingConfig = ClientConfig;
|
|
107
|
+
export declare function defaultClientConfig(): ClientConfig;
|
|
108
|
+
/** 与 Rust `ClientConfig::low_latency` 一致 */
|
|
109
|
+
export declare function lowLatencyClientConfig(): ClientConfig;
|
|
110
|
+
/** 与 Rust `ClientConfig::high_throughput` 一致 */
|
|
111
|
+
export declare function highThroughputClientConfig(): ClientConfig;
|
|
112
|
+
export interface TransactionFilter {
|
|
113
|
+
account_include: string[];
|
|
114
|
+
account_exclude: string[];
|
|
115
|
+
account_required: string[];
|
|
116
|
+
}
|
|
117
|
+
export declare function newTransactionFilter(): TransactionFilter;
|
|
118
|
+
/** 与 Rust `TransactionFilter::from_program_ids` 一致 */
|
|
119
|
+
export declare function transactionFilterFromProgramIds(programIds: string[]): TransactionFilter;
|
|
120
|
+
/** 与 Rust `grpc::AccountFilter` 一致(Yellowstone 账户订阅) */
|
|
121
|
+
export interface AccountFilter {
|
|
122
|
+
account: string[];
|
|
123
|
+
owner: string[];
|
|
124
|
+
filters: SubscribeRequestFilterAccountsFilter[];
|
|
125
|
+
}
|
|
126
|
+
/** 与 Rust `grpc::types::AccountFilterMemcmp` / `AccountFilterData` 一致(文档与扩展用) */
|
|
127
|
+
export interface AccountFilterMemcmp {
|
|
128
|
+
offset: number;
|
|
129
|
+
bytes: Uint8Array;
|
|
130
|
+
}
|
|
131
|
+
export interface AccountFilterData {
|
|
132
|
+
memcmp?: AccountFilterMemcmp;
|
|
133
|
+
datasize?: number;
|
|
134
|
+
}
|
|
135
|
+
export declare function newAccountFilter(): AccountFilter;
|
|
136
|
+
/** 与 Rust `grpc::types::SlotFilter` 一致 */
|
|
137
|
+
export interface SlotFilter {
|
|
138
|
+
min_slot?: number;
|
|
139
|
+
max_slot?: number;
|
|
140
|
+
}
|
|
141
|
+
export declare function newSlotFilter(): SlotFilter;
|
|
142
|
+
export declare function slotFilterMinSlot(filter: SlotFilter, slot: number): SlotFilter;
|
|
143
|
+
export declare function slotFilterMaxSlot(filter: SlotFilter, slot: number): SlotFilter;
|
|
144
|
+
/** 与 Rust `AccountFilter::from_program_owners` 一致 */
|
|
145
|
+
export declare function accountFilterFromProgramOwners(programIds: string[]): AccountFilter;
|
|
146
|
+
/**
|
|
147
|
+
* 构造 memcmp 账户过滤器(与 Rust `account_filter_memcmp` 一致)。
|
|
148
|
+
* ATA 常在 offset 0 放 mint;PumpSwap 池子等常在 offset 32。
|
|
149
|
+
*/
|
|
150
|
+
export declare function accountFilterMemcmp(offset: number, bytes: Uint8Array): SubscribeRequestFilterAccountsFilter;
|
|
151
|
+
/** 事件类型过滤标签 */
|
|
152
|
+
export type EventType = "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" | "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";
|
|
153
|
+
/** 与 Rust `grpc::EventType`(由 `StreamingEventType` 导出)一致 */
|
|
154
|
+
export type StreamingEventType = EventType;
|
|
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;
|
|
159
|
+
export declare function eventTypeFilterNormalizeDexEvent(filter: EventTypeFilter, event: DexEvent): DexEvent;
|
|
160
|
+
export interface EventTypeFilter {
|
|
161
|
+
include_only?: EventType[];
|
|
162
|
+
exclude_types?: EventType[];
|
|
163
|
+
shouldInclude(eventType: EventType): boolean;
|
|
164
|
+
}
|
|
165
|
+
export declare function eventTypeFilterIncludeOnly(types: EventType[]): EventTypeFilter;
|
|
166
|
+
export declare function eventTypeFilterExclude(types: EventType[]): EventTypeFilter;
|
|
167
|
+
/** 过滤器是否包含 PumpFun 相关类型 */
|
|
168
|
+
export declare function eventTypeFilterIncludesPumpfun(filter: EventTypeFilter): boolean;
|
|
169
|
+
/** 过滤器是否包含 Pump Fees (`pfeeUx...`) 相关类型 */
|
|
170
|
+
export declare function eventTypeFilterIncludesPumpFees(filter: EventTypeFilter): boolean;
|
|
171
|
+
/** 过滤器是否包含 PumpSwap 相关类型 */
|
|
172
|
+
export declare function eventTypeFilterIncludesPumpswap(filter: EventTypeFilter): boolean;
|
|
173
|
+
/** 过滤器是否包含 Meteora DAMM V2 相关类型 */
|
|
174
|
+
export declare function eventTypeFilterIncludesMeteoraDammV2(filter: EventTypeFilter): boolean;
|
|
175
|
+
/** 过滤器是否包含 Meteora DBC 相关类型 */
|
|
176
|
+
export declare function eventTypeFilterIncludesMeteoraDbc(filter: EventTypeFilter): boolean;
|
|
177
|
+
/** 过滤器是否包含 Meteora Pools 相关类型 */
|
|
178
|
+
export declare function eventTypeFilterIncludesMeteoraPools(filter: EventTypeFilter): boolean;
|
|
179
|
+
/** 过滤器是否包含 Meteora DLMM 相关类型 */
|
|
180
|
+
export declare function eventTypeFilterIncludesMeteoraDlmm(filter: EventTypeFilter): boolean;
|
|
181
|
+
/** 过滤器是否包含 Raydium CLMM 相关类型 */
|
|
182
|
+
export declare function eventTypeFilterIncludesRaydiumClmm(filter: EventTypeFilter): boolean;
|
|
183
|
+
/** 过滤器是否包含 Raydium CPMM 相关类型 */
|
|
184
|
+
export declare function eventTypeFilterIncludesRaydiumCpmm(filter: EventTypeFilter): boolean;
|
|
185
|
+
/** 过滤器是否包含 Raydium AMM V4 相关类型 */
|
|
186
|
+
export declare function eventTypeFilterIncludesRaydiumAmmV4(filter: EventTypeFilter): boolean;
|
|
187
|
+
/** 过滤器是否包含 Orca Whirlpool 相关类型 */
|
|
188
|
+
export declare function eventTypeFilterIncludesOrcaWhirlpool(filter: EventTypeFilter): boolean;
|
|
189
|
+
/** 过滤器是否包含 Raydium LaunchLab 相关类型(与 Rust `includes_raydium_launchlab` 集合一致) */
|
|
190
|
+
export declare function eventTypeFilterIncludesRaydiumLaunchlab(filter: EventTypeFilter): boolean;
|
|
191
|
+
/**
|
|
192
|
+
* `parseInstructionUnified` 前置白名单:仅当 `include_only` 与下列指令相关类型有交集时才解析指令。
|
|
193
|
+
* 若白名单中不含下列任一类型,则整条指令解析入口返回 null。
|
|
194
|
+
*/
|
|
195
|
+
export declare function eventTypeFilterAllowsInstructionParsing(includeOnly: EventType[]): boolean;
|