solana-agent-kit-plugin-madeonsol 1.7.2 → 1.8.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/dist/index.js CHANGED
@@ -1,89 +1,364 @@
1
- import { kolFeedAction } from "./actions/kolFeed.js";
2
- import { kolCoordinationAction } from "./actions/kolCoordination.js";
3
- import { kolLeaderboardAction } from "./actions/kolLeaderboard.js";
4
- import { deployerAlertsAction } from "./actions/deployerAlerts.js";
5
- import { kolPnlAction } from "./actions/kolPnl.js";
6
- import { kolTrendingTokensAction } from "./actions/kolTrendingTokens.js";
7
- import { walletTrackerWatchlistAction, walletTrackerAddAction, walletTrackerRemoveAction, walletTrackerTradesAction, walletTrackerSummaryAction } from "./actions/walletTracker.js";
8
- import { kolTokenEntryOrderAction } from "./actions/kolTokenEntryOrder.js";
9
- import { kolCompareAction } from "./actions/kolCompare.js";
10
- import { kolAlertsRecentAction } from "./actions/kolAlertsRecent.js";
11
- import { kolFirstTouchesAction } from "./actions/kolFirstTouches.js";
12
- import { meAction } from "./actions/me.js";
13
- import { tokensListAction } from "./actions/tokensList.js";
14
- import { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, kolPnl, kolTrendingTokens, kolTokenEntryOrder, kolCompare, kolAlertsRecent, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken, walletTrackerWatchlist, walletTrackerAdd, walletTrackerRemove, walletTrackerTrades, walletTrackerSummary, alphaLeaderboard, alphaWallet, alphaLinked, tokenCapTable, tokenBuyerQuality, copyTradeList, copyTradeCreate, copyTradeGet, copyTradeUpdate, copyTradeDelete, copyTradeSignals, coordinationAlertsList, coordinationAlertsCreate, coordinationAlertsGet, coordinationAlertsUpdate, coordinationAlertsDelete, kolFirstTouches, firstTouchSubscriptionsList, firstTouchSubscriptionsCreate, firstTouchSubscriptionsGet, firstTouchSubscriptionsUpdate, firstTouchSubscriptionsDelete, me, tokensList, } from "./tools/index.js";
15
- const MadeOnSolPlugin = {
16
- name: "madeonsol",
17
- methods: {
18
- kolFeed,
19
- kolCoordination,
20
- kolLeaderboard,
21
- deployerAlerts,
22
- kolPnl,
23
- kolTrendingTokens,
24
- kolTokenEntryOrder,
25
- kolCompare,
26
- kolAlertsRecent,
27
- createWebhook,
28
- listWebhooks,
29
- deleteWebhook,
30
- testWebhook,
31
- getStreamToken,
32
- walletTrackerWatchlist,
33
- walletTrackerAdd,
34
- walletTrackerRemove,
35
- walletTrackerTrades,
36
- walletTrackerSummary,
37
- alphaLeaderboard,
38
- alphaWallet,
39
- alphaLinked,
40
- tokenCapTable,
41
- tokenBuyerQuality,
42
- copyTradeList,
43
- copyTradeCreate,
44
- copyTradeGet,
45
- copyTradeUpdate,
46
- copyTradeDelete,
47
- copyTradeSignals,
48
- coordinationAlertsList,
49
- coordinationAlertsCreate,
50
- coordinationAlertsGet,
51
- coordinationAlertsUpdate,
52
- coordinationAlertsDelete,
53
- kolFirstTouches,
54
- firstTouchSubscriptionsList,
55
- firstTouchSubscriptionsCreate,
56
- firstTouchSubscriptionsGet,
57
- firstTouchSubscriptionsUpdate,
58
- firstTouchSubscriptionsDelete,
59
- me,
60
- tokensList,
61
- },
62
- actions: [
63
- kolFeedAction,
64
- kolCoordinationAction,
65
- kolLeaderboardAction,
66
- deployerAlertsAction,
67
- kolPnlAction,
68
- kolTrendingTokensAction,
69
- kolTokenEntryOrderAction,
70
- kolCompareAction,
71
- kolAlertsRecentAction,
72
- kolFirstTouchesAction,
73
- walletTrackerWatchlistAction,
74
- walletTrackerAddAction,
75
- walletTrackerRemoveAction,
76
- walletTrackerTradesAction,
77
- walletTrackerSummaryAction,
78
- meAction,
79
- tokensListAction,
80
- ],
81
- initialize(_agent) {
82
- // No-op — payment setup is lazy in tool functions
83
- },
84
- };
85
- export default MadeOnSolPlugin;
86
- export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, kolPnl, kolTrendingTokens, kolTokenEntryOrder, kolCompare, kolAlertsRecent, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken, walletTrackerWatchlist, walletTrackerAdd, walletTrackerRemove, walletTrackerTrades, walletTrackerSummary, alphaLeaderboard, alphaWallet, alphaLinked, tokenCapTable, tokenBuyerQuality, copyTradeList, copyTradeCreate, copyTradeGet, copyTradeUpdate, copyTradeDelete, copyTradeSignals, coordinationAlertsList, coordinationAlertsCreate, coordinationAlertsGet, coordinationAlertsUpdate, coordinationAlertsDelete, kolFirstTouches, firstTouchSubscriptionsList, firstTouchSubscriptionsCreate, firstTouchSubscriptionsGet, firstTouchSubscriptionsUpdate, firstTouchSubscriptionsDelete, me, tokensList, };
87
- export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction, kolPnlAction, kolTrendingTokensAction, kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, kolFirstTouchesAction };
88
- export { walletTrackerWatchlistAction, walletTrackerAddAction, walletTrackerRemoveAction, walletTrackerTradesAction, walletTrackerSummaryAction };
89
- export { meAction, tokensListAction };
1
+ /**
2
+ * Tool functions pure logic that calls MadeOnSol API.
3
+ * Auth priority: MADEONSOL_API_KEY > SVM_PRIVATE_KEY (x402).
4
+ *
5
+ * v1.0 breaking change: RAPIDAPI_KEY support has been removed
6
+ * (MadeOnSol RapidAPI marketplace was retired 2026-04-19).
7
+ * Get a free `msk_` key at https://madeonsol.com/pricing.
8
+ */
9
+ const BASE_URL = "https://madeonsol.com";
10
+ let _authMode = null;
11
+ let _authHeaders = {};
12
+ let _paidFetch = null;
13
+ /** Most recent rate-limit headers, populated by every successful API request. */
14
+ export let lastRateLimit = {};
15
+ function captureRateLimit(res) {
16
+ lastRateLimit = {
17
+ limit: res.headers.get("X-RateLimit-Limit") ?? undefined,
18
+ remaining: res.headers.get("X-RateLimit-Remaining") ?? undefined,
19
+ reset: res.headers.get("X-RateLimit-Reset") ?? undefined,
20
+ requestId: res.headers.get("X-Request-Id") ?? undefined,
21
+ };
22
+ }
23
+ function getConfig(agent, key) {
24
+ return agent.config?.[key] || agent.config?.OTHER_API_KEYS?.[key];
25
+ }
26
+ export async function initAuth(agent) {
27
+ if (_authMode)
28
+ return;
29
+ const apiKey = getConfig(agent, "MADEONSOL_API_KEY");
30
+ const privateKey = getConfig(agent, "SVM_PRIVATE_KEY");
31
+ if (apiKey) {
32
+ _authMode = "madeonsol";
33
+ _authHeaders = { Authorization: `Bearer ${apiKey}` };
34
+ _paidFetch = fetch;
35
+ console.log("[madeonsol] Using MadeOnSol API key (Bearer auth)");
36
+ }
37
+ else if (privateKey) {
38
+ const { wrapFetchWithPayment } = await import("@x402/fetch");
39
+ const { x402Client } = await import("@x402/core/client");
40
+ const { ExactSvmScheme } = await import("@x402/svm/exact/client");
41
+ const { createKeyPairSignerFromBytes } = await import("@solana/kit");
42
+ const { base58 } = await import("@scure/base");
43
+ const signer = await createKeyPairSignerFromBytes(base58.decode(privateKey));
44
+ const client = new x402Client();
45
+ client.register("solana:*", new ExactSvmScheme(signer));
46
+ _paidFetch = wrapFetchWithPayment(fetch, client);
47
+ _authMode = "x402";
48
+ console.log(`[madeonsol] x402 payments enabled, wallet: ${signer.address}`);
49
+ }
50
+ else {
51
+ _authMode = "none";
52
+ _paidFetch = fetch;
53
+ console.warn("\n[madeonsol] No auth configured — every API call will fail.\n" +
54
+ " → Get a free MADEONSOL_API_KEY (200 req/day, no card) at https://madeonsol.com/pricing\n" +
55
+ " → Or set SVM_PRIVATE_KEY for x402 micropayments.\n");
56
+ }
57
+ }
58
+ /** @deprecated Use initAuth instead */
59
+ export async function initPaidFetch(agent) {
60
+ await initAuth(agent);
61
+ return _paidFetch;
62
+ }
63
+ async function query(path, params) {
64
+ const apiPath = _authMode === "x402" || _authMode === "none"
65
+ ? path
66
+ : path.replace("/api/x402/", "/api/v1/");
67
+ const url = new URL(apiPath, BASE_URL);
68
+ if (params) {
69
+ for (const [k, v] of Object.entries(params)) {
70
+ if (v !== undefined)
71
+ url.searchParams.set(k, String(v));
72
+ }
73
+ }
74
+ const res = _authMode === "x402"
75
+ ? await _paidFetch(url.toString())
76
+ : await fetch(url.toString(), { headers: _authHeaders });
77
+ captureRateLimit(res);
78
+ if (!res.ok) {
79
+ const body = await res.text().catch(() => "");
80
+ throw new Error(`MadeOnSol API error ${res.status}: ${body}`);
81
+ }
82
+ return res.json();
83
+ }
84
+ export async function kolFeed(agent, params = {}) {
85
+ await initAuth(agent);
86
+ return query("/api/x402/kol/feed", params);
87
+ }
88
+ export async function kolCoordination(agent, params = {}) {
89
+ await initAuth(agent);
90
+ const { include_majors, ...rest } = params;
91
+ const flat = { ...rest };
92
+ if (include_majors !== undefined)
93
+ flat.include_majors = include_majors ? "true" : "false";
94
+ return query("/api/x402/kol/coordination", flat);
95
+ }
96
+ export async function kolLeaderboard(agent, params = {}) {
97
+ await initAuth(agent);
98
+ return query("/api/x402/kol/leaderboard", params);
99
+ }
100
+ /**
101
+ * Get Pump.fun deployer alerts with KOL buy enrichment.
102
+ * The `tier` filter (elite/good/moderate/rising/cold) is PRO/ULTRA only —
103
+ * BASIC callers passing it receive HTTP 403.
104
+ */
105
+ export async function deployerAlerts(agent, params = {}) {
106
+ await initAuth(agent);
107
+ return query("/api/x402/deployer-hunter/alerts", params);
108
+ }
109
+ export async function kolPairs(agent, params = {}) {
110
+ await initAuth(agent);
111
+ return query("/api/x402/kol/pairs", params);
112
+ }
113
+ export async function kolHotTokens(agent, params = {}) {
114
+ await initAuth(agent);
115
+ return query("/api/x402/kol/tokens/hot", params);
116
+ }
117
+ export async function kolTrendingTokens(agent, params = {}) {
118
+ await initAuth(agent);
119
+ return query("/api/x402/kol/tokens/trending", params);
120
+ }
121
+ export async function kolTokenEntryOrder(agent, params) {
122
+ await initAuth(agent);
123
+ const { mint, ...rest } = params;
124
+ return query(`/api/x402/kol/tokens/${encodeURIComponent(mint)}/entry-order`, rest);
125
+ }
126
+ export async function kolCompare(agent, params) {
127
+ await initAuth(agent);
128
+ return query("/api/x402/kol/compare", { wallets: params.wallets.join(",") });
129
+ }
130
+ export async function kolAlertsRecent(agent, params = {}) {
131
+ await initAuth(agent);
132
+ const { types, ...rest } = params;
133
+ const flat = { ...rest };
134
+ if (types && types.length > 0)
135
+ flat.types = types.join(",");
136
+ return query("/api/x402/kol/alerts/recent", flat);
137
+ }
138
+ export async function kolPnl(agent, params) {
139
+ const qs = params.period ? `?period=${params.period}` : "";
140
+ return restQuery(agent, "GET", `/kol/${params.wallet}/pnl${qs}`);
141
+ }
142
+ export async function kolTiming(agent, params) {
143
+ const qs = params.period ? `?period=${params.period}` : "";
144
+ return restQuery(agent, "GET", `/kol/${params.wallet}/timing${qs}`);
145
+ }
146
+ export async function deployerTrajectory(agent, params) {
147
+ return restQuery(agent, "GET", `/deployer-hunter/${params.wallet}/trajectory`);
148
+ }
149
+ // ── REST helper (webhooks, streaming, alpha, copy-trade, wallet-tracker) ──
150
+ async function restQuery(agent, method, path, body) {
151
+ await initAuth(agent);
152
+ if (_authMode !== "madeonsol") {
153
+ throw new Error("MadeOnSol API key required for this endpoint. Get a free `msk_` key at madeonsol.com/pricing");
154
+ }
155
+ const res = await fetch(`${BASE_URL}/api/v1${path}`, {
156
+ method,
157
+ headers: {
158
+ "Content-Type": "application/json",
159
+ ..._authHeaders,
160
+ },
161
+ ...(body ? { body: JSON.stringify(body) } : {}),
162
+ });
163
+ captureRateLimit(res);
164
+ if (!res.ok) {
165
+ const text = await res.text().catch(() => "");
166
+ throw new Error(`MadeOnSol API error ${res.status}: ${text}`);
167
+ }
168
+ return res.json();
169
+ }
170
+ export async function createWebhook(agent, params) {
171
+ return restQuery(agent, "POST", "/webhooks", params);
172
+ }
173
+ export async function listWebhooks(agent) {
174
+ return restQuery(agent, "GET", "/webhooks");
175
+ }
176
+ export async function deleteWebhook(agent, params) {
177
+ return restQuery(agent, "DELETE", `/webhooks/${params.id}`);
178
+ }
179
+ export async function testWebhook(agent, params) {
180
+ return restQuery(agent, "POST", "/webhooks/test", params);
181
+ }
182
+ export async function getStreamToken(agent) {
183
+ return restQuery(agent, "POST", "/stream/token");
184
+ }
185
+ // ── Wallet Tracker ──
186
+ export async function walletTrackerWatchlist(agent) {
187
+ return restQuery(agent, "GET", "/wallet-tracker/watchlist");
188
+ }
189
+ export async function walletTrackerAdd(agent, params) {
190
+ return restQuery(agent, "POST", "/wallet-tracker/watchlist", params);
191
+ }
192
+ export async function walletTrackerRemove(agent, params) {
193
+ return restQuery(agent, "DELETE", `/wallet-tracker/watchlist/${encodeURIComponent(params.wallet_address)}`);
194
+ }
195
+ export async function walletTrackerTrades(agent, params = {}) {
196
+ const qs = new URLSearchParams();
197
+ for (const [k, v] of Object.entries(params)) {
198
+ if (v !== undefined)
199
+ qs.set(k, String(v));
200
+ }
201
+ const query = qs.toString() ? `?${qs.toString()}` : "";
202
+ return restQuery(agent, "GET", `/wallet-tracker/trades${query}`);
203
+ }
204
+ export async function walletTrackerSummary(agent, params = {}) {
205
+ const qs = new URLSearchParams();
206
+ if (params.period)
207
+ qs.set("period", params.period);
208
+ if (params.wallet)
209
+ qs.set("wallet", params.wallet);
210
+ const query = qs.toString() ? `?${qs.toString()}` : "";
211
+ return restQuery(agent, "GET", `/wallet-tracker/summary${query}`);
212
+ }
213
+ // ── Universal Wallet Endpoints (PRO+, any wallet — not just curated KOLs) ──
214
+ export async function walletStats(agent, params) {
215
+ return restQuery(agent, "GET", `/wallet/${encodeURIComponent(params.address)}`);
216
+ }
217
+ export async function walletPnl(agent, params) {
218
+ return restQuery(agent, "GET", `/wallet/${encodeURIComponent(params.address)}/pnl`);
219
+ }
220
+ export async function walletPositions(agent, params) {
221
+ return restQuery(agent, "GET", `/wallet/${encodeURIComponent(params.address)}/positions`);
222
+ }
223
+ export async function walletTrades(agent, params) {
224
+ const qs = new URLSearchParams();
225
+ if (params.limit !== undefined)
226
+ qs.set("limit", String(params.limit));
227
+ if (params.cursor)
228
+ qs.set("cursor", params.cursor);
229
+ if (params.action)
230
+ qs.set("action", params.action);
231
+ if (params.token_mint)
232
+ qs.set("token_mint", params.token_mint);
233
+ if (params.since !== undefined)
234
+ qs.set("since", String(params.since));
235
+ if (params.until !== undefined)
236
+ qs.set("until", String(params.until));
237
+ const query = qs.toString() ? `?${qs.toString()}` : "";
238
+ return restQuery(agent, "GET", `/wallet/${encodeURIComponent(params.address)}/trades${query}`);
239
+ }
240
+ // ── Alpha Wallet Intelligence ──
241
+ export async function alphaLeaderboard(agent, params = {}) {
242
+ const qs = new URLSearchParams();
243
+ for (const [k, v] of Object.entries(params)) {
244
+ if (v !== undefined)
245
+ qs.set(k, String(v));
246
+ }
247
+ const query = qs.toString() ? `?${qs.toString()}` : "";
248
+ return restQuery(agent, "GET", `/alpha/leaderboard${query}`);
249
+ }
250
+ export async function alphaWallet(agent, params) {
251
+ return restQuery(agent, "GET", `/alpha/${encodeURIComponent(params.wallet)}`);
252
+ }
253
+ export async function alphaLinked(agent, params) {
254
+ return restQuery(agent, "GET", `/alpha/${encodeURIComponent(params.wallet)}/linked`);
255
+ }
256
+ // ── Token Quality ──
257
+ export async function tokenCapTable(agent, params) {
258
+ return restQuery(agent, "GET", `/tokens/${encodeURIComponent(params.mint)}/cap-table`);
259
+ }
260
+ export async function tokenBuyerQuality(agent, params) {
261
+ return restQuery(agent, "GET", `/tokens/${encodeURIComponent(params.mint)}/buyer-quality`);
262
+ }
263
+ /** Bulk buyer-quality scoring for up to 50 mints. Shares the 5-min LRU cache with the single-mint endpoint. */
264
+ export async function tokenBuyerQualityBatch(agent, params) {
265
+ return restQuery(agent, "POST", "/tokens/batch/buyer-quality", { mints: params.mints });
266
+ }
267
+ // ── Token Intelligence (/token/{mint}) ──
268
+ /** Comprehensive per-mint snapshot: price, MC, 24h volume, deployer reputation, KOL activity, age, blacklist status. */
269
+ export async function tokenGet(agent, params) {
270
+ return restQuery(agent, "GET", `/token/${encodeURIComponent(params.mint)}`);
271
+ }
272
+ /** Bulk token snapshot for up to 50 mints — same per-mint shape as tokenGet(). 10-20× cheaper than N sequential calls. */
273
+ export async function tokenBatch(agent, params) {
274
+ return restQuery(agent, "POST", "/token/batch", { mints: params.mints });
275
+ }
276
+ // ── Copy-Trade Rules (PRO/ULTRA) ──
277
+ export async function copyTradeList(agent) {
278
+ return restQuery(agent, "GET", "/copy-trade/rules");
279
+ }
280
+ export async function copyTradeCreate(agent, params) {
281
+ return restQuery(agent, "POST", "/copy-trade/rules", params);
282
+ }
283
+ export async function copyTradeGet(agent, params) {
284
+ return restQuery(agent, "GET", `/copy-trade/rules/${encodeURIComponent(params.rule_id)}`);
285
+ }
286
+ export async function copyTradeUpdate(agent, params) {
287
+ return restQuery(agent, "PATCH", `/copy-trade/rules/${encodeURIComponent(params.rule_id)}`, params.updates);
288
+ }
289
+ export async function copyTradeDelete(agent, params) {
290
+ return restQuery(agent, "DELETE", `/copy-trade/rules/${encodeURIComponent(params.rule_id)}`);
291
+ }
292
+ // ── Coordination Alerts (PRO/ULTRA, v1.1) ──
293
+ export async function coordinationAlertsList(agent) {
294
+ return restQuery(agent, "GET", "/kol/coordination/alerts");
295
+ }
296
+ export async function coordinationAlertsCreate(agent, params) {
297
+ return restQuery(agent, "POST", "/kol/coordination/alerts", params);
298
+ }
299
+ export async function coordinationAlertsGet(agent, params) {
300
+ return restQuery(agent, "GET", `/kol/coordination/alerts/${encodeURIComponent(params.rule_id)}`);
301
+ }
302
+ export async function coordinationAlertsUpdate(agent, params) {
303
+ return restQuery(agent, "PATCH", `/kol/coordination/alerts/${encodeURIComponent(params.rule_id)}`, params.updates);
304
+ }
305
+ export async function coordinationAlertsDelete(agent, params) {
306
+ return restQuery(agent, "DELETE", `/kol/coordination/alerts/${encodeURIComponent(params.rule_id)}`);
307
+ }
308
+ // ── First-Touch Signal ──
309
+ export async function kolFirstTouches(agent, params = {}) {
310
+ const qs = new URLSearchParams();
311
+ for (const [k, v] of Object.entries(params)) {
312
+ if (v !== undefined)
313
+ qs.set(k, String(v));
314
+ }
315
+ const query = qs.toString() ? `?${qs.toString()}` : "";
316
+ return restQuery(agent, "GET", `/kol/first-touches${query}`);
317
+ }
318
+ export async function firstTouchSubscriptionsList(agent) {
319
+ return restQuery(agent, "GET", "/kol/first-touches/subscriptions");
320
+ }
321
+ export async function firstTouchSubscriptionsCreate(agent, params) {
322
+ return restQuery(agent, "POST", "/kol/first-touches/subscriptions", params);
323
+ }
324
+ export async function firstTouchSubscriptionsGet(agent, params) {
325
+ return restQuery(agent, "GET", `/kol/first-touches/subscriptions/${encodeURIComponent(params.subscription_id)}`);
326
+ }
327
+ export async function firstTouchSubscriptionsUpdate(agent, params) {
328
+ return restQuery(agent, "PATCH", `/kol/first-touches/subscriptions/${encodeURIComponent(params.subscription_id)}`, params.updates);
329
+ }
330
+ export async function firstTouchSubscriptionsDelete(agent, params) {
331
+ return restQuery(agent, "DELETE", `/kol/first-touches/subscriptions/${encodeURIComponent(params.subscription_id)}`);
332
+ }
333
+ // ── Account & Tokens (v1.7) ──
334
+ /** Inspect your MadeOnSol API account — tier, daily/burst quota state, remaining requests, and per-feature usage. */
335
+ export async function me(agent) {
336
+ return restQuery(agent, "GET", "/me");
337
+ }
338
+ /**
339
+ * Filtered, sortable token directory (PRO+).
340
+ * Default `min_liq=2000` skips dust. Supports MC band, liquidity floor,
341
+ * recent-activity window, primary DEX, authority flags, computed 1h volume floor,
342
+ * MEV-share ceiling, MC change deltas.
343
+ */
344
+ export async function tokensList(agent, params = {}) {
345
+ const qs = new URLSearchParams();
346
+ for (const [k, v] of Object.entries(params)) {
347
+ if (v !== undefined)
348
+ qs.set(k, String(v));
349
+ }
350
+ // Default min_liq=2000 skips dust
351
+ if (params.min_liq === undefined)
352
+ qs.set("min_liq", "2000");
353
+ const query = qs.toString() ? `?${qs.toString()}` : "";
354
+ return restQuery(agent, "GET", `/tokens${query}`);
355
+ }
356
+ export async function copyTradeSignals(agent, params = {}) {
357
+ const qs = new URLSearchParams();
358
+ for (const [k, v] of Object.entries(params)) {
359
+ if (v !== undefined)
360
+ qs.set(k, String(v));
361
+ }
362
+ const query = qs.toString() ? `?${qs.toString()}` : "";
363
+ return restQuery(agent, "GET", `/copy-trade/signals${query}`);
364
+ }
@@ -132,6 +132,24 @@ export declare function walletTrackerSummary(agent: Agent, params?: {
132
132
  period?: string;
133
133
  wallet?: string;
134
134
  }): Promise<any>;
