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.
Files changed (114) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +449 -0
  3. package/README_CN.md +343 -0
  4. package/dist/accounts/mod.d.ts +11 -0
  5. package/dist/accounts/mod.js +53 -0
  6. package/dist/accounts/nonce.d.ts +5 -0
  7. package/dist/accounts/nonce.js +32 -0
  8. package/dist/accounts/pumpswap.d.ts +8 -0
  9. package/dist/accounts/pumpswap.js +192 -0
  10. package/dist/accounts/token.d.ts +5 -0
  11. package/dist/accounts/token.js +98 -0
  12. package/dist/accounts/types.d.ts +9 -0
  13. package/dist/accounts/types.js +2 -0
  14. package/dist/accounts/utils.d.ts +1 -0
  15. package/dist/accounts/utils.js +12 -0
  16. package/dist/core/account_dispatcher_rpc.d.ts +11 -0
  17. package/dist/core/account_dispatcher_rpc.js +155 -0
  18. package/dist/core/account_fill_bonk.d.ts +4 -0
  19. package/dist/core/account_fill_bonk.js +20 -0
  20. package/dist/core/account_fill_meteora.d.ts +14 -0
  21. package/dist/core/account_fill_meteora.js +26 -0
  22. package/dist/core/account_fill_orca.d.ts +5 -0
  23. package/dist/core/account_fill_orca.js +18 -0
  24. package/dist/core/account_fill_pumpfun.d.ts +7 -0
  25. package/dist/core/account_fill_pumpfun.js +75 -0
  26. package/dist/core/account_fill_pumpswap.d.ts +10 -0
  27. package/dist/core/account_fill_pumpswap.js +78 -0
  28. package/dist/core/account_fill_raydium.d.ts +20 -0
  29. package/dist/core/account_fill_raydium.js +104 -0
  30. package/dist/core/clock.d.ts +2 -0
  31. package/dist/core/clock.js +7 -0
  32. package/dist/core/common_filler_rpc.d.ts +6 -0
  33. package/dist/core/common_filler_rpc.js +21 -0
  34. package/dist/core/dex_event.d.ts +1009 -0
  35. package/dist/core/dex_event.js +14 -0
  36. package/dist/core/error.d.ts +43 -0
  37. package/dist/core/error.js +16 -0
  38. package/dist/core/json_utils.d.ts +8 -0
  39. package/dist/core/json_utils.js +18 -0
  40. package/dist/core/metadata.d.ts +10 -0
  41. package/dist/core/metadata.js +13 -0
  42. package/dist/core/rpc_invoke_map.d.ts +23 -0
  43. package/dist/core/rpc_invoke_map.js +157 -0
  44. package/dist/core/unified_parser.d.ts +19 -0
  45. package/dist/core/unified_parser.js +48 -0
  46. package/dist/grpc/client.d.ts +52 -0
  47. package/dist/grpc/client.js +309 -0
  48. package/dist/grpc/client_stub.d.ts +5 -0
  49. package/dist/grpc/client_stub.js +5 -0
  50. package/dist/grpc/types.d.ts +132 -0
  51. package/dist/grpc/types.js +304 -0
  52. package/dist/grpc/yellowstone_parse.d.ts +9 -0
  53. package/dist/grpc/yellowstone_parse.js +46 -0
  54. package/dist/index.d.ts +18 -0
  55. package/dist/index.js +99 -0
  56. package/dist/instr/bonk_ix.d.ts +5 -0
  57. package/dist/instr/bonk_ix.js +52 -0
  58. package/dist/instr/meteora_damm_ix.d.ts +6 -0
  59. package/dist/instr/meteora_damm_ix.js +349 -0
  60. package/dist/instr/mod.d.ts +15 -0
  61. package/dist/instr/mod.js +95 -0
  62. package/dist/instr/orca_whirlpool_ix.d.ts +5 -0
  63. package/dist/instr/orca_whirlpool_ix.js +73 -0
  64. package/dist/instr/program_ids.d.ts +14 -0
  65. package/dist/instr/program_ids.js +18 -0
  66. package/dist/instr/pumpfun_ix.d.ts +5 -0
  67. package/dist/instr/pumpfun_ix.js +167 -0
  68. package/dist/instr/pumpswap_ix.d.ts +5 -0
  69. package/dist/instr/pumpswap_ix.js +215 -0
  70. package/dist/instr/raydium_amm_v4_ix.d.ts +6 -0
  71. package/dist/instr/raydium_amm_v4_ix.js +46 -0
  72. package/dist/instr/raydium_clmm_ix.d.ts +5 -0
  73. package/dist/instr/raydium_clmm_ix.js +85 -0
  74. package/dist/instr/raydium_cpmm_ix.d.ts +5 -0
  75. package/dist/instr/raydium_cpmm_ix.js +63 -0
  76. package/dist/instr/utils.d.ts +10 -0
  77. package/dist/instr/utils.js +33 -0
  78. package/dist/logs/meteora_amm.d.ts +8 -0
  79. package/dist/logs/meteora_amm.js +113 -0
  80. package/dist/logs/meteora_damm.d.ts +6 -0
  81. package/dist/logs/meteora_damm.js +509 -0
  82. package/dist/logs/meteora_dlmm.d.ts +6 -0
  83. package/dist/logs/meteora_dlmm.js +201 -0
  84. package/dist/logs/optimized_matcher.d.ts +5 -0
  85. package/dist/logs/optimized_matcher.js +194 -0
  86. package/dist/logs/orca.d.ts +6 -0
  87. package/dist/logs/orca.js +148 -0
  88. package/dist/logs/program_data.d.ts +2 -0
  89. package/dist/logs/program_data.js +22 -0
  90. package/dist/logs/program_log_discriminators.d.ts +59 -0
  91. package/dist/logs/program_log_discriminators.js +67 -0
  92. package/dist/logs/pump.d.ts +12 -0
  93. package/dist/logs/pump.js +251 -0
  94. package/dist/logs/pump_amm.d.ts +9 -0
  95. package/dist/logs/pump_amm.js +418 -0
  96. package/dist/logs/raydium_amm.d.ts +9 -0
  97. package/dist/logs/raydium_amm.js +224 -0
  98. package/dist/logs/raydium_clmm.d.ts +8 -0
  99. package/dist/logs/raydium_clmm.js +141 -0
  100. package/dist/logs/raydium_cpmm.d.ts +7 -0
  101. package/dist/logs/raydium_cpmm.js +121 -0
  102. package/dist/logs/raydium_launchpad.d.ts +12 -0
  103. package/dist/logs/raydium_launchpad.js +92 -0
  104. package/dist/parser_alias.d.ts +3 -0
  105. package/dist/parser_alias.js +2 -0
  106. package/dist/rpc_parser.d.ts +16 -0
  107. package/dist/rpc_parser.js +36 -0
  108. package/dist/rpc_transaction.d.ts +25 -0
  109. package/dist/rpc_transaction.js +111 -0
  110. package/dist/util/binary.d.ts +14 -0
  111. package/dist/util/binary.js +82 -0
  112. package/dist/warmup.d.ts +3 -0
  113. package/dist/warmup.js +23 -0
  114. package/package.json +44 -0
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseTokenAccount = parseTokenAccount;
4
+ const web3_js_1 = require("@solana/web3.js");
5
+ const binary_js_1 = require("../util/binary.js");
6
+ const TOKEN_PROGRAM = new web3_js_1.PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA").toBase58();
7
+ const TOKEN_2022 = new web3_js_1.PublicKey("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb").toBase58();
8
+ const MINT_SIZE = 82;
9
+ const SUPPLY_OFF = 36;
10
+ const DECIMALS_OFF = 44;
11
+ const TOKEN_ACCOUNT_SIZE = 165;
12
+ const AMOUNT_OFF = 64;
13
+ function isTokenProgramOwner(owner) {
14
+ return owner === TOKEN_PROGRAM || owner === TOKEN_2022;
15
+ }
16
+ function parseMintFast(account, metadata) {
17
+ const { data } = account;
18
+ if (data.length < MINT_SIZE)
19
+ return null;
20
+ const supply = (0, binary_js_1.readU64LE)(data, SUPPLY_OFF);
21
+ const decimals = data[DECIMALS_OFF] ?? 0;
22
+ if (supply === null)
23
+ return null;
24
+ const ev = {
25
+ metadata,
26
+ pubkey: account.pubkey,
27
+ executable: account.executable,
28
+ lamports: account.lamports,
29
+ owner: account.owner,
30
+ rent_epoch: account.rent_epoch,
31
+ supply,
32
+ decimals,
33
+ };
34
+ return { TokenInfo: ev };
35
+ }
36
+ function parseTokenFast(account, metadata) {
37
+ const { data } = account;
38
+ if (data.length !== TOKEN_ACCOUNT_SIZE)
39
+ return null;
40
+ const amount = (0, binary_js_1.readU64LE)(data, AMOUNT_OFF);
41
+ if (amount === null)
42
+ return null;
43
+ const ev = {
44
+ metadata,
45
+ pubkey: account.pubkey,
46
+ executable: account.executable,
47
+ lamports: account.lamports,
48
+ owner: account.owner,
49
+ rent_epoch: account.rent_epoch,
50
+ amount,
51
+ // 快速路径:将 `token_owner` 设为账户 owner(程序 ID)
52
+ token_owner: account.owner,
53
+ };
54
+ return { TokenAccount: ev };
55
+ }
56
+ /** Token-2022 等扩展账户:读取标准 Account 布局前 165 字节中的 owner / amount */
57
+ function parseTokenWithExtensions(account, metadata) {
58
+ const d = account.data;
59
+ if (!isTokenProgramOwner(account.owner) || d.length <= TOKEN_ACCOUNT_SIZE)
60
+ return null;
61
+ const tokenOwner = (0, binary_js_1.readPubkey)(d, 32);
62
+ const amount = (0, binary_js_1.readU64LE)(d, AMOUNT_OFF);
63
+ if (tokenOwner === null || amount === null)
64
+ return null;
65
+ const ev = {
66
+ metadata,
67
+ pubkey: account.pubkey,
68
+ executable: account.executable,
69
+ lamports: account.lamports,
70
+ owner: account.owner,
71
+ rent_epoch: account.rent_epoch,
72
+ amount,
73
+ token_owner: tokenOwner,
74
+ };
75
+ return { TokenAccount: ev };
76
+ }
77
+ /** SPL Token 账户解析(快速路径 + 扩展长度回退) */
78
+ function parseTokenAccount(account, metadata) {
79
+ if (!isTokenProgramOwner(account.owner))
80
+ return null;
81
+ if (account.data.length <= 100) {
82
+ const m = parseMintFast(account, metadata);
83
+ if (m)
84
+ return m;
85
+ }
86
+ const t = parseTokenFast(account, metadata);
87
+ if (t)
88
+ return t;
89
+ const ext = parseTokenWithExtensions(account, metadata);
90
+ if (ext)
91
+ return ext;
92
+ if (account.data.length >= MINT_SIZE) {
93
+ const m = parseMintFast(account, metadata);
94
+ if (m)
95
+ return m;
96
+ }
97
+ return null;
98
+ }
@@ -0,0 +1,9 @@
1
+ /** 账户解析结果载体 */
2
+ export interface AccountData {
3
+ pubkey: string;
4
+ executable: boolean;
5
+ lamports: bigint;
6
+ owner: string;
7
+ rent_epoch: bigint;
8
+ data: Uint8Array;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export declare function hasDiscriminator(data: Uint8Array, disc: Uint8Array): boolean;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hasDiscriminator = hasDiscriminator;
4
+ function hasDiscriminator(data, disc) {
5
+ if (data.length < disc.length)
6
+ return false;
7
+ for (let i = 0; i < disc.length; i++) {
8
+ if (data[i] !== disc[i])
9
+ return false;
10
+ }
11
+ return true;
12
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * RPC 路径账户填充(`fillAccountsFromTransactionDataRpc`)。
3
+ * `RaydiumClmmOpenPositionWithTokenExtNft` 与 `openPosition` 共用账户索引(见 `account_fill_raydium.ts`)。
4
+ */
5
+ import type { DexEvent } from "./dex_event.js";
6
+ import type { ConfirmedTransactionMeta, Message, MessageV0, PublicKey } from "@solana/web3.js";
7
+ import { type InvokePair } from "./rpc_invoke_map.js";
8
+ /** 就地修改事件体内字段 */
9
+ export declare function fillAccountsFromTransactionDataRpc(ev: DexEvent, message: Message | MessageV0, meta: ConfirmedTransactionMeta | null, programInvokes: Map<string, InvokePair[]>, resolver: {
10
+ get(i: number): PublicKey | undefined;
11
+ }): void;
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fillAccountsFromTransactionDataRpc = fillAccountsFromTransactionDataRpc;
4
+ const program_ids_js_1 = require("../instr/program_ids.js");
5
+ const rpc_invoke_map_js_1 = require("./rpc_invoke_map.js");
6
+ const account_fill_pumpfun_js_1 = require("./account_fill_pumpfun.js");
7
+ const account_fill_pumpswap_js_1 = require("./account_fill_pumpswap.js");
8
+ const account_fill_raydium_js_1 = require("./account_fill_raydium.js");
9
+ const account_fill_orca_js_1 = require("./account_fill_orca.js");
10
+ const account_fill_bonk_js_1 = require("./account_fill_bonk.js");
11
+ const account_fill_meteora_js_1 = require("./account_fill_meteora.js");
12
+ function tryFill(programId, programInvokes, message, meta, resolver, fn) {
13
+ const invoke = (0, rpc_invoke_map_js_1.findMaxAccountsInvoke)(programId, programInvokes, message, meta);
14
+ if (!invoke)
15
+ return;
16
+ const get = (0, rpc_invoke_map_js_1.makeInvokeAccountGetter)(resolver, invoke, message, meta);
17
+ if (!get)
18
+ return;
19
+ fn(get);
20
+ }
21
+ /** 就地修改事件体内字段 */
22
+ function fillAccountsFromTransactionDataRpc(ev, message, meta, programInvokes, resolver) {
23
+ if ("PumpFunTrade" in ev) {
24
+ tryFill(program_ids_js_1.PUMPFUN_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpfun_js_1.fillPumpfunTradeAccounts)(ev.PumpFunTrade, g));
25
+ }
26
+ else if ("PumpFunBuy" in ev) {
27
+ tryFill(program_ids_js_1.PUMPFUN_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpfun_js_1.fillPumpfunTradeAccounts)(ev.PumpFunBuy, g));
28
+ }
29
+ else if ("PumpFunSell" in ev) {
30
+ tryFill(program_ids_js_1.PUMPFUN_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpfun_js_1.fillPumpfunTradeAccounts)(ev.PumpFunSell, g));
31
+ }
32
+ else if ("PumpFunBuyExactSolIn" in ev) {
33
+ tryFill(program_ids_js_1.PUMPFUN_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpfun_js_1.fillPumpfunTradeAccounts)(ev.PumpFunBuyExactSolIn, g));
34
+ }
35
+ else if ("PumpFunCreate" in ev) {
36
+ tryFill(program_ids_js_1.PUMPFUN_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpfun_js_1.fillPumpfunCreateAccounts)(ev.PumpFunCreate, g));
37
+ }
38
+ else if ("PumpFunCreateV2" in ev) {
39
+ tryFill(program_ids_js_1.PUMPFUN_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpfun_js_1.fillPumpfunCreateV2Accounts)(ev.PumpFunCreateV2, g));
40
+ }
41
+ else if ("PumpFunMigrate" in ev) {
42
+ tryFill(program_ids_js_1.PUMPFUN_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpfun_js_1.fillPumpfunMigrateAccounts)(ev.PumpFunMigrate, g));
43
+ }
44
+ else if ("PumpSwapBuy" in ev) {
45
+ tryFill(program_ids_js_1.PUMPSWAP_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpswap_js_1.fillPumpswapBuyAccounts)(ev.PumpSwapBuy, g));
46
+ }
47
+ else if ("PumpSwapSell" in ev) {
48
+ tryFill(program_ids_js_1.PUMPSWAP_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpswap_js_1.fillPumpswapSellAccounts)(ev.PumpSwapSell, g));
49
+ }
50
+ else if ("PumpSwapTrade" in ev) {
51
+ tryFill(program_ids_js_1.PUMPSWAP_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpswap_js_1.fillPumpswapTradeAccounts)(ev.PumpSwapTrade, g));
52
+ }
53
+ else if ("PumpSwapCreatePool" in ev) {
54
+ tryFill(program_ids_js_1.PUMPSWAP_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpswap_js_1.fillPumpswapCreatePoolAccounts)(ev.PumpSwapCreatePool, g));
55
+ }
56
+ else if ("PumpSwapLiquidityAdded" in ev) {
57
+ tryFill(program_ids_js_1.PUMPSWAP_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpswap_js_1.fillPumpswapLiquidityAddedAccounts)(ev.PumpSwapLiquidityAdded, g));
58
+ }
59
+ else if ("PumpSwapLiquidityRemoved" in ev) {
60
+ tryFill(program_ids_js_1.PUMPSWAP_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_pumpswap_js_1.fillPumpswapLiquidityRemovedAccounts)(ev.PumpSwapLiquidityRemoved, g));
61
+ }
62
+ else if ("RaydiumClmmSwap" in ev) {
63
+ tryFill(program_ids_js_1.RAYDIUM_CLMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumClmmSwapAccounts)(ev.RaydiumClmmSwap, g));
64
+ }
65
+ else if ("RaydiumClmmCreatePool" in ev) {
66
+ tryFill(program_ids_js_1.RAYDIUM_CLMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumClmmCreatePoolAccounts)(ev.RaydiumClmmCreatePool, g));
67
+ }
68
+ else if ("RaydiumClmmOpenPosition" in ev) {
69
+ tryFill(program_ids_js_1.RAYDIUM_CLMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumClmmOpenPositionAccounts)(ev.RaydiumClmmOpenPosition, g));
70
+ }
71
+ else if ("RaydiumClmmOpenPositionWithTokenExtNft" in ev) {
72
+ tryFill(program_ids_js_1.RAYDIUM_CLMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumClmmOpenPositionWithTokenExtNftAccounts)(ev.RaydiumClmmOpenPositionWithTokenExtNft, g));
73
+ }
74
+ else if ("RaydiumClmmClosePosition" in ev) {
75
+ tryFill(program_ids_js_1.RAYDIUM_CLMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumClmmClosePositionAccounts)(ev.RaydiumClmmClosePosition, g));
76
+ }
77
+ else if ("RaydiumClmmIncreaseLiquidity" in ev) {
78
+ tryFill(program_ids_js_1.RAYDIUM_CLMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumClmmIncreaseLiquidityAccounts)(ev.RaydiumClmmIncreaseLiquidity, g));
79
+ }
80
+ else if ("RaydiumClmmDecreaseLiquidity" in ev) {
81
+ tryFill(program_ids_js_1.RAYDIUM_CLMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumClmmDecreaseLiquidityAccounts)(ev.RaydiumClmmDecreaseLiquidity, g));
82
+ }
83
+ else if ("RaydiumCpmmSwap" in ev) {
84
+ tryFill(program_ids_js_1.RAYDIUM_CPMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumCpmmSwapAccounts)(ev.RaydiumCpmmSwap, g));
85
+ }
86
+ else if ("RaydiumCpmmDeposit" in ev) {
87
+ tryFill(program_ids_js_1.RAYDIUM_CPMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumCpmmDepositAccounts)(ev.RaydiumCpmmDeposit, g));
88
+ }
89
+ else if ("RaydiumCpmmWithdraw" in ev) {
90
+ tryFill(program_ids_js_1.RAYDIUM_CPMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumCpmmWithdrawAccounts)(ev.RaydiumCpmmWithdraw, g));
91
+ }
92
+ else if ("RaydiumCpmmInitialize" in ev) {
93
+ tryFill(program_ids_js_1.RAYDIUM_CPMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumCpmmInitializeAccounts)(ev.RaydiumCpmmInitialize, g));
94
+ }
95
+ else if ("RaydiumAmmV4Swap" in ev) {
96
+ tryFill(program_ids_js_1.RAYDIUM_AMM_V4_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumAmmV4SwapAccounts)(ev.RaydiumAmmV4Swap, g));
97
+ }
98
+ else if ("RaydiumAmmV4Deposit" in ev) {
99
+ tryFill(program_ids_js_1.RAYDIUM_AMM_V4_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumAmmV4DepositAccounts)(ev.RaydiumAmmV4Deposit, g));
100
+ }
101
+ else if ("RaydiumAmmV4Withdraw" in ev) {
102
+ tryFill(program_ids_js_1.RAYDIUM_AMM_V4_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_raydium_js_1.fillRaydiumAmmV4WithdrawAccounts)(ev.RaydiumAmmV4Withdraw, g));
103
+ }
104
+ else if ("OrcaWhirlpoolSwap" in ev) {
105
+ tryFill(program_ids_js_1.ORCA_WHIRLPOOL_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_orca_js_1.fillOrcaWhirlpoolSwapAccounts)(ev.OrcaWhirlpoolSwap, g));
106
+ }
107
+ else if ("OrcaWhirlpoolLiquidityIncreased" in ev) {
108
+ tryFill(program_ids_js_1.ORCA_WHIRLPOOL_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_orca_js_1.fillOrcaWhirlpoolLiquidityIncreasedAccounts)(ev.OrcaWhirlpoolLiquidityIncreased, g));
109
+ }
110
+ else if ("OrcaWhirlpoolLiquidityDecreased" in ev) {
111
+ tryFill(program_ids_js_1.ORCA_WHIRLPOOL_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_orca_js_1.fillOrcaWhirlpoolLiquidityDecreasedAccounts)(ev.OrcaWhirlpoolLiquidityDecreased, g));
112
+ }
113
+ else if ("MeteoraDammV2Swap" in ev) {
114
+ tryFill(program_ids_js_1.METEORA_DAMM_V2_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_meteora_js_1.fillMeteoraDammV2SwapAccounts)(ev.MeteoraDammV2Swap, g));
115
+ }
116
+ else if ("MeteoraDammV2CreatePosition" in ev) {
117
+ tryFill(program_ids_js_1.METEORA_DAMM_V2_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_meteora_js_1.fillMeteoraDammV2CreatePositionAccounts)(ev.MeteoraDammV2CreatePosition, g));
118
+ }
119
+ else if ("MeteoraDammV2ClosePosition" in ev) {
120
+ tryFill(program_ids_js_1.METEORA_DAMM_V2_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_meteora_js_1.fillMeteoraDammV2ClosePositionAccounts)(ev.MeteoraDammV2ClosePosition, g));
121
+ }
122
+ else if ("MeteoraDammV2AddLiquidity" in ev) {
123
+ tryFill(program_ids_js_1.METEORA_DAMM_V2_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_meteora_js_1.fillMeteoraDammV2AddLiquidityAccounts)(ev.MeteoraDammV2AddLiquidity, g));
124
+ }
125
+ else if ("MeteoraDammV2RemoveLiquidity" in ev) {
126
+ tryFill(program_ids_js_1.METEORA_DAMM_V2_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_meteora_js_1.fillMeteoraDammV2RemoveLiquidityAccounts)(ev.MeteoraDammV2RemoveLiquidity, g));
127
+ }
128
+ else if ("MeteoraDammV2InitializePool" in ev) {
129
+ tryFill(program_ids_js_1.METEORA_DAMM_V2_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_meteora_js_1.fillMeteoraDammV2InitializePoolAccounts)(ev.MeteoraDammV2InitializePool, g));
130
+ }
131
+ else if ("MeteoraPoolsSwap" in ev) {
132
+ tryFill(program_ids_js_1.METEORA_POOLS_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_meteora_js_1.fillMeteoraPoolsSwapAccounts)(ev.MeteoraPoolsSwap, g));
133
+ }
134
+ else if ("MeteoraPoolsAddLiquidity" in ev) {
135
+ tryFill(program_ids_js_1.METEORA_POOLS_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_meteora_js_1.fillMeteoraPoolsAddLiquidityAccounts)(ev.MeteoraPoolsAddLiquidity, g));
136
+ }
137
+ else if ("MeteoraPoolsRemoveLiquidity" in ev) {
138
+ tryFill(program_ids_js_1.METEORA_POOLS_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_meteora_js_1.fillMeteoraPoolsRemoveLiquidityAccounts)(ev.MeteoraPoolsRemoveLiquidity, g));
139
+ }
140
+ else if ("MeteoraDlmmSwap" in ev) {
141
+ tryFill(program_ids_js_1.METEORA_DLMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_meteora_js_1.fillMeteoraDlmmSwapAccounts)(ev.MeteoraDlmmSwap, g));
142
+ }
143
+ else if ("MeteoraDlmmAddLiquidity" in ev) {
144
+ tryFill(program_ids_js_1.METEORA_DLMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_meteora_js_1.fillMeteoraDlmmAddLiquidityAccounts)(ev.MeteoraDlmmAddLiquidity, g));
145
+ }
146
+ else if ("MeteoraDlmmRemoveLiquidity" in ev) {
147
+ tryFill(program_ids_js_1.METEORA_DLMM_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_meteora_js_1.fillMeteoraDlmmRemoveLiquidityAccounts)(ev.MeteoraDlmmRemoveLiquidity, g));
148
+ }
149
+ else if ("BonkTrade" in ev) {
150
+ tryFill(program_ids_js_1.BONK_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_bonk_js_1.fillBonkTradeAccounts)(ev.BonkTrade, g));
151
+ }
152
+ else if ("BonkPoolCreate" in ev) {
153
+ tryFill(program_ids_js_1.BONK_PROGRAM_ID, programInvokes, message, meta, resolver, (g) => (0, account_fill_bonk_js_1.fillBonkPoolCreateAccounts)(ev.BonkPoolCreate, g));
154
+ }
155
+ }
@@ -0,0 +1,4 @@
1
+ /** Bonk(Launchpad)账户填充 */
2
+ import type { BonkPoolCreateEvent, BonkTradeEvent } from "./dex_event.js";
3
+ export declare function fillBonkTradeAccounts(e: BonkTradeEvent, get: (i: number) => string): void;
4
+ export declare function fillBonkPoolCreateAccounts(e: BonkPoolCreateEvent, get: (i: number) => string): void;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fillBonkTradeAccounts = fillBonkTradeAccounts;
4
+ exports.fillBonkPoolCreateAccounts = fillBonkPoolCreateAccounts;
5
+ const dex_event_js_1 = require("./dex_event.js");
6
+ const Z = () => (0, dex_event_js_1.defaultPubkey)();
7
+ function fillBonkTradeAccounts(e, get) {
8
+ const zero = Z();
9
+ if (!e.user || e.user === zero)
10
+ e.user = get(0);
11
+ if (!e.pool_state || e.pool_state === zero)
12
+ e.pool_state = get(1);
13
+ }
14
+ function fillBonkPoolCreateAccounts(e, get) {
15
+ const zero = Z();
16
+ if (!e.pool_state || e.pool_state === zero)
17
+ e.pool_state = get(1);
18
+ if (!e.creator || e.creator === zero)
19
+ e.creator = get(8);
20
+ }
@@ -0,0 +1,14 @@
1
+ /** Meteora DAMM V2 / Pools / DLMM 账户填充(部分占位) */
2
+ import type { MeteoraDammV2AddLiquidityEvent, MeteoraDammV2ClosePositionEvent, MeteoraDammV2CreatePositionEvent, MeteoraDammV2InitializePoolEvent, MeteoraDammV2RemoveLiquidityEvent, MeteoraDammV2SwapEvent, MeteoraDlmmAddLiquidityEvent, MeteoraDlmmRemoveLiquidityEvent, MeteoraDlmmSwapEvent, MeteoraPoolsAddLiquidityEvent, MeteoraPoolsRemoveLiquidityEvent, MeteoraPoolsSwapEvent } from "./dex_event.js";
3
+ export declare function fillMeteoraDammV2SwapAccounts(_e: MeteoraDammV2SwapEvent, _get: (i: number) => string): void;
4
+ export declare function fillMeteoraDammV2CreatePositionAccounts(_e: MeteoraDammV2CreatePositionEvent, _get: (i: number) => string): void;
5
+ export declare function fillMeteoraDammV2ClosePositionAccounts(_e: MeteoraDammV2ClosePositionEvent, _get: (i: number) => string): void;
6
+ export declare function fillMeteoraDammV2AddLiquidityAccounts(_e: MeteoraDammV2AddLiquidityEvent, _get: (i: number) => string): void;
7
+ export declare function fillMeteoraDammV2RemoveLiquidityAccounts(_e: MeteoraDammV2RemoveLiquidityEvent, _get: (i: number) => string): void;
8
+ export declare function fillMeteoraDammV2InitializePoolAccounts(_e: MeteoraDammV2InitializePoolEvent, _get: (i: number) => string): void;
9
+ export declare function fillMeteoraPoolsSwapAccounts(_e: MeteoraPoolsSwapEvent, _get: (i: number) => string): void;
10
+ export declare function fillMeteoraPoolsAddLiquidityAccounts(_e: MeteoraPoolsAddLiquidityEvent, _get: (i: number) => string): void;
11
+ export declare function fillMeteoraPoolsRemoveLiquidityAccounts(_e: MeteoraPoolsRemoveLiquidityEvent, _get: (i: number) => string): void;
12
+ export declare function fillMeteoraDlmmSwapAccounts(_e: MeteoraDlmmSwapEvent, _get: (i: number) => string): void;
13
+ export declare function fillMeteoraDlmmAddLiquidityAccounts(_e: MeteoraDlmmAddLiquidityEvent, _get: (i: number) => string): void;
14
+ export declare function fillMeteoraDlmmRemoveLiquidityAccounts(_e: MeteoraDlmmRemoveLiquidityEvent, _get: (i: number) => string): void;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fillMeteoraDammV2SwapAccounts = fillMeteoraDammV2SwapAccounts;
4
+ exports.fillMeteoraDammV2CreatePositionAccounts = fillMeteoraDammV2CreatePositionAccounts;
5
+ exports.fillMeteoraDammV2ClosePositionAccounts = fillMeteoraDammV2ClosePositionAccounts;
6
+ exports.fillMeteoraDammV2AddLiquidityAccounts = fillMeteoraDammV2AddLiquidityAccounts;
7
+ exports.fillMeteoraDammV2RemoveLiquidityAccounts = fillMeteoraDammV2RemoveLiquidityAccounts;
8
+ exports.fillMeteoraDammV2InitializePoolAccounts = fillMeteoraDammV2InitializePoolAccounts;
9
+ exports.fillMeteoraPoolsSwapAccounts = fillMeteoraPoolsSwapAccounts;
10
+ exports.fillMeteoraPoolsAddLiquidityAccounts = fillMeteoraPoolsAddLiquidityAccounts;
11
+ exports.fillMeteoraPoolsRemoveLiquidityAccounts = fillMeteoraPoolsRemoveLiquidityAccounts;
12
+ exports.fillMeteoraDlmmSwapAccounts = fillMeteoraDlmmSwapAccounts;
13
+ exports.fillMeteoraDlmmAddLiquidityAccounts = fillMeteoraDlmmAddLiquidityAccounts;
14
+ exports.fillMeteoraDlmmRemoveLiquidityAccounts = fillMeteoraDlmmRemoveLiquidityAccounts;
15
+ function fillMeteoraDammV2SwapAccounts(_e, _get) { }
16
+ function fillMeteoraDammV2CreatePositionAccounts(_e, _get) { }
17
+ function fillMeteoraDammV2ClosePositionAccounts(_e, _get) { }
18
+ function fillMeteoraDammV2AddLiquidityAccounts(_e, _get) { }
19
+ function fillMeteoraDammV2RemoveLiquidityAccounts(_e, _get) { }
20
+ function fillMeteoraDammV2InitializePoolAccounts(_e, _get) { }
21
+ function fillMeteoraPoolsSwapAccounts(_e, _get) { }
22
+ function fillMeteoraPoolsAddLiquidityAccounts(_e, _get) { }
23
+ function fillMeteoraPoolsRemoveLiquidityAccounts(_e, _get) { }
24
+ function fillMeteoraDlmmSwapAccounts(_e, _get) { }
25
+ function fillMeteoraDlmmAddLiquidityAccounts(_e, _get) { }
26
+ function fillMeteoraDlmmRemoveLiquidityAccounts(_e, _get) { }
@@ -0,0 +1,5 @@
1
+ /** Orca Whirlpool 账户填充 */
2
+ import type { OrcaWhirlpoolLiquidityDecreasedEvent, OrcaWhirlpoolLiquidityIncreasedEvent, OrcaWhirlpoolSwapEvent } from "./dex_event.js";
3
+ export declare function fillOrcaWhirlpoolSwapAccounts(_e: OrcaWhirlpoolSwapEvent, _get: (i: number) => string): void;
4
+ export declare function fillOrcaWhirlpoolLiquidityIncreasedAccounts(e: OrcaWhirlpoolLiquidityIncreasedEvent, get: (i: number) => string): void;
5
+ export declare function fillOrcaWhirlpoolLiquidityDecreasedAccounts(e: OrcaWhirlpoolLiquidityDecreasedEvent, get: (i: number) => string): void;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fillOrcaWhirlpoolSwapAccounts = fillOrcaWhirlpoolSwapAccounts;
4
+ exports.fillOrcaWhirlpoolLiquidityIncreasedAccounts = fillOrcaWhirlpoolLiquidityIncreasedAccounts;
5
+ exports.fillOrcaWhirlpoolLiquidityDecreasedAccounts = fillOrcaWhirlpoolLiquidityDecreasedAccounts;
6
+ const dex_event_js_1 = require("./dex_event.js");
7
+ const Z = () => (0, dex_event_js_1.defaultPubkey)();
8
+ function fillOrcaWhirlpoolSwapAccounts(_e, _get) { }
9
+ function fillOrcaWhirlpoolLiquidityIncreasedAccounts(e, get) {
10
+ const zero = Z();
11
+ if (!e.position || e.position === zero)
12
+ e.position = get(3);
13
+ }
14
+ function fillOrcaWhirlpoolLiquidityDecreasedAccounts(e, get) {
15
+ const zero = Z();
16
+ if (!e.position || e.position === zero)
17
+ e.position = get(3);
18
+ }
@@ -0,0 +1,7 @@
1
+ /** PumpFun 账户填充(字符串公钥) */
2
+ import type { PumpFunCreateTokenEvent, PumpFunCreateV2TokenEvent, PumpFunMigrateEvent, PumpFunTradeEvent } from "./dex_event.js";
3
+ export declare function fillPumpfunTradeAccounts(e: PumpFunTradeEvent, get: (i: number) => string): void;
4
+ export declare function fillPumpfunCreateAccounts(e: PumpFunCreateTokenEvent, get: (i: number) => string): void;
5
+ export declare function fillPumpfunCreateV2Accounts(e: PumpFunCreateV2TokenEvent, get: (i: number) => string): void;
6
+ /** Migrate:占位,待 IDL 账户映射 */
7
+ export declare function fillPumpfunMigrateAccounts(_e: PumpFunMigrateEvent, _get: (i: number) => string): void;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fillPumpfunTradeAccounts = fillPumpfunTradeAccounts;
4
+ exports.fillPumpfunCreateAccounts = fillPumpfunCreateAccounts;
5
+ exports.fillPumpfunCreateV2Accounts = fillPumpfunCreateV2Accounts;
6
+ exports.fillPumpfunMigrateAccounts = fillPumpfunMigrateAccounts;
7
+ const dex_event_js_1 = require("./dex_event.js");
8
+ const Z = () => (0, dex_event_js_1.defaultPubkey)();
9
+ function fillPumpfunTradeAccounts(e, get) {
10
+ const zero = Z();
11
+ if (!e.user || e.user === zero)
12
+ e.user = get(6);
13
+ if (!e.bonding_curve || e.bonding_curve === zero)
14
+ e.bonding_curve = get(3);
15
+ if (!e.associated_bonding_curve || e.associated_bonding_curve === zero) {
16
+ e.associated_bonding_curve = get(4);
17
+ }
18
+ if (!e.creator_vault || e.creator_vault === zero) {
19
+ e.creator_vault = e.is_buy ? get(9) : get(8);
20
+ }
21
+ if (!e.token_program || e.token_program === zero) {
22
+ e.token_program = e.is_buy ? get(8) : get(9);
23
+ }
24
+ const a17 = get(16);
25
+ if (a17 !== zero)
26
+ e.account = a17;
27
+ }
28
+ function fillPumpfunCreateAccounts(e, get) {
29
+ const zero = Z();
30
+ if (!e.mint || e.mint === zero)
31
+ e.mint = get(0);
32
+ if (!e.bonding_curve || e.bonding_curve === zero)
33
+ e.bonding_curve = get(2);
34
+ if (!e.user || e.user === zero)
35
+ e.user = get(7);
36
+ }
37
+ function fillPumpfunCreateV2Accounts(e, get) {
38
+ const zero = Z();
39
+ if (!e.mint || e.mint === zero)
40
+ e.mint = get(0);
41
+ if (!e.bonding_curve || e.bonding_curve === zero)
42
+ e.bonding_curve = get(2);
43
+ if (!e.user || e.user === zero)
44
+ e.user = get(5);
45
+ if (!e.mint_authority || e.mint_authority === zero)
46
+ e.mint_authority = get(1);
47
+ if (!e.associated_bonding_curve || e.associated_bonding_curve === zero) {
48
+ e.associated_bonding_curve = get(3);
49
+ }
50
+ if (!e.global || e.global === zero)
51
+ e.global = get(4);
52
+ if (!e.system_program || e.system_program === zero)
53
+ e.system_program = get(6);
54
+ if (!e.token_program || e.token_program === zero)
55
+ e.token_program = get(7);
56
+ if (!e.associated_token_program || e.associated_token_program === zero) {
57
+ e.associated_token_program = get(8);
58
+ }
59
+ if (!e.mayhem_program_id || e.mayhem_program_id === zero)
60
+ e.mayhem_program_id = get(9);
61
+ if (!e.global_params || e.global_params === zero)
62
+ e.global_params = get(10);
63
+ if (!e.sol_vault || e.sol_vault === zero)
64
+ e.sol_vault = get(11);
65
+ if (!e.mayhem_state || e.mayhem_state === zero)
66
+ e.mayhem_state = get(12);
67
+ if (!e.mayhem_token_vault || e.mayhem_token_vault === zero)
68
+ e.mayhem_token_vault = get(13);
69
+ if (!e.event_authority || e.event_authority === zero)
70
+ e.event_authority = get(14);
71
+ if (!e.program || e.program === zero)
72
+ e.program = get(15);
73
+ }
74
+ /** Migrate:占位,待 IDL 账户映射 */
75
+ function fillPumpfunMigrateAccounts(_e, _get) { }
@@ -0,0 +1,10 @@
1
+ /** PumpSwap 账户填充 */
2
+ import type { PumpSwapBuyEvent, PumpSwapCreatePoolEvent, PumpSwapLiquidityAdded, PumpSwapLiquidityRemoved, PumpSwapSellEvent, PumpSwapTradeEvent } from "./dex_event.js";
3
+ export declare function fillPumpswapBuyAccounts(e: PumpSwapBuyEvent, get: (i: number) => string): void;
4
+ export declare function fillPumpswapSellAccounts(e: PumpSwapSellEvent, get: (i: number) => string): void;
5
+ export declare function fillPumpswapCreatePoolAccounts(e: PumpSwapCreatePoolEvent, get: (i: number) => string): void;
6
+ /** PumpSwapTrade:字段已由事件数据解析,不从账户表补 */
7
+ export declare function fillPumpswapTradeAccounts(_e: PumpSwapTradeEvent, _get: (i: number) => string): void;
8
+ /** 加/减流动性:占位(字段来自事件数据) */
9
+ export declare function fillPumpswapLiquidityAddedAccounts(_e: PumpSwapLiquidityAdded, _get: (i: number) => string): void;
10
+ export declare function fillPumpswapLiquidityRemovedAccounts(_e: PumpSwapLiquidityRemoved, _get: (i: number) => string): void;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fillPumpswapBuyAccounts = fillPumpswapBuyAccounts;
4
+ exports.fillPumpswapSellAccounts = fillPumpswapSellAccounts;
5
+ exports.fillPumpswapCreatePoolAccounts = fillPumpswapCreatePoolAccounts;
6
+ exports.fillPumpswapTradeAccounts = fillPumpswapTradeAccounts;
7
+ exports.fillPumpswapLiquidityAddedAccounts = fillPumpswapLiquidityAddedAccounts;
8
+ exports.fillPumpswapLiquidityRemovedAccounts = fillPumpswapLiquidityRemovedAccounts;
9
+ const dex_event_js_1 = require("./dex_event.js");
10
+ const Z = () => (0, dex_event_js_1.defaultPubkey)();
11
+ function fillPumpswapTradeCommon(e, get) {
12
+ const zero = Z();
13
+ if (!e.pool || e.pool === zero)
14
+ e.pool = get(0);
15
+ if (!e.user || e.user === zero)
16
+ e.user = get(1);
17
+ if (!e.base_mint || e.base_mint === zero)
18
+ e.base_mint = get(3);
19
+ if (!e.quote_mint || e.quote_mint === zero)
20
+ e.quote_mint = get(4);
21
+ if (!e.user_base_token_account || e.user_base_token_account === zero) {
22
+ e.user_base_token_account = get(5);
23
+ }
24
+ if (!e.user_quote_token_account || e.user_quote_token_account === zero) {
25
+ e.user_quote_token_account = get(6);
26
+ }
27
+ if (!e.pool_base_token_account || e.pool_base_token_account === zero) {
28
+ e.pool_base_token_account = get(7);
29
+ }
30
+ if (!e.pool_quote_token_account || e.pool_quote_token_account === zero) {
31
+ e.pool_quote_token_account = get(8);
32
+ }
33
+ if (!e.protocol_fee_recipient || e.protocol_fee_recipient === zero) {
34
+ e.protocol_fee_recipient = get(9);
35
+ }
36
+ if (!e.protocol_fee_recipient_token_account || e.protocol_fee_recipient_token_account === zero) {
37
+ e.protocol_fee_recipient_token_account = get(10);
38
+ }
39
+ if (!e.base_token_program || e.base_token_program === zero)
40
+ e.base_token_program = get(11);
41
+ if (!e.quote_token_program || e.quote_token_program === zero)
42
+ e.quote_token_program = get(12);
43
+ if (!e.coin_creator_vault_ata || e.coin_creator_vault_ata === zero)
44
+ e.coin_creator_vault_ata = get(17);
45
+ if (!e.coin_creator_vault_authority || e.coin_creator_vault_authority === zero) {
46
+ e.coin_creator_vault_authority = get(18);
47
+ }
48
+ }
49
+ function fillPumpswapBuyAccounts(e, get) {
50
+ fillPumpswapTradeCommon(e, get);
51
+ }
52
+ function fillPumpswapSellAccounts(e, get) {
53
+ fillPumpswapTradeCommon(e, get);
54
+ }
55
+ function fillPumpswapCreatePoolAccounts(e, get) {
56
+ const zero = Z();
57
+ if (!e.pool || e.pool === zero)
58
+ e.pool = get(0);
59
+ if (!e.creator || e.creator === zero)
60
+ e.creator = get(2);
61
+ if (!e.base_mint || e.base_mint === zero)
62
+ e.base_mint = get(3);
63
+ if (!e.quote_mint || e.quote_mint === zero)
64
+ e.quote_mint = get(4);
65
+ if (!e.lp_mint || e.lp_mint === zero)
66
+ e.lp_mint = get(5);
67
+ if (!e.user_base_token_account || e.user_base_token_account === zero) {
68
+ e.user_base_token_account = get(6);
69
+ }
70
+ if (!e.user_quote_token_account || e.user_quote_token_account === zero) {
71
+ e.user_quote_token_account = get(7);
72
+ }
73
+ }
74
+ /** PumpSwapTrade:字段已由事件数据解析,不从账户表补 */
75
+ function fillPumpswapTradeAccounts(_e, _get) { }
76
+ /** 加/减流动性:占位(字段来自事件数据) */
77
+ function fillPumpswapLiquidityAddedAccounts(_e, _get) { }
78
+ function fillPumpswapLiquidityRemovedAccounts(_e, _get) { }
@@ -0,0 +1,20 @@
1
+ /** Raydium CLMM / CPMM / AMM V4 账户填充(字符串公钥) */
2
+ import type { RaydiumAmmV4DepositEvent, RaydiumAmmV4SwapEvent, RaydiumAmmV4WithdrawEvent, RaydiumClmmClosePositionEvent, RaydiumClmmCreatePoolEvent, RaydiumClmmDecreaseLiquidityEvent, RaydiumClmmIncreaseLiquidityEvent, RaydiumClmmOpenPositionEvent, RaydiumClmmOpenPositionWithTokenExtNftEvent, RaydiumClmmSwapEvent, RaydiumCpmmDepositEvent, RaydiumCpmmInitializeEvent, RaydiumCpmmSwapEvent, RaydiumCpmmWithdrawEvent } from "./dex_event.js";
3
+ export declare function fillRaydiumClmmSwapAccounts(e: RaydiumClmmSwapEvent, get: (i: number) => string): void;
4
+ export declare function fillRaydiumClmmCreatePoolAccounts(e: RaydiumClmmCreatePoolEvent, get: (i: number) => string): void;
5
+ export declare function fillRaydiumClmmOpenPositionAccounts(e: RaydiumClmmOpenPositionEvent, get: (i: number) => string): void;
6
+ /**
7
+ * `fill_clmm_open_position_accounts` 账户索引相同(openPosition / token-ext 变体共用 IDL 布局)。
8
+ * 参考实现未对该 `DexEvent` 变体做账户调度;本包在 RPC 路径补全。
9
+ */
10
+ export declare function fillRaydiumClmmOpenPositionWithTokenExtNftAccounts(e: RaydiumClmmOpenPositionWithTokenExtNftEvent, get: (i: number) => string): void;
11
+ export declare function fillRaydiumClmmClosePositionAccounts(e: RaydiumClmmClosePositionEvent, get: (i: number) => string): void;
12
+ export declare function fillRaydiumClmmIncreaseLiquidityAccounts(e: RaydiumClmmIncreaseLiquidityEvent, get: (i: number) => string): void;
13
+ export declare function fillRaydiumClmmDecreaseLiquidityAccounts(e: RaydiumClmmDecreaseLiquidityEvent, get: (i: number) => string): void;
14
+ export declare function fillRaydiumCpmmSwapAccounts(_e: RaydiumCpmmSwapEvent, _get: (i: number) => string): void;
15
+ export declare function fillRaydiumCpmmDepositAccounts(e: RaydiumCpmmDepositEvent, get: (i: number) => string): void;
16
+ export declare function fillRaydiumCpmmWithdrawAccounts(e: RaydiumCpmmWithdrawEvent, get: (i: number) => string): void;
17
+ export declare function fillRaydiumCpmmInitializeAccounts(e: RaydiumCpmmInitializeEvent, get: (i: number) => string): void;
18
+ export declare function fillRaydiumAmmV4SwapAccounts(e: RaydiumAmmV4SwapEvent, get: (i: number) => string): void;
19
+ export declare function fillRaydiumAmmV4DepositAccounts(e: RaydiumAmmV4DepositEvent, get: (i: number) => string): void;
20
+ export declare function fillRaydiumAmmV4WithdrawAccounts(e: RaydiumAmmV4WithdrawEvent, get: (i: number) => string): void;