sol-parser-sdk-nodejs 0.4.0 → 0.4.4
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 +6 -0
- package/README_CN.md +6 -0
- package/dist/accounts/mod.d.ts +1 -0
- package/dist/accounts/mod.js +14 -1
- package/dist/accounts/pumpfun.d.ts +6 -0
- package/dist/accounts/pumpfun.js +157 -0
- package/dist/accounts/rust_aliases.d.ts +1 -0
- package/dist/accounts/rust_aliases.js +3 -1
- package/dist/core/account_fill_pumpfun.js +17 -0
- package/dist/core/dex_event.d.ts +147 -0
- package/dist/core/pumpfun_fee_enrich.d.ts +4 -0
- package/dist/core/pumpfun_fee_enrich.js +80 -0
- package/dist/core/unified_parser.js +2 -0
- package/dist/grpc/client.d.ts +26 -1
- package/dist/grpc/client.js +279 -0
- package/dist/grpc/log_instr_dedup.d.ts +2 -0
- package/dist/grpc/log_instr_dedup.js +330 -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 +1 -0
- package/dist/grpc/program_ids.js +2 -1
- package/dist/grpc/types.d.ts +5 -1
- package/dist/grpc/types.js +101 -0
- package/dist/grpc/yellowstone_parse.d.ts +3 -1
- package/dist/grpc/yellowstone_parse.js +13 -10
- package/dist/index.d.ts +8 -7
- package/dist/index.js +16 -4
- package/dist/instr/mod.d.ts +1 -0
- package/dist/instr/mod.js +9 -1
- package/dist/instr/program_ids.d.ts +1 -1
- package/dist/instr/program_ids.js +2 -1
- package/dist/instr/pump_fees_ix.d.ts +2 -0
- package/dist/instr/pump_fees_ix.js +166 -0
- package/dist/instr/pumpfun_ix.js +57 -0
- package/dist/instr/raydium_clmm_ix.js +73 -52
- package/dist/instr/rust_aliases.d.ts +1 -0
- package/dist/instr/rust_aliases.js +3 -1
- package/dist/logs/discriminator_lut.d.ts +1 -1
- package/dist/logs/discriminator_lut.js +2 -0
- package/dist/logs/optimized_matcher.js +120 -20
- package/dist/logs/program_log_discriminators.d.ts +10 -0
- package/dist/logs/program_log_discriminators.js +10 -0
- package/dist/logs/pump.d.ts +2 -0
- package/dist/logs/pump.js +51 -4
- package/dist/logs/pump_fees.d.ts +23 -0
- package/dist/logs/pump_fees.js +364 -0
- package/dist/rpc_transaction.d.ts +2 -0
- package/dist/rpc_transaction.js +14 -6
- package/dist/shredstream/instruction_parse.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderDispatcher = void 0;
|
|
4
|
+
const dex_event_js_1 = require("../core/dex_event.js");
|
|
5
|
+
function eventSlotAndIndex(events, fallbackSlot, fallbackTxIndex) {
|
|
6
|
+
const meta = events.length > 0 ? (0, dex_event_js_1.metadataForDexEvent)(events[0]) : null;
|
|
7
|
+
return {
|
|
8
|
+
slot: Number.isFinite(meta?.slot) ? meta.slot : fallbackSlot,
|
|
9
|
+
txIndex: Number.isFinite(meta?.tx_index) ? meta.tx_index : fallbackTxIndex,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
class OrderDispatcher {
|
|
13
|
+
mode;
|
|
14
|
+
timeoutMs;
|
|
15
|
+
microBatchUs;
|
|
16
|
+
slots = new Map();
|
|
17
|
+
streamingWatermarks = new Map();
|
|
18
|
+
microBatch = [];
|
|
19
|
+
microBatchStartUs = 0;
|
|
20
|
+
lastFlushMs = Date.now();
|
|
21
|
+
currentSlot = 0;
|
|
22
|
+
seq = 0;
|
|
23
|
+
constructor(config) {
|
|
24
|
+
this.mode = config.order_mode;
|
|
25
|
+
this.timeoutMs = Math.max(1, config.order_timeout_ms || 100);
|
|
26
|
+
this.microBatchUs = Math.max(1, config.micro_batch_us || 100);
|
|
27
|
+
}
|
|
28
|
+
get needsTimer() {
|
|
29
|
+
return this.mode !== "Unordered";
|
|
30
|
+
}
|
|
31
|
+
pushTransactionEvents(events, fallbackSlot, fallbackTxIndex, emit) {
|
|
32
|
+
if (events.length === 0)
|
|
33
|
+
return;
|
|
34
|
+
const { slot, txIndex } = eventSlotAndIndex(events, fallbackSlot, fallbackTxIndex);
|
|
35
|
+
const batch = { slot, txIndex, seq: this.seq++, events };
|
|
36
|
+
switch (this.mode) {
|
|
37
|
+
case "Unordered":
|
|
38
|
+
this.emitBatch(batch, emit);
|
|
39
|
+
return;
|
|
40
|
+
case "Ordered":
|
|
41
|
+
this.pushOrdered(batch, emit);
|
|
42
|
+
return;
|
|
43
|
+
case "StreamingOrdered":
|
|
44
|
+
this.pushStreaming(batch, emit);
|
|
45
|
+
return;
|
|
46
|
+
case "MicroBatch":
|
|
47
|
+
this.pushMicroBatch(batch, emit);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
flushDue(emit) {
|
|
52
|
+
const nowMs = Date.now();
|
|
53
|
+
if ((this.mode === "Ordered" || this.mode === "StreamingOrdered") && nowMs - this.lastFlushMs > this.timeoutMs) {
|
|
54
|
+
this.flushAllSlots(emit);
|
|
55
|
+
}
|
|
56
|
+
if (this.mode === "MicroBatch") {
|
|
57
|
+
const nowUs = Math.floor(nowMs * 1000);
|
|
58
|
+
if (this.microBatch.length > 0 && nowUs - this.microBatchStartUs >= this.microBatchUs) {
|
|
59
|
+
this.flushMicroBatch(emit);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
flushAll(emit) {
|
|
64
|
+
this.flushAllSlots(emit);
|
|
65
|
+
this.flushMicroBatch(emit);
|
|
66
|
+
}
|
|
67
|
+
pushOrdered(batch, emit) {
|
|
68
|
+
if (batch.slot > this.currentSlot && this.currentSlot > 0) {
|
|
69
|
+
this.flushBefore(batch.slot, emit);
|
|
70
|
+
}
|
|
71
|
+
if (batch.slot > this.currentSlot)
|
|
72
|
+
this.currentSlot = batch.slot;
|
|
73
|
+
this.pushSlotBatch(batch);
|
|
74
|
+
}
|
|
75
|
+
pushStreaming(batch, emit) {
|
|
76
|
+
if (batch.slot > this.currentSlot && this.currentSlot > 0) {
|
|
77
|
+
this.flushBefore(batch.slot, emit);
|
|
78
|
+
for (const slot of [...this.streamingWatermarks.keys()]) {
|
|
79
|
+
if (slot < batch.slot)
|
|
80
|
+
this.streamingWatermarks.delete(slot);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (batch.slot > this.currentSlot)
|
|
84
|
+
this.currentSlot = batch.slot;
|
|
85
|
+
const expected = this.streamingWatermarks.get(batch.slot) ?? 0;
|
|
86
|
+
if (batch.txIndex === expected) {
|
|
87
|
+
this.emitBatch(batch, emit);
|
|
88
|
+
let watermark = expected + 1;
|
|
89
|
+
const buffered = this.slots.get(batch.slot);
|
|
90
|
+
if (buffered) {
|
|
91
|
+
buffered.sort(compareBatch);
|
|
92
|
+
let pos = buffered.findIndex((b) => b.txIndex === watermark);
|
|
93
|
+
while (pos >= 0) {
|
|
94
|
+
const [next] = buffered.splice(pos, 1);
|
|
95
|
+
this.emitBatch(next, emit);
|
|
96
|
+
watermark += 1;
|
|
97
|
+
pos = buffered.findIndex((b) => b.txIndex === watermark);
|
|
98
|
+
}
|
|
99
|
+
if (buffered.length === 0)
|
|
100
|
+
this.slots.delete(batch.slot);
|
|
101
|
+
}
|
|
102
|
+
this.streamingWatermarks.set(batch.slot, watermark);
|
|
103
|
+
}
|
|
104
|
+
else if (batch.txIndex > expected) {
|
|
105
|
+
this.pushSlotBatch(batch);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
pushMicroBatch(batch, emit) {
|
|
109
|
+
const nowUs = Math.floor(Date.now() * 1000);
|
|
110
|
+
if (this.microBatch.length === 0)
|
|
111
|
+
this.microBatchStartUs = nowUs;
|
|
112
|
+
this.microBatch.push(batch);
|
|
113
|
+
if (nowUs - this.microBatchStartUs >= this.microBatchUs) {
|
|
114
|
+
this.flushMicroBatch(emit);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
pushSlotBatch(batch) {
|
|
118
|
+
const list = this.slots.get(batch.slot);
|
|
119
|
+
if (list)
|
|
120
|
+
list.push(batch);
|
|
121
|
+
else
|
|
122
|
+
this.slots.set(batch.slot, [batch]);
|
|
123
|
+
}
|
|
124
|
+
flushBefore(slot, emit) {
|
|
125
|
+
for (const s of [...this.slots.keys()].sort((a, b) => a - b)) {
|
|
126
|
+
if (s >= slot)
|
|
127
|
+
continue;
|
|
128
|
+
const batches = this.slots.get(s) ?? [];
|
|
129
|
+
batches.sort(compareBatch);
|
|
130
|
+
for (const batch of batches)
|
|
131
|
+
this.emitBatch(batch, emit);
|
|
132
|
+
this.slots.delete(s);
|
|
133
|
+
this.streamingWatermarks.delete(s);
|
|
134
|
+
}
|
|
135
|
+
this.lastFlushMs = Date.now();
|
|
136
|
+
}
|
|
137
|
+
flushAllSlots(emit) {
|
|
138
|
+
for (const s of [...this.slots.keys()].sort((a, b) => a - b)) {
|
|
139
|
+
const batches = this.slots.get(s) ?? [];
|
|
140
|
+
batches.sort(compareBatch);
|
|
141
|
+
for (const batch of batches)
|
|
142
|
+
this.emitBatch(batch, emit);
|
|
143
|
+
this.slots.delete(s);
|
|
144
|
+
this.streamingWatermarks.delete(s);
|
|
145
|
+
}
|
|
146
|
+
this.lastFlushMs = Date.now();
|
|
147
|
+
}
|
|
148
|
+
flushMicroBatch(emit) {
|
|
149
|
+
if (this.microBatch.length === 0)
|
|
150
|
+
return;
|
|
151
|
+
this.microBatch.sort(compareBatch);
|
|
152
|
+
for (const batch of this.microBatch)
|
|
153
|
+
this.emitBatch(batch, emit);
|
|
154
|
+
this.microBatch = [];
|
|
155
|
+
this.microBatchStartUs = 0;
|
|
156
|
+
this.lastFlushMs = Date.now();
|
|
157
|
+
}
|
|
158
|
+
emitBatch(batch, emit) {
|
|
159
|
+
for (const event of batch.events)
|
|
160
|
+
emit(event);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
exports.OrderDispatcher = OrderDispatcher;
|
|
164
|
+
function compareBatch(a, b) {
|
|
165
|
+
return a.slot - b.slot || a.txIndex - b.txIndex || a.seq - b.seq;
|
|
166
|
+
}
|
|
@@ -6,6 +6,7 @@ import type { AccountFilter, TransactionFilter } from "./types.js";
|
|
|
6
6
|
export declare const PUMPFUN_PROGRAM_ID = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P";
|
|
7
7
|
export declare const PUMPSWAP_PROGRAM_ID = "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA";
|
|
8
8
|
export declare const PUMPSWAP_FEES_PROGRAM_ID = "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ";
|
|
9
|
+
export declare const PUMP_FEES_PROGRAM_ID = "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ";
|
|
9
10
|
/** 与 Rust `BONK_PROGRAM_ID`(`Protocol::Bonk`)一致 */
|
|
10
11
|
export declare const BONK_PROGRAM_ID = "BSwp6bEBihVLdqJRKS58NaebUBSDNjN7MdpFwNaR6gn3";
|
|
11
12
|
export declare const RAYDIUM_CPMM_PROGRAM_ID = "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C";
|
package/dist/grpc/program_ids.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
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.PUMPSWAP_FEES_PROGRAM_ID = exports.PUMPSWAP_PROGRAM_ID = exports.PUMPFUN_PROGRAM_ID = void 0;
|
|
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;
|
|
4
4
|
exports.getProgramIdsForProtocols = getProgramIdsForProtocols;
|
|
5
5
|
exports.transactionFilterForProtocols = transactionFilterForProtocols;
|
|
6
6
|
exports.accountFilterForProtocols = accountFilterForProtocols;
|
|
7
7
|
exports.PUMPFUN_PROGRAM_ID = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P";
|
|
8
8
|
exports.PUMPSWAP_PROGRAM_ID = "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA";
|
|
9
9
|
exports.PUMPSWAP_FEES_PROGRAM_ID = "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ";
|
|
10
|
+
exports.PUMP_FEES_PROGRAM_ID = exports.PUMPSWAP_FEES_PROGRAM_ID;
|
|
10
11
|
/** 与 Rust `BONK_PROGRAM_ID`(`Protocol::Bonk`)一致 */
|
|
11
12
|
exports.BONK_PROGRAM_ID = "BSwp6bEBihVLdqJRKS58NaebUBSDNjN7MdpFwNaR6gn3";
|
|
12
13
|
exports.RAYDIUM_CPMM_PROGRAM_ID = "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C";
|
package/dist/grpc/types.d.ts
CHANGED
|
@@ -73,6 +73,8 @@ export interface SubscribeUpdate {
|
|
|
73
73
|
blockMeta?: SubscribeUpdateBlockMeta;
|
|
74
74
|
ping?: SubscribeUpdatePing;
|
|
75
75
|
pong?: SubscribeUpdatePong;
|
|
76
|
+
/** Yellowstone SubscribeUpdate.created_at, Unix timestamp in microseconds. */
|
|
77
|
+
createdAtUs?: number;
|
|
76
78
|
}
|
|
77
79
|
export interface SubscribeCallbacks {
|
|
78
80
|
onUpdate?: (update: SubscribeUpdate) => void;
|
|
@@ -146,7 +148,7 @@ export declare function accountFilterFromProgramOwners(programIds: string[]): Ac
|
|
|
146
148
|
*/
|
|
147
149
|
export declare function accountFilterMemcmp(offset: number, bytes: Uint8Array): SubscribeRequestFilterAccountsFilter;
|
|
148
150
|
/** 事件类型过滤标签 */
|
|
149
|
-
export type EventType = "BlockMeta" | "PumpFunTrade" | "PumpFunBuy" | "PumpFunSell" | "PumpFunBuyExactSolIn" | "PumpFunCreate" | "PumpFunCreateV2" | "PumpFunComplete" | "PumpFunMigrate" | "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" | "AccountPumpSwapGlobalConfig" | "AccountPumpSwapPool";
|
|
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";
|
|
150
152
|
/** 与 Rust `grpc::EventType`(由 `StreamingEventType` 导出)一致 */
|
|
151
153
|
export type StreamingEventType = EventType;
|
|
152
154
|
/** 所有事件类型列表 */
|
|
@@ -160,6 +162,8 @@ export declare function eventTypeFilterIncludeOnly(types: EventType[]): EventTyp
|
|
|
160
162
|
export declare function eventTypeFilterExclude(types: EventType[]): EventTypeFilter;
|
|
161
163
|
/** 过滤器是否包含 PumpFun 相关类型 */
|
|
162
164
|
export declare function eventTypeFilterIncludesPumpfun(filter: EventTypeFilter): boolean;
|
|
165
|
+
/** 过滤器是否包含 Pump Fees (`pfeeUx...`) 相关类型 */
|
|
166
|
+
export declare function eventTypeFilterIncludesPumpFees(filter: EventTypeFilter): boolean;
|
|
163
167
|
/** 过滤器是否包含 PumpSwap 相关类型 */
|
|
164
168
|
export declare function eventTypeFilterIncludesPumpswap(filter: EventTypeFilter): boolean;
|
|
165
169
|
/** 过滤器是否包含 Meteora DAMM V2 相关类型 */
|
package/dist/grpc/types.js
CHANGED
|
@@ -15,6 +15,7 @@ exports.accountFilterMemcmp = accountFilterMemcmp;
|
|
|
15
15
|
exports.eventTypeFilterIncludeOnly = eventTypeFilterIncludeOnly;
|
|
16
16
|
exports.eventTypeFilterExclude = eventTypeFilterExclude;
|
|
17
17
|
exports.eventTypeFilterIncludesPumpfun = eventTypeFilterIncludesPumpfun;
|
|
18
|
+
exports.eventTypeFilterIncludesPumpFees = eventTypeFilterIncludesPumpFees;
|
|
18
19
|
exports.eventTypeFilterIncludesPumpswap = eventTypeFilterIncludesPumpswap;
|
|
19
20
|
exports.eventTypeFilterIncludesMeteoraDammV2 = eventTypeFilterIncludesMeteoraDammV2;
|
|
20
21
|
exports.eventTypeFilterIncludesRaydiumClmm = eventTypeFilterIncludesRaydiumClmm;
|
|
@@ -129,6 +130,16 @@ exports.ALL_EVENT_TYPES = [
|
|
|
129
130
|
"PumpFunCreateV2",
|
|
130
131
|
"PumpFunComplete",
|
|
131
132
|
"PumpFunMigrate",
|
|
133
|
+
"PumpFeesCreateFeeSharingConfig",
|
|
134
|
+
"PumpFeesInitializeFeeConfig",
|
|
135
|
+
"PumpFeesResetFeeSharingConfig",
|
|
136
|
+
"PumpFeesRevokeFeeSharingAuthority",
|
|
137
|
+
"PumpFeesTransferFeeSharingAuthority",
|
|
138
|
+
"PumpFeesUpdateAdmin",
|
|
139
|
+
"PumpFeesUpdateFeeConfig",
|
|
140
|
+
"PumpFeesUpdateFeeShares",
|
|
141
|
+
"PumpFeesUpsertFeeTiers",
|
|
142
|
+
"PumpFunMigrateBondingCurveCreator",
|
|
132
143
|
// PumpSwap
|
|
133
144
|
"PumpSwapTrade",
|
|
134
145
|
"PumpSwapBuy",
|
|
@@ -193,6 +204,7 @@ exports.ALL_EVENT_TYPES = [
|
|
|
193
204
|
"TokenAccount",
|
|
194
205
|
"TokenInfo",
|
|
195
206
|
"NonceAccount",
|
|
207
|
+
"AccountPumpFunGlobal",
|
|
196
208
|
"AccountPumpSwapGlobalConfig",
|
|
197
209
|
"AccountPumpSwapPool",
|
|
198
210
|
];
|
|
@@ -231,6 +243,17 @@ function eventTypeFilterIncludesPumpfun(filter) {
|
|
|
231
243
|
"PumpFunCreateV2",
|
|
232
244
|
"PumpFunComplete",
|
|
233
245
|
"PumpFunMigrate",
|
|
246
|
+
"PumpFeesCreateFeeSharingConfig",
|
|
247
|
+
"PumpFeesInitializeFeeConfig",
|
|
248
|
+
"PumpFeesResetFeeSharingConfig",
|
|
249
|
+
"PumpFeesRevokeFeeSharingAuthority",
|
|
250
|
+
"PumpFeesTransferFeeSharingAuthority",
|
|
251
|
+
"PumpFeesUpdateAdmin",
|
|
252
|
+
"PumpFeesUpdateFeeConfig",
|
|
253
|
+
"PumpFeesUpdateFeeShares",
|
|
254
|
+
"PumpFeesUpsertFeeTiers",
|
|
255
|
+
"PumpFunMigrateBondingCurveCreator",
|
|
256
|
+
"AccountPumpFunGlobal",
|
|
234
257
|
].includes(t));
|
|
235
258
|
}
|
|
236
259
|
if (filter.exclude_types) {
|
|
@@ -243,10 +266,42 @@ function eventTypeFilterIncludesPumpfun(filter) {
|
|
|
243
266
|
"PumpFunCreateV2",
|
|
244
267
|
"PumpFunComplete",
|
|
245
268
|
"PumpFunMigrate",
|
|
269
|
+
"PumpFeesCreateFeeSharingConfig",
|
|
270
|
+
"PumpFeesInitializeFeeConfig",
|
|
271
|
+
"PumpFeesResetFeeSharingConfig",
|
|
272
|
+
"PumpFeesRevokeFeeSharingAuthority",
|
|
273
|
+
"PumpFeesTransferFeeSharingAuthority",
|
|
274
|
+
"PumpFeesUpdateAdmin",
|
|
275
|
+
"PumpFeesUpdateFeeConfig",
|
|
276
|
+
"PumpFeesUpdateFeeShares",
|
|
277
|
+
"PumpFeesUpsertFeeTiers",
|
|
278
|
+
"PumpFunMigrateBondingCurveCreator",
|
|
279
|
+
"AccountPumpFunGlobal",
|
|
246
280
|
].includes(t));
|
|
247
281
|
}
|
|
248
282
|
return true;
|
|
249
283
|
}
|
|
284
|
+
const PUMP_FEES_EVENT_TYPES = [
|
|
285
|
+
"PumpFeesCreateFeeSharingConfig",
|
|
286
|
+
"PumpFeesInitializeFeeConfig",
|
|
287
|
+
"PumpFeesResetFeeSharingConfig",
|
|
288
|
+
"PumpFeesRevokeFeeSharingAuthority",
|
|
289
|
+
"PumpFeesTransferFeeSharingAuthority",
|
|
290
|
+
"PumpFeesUpdateAdmin",
|
|
291
|
+
"PumpFeesUpdateFeeConfig",
|
|
292
|
+
"PumpFeesUpdateFeeShares",
|
|
293
|
+
"PumpFeesUpsertFeeTiers",
|
|
294
|
+
];
|
|
295
|
+
/** 过滤器是否包含 Pump Fees (`pfeeUx...`) 相关类型 */
|
|
296
|
+
function eventTypeFilterIncludesPumpFees(filter) {
|
|
297
|
+
if (filter.include_only) {
|
|
298
|
+
return filter.include_only.some((t) => PUMP_FEES_EVENT_TYPES.includes(t));
|
|
299
|
+
}
|
|
300
|
+
if (filter.exclude_types) {
|
|
301
|
+
return !filter.exclude_types.some((t) => PUMP_FEES_EVENT_TYPES.includes(t));
|
|
302
|
+
}
|
|
303
|
+
return true;
|
|
304
|
+
}
|
|
250
305
|
/** 过滤器是否包含 PumpSwap 相关类型 */
|
|
251
306
|
function eventTypeFilterIncludesPumpswap(filter) {
|
|
252
307
|
if (filter.include_only) {
|
|
@@ -303,6 +358,10 @@ function eventTypeFilterIncludesRaydiumClmm(filter) {
|
|
|
303
358
|
"RaydiumClmmIncreaseLiquidity",
|
|
304
359
|
"RaydiumClmmDecreaseLiquidity",
|
|
305
360
|
"RaydiumClmmCreatePool",
|
|
361
|
+
"RaydiumClmmOpenPosition",
|
|
362
|
+
"RaydiumClmmOpenPositionWithTokenExtNft",
|
|
363
|
+
"RaydiumClmmClosePosition",
|
|
364
|
+
"RaydiumClmmCollectFee",
|
|
306
365
|
].includes(t));
|
|
307
366
|
}
|
|
308
367
|
if (filter.exclude_types) {
|
|
@@ -311,6 +370,10 @@ function eventTypeFilterIncludesRaydiumClmm(filter) {
|
|
|
311
370
|
"RaydiumClmmIncreaseLiquidity",
|
|
312
371
|
"RaydiumClmmDecreaseLiquidity",
|
|
313
372
|
"RaydiumClmmCreatePool",
|
|
373
|
+
"RaydiumClmmOpenPosition",
|
|
374
|
+
"RaydiumClmmOpenPositionWithTokenExtNft",
|
|
375
|
+
"RaydiumClmmClosePosition",
|
|
376
|
+
"RaydiumClmmCollectFee",
|
|
314
377
|
].includes(t));
|
|
315
378
|
}
|
|
316
379
|
return true;
|
|
@@ -382,7 +445,21 @@ function eventTypeFilterIncludesRaydiumLaunchpad(filter) {
|
|
|
382
445
|
*/
|
|
383
446
|
function eventTypeFilterAllowsInstructionParsing(includeOnly) {
|
|
384
447
|
const ix = [
|
|
448
|
+
"PumpFunTrade",
|
|
449
|
+
"PumpFunBuy",
|
|
450
|
+
"PumpFunSell",
|
|
451
|
+
"PumpFunBuyExactSolIn",
|
|
452
|
+
"PumpFunCreate",
|
|
453
|
+
"PumpFunCreateV2",
|
|
385
454
|
"PumpFunMigrate",
|
|
455
|
+
"PumpFunMigrateBondingCurveCreator",
|
|
456
|
+
"AccountPumpFunGlobal",
|
|
457
|
+
...PUMP_FEES_EVENT_TYPES,
|
|
458
|
+
"PumpSwapBuy",
|
|
459
|
+
"PumpSwapSell",
|
|
460
|
+
"PumpSwapCreatePool",
|
|
461
|
+
"PumpSwapLiquidityAdded",
|
|
462
|
+
"PumpSwapLiquidityRemoved",
|
|
386
463
|
"MeteoraDammV2Swap",
|
|
387
464
|
"MeteoraDammV2AddLiquidity",
|
|
388
465
|
"MeteoraDammV2CreatePosition",
|
|
@@ -390,6 +467,30 @@ function eventTypeFilterAllowsInstructionParsing(includeOnly) {
|
|
|
390
467
|
"MeteoraDammV2ClosePosition",
|
|
391
468
|
"MeteoraDammV2RemoveLiquidity",
|
|
392
469
|
"MeteoraDammV2RemoveAllLiquidity",
|
|
470
|
+
"RaydiumClmmSwap",
|
|
471
|
+
"RaydiumClmmIncreaseLiquidity",
|
|
472
|
+
"RaydiumClmmDecreaseLiquidity",
|
|
473
|
+
"RaydiumClmmCreatePool",
|
|
474
|
+
"RaydiumClmmOpenPosition",
|
|
475
|
+
"RaydiumClmmOpenPositionWithTokenExtNft",
|
|
476
|
+
"RaydiumClmmClosePosition",
|
|
477
|
+
"RaydiumClmmCollectFee",
|
|
478
|
+
"RaydiumCpmmSwap",
|
|
479
|
+
"RaydiumCpmmDeposit",
|
|
480
|
+
"RaydiumCpmmWithdraw",
|
|
481
|
+
"RaydiumCpmmInitialize",
|
|
482
|
+
"RaydiumAmmV4Swap",
|
|
483
|
+
"RaydiumAmmV4Deposit",
|
|
484
|
+
"RaydiumAmmV4Withdraw",
|
|
485
|
+
"RaydiumAmmV4WithdrawPnl",
|
|
486
|
+
"RaydiumAmmV4Initialize2",
|
|
487
|
+
"OrcaWhirlpoolSwap",
|
|
488
|
+
"OrcaWhirlpoolLiquidityIncreased",
|
|
489
|
+
"OrcaWhirlpoolLiquidityDecreased",
|
|
490
|
+
"OrcaWhirlpoolPoolInitialized",
|
|
491
|
+
"BonkTrade",
|
|
492
|
+
"BonkPoolCreate",
|
|
493
|
+
"BonkMigrateAmm",
|
|
393
494
|
];
|
|
394
495
|
return includeOnly.some((t) => ix.includes(t));
|
|
395
496
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DexEvent } from "../core/dex_event.js";
|
|
2
|
-
import type { SubscribeUpdateTransactionInfo } from "./types.js";
|
|
2
|
+
import type { EventTypeFilter, SubscribeUpdateTransactionInfo } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* Yellowstone `SubscribeUpdateTransactionInfo.index` → `EventMetadata.tx_index`。
|
|
5
5
|
* 与 Rust `sol-parser-sdk` gRPC 路径中 `let idx = info.index` 传入 `parse_logs(..., idx, ...)` 一致。
|
|
@@ -11,4 +11,6 @@ export declare function grpcTxIndexFromInfo(info: Pick<SubscribeUpdateTransactio
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function parseDexEventsFromGrpcTransactionInfo(info: SubscribeUpdateTransactionInfo, slot: string | bigint, options?: {
|
|
13
13
|
blockTimeUs?: number;
|
|
14
|
+
grpcRecvUs?: number;
|
|
15
|
+
eventTypeFilter?: EventTypeFilter;
|
|
14
16
|
}): DexEvent[];
|
|
@@ -6,14 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.grpcTxIndexFromInfo = grpcTxIndexFromInfo;
|
|
7
7
|
exports.parseDexEventsFromGrpcTransactionInfo = parseDexEventsFromGrpcTransactionInfo;
|
|
8
8
|
/**
|
|
9
|
-
* Yellowstone gRPC
|
|
9
|
+
* Yellowstone gRPC 单笔交易:统一交易解析(指令 + 日志 + 与 Rust 相同的账户/数据填充)。
|
|
10
10
|
* 依赖 `@triton-one/yellowstone-grpc` 的 `txEncode`(Binary)得到与 web3 兼容的 meta + 反序列化交易。
|
|
11
11
|
*/
|
|
12
12
|
const yellowstone_grpc_1 = require("@triton-one/yellowstone-grpc");
|
|
13
13
|
const yellowstone_grpc_solana_encoding_wasm_js_1 = require("@triton-one/yellowstone-grpc/dist/encoding/yellowstone_grpc_solana_encoding_wasm.js");
|
|
14
14
|
const bs58_1 = __importDefault(require("bs58"));
|
|
15
15
|
const web3_js_1 = require("@solana/web3.js");
|
|
16
|
-
const unified_parser_js_1 = require("../core/unified_parser.js");
|
|
17
16
|
const rpc_transaction_js_1 = require("../rpc_transaction.js");
|
|
18
17
|
/**
|
|
19
18
|
* Yellowstone `SubscribeUpdateTransactionInfo.index` → `EventMetadata.tx_index`。
|
|
@@ -45,15 +44,19 @@ function parseDexEventsFromGrpcTransactionInfo(info, slot, options) {
|
|
|
45
44
|
const enc = yellowstone_grpc_1.txEncode.encode(y, yellowstone_grpc_solana_encoding_wasm_js_1.WasmUiTransactionEncoding.Binary, 0, false);
|
|
46
45
|
const vt = web3_js_1.VersionedTransaction.deserialize(bs58_1.default.decode(enc.transaction));
|
|
47
46
|
const meta = enc.meta;
|
|
48
|
-
const logs = meta?.logMessages;
|
|
49
|
-
if (!Array.isArray(logs) || logs.length === 0)
|
|
50
|
-
return [];
|
|
51
47
|
const slotNum = typeof slot === "bigint" ? Number(slot) : Number(slot);
|
|
52
48
|
const signatureBase58 = bs58_1.default.encode(Uint8Array.from(info.signature));
|
|
53
49
|
const txIndex = grpcTxIndexFromInfo(info);
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
const blockTime = options?.blockTimeUs == null ? null : Math.floor(options.blockTimeUs / 1_000_000);
|
|
51
|
+
const parsed = (0, rpc_transaction_js_1.parseRpcTransaction)({
|
|
52
|
+
slot: slotNum,
|
|
53
|
+
blockTime,
|
|
54
|
+
meta,
|
|
55
|
+
transaction: vt,
|
|
56
|
+
}, signatureBase58, options?.eventTypeFilter, {
|
|
57
|
+
blockTimeUs: options?.blockTimeUs,
|
|
58
|
+
grpcRecvUs: options?.grpcRecvUs,
|
|
59
|
+
txIndex,
|
|
60
|
+
});
|
|
61
|
+
return parsed.ok ? parsed.events : [];
|
|
59
62
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { bigintToJsonReplacer, dexEventToJsonString } from "./core/json_utils.js
|
|
|
5
5
|
export type { EventMetadata } from "./core/metadata.js";
|
|
6
6
|
export type { ParseError } from "./core/error.js";
|
|
7
7
|
export { formatParseError } from "./core/error.js";
|
|
8
|
+
export { enrichCreateV2ObservedFeeRecipient, enrichPumpfunTradesFromCreateInstructions, enrichPumpfunSameTxPostMerge, } from "./core/pumpfun_fee_enrich.js";
|
|
8
9
|
export { parseTransactionEvents, parseLogsOnly, parseTransactionWithListener, parseTransactionEventsStreaming, parseLogsStreaming, parseTransactionWithStreamingListener, parseLog, parseLog as parse_log, nowUs, type EventListener, type StreamingEventListener, } from "./core/unified_parser.js";
|
|
9
10
|
export { nowMicros, nowNanos, elapsedMicrosSince } from "./core/clock.js";
|
|
10
11
|
export { AccountPubkeyCache, buildAccountPubkeysWithCache, buildAccountPubkeysWithCache as build_account_pubkeys_with_cache, } from "./core/account_pubkey_cache.js";
|
|
@@ -14,10 +15,10 @@ export { parseDexEventsFromGrpcTransactionInfo, grpcTxIndexFromInfo, } from "./g
|
|
|
14
15
|
export { pubkeyBytesToBs58, collectAccountKeysBs58, lamportBalanceDeltas, heuristicSolCounterpartiesForWatchedKeys, tokenBalanceRawAmount, splTokenCounterpartyByOwner, collectWatchTransferCounterpartyPairs, tryYellowstoneSignature, } from "./grpc/transaction_meta.js";
|
|
15
16
|
/** Rust `grpc::transaction_meta` 蛇形命名别名(便于从 Rust 迁移) */
|
|
16
17
|
export { pubkeyBytesToBs58 as pubkey_bytes_to_bs58, collectAccountKeysBs58 as collect_account_keys_bs58, lamportBalanceDeltas as lamport_balance_deltas, heuristicSolCounterpartiesForWatchedKeys as heuristic_sol_counterparties_for_watched_keys, tokenBalanceRawAmount as token_balance_raw_amount, splTokenCounterpartyByOwner as spl_token_counterparty_by_owner, collectWatchTransferCounterpartyPairs as collect_watch_transfer_counterparty_pairs, tryYellowstoneSignature as try_yellowstone_signature, } from "./grpc/transaction_meta.js";
|
|
17
|
-
export { type OrderMode, type Protocol, type ClientConfig, type StreamingConfig, type TransactionFilter, type AccountFilter, type AccountFilterData, type AccountFilterMemcmp, type SlotFilter, type EventType, type StreamingEventType, type EventTypeFilter, defaultClientConfig, lowLatencyClientConfig, highThroughputClientConfig, newTransactionFilter, transactionFilterFromProgramIds, newAccountFilter, newSlotFilter, slotFilterMinSlot, slotFilterMaxSlot, accountFilterFromProgramOwners, accountFilterMemcmp, eventTypeFilterIncludeOnly, eventTypeFilterExclude, eventTypeFilterIncludesPumpfun, eventTypeFilterIncludesPumpswap, eventTypeFilterIncludesMeteoraDammV2, eventTypeFilterIncludesRaydiumClmm, eventTypeFilterIncludesRaydiumCpmm, eventTypeFilterIncludesRaydiumAmmV4, eventTypeFilterIncludesOrcaWhirlpool, eventTypeFilterIncludesBonk, eventTypeFilterIncludesRaydiumLaunchpad, eventTypeFilterAllowsInstructionParsing, ALL_EVENT_TYPES, } from "./grpc/types.js";
|
|
18
|
+
export { type OrderMode, type Protocol, type ClientConfig, type StreamingConfig, type TransactionFilter, type AccountFilter, type AccountFilterData, type AccountFilterMemcmp, type SlotFilter, type EventType, type StreamingEventType, type EventTypeFilter, defaultClientConfig, lowLatencyClientConfig, highThroughputClientConfig, newTransactionFilter, transactionFilterFromProgramIds, newAccountFilter, newSlotFilter, slotFilterMinSlot, slotFilterMaxSlot, accountFilterFromProgramOwners, accountFilterMemcmp, eventTypeFilterIncludeOnly, eventTypeFilterExclude, eventTypeFilterIncludesPumpfun, eventTypeFilterIncludesPumpswap, eventTypeFilterIncludesMeteoraDammV2, eventTypeFilterIncludesRaydiumClmm, eventTypeFilterIncludesRaydiumCpmm, eventTypeFilterIncludesRaydiumAmmV4, eventTypeFilterIncludesOrcaWhirlpool, eventTypeFilterIncludesBonk, eventTypeFilterIncludesRaydiumLaunchpad, eventTypeFilterIncludesPumpFees, eventTypeFilterAllowsInstructionParsing, ALL_EVENT_TYPES, } from "./grpc/types.js";
|
|
18
19
|
export { ALL_EVENT_TYPES as all_event_types } from "./grpc/types.js";
|
|
19
20
|
export type { StreamingConfig as streaming_config } from "./grpc/types.js";
|
|
20
|
-
export { PROTOCOL_PROGRAM_IDS, PUMPFUN_PROGRAM_ID, PUMPSWAP_PROGRAM_ID, PUMPSWAP_FEES_PROGRAM_ID, BONK_PROGRAM_ID, RAYDIUM_CPMM_PROGRAM_ID, RAYDIUM_CLMM_PROGRAM_ID, RAYDIUM_AMM_V4_PROGRAM_ID, ORCA_WHIRLPOOL_PROGRAM_ID, METEORA_POOLS_PROGRAM_ID, METEORA_DAMM_V2_PROGRAM_ID, METEORA_DLMM_PROGRAM_ID, getProgramIdsForProtocols, transactionFilterForProtocols, accountFilterForProtocols, } from "./grpc/program_ids.js";
|
|
21
|
+
export { PROTOCOL_PROGRAM_IDS, PUMPFUN_PROGRAM_ID, PUMPSWAP_PROGRAM_ID, PUMPSWAP_FEES_PROGRAM_ID, PUMP_FEES_PROGRAM_ID, BONK_PROGRAM_ID, RAYDIUM_CPMM_PROGRAM_ID, RAYDIUM_CLMM_PROGRAM_ID, RAYDIUM_AMM_V4_PROGRAM_ID, ORCA_WHIRLPOOL_PROGRAM_ID, METEORA_POOLS_PROGRAM_ID, METEORA_DAMM_V2_PROGRAM_ID, METEORA_DLMM_PROGRAM_ID, getProgramIdsForProtocols, transactionFilterForProtocols, accountFilterForProtocols, } from "./grpc/program_ids.js";
|
|
21
22
|
export { PROTOCOL_PROGRAM_IDS as protocol_program_ids, getProgramIdsForProtocols as get_program_ids_for_protocols, transactionFilterForProtocols as transaction_filter_for_protocols, accountFilterForProtocols as account_filter_for_protocols, } from "./grpc/program_ids.js";
|
|
22
23
|
/** Rust `grpc::types` 蛇形命名别名 */
|
|
23
24
|
export { defaultClientConfig as default_client_config, lowLatencyClientConfig as low_latency_client_config, highThroughputClientConfig as high_throughput_client_config, newTransactionFilter as new_transaction_filter, transactionFilterFromProgramIds as transaction_filter_from_program_ids, newAccountFilter as new_account_filter, newSlotFilter as new_slot_filter, slotFilterMinSlot as slot_filter_min_slot, slotFilterMaxSlot as slot_filter_max_slot, accountFilterFromProgramOwners as account_filter_from_program_owners, accountFilterMemcmp as account_filter_memcmp, eventTypeFilterIncludeOnly as event_type_filter_include_only, eventTypeFilterExclude as event_type_filter_exclude, eventTypeFilterIncludeOnly as include_only, eventTypeFilterExclude as exclude_types, } from "./grpc/types.js";
|
|
@@ -32,14 +33,14 @@ export { discriminatorToName, discriminator_to_name, discriminatorToProtocol, di
|
|
|
32
33
|
export { parseMeteoraDammLog } from "./logs/meteora_damm.js";
|
|
33
34
|
export { PROGRAM_LOG_DISC, PUMPSWAP_DISC, u64leDiscriminator, type ProgramLogDiscriminatorKey, } from "./logs/program_log_discriminators.js";
|
|
34
35
|
export type { ParsedEvent } from "./parser_alias.js";
|
|
35
|
-
export { parseAccountUnified, type AccountData, parseNonceAccount, isNonceAccount, parseTokenAccount, parsePumpswapGlobalConfig, parsePumpswapPool, parsePumpswapAccount, isGlobalConfigAccount, isPoolAccount, hasDiscriminator, userWalletPubkeyForOnchainAccount, rpcResolveUserWalletPubkey, } from "./accounts/mod.js";
|
|
36
|
+
export { parseAccountUnified, type AccountData, parseNonceAccount, isNonceAccount, parseTokenAccount, parsePumpfunGlobal, parsePumpfunAccount, isPumpfunGlobalAccount, parsePumpswapGlobalConfig, parsePumpswapPool, parsePumpswapAccount, isGlobalConfigAccount, isPoolAccount, hasDiscriminator, userWalletPubkeyForOnchainAccount, rpcResolveUserWalletPubkey, } from "./accounts/mod.js";
|
|
36
37
|
/** Rust `accounts` 蛇形命名别名 */
|
|
37
|
-
export { parse_account_unified, parse_nonce_account, parse_token_account, parse_pumpswap_global_config, parse_pumpswap_pool, rpc_resolve_user_wallet_pubkey, user_wallet_pubkey_for_onchain_account, } from "./accounts/rust_aliases.js";
|
|
38
|
-
export { parseInstructionUnified, parsePumpfunInstruction, parsePumpswapInstruction, parseMeteoraDammInstruction, } from "./instr/mod.js";
|
|
38
|
+
export { parse_account_unified, parse_nonce_account, parse_token_account, parse_pumpfun_global, parse_pumpswap_global_config, parse_pumpswap_pool, rpc_resolve_user_wallet_pubkey, user_wallet_pubkey_for_onchain_account, } from "./accounts/rust_aliases.js";
|
|
39
|
+
export { parseInstructionUnified, parsePumpfunInstruction, parsePumpswapInstruction, parseMeteoraDammInstruction, parsePumpFeesInstruction, } from "./instr/mod.js";
|
|
39
40
|
/** Rust `instr` 根模块蛇形命名别名 */
|
|
40
|
-
export { parse_instruction_unified, parse_pumpfun_instruction, parse_pumpswap_instruction, parse_meteora_damm_instruction, } from "./instr/rust_aliases.js";
|
|
41
|
+
export { parse_instruction_unified, parse_pumpfun_instruction, parse_pumpswap_instruction, parse_meteora_damm_instruction, parse_pump_fees_instruction, } from "./instr/rust_aliases.js";
|
|
41
42
|
export * as programIds from "./instr/program_ids.js";
|
|
42
|
-
export { YellowstoneGrpc, type SubscribeCallbacks } from "./grpc/client.js";
|
|
43
|
+
export { YellowstoneGrpc, type SubscribeCallbacks, type DexEventSubscription } from "./grpc/client.js";
|
|
43
44
|
export { connectYellowstoneGeyser, defaultGeyserConnectConfig, geyserGrpcChannelOptions, type GeyserConnectConfig, } from "./grpc/geyser_connect.js";
|
|
44
45
|
/** 与 Rust `sol_parser_sdk::grpc::event_parser` 模块对应 */
|
|
45
46
|
export * as event_parser from "./grpc/event_parser.js";
|
package/dist/index.js
CHANGED
|
@@ -33,10 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.high_throughput_shred_stream_config = exports.low_latency_shred_stream_config = exports.default_shred_stream_config = exports.highThroughputShredStreamConfig = exports.lowLatencyShredStreamConfig = exports.defaultShredStreamConfig = exports.wireBytesToShredWasmTx = exports.decodeShredstreamEntriesBincode = exports.decodeEntriesBincodeNested = exports.decodeEntriesBincodeFlat = exports.bincodeVecEntryCount = exports.loadAddressLookupTableAccounts = exports.fullAccountKeyStringsFromShredTx = exports.dexEventsFromShredWasmTxWithFullKeys = exports.dexEventsFromShredWasmTx = exports.ShredEventQueue = exports.ShredStreamClient = exports.geyser_grpc_channel_options = exports.default_geyser_connect_config = exports.connect_yellowstone_geyser = exports.event_parser = exports.geyserGrpcChannelOptions = exports.defaultGeyserConnectConfig = exports.connectYellowstoneGeyser = exports.YellowstoneGrpc = exports.programIds = exports.parse_meteora_damm_instruction = exports.parse_pumpswap_instruction = exports.parse_pumpfun_instruction = exports.parse_instruction_unified = exports.parseMeteoraDammInstruction = exports.parsePumpswapInstruction = exports.parsePumpfunInstruction = exports.parseInstructionUnified = exports.user_wallet_pubkey_for_onchain_account = exports.rpc_resolve_user_wallet_pubkey = exports.parse_pumpswap_pool = exports.parse_pumpswap_global_config = exports.parse_token_account = void 0;
|
|
36
|
+
exports.pubkey_bytes_to_bs58 = exports.tryYellowstoneSignature = exports.collectWatchTransferCounterpartyPairs = exports.splTokenCounterpartyByOwner = exports.tokenBalanceRawAmount = exports.heuristicSolCounterpartiesForWatchedKeys = exports.lamportBalanceDeltas = exports.collectAccountKeysBs58 = exports.pubkeyBytesToBs58 = exports.grpcTxIndexFromInfo = exports.parseDexEventsFromGrpcTransactionInfo = exports.convert_rpc_to_grpc = exports.convertRpcToGrpc = exports.applyAccountFillsToLogEvents = exports.fillDataRpc = exports.fillAccountsFromTransactionDataRpc = exports.parseRpcTransaction = exports.parseTransactionFromRpc = exports.isWarmedUp = exports.warmupParser = exports.build_account_pubkeys_with_cache = exports.buildAccountPubkeysWithCache = exports.AccountPubkeyCache = exports.elapsedMicrosSince = exports.nowNanos = exports.nowMicros = exports.nowUs = exports.parse_log = exports.parseLog = exports.parseTransactionWithStreamingListener = exports.parseLogsStreaming = exports.parseTransactionEventsStreaming = exports.parseTransactionWithListener = exports.parseLogsOnly = exports.parseTransactionEvents = exports.enrichPumpfunSameTxPostMerge = exports.enrichPumpfunTradesFromCreateInstructions = exports.enrichCreateV2ObservedFeeRecipient = exports.formatParseError = exports.dexEventToJsonString = exports.bigintToJsonReplacer = exports.defaultPubkey = exports.metadataForDexEvent = exports.SLOW_PROCESSING_THRESHOLD_US = exports.DEFAULT_REQUEST_TIMEOUT = exports.DEFAULT_METRICS_WINDOW_SECONDS = exports.DEFAULT_METRICS_PRINT_INTERVAL_SECONDS = exports.DEFAULT_MAX_DECODING_MESSAGE_SIZE = exports.DEFAULT_CONNECT_TIMEOUT = exports.DEFAULT_CHANNEL_SIZE = void 0;
|
|
37
|
+
exports.protocol_program_ids = exports.accountFilterForProtocols = exports.transactionFilterForProtocols = exports.getProgramIdsForProtocols = 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 = exports.PROTOCOL_PROGRAM_IDS = exports.all_event_types = exports.ALL_EVENT_TYPES = exports.eventTypeFilterAllowsInstructionParsing = exports.eventTypeFilterIncludesPumpFees = exports.eventTypeFilterIncludesRaydiumLaunchpad = exports.eventTypeFilterIncludesBonk = exports.eventTypeFilterIncludesOrcaWhirlpool = exports.eventTypeFilterIncludesRaydiumAmmV4 = exports.eventTypeFilterIncludesRaydiumCpmm = exports.eventTypeFilterIncludesRaydiumClmm = exports.eventTypeFilterIncludesMeteoraDammV2 = exports.eventTypeFilterIncludesPumpswap = exports.eventTypeFilterIncludesPumpfun = exports.eventTypeFilterExclude = exports.eventTypeFilterIncludeOnly = exports.accountFilterMemcmp = exports.accountFilterFromProgramOwners = exports.slotFilterMaxSlot = exports.slotFilterMinSlot = exports.newSlotFilter = exports.newAccountFilter = exports.transactionFilterFromProgramIds = exports.newTransactionFilter = exports.highThroughputClientConfig = exports.lowLatencyClientConfig = exports.defaultClientConfig = exports.try_yellowstone_signature = exports.collect_watch_transfer_counterparty_pairs = exports.spl_token_counterparty_by_owner = exports.token_balance_raw_amount = exports.heuristic_sol_counterparties_for_watched_keys = exports.lamport_balance_deltas = exports.collect_account_keys_bs58 = void 0;
|
|
38
|
+
exports.parsePumpswapPool = exports.parsePumpswapGlobalConfig = exports.isPumpfunGlobalAccount = exports.parsePumpfunAccount = exports.parsePumpfunGlobal = exports.parseTokenAccount = exports.isNonceAccount = exports.parseNonceAccount = exports.parseAccountUnified = exports.u64leDiscriminator = exports.PUMPSWAP_DISC = exports.PROGRAM_LOG_DISC = exports.parseMeteoraDammLog = exports.lookup_discriminator = exports.lookupDiscriminator = exports.discriminator_to_protocol = exports.discriminatorToProtocol = exports.discriminator_to_name = exports.discriminatorToName = exports.parse_log_unified = exports.parse_log_optimized = exports.parse_meteora_dlmm_log = exports.parse_meteora_damm_log = exports.parseLogOptimized = exports.parseLogUnified = exports.build_subscribe_transaction_filters_named = exports.build_subscribe_request_with_commitment = exports.build_subscribe_request = exports.CommitmentLevel = exports.buildSubscribeTransactionFiltersNamed = exports.buildSubscribeRequestWithCommitment = exports.buildSubscribeRequest = exports.exclude_types = exports.include_only = exports.event_type_filter_exclude = exports.event_type_filter_include_only = exports.account_filter_memcmp = exports.account_filter_from_program_owners = exports.slot_filter_max_slot = exports.slot_filter_min_slot = exports.new_slot_filter = exports.new_account_filter = exports.transaction_filter_from_program_ids = exports.new_transaction_filter = exports.high_throughput_client_config = exports.low_latency_client_config = exports.default_client_config = exports.account_filter_for_protocols = exports.transaction_filter_for_protocols = exports.get_program_ids_for_protocols = void 0;
|
|
39
|
+
exports.high_throughput_shred_stream_config = exports.low_latency_shred_stream_config = exports.default_shred_stream_config = exports.highThroughputShredStreamConfig = exports.lowLatencyShredStreamConfig = exports.defaultShredStreamConfig = exports.wireBytesToShredWasmTx = exports.decodeShredstreamEntriesBincode = exports.decodeEntriesBincodeNested = exports.decodeEntriesBincodeFlat = exports.bincodeVecEntryCount = exports.loadAddressLookupTableAccounts = exports.fullAccountKeyStringsFromShredTx = exports.dexEventsFromShredWasmTxWithFullKeys = exports.dexEventsFromShredWasmTx = exports.ShredEventQueue = exports.ShredStreamClient = exports.geyser_grpc_channel_options = exports.default_geyser_connect_config = exports.connect_yellowstone_geyser = exports.event_parser = exports.geyserGrpcChannelOptions = exports.defaultGeyserConnectConfig = exports.connectYellowstoneGeyser = exports.YellowstoneGrpc = exports.programIds = exports.parse_pump_fees_instruction = exports.parse_meteora_damm_instruction = exports.parse_pumpswap_instruction = exports.parse_pumpfun_instruction = exports.parse_instruction_unified = exports.parsePumpFeesInstruction = exports.parseMeteoraDammInstruction = exports.parsePumpswapInstruction = exports.parsePumpfunInstruction = exports.parseInstructionUnified = exports.user_wallet_pubkey_for_onchain_account = exports.rpc_resolve_user_wallet_pubkey = exports.parse_pumpswap_pool = exports.parse_pumpswap_global_config = exports.parse_pumpfun_global = exports.parse_token_account = exports.parse_nonce_account = exports.parse_account_unified = exports.rpcResolveUserWalletPubkey = exports.userWalletPubkeyForOnchainAccount = exports.hasDiscriminator = exports.isPoolAccount = exports.isGlobalConfigAccount = exports.parsePumpswapAccount = void 0;
|
|
40
40
|
var constants_js_1 = require("./common/constants.js");
|
|
41
41
|
Object.defineProperty(exports, "DEFAULT_CHANNEL_SIZE", { enumerable: true, get: function () { return constants_js_1.DEFAULT_CHANNEL_SIZE; } });
|
|
42
42
|
Object.defineProperty(exports, "DEFAULT_CONNECT_TIMEOUT", { enumerable: true, get: function () { return constants_js_1.DEFAULT_CONNECT_TIMEOUT; } });
|
|
@@ -53,6 +53,10 @@ Object.defineProperty(exports, "bigintToJsonReplacer", { enumerable: true, get:
|
|
|
53
53
|
Object.defineProperty(exports, "dexEventToJsonString", { enumerable: true, get: function () { return json_utils_js_1.dexEventToJsonString; } });
|
|
54
54
|
var error_js_1 = require("./core/error.js");
|
|
55
55
|
Object.defineProperty(exports, "formatParseError", { enumerable: true, get: function () { return error_js_1.formatParseError; } });
|
|
56
|
+
var pumpfun_fee_enrich_js_1 = require("./core/pumpfun_fee_enrich.js");
|
|
57
|
+
Object.defineProperty(exports, "enrichCreateV2ObservedFeeRecipient", { enumerable: true, get: function () { return pumpfun_fee_enrich_js_1.enrichCreateV2ObservedFeeRecipient; } });
|
|
58
|
+
Object.defineProperty(exports, "enrichPumpfunTradesFromCreateInstructions", { enumerable: true, get: function () { return pumpfun_fee_enrich_js_1.enrichPumpfunTradesFromCreateInstructions; } });
|
|
59
|
+
Object.defineProperty(exports, "enrichPumpfunSameTxPostMerge", { enumerable: true, get: function () { return pumpfun_fee_enrich_js_1.enrichPumpfunSameTxPostMerge; } });
|
|
56
60
|
var unified_parser_js_1 = require("./core/unified_parser.js");
|
|
57
61
|
Object.defineProperty(exports, "parseTransactionEvents", { enumerable: true, get: function () { return unified_parser_js_1.parseTransactionEvents; } });
|
|
58
62
|
Object.defineProperty(exports, "parseLogsOnly", { enumerable: true, get: function () { return unified_parser_js_1.parseLogsOnly; } });
|
|
@@ -127,6 +131,7 @@ Object.defineProperty(exports, "eventTypeFilterIncludesRaydiumAmmV4", { enumerab
|
|
|
127
131
|
Object.defineProperty(exports, "eventTypeFilterIncludesOrcaWhirlpool", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesOrcaWhirlpool; } });
|
|
128
132
|
Object.defineProperty(exports, "eventTypeFilterIncludesBonk", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesBonk; } });
|
|
129
133
|
Object.defineProperty(exports, "eventTypeFilterIncludesRaydiumLaunchpad", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesRaydiumLaunchpad; } });
|
|
134
|
+
Object.defineProperty(exports, "eventTypeFilterIncludesPumpFees", { enumerable: true, get: function () { return types_js_1.eventTypeFilterIncludesPumpFees; } });
|
|
130
135
|
Object.defineProperty(exports, "eventTypeFilterAllowsInstructionParsing", { enumerable: true, get: function () { return types_js_1.eventTypeFilterAllowsInstructionParsing; } });
|
|
131
136
|
Object.defineProperty(exports, "ALL_EVENT_TYPES", { enumerable: true, get: function () { return types_js_1.ALL_EVENT_TYPES; } });
|
|
132
137
|
var types_js_2 = require("./grpc/types.js");
|
|
@@ -136,6 +141,7 @@ Object.defineProperty(exports, "PROTOCOL_PROGRAM_IDS", { enumerable: true, get:
|
|
|
136
141
|
Object.defineProperty(exports, "PUMPFUN_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.PUMPFUN_PROGRAM_ID; } });
|
|
137
142
|
Object.defineProperty(exports, "PUMPSWAP_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.PUMPSWAP_PROGRAM_ID; } });
|
|
138
143
|
Object.defineProperty(exports, "PUMPSWAP_FEES_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.PUMPSWAP_FEES_PROGRAM_ID; } });
|
|
144
|
+
Object.defineProperty(exports, "PUMP_FEES_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.PUMP_FEES_PROGRAM_ID; } });
|
|
139
145
|
Object.defineProperty(exports, "BONK_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.BONK_PROGRAM_ID; } });
|
|
140
146
|
Object.defineProperty(exports, "RAYDIUM_CPMM_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.RAYDIUM_CPMM_PROGRAM_ID; } });
|
|
141
147
|
Object.defineProperty(exports, "RAYDIUM_CLMM_PROGRAM_ID", { enumerable: true, get: function () { return program_ids_js_1.RAYDIUM_CLMM_PROGRAM_ID; } });
|
|
@@ -207,6 +213,9 @@ Object.defineProperty(exports, "parseAccountUnified", { enumerable: true, get: f
|
|
|
207
213
|
Object.defineProperty(exports, "parseNonceAccount", { enumerable: true, get: function () { return mod_js_1.parseNonceAccount; } });
|
|
208
214
|
Object.defineProperty(exports, "isNonceAccount", { enumerable: true, get: function () { return mod_js_1.isNonceAccount; } });
|
|
209
215
|
Object.defineProperty(exports, "parseTokenAccount", { enumerable: true, get: function () { return mod_js_1.parseTokenAccount; } });
|
|
216
|
+
Object.defineProperty(exports, "parsePumpfunGlobal", { enumerable: true, get: function () { return mod_js_1.parsePumpfunGlobal; } });
|
|
217
|
+
Object.defineProperty(exports, "parsePumpfunAccount", { enumerable: true, get: function () { return mod_js_1.parsePumpfunAccount; } });
|
|
218
|
+
Object.defineProperty(exports, "isPumpfunGlobalAccount", { enumerable: true, get: function () { return mod_js_1.isPumpfunGlobalAccount; } });
|
|
210
219
|
Object.defineProperty(exports, "parsePumpswapGlobalConfig", { enumerable: true, get: function () { return mod_js_1.parsePumpswapGlobalConfig; } });
|
|
211
220
|
Object.defineProperty(exports, "parsePumpswapPool", { enumerable: true, get: function () { return mod_js_1.parsePumpswapPool; } });
|
|
212
221
|
Object.defineProperty(exports, "parsePumpswapAccount", { enumerable: true, get: function () { return mod_js_1.parsePumpswapAccount; } });
|
|
@@ -220,6 +229,7 @@ var rust_aliases_js_2 = require("./accounts/rust_aliases.js");
|
|
|
220
229
|
Object.defineProperty(exports, "parse_account_unified", { enumerable: true, get: function () { return rust_aliases_js_2.parse_account_unified; } });
|
|
221
230
|
Object.defineProperty(exports, "parse_nonce_account", { enumerable: true, get: function () { return rust_aliases_js_2.parse_nonce_account; } });
|
|
222
231
|
Object.defineProperty(exports, "parse_token_account", { enumerable: true, get: function () { return rust_aliases_js_2.parse_token_account; } });
|
|
232
|
+
Object.defineProperty(exports, "parse_pumpfun_global", { enumerable: true, get: function () { return rust_aliases_js_2.parse_pumpfun_global; } });
|
|
223
233
|
Object.defineProperty(exports, "parse_pumpswap_global_config", { enumerable: true, get: function () { return rust_aliases_js_2.parse_pumpswap_global_config; } });
|
|
224
234
|
Object.defineProperty(exports, "parse_pumpswap_pool", { enumerable: true, get: function () { return rust_aliases_js_2.parse_pumpswap_pool; } });
|
|
225
235
|
Object.defineProperty(exports, "rpc_resolve_user_wallet_pubkey", { enumerable: true, get: function () { return rust_aliases_js_2.rpc_resolve_user_wallet_pubkey; } });
|
|
@@ -229,12 +239,14 @@ Object.defineProperty(exports, "parseInstructionUnified", { enumerable: true, ge
|
|
|
229
239
|
Object.defineProperty(exports, "parsePumpfunInstruction", { enumerable: true, get: function () { return mod_js_2.parsePumpfunInstruction; } });
|
|
230
240
|
Object.defineProperty(exports, "parsePumpswapInstruction", { enumerable: true, get: function () { return mod_js_2.parsePumpswapInstruction; } });
|
|
231
241
|
Object.defineProperty(exports, "parseMeteoraDammInstruction", { enumerable: true, get: function () { return mod_js_2.parseMeteoraDammInstruction; } });
|
|
242
|
+
Object.defineProperty(exports, "parsePumpFeesInstruction", { enumerable: true, get: function () { return mod_js_2.parsePumpFeesInstruction; } });
|
|
232
243
|
/** Rust `instr` 根模块蛇形命名别名 */
|
|
233
244
|
var rust_aliases_js_3 = require("./instr/rust_aliases.js");
|
|
234
245
|
Object.defineProperty(exports, "parse_instruction_unified", { enumerable: true, get: function () { return rust_aliases_js_3.parse_instruction_unified; } });
|
|
235
246
|
Object.defineProperty(exports, "parse_pumpfun_instruction", { enumerable: true, get: function () { return rust_aliases_js_3.parse_pumpfun_instruction; } });
|
|
236
247
|
Object.defineProperty(exports, "parse_pumpswap_instruction", { enumerable: true, get: function () { return rust_aliases_js_3.parse_pumpswap_instruction; } });
|
|
237
248
|
Object.defineProperty(exports, "parse_meteora_damm_instruction", { enumerable: true, get: function () { return rust_aliases_js_3.parse_meteora_damm_instruction; } });
|
|
249
|
+
Object.defineProperty(exports, "parse_pump_fees_instruction", { enumerable: true, get: function () { return rust_aliases_js_3.parse_pump_fees_instruction; } });
|
|
238
250
|
exports.programIds = __importStar(require("./instr/program_ids.js"));
|
|
239
251
|
var client_js_1 = require("./grpc/client.js");
|
|
240
252
|
Object.defineProperty(exports, "YellowstoneGrpc", { enumerable: true, get: function () { return client_js_1.YellowstoneGrpc; } });
|
package/dist/instr/mod.d.ts
CHANGED
|
@@ -11,5 +11,6 @@ export { parseRaydiumCpmmInstruction } from "./raydium_cpmm_ix.js";
|
|
|
11
11
|
export { parseRaydiumAmmV4Instruction } from "./raydium_amm_v4_ix.js";
|
|
12
12
|
export { parseOrcaWhirlpoolInstruction } from "./orca_whirlpool_ix.js";
|
|
13
13
|
export { parseBonkInstruction } from "./bonk_ix.js";
|
|
14
|
+
export { parsePumpFeesInstruction } from "./pump_fees_ix.js";
|
|
14
15
|
export * from "./program_ids.js";
|
|
15
16
|
export declare function parseInstructionUnified(instructionData: Uint8Array, accounts: string[], signature: string, slot: number, txIndex: number, blockTimeUs: number | undefined, grpcRecvUs: number, eventTypeFilter: EventTypeFilter | undefined, programId: string): DexEvent | null;
|