135
+ export declare function walletStats(agent: Agent, params: {
136
+ address: string;
137
+ }): Promise<any>;
138
+ export declare function walletPnl(agent: Agent, params: {
139
+ address: string;
140
+ }): Promise<any>;
141
+ export declare function walletPositions(agent: Agent, params: {
142
+ address: string;
143
+ }): Promise<any>;
144
+ export declare function walletTrades(agent: Agent, params: {
145
+ address: string;
146
+ limit?: number;
147
+ cursor?: string;
148
+ action?: "buy" | "sell";
149
+ token_mint?: string;
150
+ since?: number;
151
+ until?: number;
152
+ }): Promise<any>;
135
153
  export declare function alphaLeaderboard(agent: Agent, params?: {
136
154
  limit?: number;
137
155
  min_tokens?: number;
@@ -210,6 +210,33 @@ export async function walletTrackerSummary(agent, params = {}) {
210
210
  const query = qs.toString() ? `?${qs.toString()}` : "";
211
211
  return restQuery(agent, "GET", `/wallet-tracker/summary${query}`);
212
212
  }
213
+ // ── Universal Wallet Endpoints (PRO+, any wallet — not just curated KOLs) ──
214
+ export async function walletStats(agent, params) {
215
+ return restQuery(agent, "GET", `/wallet/${encodeURIComponent(params.address)}`);
216
+ }
217
+ export async function walletPnl(agent, params) {
218
+ return restQuery(agent, "GET", `/wallet/${encodeURIComponent(params.address)}/pnl`);
219
+ }
220
+ export async function walletPositions(agent, params) {
221
+ return restQuery(agent, "GET", `/wallet/${encodeURIComponent(params.address)}/positions`);
222
+ }
223
+ export async function walletTrades(agent, params) {
224
+ const qs = new URLSearchParams();
225
+ if (params.limit !== undefined)
226
+ qs.set("limit", String(params.limit));
227
+ if (params.cursor)
228
+ qs.set("cursor", params.cursor);
229
+ if (params.action)
230
+ qs.set("action", params.action);
231
+ if (params.token_mint)
232
+ qs.set("token_mint", params.token_mint);
233
+ if (params.since !== undefined)
234
+ qs.set("since", String(params.since));
235
+ if (params.until !== undefined)
236
+ qs.set("until", String(params.until));
237
+ const query = qs.toString() ? `?${qs.toString()}` : "";
238
+ return restQuery(agent, "GET", `/wallet/${encodeURIComponent(params.address)}/trades${query}`);
239
+ }
213
240
  // ── Alpha Wallet Intelligence ──
214
241
  export async function alphaLeaderboard(agent, params = {}) {
215
242
  const qs = new URLSearchParams();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solana-agent-kit-plugin-madeonsol",
3
- "version": "1.7.2",
3
+ "version": "1.8.0",
4
4
  "description": "Solana Agent Kit plugin for MadeOnSol — KOL intelligence and deployer analytics via x402 micropayments",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,9 +17,22 @@
17
17
  "keywords": [
18
18
  "solana",
19
19
  "agent-kit",
20
+ "solana-agent-kit",
21
+ "sendaifun",
22
+ "plugin",
23
+ "ai-agent",
20
24
  "x402",
21
25
  "kol",
26
+ "kol-tracker",
22
27
  "trading",
28
+ "memecoin",
29
+ "memecoin-tracker",
30
+ "pumpfun",
31
+ "deployer-hunter",
32
+ "alpha",
33
+ "alpha-bot",
34
+ "smart-money",
35
+ "copy-trading",
23
36
  "madeonsol"
24
37
  ],
25
38
  "license": "MIT",