sol-parser-sdk-nodejs 0.3.0
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/LICENSE +21 -0
- package/README.md +449 -0
- package/README_CN.md +343 -0
- package/dist/accounts/mod.d.ts +11 -0
- package/dist/accounts/mod.js +53 -0
- package/dist/accounts/nonce.d.ts +5 -0
- package/dist/accounts/nonce.js +32 -0
- package/dist/accounts/pumpswap.d.ts +8 -0
- package/dist/accounts/pumpswap.js +192 -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/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 +14 -0
- package/dist/core/account_fill_meteora.js +26 -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 +75 -0
- package/dist/core/account_fill_pumpswap.d.ts +10 -0
- package/dist/core/account_fill_pumpswap.js +78 -0
- package/dist/core/account_fill_raydium.d.ts +20 -0
- package/dist/core/account_fill_raydium.js +104 -0
- package/dist/core/clock.d.ts +2 -0
- package/dist/core/clock.js +7 -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 +1009 -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 +10 -0
- package/dist/core/metadata.js +13 -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 +48 -0
- package/dist/grpc/client.d.ts +52 -0
- package/dist/grpc/client.js +309 -0
- package/dist/grpc/client_stub.d.ts +5 -0
- package/dist/grpc/client_stub.js +5 -0
- package/dist/grpc/types.d.ts +132 -0
- package/dist/grpc/types.js +304 -0
- package/dist/grpc/yellowstone_parse.d.ts +9 -0
- package/dist/grpc/yellowstone_parse.js +46 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +99 -0
- package/dist/instr/bonk_ix.d.ts +5 -0
- package/dist/instr/bonk_ix.js +52 -0
- package/dist/instr/meteora_damm_ix.d.ts +6 -0
- package/dist/instr/meteora_damm_ix.js +349 -0
- package/dist/instr/mod.d.ts +15 -0
- package/dist/instr/mod.js +95 -0
- package/dist/instr/orca_whirlpool_ix.d.ts +5 -0
- package/dist/instr/orca_whirlpool_ix.js +73 -0
- package/dist/instr/program_ids.d.ts +14 -0
- package/dist/instr/program_ids.js +18 -0
- package/dist/instr/pumpfun_ix.d.ts +5 -0
- package/dist/instr/pumpfun_ix.js +167 -0
- package/dist/instr/pumpswap_ix.d.ts +5 -0
- package/dist/instr/pumpswap_ix.js +215 -0
- package/dist/instr/raydium_amm_v4_ix.d.ts +6 -0
- package/dist/instr/raydium_amm_v4_ix.js +46 -0
- package/dist/instr/raydium_clmm_ix.d.ts +5 -0
- package/dist/instr/raydium_clmm_ix.js +85 -0
- package/dist/instr/raydium_cpmm_ix.d.ts +5 -0
- package/dist/instr/raydium_cpmm_ix.js +63 -0
- package/dist/instr/utils.d.ts +10 -0
- package/dist/instr/utils.js +33 -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 +6 -0
- package/dist/logs/meteora_damm.js +509 -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 +5 -0
- package/dist/logs/optimized_matcher.js +194 -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 +22 -0
- package/dist/logs/program_log_discriminators.d.ts +59 -0
- package/dist/logs/program_log_discriminators.js +67 -0
- package/dist/logs/pump.d.ts +12 -0
- package/dist/logs/pump.js +251 -0
- package/dist/logs/pump_amm.d.ts +9 -0
- package/dist/logs/pump_amm.js +418 -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 +8 -0
- package/dist/logs/raydium_clmm.js +141 -0
- package/dist/logs/raydium_cpmm.d.ts +7 -0
- package/dist/logs/raydium_cpmm.js +121 -0
- package/dist/logs/raydium_launchpad.d.ts +12 -0
- package/dist/logs/raydium_launchpad.js +92 -0
- package/dist/parser_alias.d.ts +3 -0
- package/dist/parser_alias.js +2 -0
- package/dist/rpc_parser.d.ts +16 -0
- package/dist/rpc_parser.js +36 -0
- package/dist/rpc_transaction.d.ts +25 -0
- package/dist/rpc_transaction.js +111 -0
- package/dist/util/binary.d.ts +14 -0
- package/dist/util/binary.js +82 -0
- package/dist/warmup.d.ts +3 -0
- package/dist/warmup.js +23 -0
- package/package.json +44 -0
|
@@ -0,0 +1,1009 @@
|
|
|
1
|
+
import type { EventMetadata } from "./metadata.js";
|
|
2
|
+
/** 统一 DEX 事件:外部标签 JSON(单键对象);键名清单见 `scripts/dex-event-variant-names.json` */
|
|
3
|
+
export type DexEvent = {
|
|
4
|
+
PumpFunCreate: PumpFunCreateTokenEvent;
|
|
5
|
+
} | {
|
|
6
|
+
PumpFunCreateV2: PumpFunCreateV2TokenEvent;
|
|
7
|
+
} | {
|
|
8
|
+
PumpFunTrade: PumpFunTradeEvent;
|
|
9
|
+
} | {
|
|
10
|
+
PumpFunBuy: PumpFunTradeEvent;
|
|
11
|
+
} | {
|
|
12
|
+
PumpFunSell: PumpFunTradeEvent;
|
|
13
|
+
} | {
|
|
14
|
+
PumpFunBuyExactSolIn: PumpFunTradeEvent;
|
|
15
|
+
} | {
|
|
16
|
+
PumpFunMigrate: PumpFunMigrateEvent;
|
|
17
|
+
} | {
|
|
18
|
+
PumpSwapTrade: PumpSwapTradeEvent;
|
|
19
|
+
} | {
|
|
20
|
+
PumpSwapBuy: PumpSwapBuyEvent;
|
|
21
|
+
} | {
|
|
22
|
+
PumpSwapSell: PumpSwapSellEvent;
|
|
23
|
+
} | {
|
|
24
|
+
PumpSwapCreatePool: PumpSwapCreatePoolEvent;
|
|
25
|
+
} | {
|
|
26
|
+
PumpSwapLiquidityAdded: PumpSwapLiquidityAdded;
|
|
27
|
+
} | {
|
|
28
|
+
PumpSwapLiquidityRemoved: PumpSwapLiquidityRemoved;
|
|
29
|
+
} | {
|
|
30
|
+
RaydiumClmmSwap: RaydiumClmmSwapEvent;
|
|
31
|
+
} | {
|
|
32
|
+
RaydiumClmmIncreaseLiquidity: RaydiumClmmIncreaseLiquidityEvent;
|
|
33
|
+
} | {
|
|
34
|
+
RaydiumClmmDecreaseLiquidity: RaydiumClmmDecreaseLiquidityEvent;
|
|
35
|
+
} | {
|
|
36
|
+
RaydiumClmmCreatePool: RaydiumClmmCreatePoolEvent;
|
|
37
|
+
} | {
|
|
38
|
+
RaydiumClmmOpenPosition: RaydiumClmmOpenPositionEvent;
|
|
39
|
+
} | {
|
|
40
|
+
RaydiumClmmOpenPositionWithTokenExtNft: RaydiumClmmOpenPositionWithTokenExtNftEvent;
|
|
41
|
+
} | {
|
|
42
|
+
RaydiumClmmClosePosition: RaydiumClmmClosePositionEvent;
|
|
43
|
+
} | {
|
|
44
|
+
RaydiumClmmCollectFee: RaydiumClmmCollectFeeEvent;
|
|
45
|
+
} | {
|
|
46
|
+
RaydiumCpmmSwap: RaydiumCpmmSwapEvent;
|
|
47
|
+
} | {
|
|
48
|
+
RaydiumCpmmDeposit: RaydiumCpmmDepositEvent;
|
|
49
|
+
} | {
|
|
50
|
+
RaydiumCpmmWithdraw: RaydiumCpmmWithdrawEvent;
|
|
51
|
+
} | {
|
|
52
|
+
RaydiumCpmmInitialize: RaydiumCpmmInitializeEvent;
|
|
53
|
+
} | {
|
|
54
|
+
RaydiumAmmV4Swap: RaydiumAmmV4SwapEvent;
|
|
55
|
+
} | {
|
|
56
|
+
RaydiumAmmV4Deposit: RaydiumAmmV4DepositEvent;
|
|
57
|
+
} | {
|
|
58
|
+
RaydiumAmmV4Withdraw: RaydiumAmmV4WithdrawEvent;
|
|
59
|
+
} | {
|
|
60
|
+
RaydiumAmmV4WithdrawPnl: RaydiumAmmV4WithdrawPnlEvent;
|
|
61
|
+
} | {
|
|
62
|
+
RaydiumAmmV4Initialize2: RaydiumAmmV4Initialize2Event;
|
|
63
|
+
} | {
|
|
64
|
+
OrcaWhirlpoolSwap: OrcaWhirlpoolSwapEvent;
|
|
65
|
+
} | {
|
|
66
|
+
OrcaWhirlpoolLiquidityIncreased: OrcaWhirlpoolLiquidityIncreasedEvent;
|
|
67
|
+
} | {
|
|
68
|
+
OrcaWhirlpoolLiquidityDecreased: OrcaWhirlpoolLiquidityDecreasedEvent;
|
|
69
|
+
} | {
|
|
70
|
+
OrcaWhirlpoolPoolInitialized: OrcaWhirlpoolPoolInitializedEvent;
|
|
71
|
+
} | {
|
|
72
|
+
MeteoraPoolsSwap: MeteoraPoolsSwapEvent;
|
|
73
|
+
} | {
|
|
74
|
+
MeteoraPoolsAddLiquidity: MeteoraPoolsAddLiquidityEvent;
|
|
75
|
+
} | {
|
|
76
|
+
MeteoraPoolsRemoveLiquidity: MeteoraPoolsRemoveLiquidityEvent;
|
|
77
|
+
} | {
|
|
78
|
+
MeteoraPoolsBootstrapLiquidity: MeteoraPoolsBootstrapLiquidityEvent;
|
|
79
|
+
} | {
|
|
80
|
+
MeteoraPoolsPoolCreated: MeteoraPoolsPoolCreatedEvent;
|
|
81
|
+
} | {
|
|
82
|
+
MeteoraPoolsSetPoolFees: MeteoraPoolsSetPoolFeesEvent;
|
|
83
|
+
} | {
|
|
84
|
+
MeteoraDammV2Swap: MeteoraDammV2SwapEvent;
|
|
85
|
+
} | {
|
|
86
|
+
MeteoraDammV2AddLiquidity: MeteoraDammV2AddLiquidityEvent;
|
|
87
|
+
} | {
|
|
88
|
+
MeteoraDammV2RemoveLiquidity: MeteoraDammV2RemoveLiquidityEvent;
|
|
89
|
+
} | {
|
|
90
|
+
MeteoraDammV2CreatePosition: MeteoraDammV2CreatePositionEvent;
|
|
91
|
+
} | {
|
|
92
|
+
MeteoraDammV2ClosePosition: MeteoraDammV2ClosePositionEvent;
|
|
93
|
+
} | {
|
|
94
|
+
MeteoraDammV2InitializePool: MeteoraDammV2InitializePoolEvent;
|
|
95
|
+
} | {
|
|
96
|
+
MeteoraDlmmSwap: MeteoraDlmmSwapEvent;
|
|
97
|
+
} | {
|
|
98
|
+
MeteoraDlmmAddLiquidity: MeteoraDlmmAddLiquidityEvent;
|
|
99
|
+
} | {
|
|
100
|
+
MeteoraDlmmRemoveLiquidity: MeteoraDlmmRemoveLiquidityEvent;
|
|
101
|
+
} | {
|
|
102
|
+
MeteoraDlmmInitializePool: MeteoraDlmmInitializePoolEvent;
|
|
103
|
+
} | {
|
|
104
|
+
MeteoraDlmmInitializeBinArray: MeteoraDlmmInitializeBinArrayEvent;
|
|
105
|
+
} | {
|
|
106
|
+
MeteoraDlmmCreatePosition: MeteoraDlmmCreatePositionEvent;
|
|
107
|
+
} | {
|
|
108
|
+
MeteoraDlmmClosePosition: MeteoraDlmmClosePositionEvent;
|
|
109
|
+
} | {
|
|
110
|
+
MeteoraDlmmClaimFee: MeteoraDlmmClaimFeeEvent;
|
|
111
|
+
} | {
|
|
112
|
+
BonkTrade: BonkTradeEvent;
|
|
113
|
+
} | {
|
|
114
|
+
BonkPoolCreate: BonkPoolCreateEvent;
|
|
115
|
+
} | {
|
|
116
|
+
BonkMigrateAmm: BonkMigrateAmmEvent;
|
|
117
|
+
} | {
|
|
118
|
+
TokenInfo: TokenInfoEvent;
|
|
119
|
+
} | {
|
|
120
|
+
TokenAccount: TokenAccountEvent;
|
|
121
|
+
} | {
|
|
122
|
+
NonceAccount: NonceAccountEvent;
|
|
123
|
+
} | {
|
|
124
|
+
PumpSwapGlobalConfigAccount: PumpSwapGlobalConfigAccountEvent;
|
|
125
|
+
} | {
|
|
126
|
+
PumpSwapPoolAccount: PumpSwapPoolAccountEvent;
|
|
127
|
+
} | {
|
|
128
|
+
BlockMeta: BlockMetaEvent;
|
|
129
|
+
} | {
|
|
130
|
+
Error: string;
|
|
131
|
+
};
|
|
132
|
+
export interface PumpFunCreateTokenEvent {
|
|
133
|
+
metadata: EventMetadata;
|
|
134
|
+
name: string;
|
|
135
|
+
symbol: string;
|
|
136
|
+
uri: string;
|
|
137
|
+
mint: string;
|
|
138
|
+
bonding_curve: string;
|
|
139
|
+
user: string;
|
|
140
|
+
creator: string;
|
|
141
|
+
timestamp: bigint;
|
|
142
|
+
virtual_token_reserves: bigint;
|
|
143
|
+
virtual_sol_reserves: bigint;
|
|
144
|
+
real_token_reserves: bigint;
|
|
145
|
+
token_total_supply: bigint;
|
|
146
|
+
token_program: string;
|
|
147
|
+
is_mayhem_mode: boolean;
|
|
148
|
+
is_cashback_enabled: boolean;
|
|
149
|
+
}
|
|
150
|
+
export interface PumpFunCreateV2TokenEvent extends PumpFunCreateTokenEvent {
|
|
151
|
+
mint_authority: string;
|
|
152
|
+
associated_bonding_curve: string;
|
|
153
|
+
global: string;
|
|
154
|
+
system_program: string;
|
|
155
|
+
associated_token_program: string;
|
|
156
|
+
mayhem_program_id: string;
|
|
157
|
+
global_params: string;
|
|
158
|
+
sol_vault: string;
|
|
159
|
+
mayhem_state: string;
|
|
160
|
+
mayhem_token_vault: string;
|
|
161
|
+
event_authority: string;
|
|
162
|
+
program: string;
|
|
163
|
+
}
|
|
164
|
+
export interface PumpFunTradeEvent {
|
|
165
|
+
metadata: EventMetadata;
|
|
166
|
+
mint: string;
|
|
167
|
+
sol_amount: bigint;
|
|
168
|
+
token_amount: bigint;
|
|
169
|
+
is_buy: boolean;
|
|
170
|
+
is_created_buy: boolean;
|
|
171
|
+
user: string;
|
|
172
|
+
timestamp: bigint;
|
|
173
|
+
virtual_sol_reserves: bigint;
|
|
174
|
+
virtual_token_reserves: bigint;
|
|
175
|
+
real_sol_reserves: bigint;
|
|
176
|
+
real_token_reserves: bigint;
|
|
177
|
+
fee_recipient: string;
|
|
178
|
+
fee_basis_points: bigint;
|
|
179
|
+
fee: bigint;
|
|
180
|
+
creator: string;
|
|
181
|
+
creator_fee_basis_points: bigint;
|
|
182
|
+
creator_fee: bigint;
|
|
183
|
+
track_volume: boolean;
|
|
184
|
+
total_unclaimed_tokens: bigint;
|
|
185
|
+
total_claimed_tokens: bigint;
|
|
186
|
+
current_sol_volume: bigint;
|
|
187
|
+
last_update_timestamp: bigint;
|
|
188
|
+
ix_name: string;
|
|
189
|
+
mayhem_mode: boolean;
|
|
190
|
+
cashback_fee_basis_points: bigint;
|
|
191
|
+
cashback: bigint;
|
|
192
|
+
is_cashback_coin: boolean;
|
|
193
|
+
bonding_curve: string;
|
|
194
|
+
associated_bonding_curve: string;
|
|
195
|
+
token_program: string;
|
|
196
|
+
creator_vault: string;
|
|
197
|
+
account?: string;
|
|
198
|
+
}
|
|
199
|
+
export interface PumpFunMigrateEvent {
|
|
200
|
+
metadata: EventMetadata;
|
|
201
|
+
user: string;
|
|
202
|
+
mint: string;
|
|
203
|
+
mint_amount: bigint;
|
|
204
|
+
sol_amount: bigint;
|
|
205
|
+
pool_migration_fee: bigint;
|
|
206
|
+
bonding_curve: string;
|
|
207
|
+
timestamp: bigint;
|
|
208
|
+
pool: string;
|
|
209
|
+
}
|
|
210
|
+
/** 与 `PumpSwapTradeEvent`(IDL TradeEvent)对齐 */
|
|
211
|
+
export interface PumpSwapTradeEvent {
|
|
212
|
+
metadata: EventMetadata;
|
|
213
|
+
mint: string;
|
|
214
|
+
sol_amount: bigint;
|
|
215
|
+
token_amount: bigint;
|
|
216
|
+
is_buy: boolean;
|
|
217
|
+
user: string;
|
|
218
|
+
timestamp: bigint;
|
|
219
|
+
virtual_sol_reserves: bigint;
|
|
220
|
+
virtual_token_reserves: bigint;
|
|
221
|
+
real_sol_reserves: bigint;
|
|
222
|
+
real_token_reserves: bigint;
|
|
223
|
+
fee_recipient: string;
|
|
224
|
+
fee_basis_points: bigint;
|
|
225
|
+
fee: bigint;
|
|
226
|
+
creator: string;
|
|
227
|
+
creator_fee_basis_points: bigint;
|
|
228
|
+
creator_fee: bigint;
|
|
229
|
+
track_volume: boolean;
|
|
230
|
+
total_unclaimed_tokens: bigint;
|
|
231
|
+
total_claimed_tokens: bigint;
|
|
232
|
+
current_sol_volume: bigint;
|
|
233
|
+
last_update_timestamp: bigint;
|
|
234
|
+
ix_name: string;
|
|
235
|
+
}
|
|
236
|
+
export interface PumpSwapBuyEvent {
|
|
237
|
+
metadata: EventMetadata;
|
|
238
|
+
timestamp: bigint;
|
|
239
|
+
base_amount_out: bigint;
|
|
240
|
+
max_quote_amount_in: bigint;
|
|
241
|
+
user_base_token_reserves: bigint;
|
|
242
|
+
user_quote_token_reserves: bigint;
|
|
243
|
+
pool_base_token_reserves: bigint;
|
|
244
|
+
pool_quote_token_reserves: bigint;
|
|
245
|
+
quote_amount_in: bigint;
|
|
246
|
+
lp_fee_basis_points: bigint;
|
|
247
|
+
lp_fee: bigint;
|
|
248
|
+
protocol_fee_basis_points: bigint;
|
|
249
|
+
protocol_fee: bigint;
|
|
250
|
+
quote_amount_in_with_lp_fee: bigint;
|
|
251
|
+
user_quote_amount_in: bigint;
|
|
252
|
+
pool: string;
|
|
253
|
+
user: string;
|
|
254
|
+
user_base_token_account: string;
|
|
255
|
+
user_quote_token_account: string;
|
|
256
|
+
protocol_fee_recipient: string;
|
|
257
|
+
protocol_fee_recipient_token_account: string;
|
|
258
|
+
coin_creator: string;
|
|
259
|
+
coin_creator_fee_basis_points: bigint;
|
|
260
|
+
coin_creator_fee: bigint;
|
|
261
|
+
track_volume: boolean;
|
|
262
|
+
total_unclaimed_tokens: bigint;
|
|
263
|
+
total_claimed_tokens: bigint;
|
|
264
|
+
current_sol_volume: bigint;
|
|
265
|
+
last_update_timestamp: bigint;
|
|
266
|
+
min_base_amount_out: bigint;
|
|
267
|
+
ix_name: string;
|
|
268
|
+
/** 与 `PumpSwapBuyEvent`:PUMP_CASHBACK / IDL */
|
|
269
|
+
cashback_fee_basis_points: bigint;
|
|
270
|
+
cashback: bigint;
|
|
271
|
+
/** 由 fees 指令数据填充(见 `fillDataRpc`) */
|
|
272
|
+
is_pump_pool: boolean;
|
|
273
|
+
/** 自指令账户填充(account_fillers/pumpswap) */
|
|
274
|
+
base_mint: string;
|
|
275
|
+
quote_mint: string;
|
|
276
|
+
pool_base_token_account: string;
|
|
277
|
+
pool_quote_token_account: string;
|
|
278
|
+
coin_creator_vault_ata: string;
|
|
279
|
+
coin_creator_vault_authority: string;
|
|
280
|
+
base_token_program: string;
|
|
281
|
+
quote_token_program: string;
|
|
282
|
+
}
|
|
283
|
+
export interface PumpSwapSellEvent {
|
|
284
|
+
metadata: EventMetadata;
|
|
285
|
+
timestamp: bigint;
|
|
286
|
+
base_amount_in: bigint;
|
|
287
|
+
min_quote_amount_out: bigint;
|
|
288
|
+
user_base_token_reserves: bigint;
|
|
289
|
+
user_quote_token_reserves: bigint;
|
|
290
|
+
pool_base_token_reserves: bigint;
|
|
291
|
+
pool_quote_token_reserves: bigint;
|
|
292
|
+
quote_amount_out: bigint;
|
|
293
|
+
lp_fee_basis_points: bigint;
|
|
294
|
+
lp_fee: bigint;
|
|
295
|
+
protocol_fee_basis_points: bigint;
|
|
296
|
+
protocol_fee: bigint;
|
|
297
|
+
quote_amount_out_without_lp_fee: bigint;
|
|
298
|
+
user_quote_amount_out: bigint;
|
|
299
|
+
pool: string;
|
|
300
|
+
user: string;
|
|
301
|
+
user_base_token_account: string;
|
|
302
|
+
user_quote_token_account: string;
|
|
303
|
+
protocol_fee_recipient: string;
|
|
304
|
+
protocol_fee_recipient_token_account: string;
|
|
305
|
+
coin_creator: string;
|
|
306
|
+
coin_creator_fee_basis_points: bigint;
|
|
307
|
+
coin_creator_fee: bigint;
|
|
308
|
+
cashback_fee_basis_points: bigint;
|
|
309
|
+
cashback: bigint;
|
|
310
|
+
is_pump_pool: boolean;
|
|
311
|
+
base_mint: string;
|
|
312
|
+
quote_mint: string;
|
|
313
|
+
pool_base_token_account: string;
|
|
314
|
+
pool_quote_token_account: string;
|
|
315
|
+
coin_creator_vault_ata: string;
|
|
316
|
+
coin_creator_vault_authority: string;
|
|
317
|
+
base_token_program: string;
|
|
318
|
+
quote_token_program: string;
|
|
319
|
+
}
|
|
320
|
+
export interface PumpSwapCreatePoolEvent {
|
|
321
|
+
metadata: EventMetadata;
|
|
322
|
+
timestamp: bigint;
|
|
323
|
+
index: number;
|
|
324
|
+
creator: string;
|
|
325
|
+
base_mint: string;
|
|
326
|
+
quote_mint: string;
|
|
327
|
+
base_mint_decimals: number;
|
|
328
|
+
quote_mint_decimals: number;
|
|
329
|
+
base_amount_in: bigint;
|
|
330
|
+
quote_amount_in: bigint;
|
|
331
|
+
pool_base_amount: bigint;
|
|
332
|
+
pool_quote_amount: bigint;
|
|
333
|
+
minimum_liquidity: bigint;
|
|
334
|
+
initial_liquidity: bigint;
|
|
335
|
+
lp_token_amount_out: bigint;
|
|
336
|
+
pool_bump: number;
|
|
337
|
+
pool: string;
|
|
338
|
+
lp_mint: string;
|
|
339
|
+
user_base_token_account: string;
|
|
340
|
+
user_quote_token_account: string;
|
|
341
|
+
coin_creator: string;
|
|
342
|
+
is_mayhem_mode: boolean;
|
|
343
|
+
}
|
|
344
|
+
export interface PumpSwapLiquidityAdded {
|
|
345
|
+
metadata: EventMetadata;
|
|
346
|
+
timestamp: bigint;
|
|
347
|
+
lp_token_amount_out: bigint;
|
|
348
|
+
max_base_amount_in: bigint;
|
|
349
|
+
max_quote_amount_in: bigint;
|
|
350
|
+
user_base_token_reserves: bigint;
|
|
351
|
+
user_quote_token_reserves: bigint;
|
|
352
|
+
pool_base_token_reserves: bigint;
|
|
353
|
+
pool_quote_token_reserves: bigint;
|
|
354
|
+
base_amount_in: bigint;
|
|
355
|
+
quote_amount_in: bigint;
|
|
356
|
+
lp_mint_supply: bigint;
|
|
357
|
+
pool: string;
|
|
358
|
+
user: string;
|
|
359
|
+
user_base_token_account: string;
|
|
360
|
+
user_quote_token_account: string;
|
|
361
|
+
user_pool_token_account: string;
|
|
362
|
+
}
|
|
363
|
+
export interface PumpSwapLiquidityRemoved {
|
|
364
|
+
metadata: EventMetadata;
|
|
365
|
+
timestamp: bigint;
|
|
366
|
+
lp_token_amount_in: bigint;
|
|
367
|
+
min_base_amount_out: bigint;
|
|
368
|
+
min_quote_amount_out: bigint;
|
|
369
|
+
user_base_token_reserves: bigint;
|
|
370
|
+
user_quote_token_reserves: bigint;
|
|
371
|
+
pool_base_token_reserves: bigint;
|
|
372
|
+
pool_quote_token_reserves: bigint;
|
|
373
|
+
base_amount_out: bigint;
|
|
374
|
+
quote_amount_out: bigint;
|
|
375
|
+
lp_mint_supply: bigint;
|
|
376
|
+
pool: string;
|
|
377
|
+
user: string;
|
|
378
|
+
user_base_token_account: string;
|
|
379
|
+
user_quote_token_account: string;
|
|
380
|
+
user_pool_token_account: string;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Raydium CLMM Swap(Program data 子集)。
|
|
384
|
+
* `sqrt_price_x64` 对应链上载荷中的 sqrt price limit u128。
|
|
385
|
+
* TS 为 `bigint`;Go/Python 落 JSON 时为十进制字符串;占位 `liquidity` 为 `0n` / `"0"`。
|
|
386
|
+
*/
|
|
387
|
+
export interface RaydiumClmmSwapEvent {
|
|
388
|
+
metadata: EventMetadata;
|
|
389
|
+
pool_state: string;
|
|
390
|
+
token_account_0: string;
|
|
391
|
+
token_account_1: string;
|
|
392
|
+
amount_0: bigint;
|
|
393
|
+
amount_1: bigint;
|
|
394
|
+
zero_for_one: boolean;
|
|
395
|
+
sqrt_price_x64: bigint;
|
|
396
|
+
liquidity: bigint;
|
|
397
|
+
sender: string;
|
|
398
|
+
transfer_fee_0: bigint;
|
|
399
|
+
transfer_fee_1: bigint;
|
|
400
|
+
tick: number;
|
|
401
|
+
}
|
|
402
|
+
/** `liquidity` 在 Go/Python 为十进制字符串。 */
|
|
403
|
+
export interface RaydiumClmmIncreaseLiquidityEvent {
|
|
404
|
+
metadata: EventMetadata;
|
|
405
|
+
pool: string;
|
|
406
|
+
position_nft_mint: string;
|
|
407
|
+
user: string;
|
|
408
|
+
liquidity: bigint;
|
|
409
|
+
amount0_max: bigint;
|
|
410
|
+
amount1_max: bigint;
|
|
411
|
+
}
|
|
412
|
+
/** `liquidity` 在 Go/Python 为十进制字符串。 */
|
|
413
|
+
export interface RaydiumClmmDecreaseLiquidityEvent {
|
|
414
|
+
metadata: EventMetadata;
|
|
415
|
+
pool: string;
|
|
416
|
+
position_nft_mint: string;
|
|
417
|
+
user: string;
|
|
418
|
+
liquidity: bigint;
|
|
419
|
+
amount0_min: bigint;
|
|
420
|
+
amount1_min: bigint;
|
|
421
|
+
}
|
|
422
|
+
/** `sqrt_price_x64` 在 Go/Python 为十进制字符串。 */
|
|
423
|
+
export interface RaydiumClmmCreatePoolEvent {
|
|
424
|
+
metadata: EventMetadata;
|
|
425
|
+
pool: string;
|
|
426
|
+
token_0_mint: string;
|
|
427
|
+
token_1_mint: string;
|
|
428
|
+
tick_spacing: number;
|
|
429
|
+
fee_rate: number;
|
|
430
|
+
creator: string;
|
|
431
|
+
sqrt_price_x64: bigint;
|
|
432
|
+
open_time: bigint;
|
|
433
|
+
}
|
|
434
|
+
/** 与 `RaydiumClmmOpenPositionEvent` 对齐 */
|
|
435
|
+
export interface RaydiumClmmOpenPositionEvent {
|
|
436
|
+
metadata: EventMetadata;
|
|
437
|
+
pool: string;
|
|
438
|
+
user: string;
|
|
439
|
+
position_nft_mint: string;
|
|
440
|
+
tick_lower_index: number;
|
|
441
|
+
tick_upper_index: number;
|
|
442
|
+
liquidity: bigint;
|
|
443
|
+
}
|
|
444
|
+
/** 与 `RaydiumClmmOpenPositionWithTokenExtNftEvent` 对齐 */
|
|
445
|
+
export interface RaydiumClmmOpenPositionWithTokenExtNftEvent {
|
|
446
|
+
metadata: EventMetadata;
|
|
447
|
+
pool: string;
|
|
448
|
+
user: string;
|
|
449
|
+
position_nft_mint: string;
|
|
450
|
+
tick_lower_index: number;
|
|
451
|
+
tick_upper_index: number;
|
|
452
|
+
liquidity: bigint;
|
|
453
|
+
}
|
|
454
|
+
/** 与 `RaydiumClmmClosePositionEvent` 对齐 */
|
|
455
|
+
export interface RaydiumClmmClosePositionEvent {
|
|
456
|
+
metadata: EventMetadata;
|
|
457
|
+
pool: string;
|
|
458
|
+
user: string;
|
|
459
|
+
position_nft_mint: string;
|
|
460
|
+
}
|
|
461
|
+
export interface RaydiumClmmCollectFeeEvent {
|
|
462
|
+
metadata: EventMetadata;
|
|
463
|
+
pool_state: string;
|
|
464
|
+
position_nft_mint: string;
|
|
465
|
+
amount_0: bigint;
|
|
466
|
+
amount_1: bigint;
|
|
467
|
+
}
|
|
468
|
+
export interface RaydiumCpmmSwapEvent {
|
|
469
|
+
metadata: EventMetadata;
|
|
470
|
+
pool_id: string;
|
|
471
|
+
input_vault_before: bigint;
|
|
472
|
+
output_vault_before: bigint;
|
|
473
|
+
input_amount: bigint;
|
|
474
|
+
output_amount: bigint;
|
|
475
|
+
input_transfer_fee: bigint;
|
|
476
|
+
output_transfer_fee: bigint;
|
|
477
|
+
base_input: boolean;
|
|
478
|
+
}
|
|
479
|
+
export interface RaydiumCpmmDepositEvent {
|
|
480
|
+
metadata: EventMetadata;
|
|
481
|
+
pool: string;
|
|
482
|
+
user: string;
|
|
483
|
+
lp_token_amount: bigint;
|
|
484
|
+
token0_amount: bigint;
|
|
485
|
+
token1_amount: bigint;
|
|
486
|
+
}
|
|
487
|
+
export interface RaydiumCpmmWithdrawEvent {
|
|
488
|
+
metadata: EventMetadata;
|
|
489
|
+
pool: string;
|
|
490
|
+
user: string;
|
|
491
|
+
lp_token_amount: bigint;
|
|
492
|
+
token0_amount: bigint;
|
|
493
|
+
token1_amount: bigint;
|
|
494
|
+
}
|
|
495
|
+
export interface RaydiumCpmmInitializeEvent {
|
|
496
|
+
metadata: EventMetadata;
|
|
497
|
+
pool: string;
|
|
498
|
+
creator: string;
|
|
499
|
+
init_amount0: bigint;
|
|
500
|
+
init_amount1: bigint;
|
|
501
|
+
}
|
|
502
|
+
export interface RaydiumAmmV4SwapEvent {
|
|
503
|
+
metadata: EventMetadata;
|
|
504
|
+
amount_in: bigint;
|
|
505
|
+
minimum_amount_out: bigint;
|
|
506
|
+
max_amount_in: bigint;
|
|
507
|
+
amount_out: bigint;
|
|
508
|
+
token_program: string;
|
|
509
|
+
amm: string;
|
|
510
|
+
amm_authority: string;
|
|
511
|
+
amm_open_orders: string;
|
|
512
|
+
amm_target_orders?: string;
|
|
513
|
+
pool_coin_token_account: string;
|
|
514
|
+
pool_pc_token_account: string;
|
|
515
|
+
serum_program: string;
|
|
516
|
+
serum_market: string;
|
|
517
|
+
serum_bids: string;
|
|
518
|
+
serum_asks: string;
|
|
519
|
+
serum_event_queue: string;
|
|
520
|
+
serum_coin_vault_account: string;
|
|
521
|
+
serum_pc_vault_account: string;
|
|
522
|
+
serum_vault_signer: string;
|
|
523
|
+
user_source_token_account: string;
|
|
524
|
+
user_destination_token_account: string;
|
|
525
|
+
user_source_owner: string;
|
|
526
|
+
}
|
|
527
|
+
export interface RaydiumAmmV4DepositEvent {
|
|
528
|
+
metadata: EventMetadata;
|
|
529
|
+
max_coin_amount: bigint;
|
|
530
|
+
max_pc_amount: bigint;
|
|
531
|
+
base_side: bigint;
|
|
532
|
+
token_program: string;
|
|
533
|
+
amm: string;
|
|
534
|
+
amm_authority: string;
|
|
535
|
+
amm_open_orders: string;
|
|
536
|
+
amm_target_orders: string;
|
|
537
|
+
lp_mint_address: string;
|
|
538
|
+
pool_coin_token_account: string;
|
|
539
|
+
pool_pc_token_account: string;
|
|
540
|
+
serum_market: string;
|
|
541
|
+
user_coin_token_account: string;
|
|
542
|
+
user_pc_token_account: string;
|
|
543
|
+
user_lp_token_account: string;
|
|
544
|
+
user_owner: string;
|
|
545
|
+
serum_event_queue: string;
|
|
546
|
+
}
|
|
547
|
+
export interface RaydiumAmmV4WithdrawEvent {
|
|
548
|
+
metadata: EventMetadata;
|
|
549
|
+
amount: bigint;
|
|
550
|
+
token_program: string;
|
|
551
|
+
amm: string;
|
|
552
|
+
amm_authority: string;
|
|
553
|
+
amm_open_orders: string;
|
|
554
|
+
amm_target_orders: string;
|
|
555
|
+
lp_mint_address: string;
|
|
556
|
+
pool_coin_token_account: string;
|
|
557
|
+
pool_pc_token_account: string;
|
|
558
|
+
pool_withdraw_queue: string;
|
|
559
|
+
pool_temp_lp_token_account: string;
|
|
560
|
+
serum_program: string;
|
|
561
|
+
serum_market: string;
|
|
562
|
+
serum_coin_vault_account: string;
|
|
563
|
+
serum_pc_vault_account: string;
|
|
564
|
+
serum_vault_signer: string;
|
|
565
|
+
user_lp_token_account: string;
|
|
566
|
+
user_coin_token_account: string;
|
|
567
|
+
user_pc_token_account: string;
|
|
568
|
+
user_owner: string;
|
|
569
|
+
serum_event_queue: string;
|
|
570
|
+
serum_bids: string;
|
|
571
|
+
serum_asks: string;
|
|
572
|
+
}
|
|
573
|
+
/** 与 `RaydiumAmmV4WithdrawPnlEvent` 对齐 */
|
|
574
|
+
export interface RaydiumAmmV4WithdrawPnlEvent {
|
|
575
|
+
metadata: EventMetadata;
|
|
576
|
+
token_program: string;
|
|
577
|
+
amm: string;
|
|
578
|
+
amm_config: string;
|
|
579
|
+
amm_authority: string;
|
|
580
|
+
amm_open_orders: string;
|
|
581
|
+
pool_coin_token_account: string;
|
|
582
|
+
pool_pc_token_account: string;
|
|
583
|
+
coin_pnl_token_account: string;
|
|
584
|
+
pc_pnl_token_account: string;
|
|
585
|
+
pnl_owner: string;
|
|
586
|
+
amm_target_orders: string;
|
|
587
|
+
serum_program: string;
|
|
588
|
+
serum_market: string;
|
|
589
|
+
serum_event_queue: string;
|
|
590
|
+
serum_coin_vault_account: string;
|
|
591
|
+
serum_pc_vault_account: string;
|
|
592
|
+
serum_vault_signer: string;
|
|
593
|
+
}
|
|
594
|
+
/** 与 `RaydiumAmmV4Initialize2Event` 对齐 */
|
|
595
|
+
export interface RaydiumAmmV4Initialize2Event {
|
|
596
|
+
metadata: EventMetadata;
|
|
597
|
+
nonce: number;
|
|
598
|
+
open_time: bigint;
|
|
599
|
+
init_pc_amount: bigint;
|
|
600
|
+
init_coin_amount: bigint;
|
|
601
|
+
token_program: string;
|
|
602
|
+
spl_associated_token_account: string;
|
|
603
|
+
system_program: string;
|
|
604
|
+
rent: string;
|
|
605
|
+
amm: string;
|
|
606
|
+
amm_authority: string;
|
|
607
|
+
amm_open_orders: string;
|
|
608
|
+
lp_mint: string;
|
|
609
|
+
coin_mint: string;
|
|
610
|
+
pc_mint: string;
|
|
611
|
+
pool_coin_token_account: string;
|
|
612
|
+
pool_pc_token_account: string;
|
|
613
|
+
pool_withdraw_queue: string;
|
|
614
|
+
amm_target_orders: string;
|
|
615
|
+
pool_temp_lp: string;
|
|
616
|
+
serum_program: string;
|
|
617
|
+
serum_market: string;
|
|
618
|
+
user_wallet: string;
|
|
619
|
+
user_token_coin: string;
|
|
620
|
+
user_token_pc: string;
|
|
621
|
+
user_lp_token_account: string;
|
|
622
|
+
}
|
|
623
|
+
/** Orca Whirlpool:u128 语义字段在 TS 为 `bigint`;Go/Python 为十进制字符串。 */
|
|
624
|
+
export interface OrcaWhirlpoolSwapEvent {
|
|
625
|
+
metadata: EventMetadata;
|
|
626
|
+
whirlpool: string;
|
|
627
|
+
a_to_b: boolean;
|
|
628
|
+
pre_sqrt_price: bigint;
|
|
629
|
+
post_sqrt_price: bigint;
|
|
630
|
+
input_amount: bigint;
|
|
631
|
+
output_amount: bigint;
|
|
632
|
+
input_transfer_fee: bigint;
|
|
633
|
+
output_transfer_fee: bigint;
|
|
634
|
+
lp_fee: bigint;
|
|
635
|
+
protocol_fee: bigint;
|
|
636
|
+
}
|
|
637
|
+
/** `liquidity` 在 Go/Python 为十进制字符串。 */
|
|
638
|
+
export interface OrcaWhirlpoolLiquidityIncreasedEvent {
|
|
639
|
+
metadata: EventMetadata;
|
|
640
|
+
whirlpool: string;
|
|
641
|
+
position: string;
|
|
642
|
+
tick_lower_index: number;
|
|
643
|
+
tick_upper_index: number;
|
|
644
|
+
liquidity: bigint;
|
|
645
|
+
token_a_amount: bigint;
|
|
646
|
+
token_b_amount: bigint;
|
|
647
|
+
token_a_transfer_fee: bigint;
|
|
648
|
+
token_b_transfer_fee: bigint;
|
|
649
|
+
}
|
|
650
|
+
/** `liquidity` 在 Go/Python 为十进制字符串。 */
|
|
651
|
+
export interface OrcaWhirlpoolLiquidityDecreasedEvent {
|
|
652
|
+
metadata: EventMetadata;
|
|
653
|
+
whirlpool: string;
|
|
654
|
+
position: string;
|
|
655
|
+
tick_lower_index: number;
|
|
656
|
+
tick_upper_index: number;
|
|
657
|
+
liquidity: bigint;
|
|
658
|
+
token_a_amount: bigint;
|
|
659
|
+
token_b_amount: bigint;
|
|
660
|
+
token_a_transfer_fee: bigint;
|
|
661
|
+
token_b_transfer_fee: bigint;
|
|
662
|
+
}
|
|
663
|
+
/** `initial_sqrt_price` 在 Go/Python 为十进制字符串。 */
|
|
664
|
+
export interface OrcaWhirlpoolPoolInitializedEvent {
|
|
665
|
+
metadata: EventMetadata;
|
|
666
|
+
whirlpool: string;
|
|
667
|
+
whirlpools_config: string;
|
|
668
|
+
token_mint_a: string;
|
|
669
|
+
token_mint_b: string;
|
|
670
|
+
tick_spacing: number;
|
|
671
|
+
token_program_a: string;
|
|
672
|
+
token_program_b: string;
|
|
673
|
+
decimals_a: number;
|
|
674
|
+
decimals_b: number;
|
|
675
|
+
initial_sqrt_price: bigint;
|
|
676
|
+
}
|
|
677
|
+
export interface MeteoraPoolsSwapEvent {
|
|
678
|
+
metadata: EventMetadata;
|
|
679
|
+
in_amount: bigint;
|
|
680
|
+
out_amount: bigint;
|
|
681
|
+
trade_fee: bigint;
|
|
682
|
+
admin_fee: bigint;
|
|
683
|
+
host_fee: bigint;
|
|
684
|
+
}
|
|
685
|
+
export interface MeteoraPoolsAddLiquidityEvent {
|
|
686
|
+
metadata: EventMetadata;
|
|
687
|
+
lp_mint_amount: bigint;
|
|
688
|
+
token_a_amount: bigint;
|
|
689
|
+
token_b_amount: bigint;
|
|
690
|
+
}
|
|
691
|
+
export interface MeteoraPoolsRemoveLiquidityEvent {
|
|
692
|
+
metadata: EventMetadata;
|
|
693
|
+
lp_unmint_amount: bigint;
|
|
694
|
+
token_a_out_amount: bigint;
|
|
695
|
+
token_b_out_amount: bigint;
|
|
696
|
+
}
|
|
697
|
+
export interface MeteoraPoolsBootstrapLiquidityEvent {
|
|
698
|
+
metadata: EventMetadata;
|
|
699
|
+
lp_mint_amount: bigint;
|
|
700
|
+
token_a_amount: bigint;
|
|
701
|
+
token_b_amount: bigint;
|
|
702
|
+
pool: string;
|
|
703
|
+
}
|
|
704
|
+
export interface MeteoraPoolsPoolCreatedEvent {
|
|
705
|
+
metadata: EventMetadata;
|
|
706
|
+
lp_mint: string;
|
|
707
|
+
token_a_mint: string;
|
|
708
|
+
token_b_mint: string;
|
|
709
|
+
pool_type: number;
|
|
710
|
+
pool: string;
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Meteora DAMM v2 Swap。TS 内 u128 语义字段为 `bigint`;
|
|
714
|
+
* Go `DexEvent` / Python 解析结果中 `next_sqrt_price` 等为**十进制字符串**(与 `bigint` 十进制一致)。
|
|
715
|
+
*/
|
|
716
|
+
export interface MeteoraDammV2SwapEvent {
|
|
717
|
+
metadata: EventMetadata;
|
|
718
|
+
pool: string;
|
|
719
|
+
amount_in: bigint;
|
|
720
|
+
output_amount: bigint;
|
|
721
|
+
trade_direction: number;
|
|
722
|
+
has_referral: boolean;
|
|
723
|
+
minimum_amount_out: bigint;
|
|
724
|
+
next_sqrt_price: bigint;
|
|
725
|
+
lp_fee: bigint;
|
|
726
|
+
protocol_fee: bigint;
|
|
727
|
+
partner_fee: bigint;
|
|
728
|
+
referral_fee: bigint;
|
|
729
|
+
actual_amount_in: bigint;
|
|
730
|
+
current_timestamp: bigint;
|
|
731
|
+
token_a_vault: string;
|
|
732
|
+
token_b_vault: string;
|
|
733
|
+
token_a_mint: string;
|
|
734
|
+
token_b_mint: string;
|
|
735
|
+
token_a_program: string;
|
|
736
|
+
token_b_program: string;
|
|
737
|
+
}
|
|
738
|
+
/** 与 `MeteoraDammV2AddLiquidityEvent` 对齐;Go/Python 中 `liquidity_delta` 为十进制字符串。 */
|
|
739
|
+
export interface MeteoraDammV2AddLiquidityEvent {
|
|
740
|
+
metadata: EventMetadata;
|
|
741
|
+
pool: string;
|
|
742
|
+
position: string;
|
|
743
|
+
owner: string;
|
|
744
|
+
token_a_amount: bigint;
|
|
745
|
+
token_b_amount: bigint;
|
|
746
|
+
liquidity_delta: bigint;
|
|
747
|
+
token_a_amount_threshold: bigint;
|
|
748
|
+
token_b_amount_threshold: bigint;
|
|
749
|
+
total_amount_a: bigint;
|
|
750
|
+
total_amount_b: bigint;
|
|
751
|
+
}
|
|
752
|
+
/** 与 `MeteoraDammV2RemoveLiquidityEvent` 对齐;Go/Python 中 `liquidity_delta` 为十进制字符串。 */
|
|
753
|
+
export interface MeteoraDammV2RemoveLiquidityEvent {
|
|
754
|
+
metadata: EventMetadata;
|
|
755
|
+
pool: string;
|
|
756
|
+
position: string;
|
|
757
|
+
owner: string;
|
|
758
|
+
token_a_amount: bigint;
|
|
759
|
+
token_b_amount: bigint;
|
|
760
|
+
liquidity_delta: bigint;
|
|
761
|
+
token_a_amount_threshold: bigint;
|
|
762
|
+
token_b_amount_threshold: bigint;
|
|
763
|
+
}
|
|
764
|
+
/** 与 `MeteoraDammV2CreatePositionEvent` 对齐 */
|
|
765
|
+
export interface MeteoraDammV2CreatePositionEvent {
|
|
766
|
+
metadata: EventMetadata;
|
|
767
|
+
pool: string;
|
|
768
|
+
owner: string;
|
|
769
|
+
position: string;
|
|
770
|
+
position_nft_mint: string;
|
|
771
|
+
}
|
|
772
|
+
/** 与 `MeteoraDammV2ClosePositionEvent` 对齐 */
|
|
773
|
+
export interface MeteoraDammV2ClosePositionEvent {
|
|
774
|
+
metadata: EventMetadata;
|
|
775
|
+
pool: string;
|
|
776
|
+
owner: string;
|
|
777
|
+
position: string;
|
|
778
|
+
position_nft_mint: string;
|
|
779
|
+
}
|
|
780
|
+
/** Meteora `cp-amm` `DynamicFeeParameters`(Anchor 序列化) */
|
|
781
|
+
export interface MeteoraDammV2DynamicFeeParameters {
|
|
782
|
+
bin_step: number;
|
|
783
|
+
bin_step_u128: bigint;
|
|
784
|
+
filter_period: number;
|
|
785
|
+
decay_period: number;
|
|
786
|
+
reduction_factor: number;
|
|
787
|
+
max_volatility_accumulator: number;
|
|
788
|
+
variable_fee_control: number;
|
|
789
|
+
}
|
|
790
|
+
/** Meteora `cp-amm` `PoolFeeParameters`(Anchor 序列化解析) */
|
|
791
|
+
export interface MeteoraDammV2PoolFeeParameters {
|
|
792
|
+
/** `BaseFeeParameters.data`,27 字节十六进制 */
|
|
793
|
+
base_fee_data: string;
|
|
794
|
+
compounding_fee_bps: number;
|
|
795
|
+
padding: number;
|
|
796
|
+
dynamic_fee: MeteoraDammV2DynamicFeeParameters | null;
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* 与 Meteora `cp-amm` `EvtInitializePool` 对齐(Program data 载荷)。
|
|
800
|
+
* Go/Python 中 `sqrt_min_price`、`liquidity`、`pool_fees.dynamic_fee.bin_step_u128` 等 u128 语义字段为十进制字符串。
|
|
801
|
+
*/
|
|
802
|
+
export interface MeteoraDammV2InitializePoolEvent {
|
|
803
|
+
metadata: EventMetadata;
|
|
804
|
+
pool: string;
|
|
805
|
+
token_a_mint: string;
|
|
806
|
+
token_b_mint: string;
|
|
807
|
+
creator: string;
|
|
808
|
+
payer: string;
|
|
809
|
+
alpha_vault: string;
|
|
810
|
+
pool_fees: MeteoraDammV2PoolFeeParameters;
|
|
811
|
+
sqrt_min_price: bigint;
|
|
812
|
+
sqrt_max_price: bigint;
|
|
813
|
+
activation_type: number;
|
|
814
|
+
collect_fee_mode: number;
|
|
815
|
+
liquidity: bigint;
|
|
816
|
+
sqrt_price: bigint;
|
|
817
|
+
activation_point: bigint;
|
|
818
|
+
token_a_flag: number;
|
|
819
|
+
token_b_flag: number;
|
|
820
|
+
token_a_amount: bigint;
|
|
821
|
+
token_b_amount: bigint;
|
|
822
|
+
total_amount_a: bigint;
|
|
823
|
+
total_amount_b: bigint;
|
|
824
|
+
pool_type: number;
|
|
825
|
+
}
|
|
826
|
+
/** Meteora DLMM Swap:`fee_bps` 在 Go/Python 为十进制字符串。 */
|
|
827
|
+
export interface MeteoraDlmmSwapEvent {
|
|
828
|
+
metadata: EventMetadata;
|
|
829
|
+
pool: string;
|
|
830
|
+
from: string;
|
|
831
|
+
start_bin_id: number;
|
|
832
|
+
end_bin_id: number;
|
|
833
|
+
amount_in: bigint;
|
|
834
|
+
amount_out: bigint;
|
|
835
|
+
swap_for_y: boolean;
|
|
836
|
+
fee: bigint;
|
|
837
|
+
protocol_fee: bigint;
|
|
838
|
+
fee_bps: bigint;
|
|
839
|
+
host_fee: bigint;
|
|
840
|
+
}
|
|
841
|
+
export interface MeteoraPoolsSetPoolFeesEvent {
|
|
842
|
+
metadata: EventMetadata;
|
|
843
|
+
trade_fee_numerator: bigint;
|
|
844
|
+
trade_fee_denominator: bigint;
|
|
845
|
+
owner_trade_fee_numerator: bigint;
|
|
846
|
+
owner_trade_fee_denominator: bigint;
|
|
847
|
+
pool: string;
|
|
848
|
+
}
|
|
849
|
+
export interface MeteoraDlmmAddLiquidityEvent {
|
|
850
|
+
metadata: EventMetadata;
|
|
851
|
+
pool: string;
|
|
852
|
+
from: string;
|
|
853
|
+
position: string;
|
|
854
|
+
amounts: [bigint, bigint];
|
|
855
|
+
active_bin_id: number;
|
|
856
|
+
}
|
|
857
|
+
export interface MeteoraDlmmRemoveLiquidityEvent {
|
|
858
|
+
metadata: EventMetadata;
|
|
859
|
+
pool: string;
|
|
860
|
+
from: string;
|
|
861
|
+
position: string;
|
|
862
|
+
amounts: [bigint, bigint];
|
|
863
|
+
active_bin_id: number;
|
|
864
|
+
}
|
|
865
|
+
export interface MeteoraDlmmInitializePoolEvent {
|
|
866
|
+
metadata: EventMetadata;
|
|
867
|
+
pool: string;
|
|
868
|
+
creator: string;
|
|
869
|
+
active_bin_id: number;
|
|
870
|
+
bin_step: number;
|
|
871
|
+
}
|
|
872
|
+
export interface MeteoraDlmmInitializeBinArrayEvent {
|
|
873
|
+
metadata: EventMetadata;
|
|
874
|
+
pool: string;
|
|
875
|
+
bin_array: string;
|
|
876
|
+
index: bigint;
|
|
877
|
+
}
|
|
878
|
+
export interface MeteoraDlmmCreatePositionEvent {
|
|
879
|
+
metadata: EventMetadata;
|
|
880
|
+
pool: string;
|
|
881
|
+
position: string;
|
|
882
|
+
owner: string;
|
|
883
|
+
lower_bin_id: number;
|
|
884
|
+
width: number;
|
|
885
|
+
}
|
|
886
|
+
export interface MeteoraDlmmClosePositionEvent {
|
|
887
|
+
metadata: EventMetadata;
|
|
888
|
+
pool: string;
|
|
889
|
+
position: string;
|
|
890
|
+
owner: string;
|
|
891
|
+
}
|
|
892
|
+
export interface MeteoraDlmmClaimFeeEvent {
|
|
893
|
+
metadata: EventMetadata;
|
|
894
|
+
pool: string;
|
|
895
|
+
position: string;
|
|
896
|
+
owner: string;
|
|
897
|
+
fee_x: bigint;
|
|
898
|
+
fee_y: bigint;
|
|
899
|
+
}
|
|
900
|
+
export type TradeDirection = "Buy" | "Sell";
|
|
901
|
+
export interface BonkTradeEvent {
|
|
902
|
+
metadata: EventMetadata;
|
|
903
|
+
pool_state: string;
|
|
904
|
+
user: string;
|
|
905
|
+
amount_in: bigint;
|
|
906
|
+
amount_out: bigint;
|
|
907
|
+
is_buy: boolean;
|
|
908
|
+
trade_direction: TradeDirection;
|
|
909
|
+
exact_in: boolean;
|
|
910
|
+
}
|
|
911
|
+
export interface BaseMintParam {
|
|
912
|
+
symbol: string;
|
|
913
|
+
name: string;
|
|
914
|
+
uri: string;
|
|
915
|
+
decimals: number;
|
|
916
|
+
}
|
|
917
|
+
export interface BonkPoolCreateEvent {
|
|
918
|
+
metadata: EventMetadata;
|
|
919
|
+
base_mint_param: BaseMintParam;
|
|
920
|
+
pool_state: string;
|
|
921
|
+
creator: string;
|
|
922
|
+
}
|
|
923
|
+
export interface BonkMigrateAmmEvent {
|
|
924
|
+
metadata: EventMetadata;
|
|
925
|
+
old_pool: string;
|
|
926
|
+
new_pool: string;
|
|
927
|
+
user: string;
|
|
928
|
+
liquidity_amount: bigint;
|
|
929
|
+
}
|
|
930
|
+
export interface TokenInfoEvent {
|
|
931
|
+
metadata: EventMetadata;
|
|
932
|
+
pubkey: string;
|
|
933
|
+
executable: boolean;
|
|
934
|
+
lamports: bigint;
|
|
935
|
+
owner: string;
|
|
936
|
+
rent_epoch: bigint;
|
|
937
|
+
supply: bigint;
|
|
938
|
+
decimals: number;
|
|
939
|
+
}
|
|
940
|
+
export interface TokenAccountEvent {
|
|
941
|
+
metadata: EventMetadata;
|
|
942
|
+
pubkey: string;
|
|
943
|
+
executable: boolean;
|
|
944
|
+
lamports: bigint;
|
|
945
|
+
owner: string;
|
|
946
|
+
rent_epoch: bigint;
|
|
947
|
+
amount: bigint | null;
|
|
948
|
+
token_owner: string;
|
|
949
|
+
}
|
|
950
|
+
export interface NonceAccountEvent {
|
|
951
|
+
metadata: EventMetadata;
|
|
952
|
+
pubkey: string;
|
|
953
|
+
executable: boolean;
|
|
954
|
+
lamports: bigint;
|
|
955
|
+
owner: string;
|
|
956
|
+
rent_epoch: bigint;
|
|
957
|
+
nonce: string;
|
|
958
|
+
authority: string;
|
|
959
|
+
}
|
|
960
|
+
export interface PumpSwapGlobalConfig {
|
|
961
|
+
admin: string;
|
|
962
|
+
lp_fee_basis_points: bigint;
|
|
963
|
+
protocol_fee_basis_points: bigint;
|
|
964
|
+
disable_flags: number;
|
|
965
|
+
protocol_fee_recipients: string[];
|
|
966
|
+
coin_creator_fee_basis_points: bigint;
|
|
967
|
+
admin_set_coin_creator_authority: string;
|
|
968
|
+
whitelist_pda: string;
|
|
969
|
+
reserved_fee_recipient: string;
|
|
970
|
+
mayhem_mode_enabled: boolean;
|
|
971
|
+
reserved_fee_recipients: string[];
|
|
972
|
+
}
|
|
973
|
+
export interface PumpSwapGlobalConfigAccountEvent {
|
|
974
|
+
metadata: EventMetadata;
|
|
975
|
+
pubkey: string;
|
|
976
|
+
executable: boolean;
|
|
977
|
+
lamports: bigint;
|
|
978
|
+
owner: string;
|
|
979
|
+
rent_epoch: bigint;
|
|
980
|
+
global_config: PumpSwapGlobalConfig;
|
|
981
|
+
}
|
|
982
|
+
export interface PumpSwapPool {
|
|
983
|
+
pool_bump: number;
|
|
984
|
+
index: number;
|
|
985
|
+
creator: string;
|
|
986
|
+
base_mint: string;
|
|
987
|
+
quote_mint: string;
|
|
988
|
+
lp_mint: string;
|
|
989
|
+
pool_base_token_account: string;
|
|
990
|
+
pool_quote_token_account: string;
|
|
991
|
+
lp_supply: bigint;
|
|
992
|
+
coin_creator: string;
|
|
993
|
+
is_mayhem_mode: boolean;
|
|
994
|
+
is_cashback_coin: boolean;
|
|
995
|
+
}
|
|
996
|
+
export interface PumpSwapPoolAccountEvent {
|
|
997
|
+
metadata: EventMetadata;
|
|
998
|
+
pubkey: string;
|
|
999
|
+
executable: boolean;
|
|
1000
|
+
lamports: bigint;
|
|
1001
|
+
owner: string;
|
|
1002
|
+
rent_epoch: bigint;
|
|
1003
|
+
pool: PumpSwapPool;
|
|
1004
|
+
}
|
|
1005
|
+
export interface BlockMetaEvent {
|
|
1006
|
+
metadata: EventMetadata;
|
|
1007
|
+
}
|
|
1008
|
+
export declare function metadataForDexEvent(ev: DexEvent): EventMetadata | null;
|
|
1009
|
+
export declare function defaultPubkey(): string;
|