@aiaiaichain/agent 0.1.5 → 0.1.7
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/dist/api/ExtensionAPI.d.ts +0 -1
- package/dist/api/ExtensionAPI.js +3 -7
- package/dist/api/Registry.d.ts +0 -1
- package/dist/api/Registry.js +54 -57
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +684 -685
- package/dist/core/AgentDir.d.ts +1 -1
- package/dist/core/AgentDir.js +45 -39
- package/dist/core/ChainConfig.d.ts +0 -1
- package/dist/core/ChainConfig.js +51 -55
- package/dist/core/EnvLoader.d.ts +4 -1
- package/dist/core/EnvLoader.js +97 -84
- package/dist/core/SystemMonitor.d.ts +0 -1
- package/dist/core/SystemMonitor.js +72 -85
- package/dist/index.d.ts +0 -1
- package/dist/index.js +19 -26
- package/dist/loader.d.ts +0 -1
- package/dist/loader.js +64 -67
- package/dist/mcp/entry.d.ts +0 -1
- package/dist/mcp/entry.js +3 -6
- package/dist/mcp/server.d.ts +0 -1
- package/dist/mcp/server.js +152 -156
- package/dist/models/CostTracker.d.ts +0 -1
- package/dist/models/CostTracker.js +58 -61
- package/dist/models/ModelRegistry.d.ts +0 -1
- package/dist/models/ModelRegistry.js +195 -155
- package/dist/providers/ProviderRegistry.d.ts +0 -1
- package/dist/providers/ProviderRegistry.js +33 -36
- package/dist/runner/AgentRunner.d.ts +0 -1
- package/dist/runner/AgentRunner.js +180 -184
- package/dist/runner/ModelClient.d.ts +0 -1
- package/dist/runner/ModelClient.js +133 -134
- package/dist/runner/SwarmRouter.d.ts +0 -1
- package/dist/runner/SwarmRouter.js +18 -22
- package/dist/runner/ToolDispatcher.d.ts +0 -1
- package/dist/runner/ToolDispatcher.js +30 -33
- package/dist/scheduler/AgentScheduler.d.ts +0 -1
- package/dist/scheduler/AgentScheduler.js +99 -103
- package/dist/session/ContextStore.d.ts +1 -1
- package/dist/session/ContextStore.js +76 -78
- package/dist/session/GoalManager.d.ts +0 -1
- package/dist/session/GoalManager.js +96 -100
- package/dist/session/MemoryStore.d.ts +2 -1
- package/dist/session/MemoryStore.js +108 -87
- package/dist/session/SessionManager.d.ts +5 -4
- package/dist/session/SessionManager.js +83 -62
- package/dist/session/SessionStore.d.ts +0 -1
- package/dist/session/SessionStore.js +112 -116
- package/dist/setup/SetupWizard.d.ts +0 -1
- package/dist/setup/SetupWizard.js +61 -64
- package/dist/tools/CrossTools.d.ts +0 -1
- package/dist/tools/CrossTools.js +140 -144
- package/dist/tools/GmgnIntegration.d.ts +0 -1
- package/dist/tools/GmgnIntegration.js +220 -230
- package/dist/tools/MarketSentiment.d.ts +0 -1
- package/dist/tools/MarketSentiment.js +213 -195
- package/dist/tools/NewsSentiment.d.ts +0 -1
- package/dist/tools/NewsSentiment.js +126 -130
- package/dist/tools/PriceFeed.d.ts +6 -1
- package/dist/tools/PriceFeed.js +201 -133
- package/dist/tools/TechnicalAnalysis.d.ts +1 -2
- package/dist/tools/TechnicalAnalysis.js +248 -216
- package/dist/tools/TechnicalAnalysis.worker.d.ts +25 -0
- package/dist/tools/TechnicalAnalysis.worker.js +92 -0
- package/dist/tools/TokenCalendar.d.ts +0 -1
- package/dist/tools/TokenCalendar.js +63 -68
- package/dist/tools/TokenSecurityScanner.d.ts +0 -1
- package/dist/tools/TokenSecurityScanner.js +93 -96
- package/dist/tools/TransactionSim.d.ts +0 -1
- package/dist/tools/TransactionSim.js +65 -71
- package/dist/tui/App.d.ts +0 -1
- package/dist/tui/App.js +895 -824
- package/dist/tui/ModelSelector.d.ts +0 -1
- package/dist/tui/ModelSelector.js +46 -49
- package/dist/tui/REPL.d.ts +0 -1
- package/dist/tui/REPL.js +222 -210
- package/dist/tui/Sparkline.d.ts +0 -1
- package/dist/tui/Sparkline.js +36 -37
- package/dist/tui/StatusBar.d.ts +0 -1
- package/dist/tui/StatusBar.js +9 -10
- package/dist/tui/ThemePresets.d.ts +0 -1
- package/dist/tui/ThemePresets.js +99 -103
- package/dist/tui/theme.d.ts +0 -1
- package/dist/tui/theme.js +50 -31
- package/dist/util/clipboard.d.ts +0 -1
- package/dist/util/clipboard.js +16 -20
- package/dist/util/commandSuggest.d.ts +0 -1
- package/dist/util/commandSuggest.js +34 -38
- package/dist/util/confirmation.d.ts +0 -1
- package/dist/util/confirmation.js +8 -11
- package/dist/util/errorHandler.d.ts +0 -1
- package/dist/util/errorHandler.js +20 -23
- package/dist/util/errors.d.ts +59 -0
- package/dist/util/errors.js +93 -0
- package/dist/util/logger.d.ts +0 -1
- package/dist/util/logger.js +30 -33
- package/dist/util/processManager.d.ts +0 -1
- package/dist/util/processManager.js +33 -36
- package/dist/util/resilientFetch.d.ts +6 -1
- package/dist/util/resilientFetch.js +134 -80
- package/dist/util/responseCache.d.ts +0 -1
- package/dist/util/responseCache.js +36 -45
- package/dist/util/rpc.d.ts +16 -0
- package/dist/util/rpc.js +69 -0
- package/dist/util/safeLog.d.ts +0 -1
- package/dist/util/safeLog.js +52 -53
- package/dist/util/scheduler.d.ts +0 -1
- package/dist/util/scheduler.js +53 -58
- package/dist/util/webhooks.d.ts +0 -1
- package/dist/util/webhooks.js +54 -58
- package/dist/wallet/ActionFeed.d.ts +3 -3
- package/dist/wallet/ActionFeed.js +189 -187
- package/dist/wallet/AgentWallet.d.ts +9 -7
- package/dist/wallet/AgentWallet.js +121 -141
- package/dist/wallet/ProfitTracker.d.ts +0 -1
- package/dist/wallet/ProfitTracker.js +71 -74
- package/package.json +12 -7
- package/scripts/build-esbuild.mjs +40 -0
- package/scripts/bundle-dts.mjs +58 -0
- package/scripts/minify.mjs +44 -0
- package/scripts/postinstall.js +27 -0
|
@@ -1,220 +1,238 @@
|
|
|
1
|
-
|
|
2
|
-
* MarketSentiment — free market sentiment data tools.
|
|
3
|
-
* Fear & Greed Index, Binance Funding Rates, BTC Mempool, DeFi TVL, Solana Stats.
|
|
4
|
-
*/
|
|
1
|
+
|
|
5
2
|
import { Type } from "@sinclair/typebox";
|
|
6
3
|
import { resilientFetch } from "../util/resilientFetch.js";
|
|
7
4
|
import { logger } from "../util/logger.js";
|
|
8
|
-
|
|
5
|
+
|
|
6
|
+
const ttlCache = new Map();
|
|
7
|
+
const TTL_MS = 30_000;
|
|
8
|
+
function getCached(key) {
|
|
9
|
+
const e = ttlCache.get(key);
|
|
10
|
+
if (!e)
|
|
11
|
+
return undefined;
|
|
12
|
+
if (Date.now() > e.expires) {
|
|
13
|
+
ttlCache.delete(key);
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
return e.data;
|
|
17
|
+
}
|
|
18
|
+
function setCached(key, data) {
|
|
19
|
+
ttlCache.set(key, { data, expires: Date.now() + TTL_MS });
|
|
20
|
+
}
|
|
21
|
+
|
|
9
22
|
export const fearGreedParams = Type.Object({});
|
|
10
23
|
export async function getFearGreedTool() {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
|
|
25
|
+
const cached = getCached("fear_greed");
|
|
26
|
+
if (cached)
|
|
27
|
+
return cached;
|
|
28
|
+
try {
|
|
29
|
+
const response = await resilientFetch("https://api.alternative.me/fng/?limit=7", { timeout: 10_000, retries: 1 });
|
|
30
|
+
if (!response.ok)
|
|
31
|
+
return fallbackFearGreed();
|
|
32
|
+
const data = await response.json();
|
|
33
|
+
const items = data.data ?? [];
|
|
34
|
+
const current = items[0];
|
|
35
|
+
const lines = items.map((i, idx) => {
|
|
36
|
+
const label = idx === 0 ? "Now" : i.timestamp ? new Date(parseInt(i.timestamp) * 1000).toLocaleDateString() : `${idx}d ago`;
|
|
37
|
+
return ` ${i.value_classification} ${i.value}/100 — ${label}`;
|
|
38
|
+
});
|
|
39
|
+
const result = {
|
|
40
|
+
content: [{
|
|
41
|
+
type: "text",
|
|
42
|
+
text: [
|
|
43
|
+
`Fear & Greed Index`,
|
|
44
|
+
`Current: ${current?.value_classification ?? "N/A"} (${current?.value ?? "?"}/100)`,
|
|
45
|
+
...lines,
|
|
46
|
+
].join("\n"),
|
|
47
|
+
}],
|
|
48
|
+
};
|
|
49
|
+
setCached("fear_greed", result);
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
logger.warn('MarketSentiment', 'Fear & Greed fetch failed', { error: error.message });
|
|
54
|
+
return fallbackFearGreed();
|
|
55
|
+
}
|
|
37
56
|
}
|
|
38
57
|
async function fallbackFearGreed() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
58
|
+
return {
|
|
59
|
+
content: [{
|
|
60
|
+
type: "text",
|
|
61
|
+
text: "Fear & Greed Index: Neutral (50/100) — data unavailable",
|
|
62
|
+
}],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
47
66
|
export const fundingRatesParams = Type.Object({
|
|
48
|
-
|
|
67
|
+
limit: Type.Optional(Type.Number({ description: "Number of top pairs", default: 10 })),
|
|
49
68
|
});
|
|
50
69
|
export async function getFundingRatesTool(_id, params) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
const limit = params.limit || 10;
|
|
71
|
+
try {
|
|
72
|
+
const response = await resilientFetch("https://fapi.binance.com/fapi/v1/premiumIndex", { timeout: 10_000, retries: 1 });
|
|
73
|
+
if (!response.ok)
|
|
74
|
+
return fallbackFundingRates();
|
|
75
|
+
const data = await response.json();
|
|
76
|
+
const sorted = (data ?? [])
|
|
77
|
+
.filter(d => parseFloat(d.lastFundingRate) !== 0)
|
|
78
|
+
.sort((a, b) => Math.abs(parseFloat(b.lastFundingRate)) - Math.abs(parseFloat(a.lastFundingRate)))
|
|
79
|
+
.slice(0, limit);
|
|
80
|
+
const lines = sorted.map(d => {
|
|
81
|
+
const rate = parseFloat(d.lastFundingRate) * 100;
|
|
82
|
+
const sign = rate > 0 ? "+" : "";
|
|
83
|
+
return ` ${d.symbol.padEnd(12)} ${sign}${rate.toFixed(4)}%`;
|
|
84
|
+
});
|
|
85
|
+
return {
|
|
86
|
+
content: [{
|
|
87
|
+
type: "text",
|
|
88
|
+
text: [`Funding Rates (top ${limit} by absolute value):`, ...lines].join("\n"),
|
|
89
|
+
}],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
logger.warn('MarketSentiment', 'Funding rates fetch failed', { error: error.message });
|
|
94
|
+
return fallbackFundingRates();
|
|
95
|
+
}
|
|
77
96
|
}
|
|
78
97
|
async function fallbackFundingRates() {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
98
|
+
return {
|
|
99
|
+
content: [{
|
|
100
|
+
type: "text",
|
|
101
|
+
text: "Funding Rates: Data temporarily unavailable.",
|
|
102
|
+
}],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
87
106
|
export const btcMempoolParams = Type.Object({});
|
|
88
107
|
export async function getBtcMempoolTool() {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
|
|
108
|
+
try {
|
|
109
|
+
const [feeResp, mempoolResp] = await Promise.all([
|
|
110
|
+
resilientFetch("https://mempool.space/api/v1/fees/recommended", { timeout: 10_000 }),
|
|
111
|
+
resilientFetch("https://mempool.space/api/mempool", { timeout: 10_000 }),
|
|
112
|
+
]);
|
|
113
|
+
const fees = await feeResp.json();
|
|
114
|
+
const mempool = await mempoolResp.json();
|
|
115
|
+
return {
|
|
116
|
+
content: [{
|
|
117
|
+
type: "text",
|
|
118
|
+
text: [
|
|
119
|
+
`BTC Mempool`,
|
|
120
|
+
`Count: ${(mempool.count ?? 0).toLocaleString()} transactions`,
|
|
121
|
+
`Mempool size: ${((mempool.vsize ?? 0) / 1_000_000).toFixed(2)} MB`,
|
|
122
|
+
``,
|
|
123
|
+
`Fees (sat/vB):`,
|
|
124
|
+
` Fastest: ${fees.fastestFee}`,
|
|
125
|
+
` Half hour: ${fees.halfHourFee}`,
|
|
126
|
+
` Hour: ${fees.hourFee}`,
|
|
127
|
+
` Economy: ${fees.economyFee}`,
|
|
128
|
+
` Minimum: ${fees.minimumFee}`,
|
|
129
|
+
].join("\n"),
|
|
130
|
+
}],
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
logger.warn('MarketSentiment', 'BTC mempool fetch failed', { error: error.message });
|
|
135
|
+
return {
|
|
136
|
+
content: [{ type: "text", text: "BTC Mempool: Data temporarily unavailable." }],
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
122
141
|
export const defiTvlParams = Type.Object({
|
|
123
|
-
|
|
142
|
+
chain: Type.Optional(Type.String({ description: "Chain name (e.g., solana, ethereum) or omit for all" })),
|
|
124
143
|
});
|
|
125
144
|
export async function getDefiTvlTool(_id, params) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
145
|
+
const chain = params.chain?.toLowerCase();
|
|
146
|
+
try {
|
|
147
|
+
if (chain) {
|
|
148
|
+
const response = await resilientFetch(`https://api.llama.fi/v2/historicalChainTvl/${chain}`, { timeout: 10_000 });
|
|
149
|
+
if (!response.ok)
|
|
150
|
+
return fallbackTvl(chain);
|
|
151
|
+
const data = await response.json();
|
|
152
|
+
const latest = data[data.length - 1];
|
|
153
|
+
return {
|
|
154
|
+
content: [{
|
|
155
|
+
type: "text",
|
|
156
|
+
text: `DeFi TVL — ${chain.toUpperCase()}\nTVL: $${(latest?.tvl ?? 0).toLocaleString(undefined, { maximumFractionDigits: 0 })}`,
|
|
157
|
+
}],
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
const response = await resilientFetch("https://api.llama.fi/v2/chains", { timeout: 10_000 });
|
|
162
|
+
if (!response.ok)
|
|
163
|
+
return fallbackTvl("all");
|
|
164
|
+
const data = await response.json();
|
|
165
|
+
const sorted = (data ?? []).sort((a, b) => b.tvl - a.tvl).slice(0, 15);
|
|
166
|
+
const lines = sorted.map(d => ` ${d.name.padEnd(16)} $${(d.tvl / 1e9).toFixed(2)}B`);
|
|
167
|
+
return {
|
|
168
|
+
content: [{
|
|
169
|
+
type: "text",
|
|
170
|
+
text: [`DeFi TVL by Chain (top 15):`, ...lines].join("\n"),
|
|
171
|
+
}],
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
logger.warn('MarketSentiment', 'DeFi TVL fetch failed', { chain, error: error.message });
|
|
177
|
+
return fallbackTvl(chain ?? "all");
|
|
178
|
+
}
|
|
160
179
|
}
|
|
161
180
|
async function fallbackTvl(chain) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
181
|
+
return {
|
|
182
|
+
content: [{ type: "text", text: `DeFi TVL for "${chain}": Data temporarily unavailable.` }],
|
|
183
|
+
};
|
|
165
184
|
}
|
|
166
|
-
|
|
185
|
+
|
|
167
186
|
export const solanaStatsParams = Type.Object({});
|
|
168
187
|
export async function getSolanaStatsTool() {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
188
|
+
try {
|
|
189
|
+
|
|
190
|
+
const rpcUrl = process.env.SOLANA_RPC_URL || "https://api.mainnet-beta.solana.com";
|
|
191
|
+
const body = JSON.stringify({
|
|
192
|
+
jsonrpc: "2.0", id: 1,
|
|
193
|
+
method: "getEpochInfo",
|
|
194
|
+
params: [],
|
|
195
|
+
});
|
|
196
|
+
const response = await resilientFetch(rpcUrl, {
|
|
197
|
+
timeout: 10_000,
|
|
198
|
+
retries: 1,
|
|
199
|
+
method: "POST",
|
|
200
|
+
headers: { "Content-Type": "application/json" },
|
|
201
|
+
body,
|
|
202
|
+
});
|
|
203
|
+
if (!response.ok)
|
|
204
|
+
return fallbackSolanaStats();
|
|
205
|
+
const data = await response.json();
|
|
206
|
+
const epoch = data.result;
|
|
207
|
+
const epochProgress = ((epoch.slotIndex / epoch.slotsInEpoch) * 100).toFixed(1);
|
|
208
|
+
|
|
209
|
+
const priceResp = await resilientFetch("https://api.coingecko.com/api/v3/simple/price?ids=solana&vs_currencies=usd&include_24hr_change=true", { timeout: 8_000 });
|
|
210
|
+
let solPrice = "";
|
|
211
|
+
if (priceResp.ok) {
|
|
212
|
+
const priceData = await priceResp.json();
|
|
213
|
+
solPrice = `$${priceData.solana.usd.toFixed(2)}`;
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
content: [{
|
|
217
|
+
type: "text",
|
|
218
|
+
text: [
|
|
219
|
+
`Solana Network`,
|
|
220
|
+
`Epoch: ${epoch.epoch}`,
|
|
221
|
+
`Slot: ${epoch.absoluteSlot.toLocaleString()}`,
|
|
222
|
+
`Block: ${epoch.blockHeight.toLocaleString()}`,
|
|
223
|
+
`Progress: ${epochProgress}% (${epoch.slotIndex.toLocaleString()}/${epoch.slotsInEpoch.toLocaleString()})`,
|
|
224
|
+
solPrice ? `SOL Price: ${solPrice}` : "",
|
|
225
|
+
].filter(Boolean).join("\n"),
|
|
226
|
+
}],
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
logger.warn('MarketSentiment', 'Solana stats fetch failed', { error: error.message });
|
|
231
|
+
return fallbackSolanaStats();
|
|
232
|
+
}
|
|
214
233
|
}
|
|
215
234
|
async function fallbackSolanaStats() {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
235
|
+
return {
|
|
236
|
+
content: [{ type: "text", text: "Solana Stats: Data temporarily unavailable. Check your RPC endpoint." }],
|
|
237
|
+
};
|
|
219
238
|
}
|
|
220
|
-
//# sourceMappingURL=MarketSentiment.js.map
|