solana-agent-kit-plugin-madeonsol 0.6.1 → 1.0.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/README.md CHANGED
@@ -13,6 +13,8 @@ Two options (in priority order):
13
13
  | **MadeOnSol API key** (recommended) | `MADEONSOL_API_KEY` | Developers — [get a free key](https://madeonsol.com/developer) |
14
14
  | x402 micropayments | `SVM_PRIVATE_KEY` | AI agents with Solana wallets |
15
15
 
16
+ > **v1.0 breaking change:** RapidAPI auth (`RAPIDAPI_KEY`) has been removed. The MadeOnSol RapidAPI marketplace was retired on 2026-04-19. Get a free `msk_` key at [madeonsol.com/developer](https://madeonsol.com/developer).
17
+
16
18
  ## Install
17
19
 
18
20
  ```bash
@@ -61,6 +63,52 @@ const events = await agent.methods.walletTrackerTrades(agent, { limit: 50 });
61
63
  | `MADEONSOL_WALLET_TRACKER_TRADES_ACTION` | "wallet tracker trades", "watchlist activity" |
62
64
  | `MADEONSOL_WALLET_TRACKER_SUMMARY_ACTION` | "wallet tracker summary", "tracked wallet stats" |
63
65
 
66
+ ## Additional methods (v1.0+)
67
+
68
+ These are exposed via `agent.methods.*` (no LLM action wrappers — call directly):
69
+
70
+ ### Alpha Wallet Intelligence
71
+
72
+ Scored from 47,000+ early-buyer records (wallets seen in the first 20 buyers of Pump.fun tokens).
73
+
74
+ ```ts
75
+ await agent.methods.alphaLeaderboard(agent, { limit: 100 }); // BASIC=25, PRO=100, ULTRA=500
76
+ await agent.methods.alphaWallet(agent, { wallet: "WALLET" }); // ULTRA only — full breakdown + bot signals
77
+ await agent.methods.alphaLinked(agent, { wallet: "WALLET" }); // ULTRA only — co-bought 3+ tokens within 2s
78
+ ```
79
+
80
+ ### Token Quality
81
+
82
+ ```ts
83
+ await agent.methods.tokenCapTable(agent, { mint: "MINT" }); // PRO=10, ULTRA=20 first non-deployer buyers
84
+ await agent.methods.tokenBuyerQuality(agent, { mint: "MINT" }); // 0–100 buyer-quality score (5-min cached)
85
+ ```
86
+
87
+ ### Copy-Trade Rules (PRO/ULTRA)
88
+
89
+ Server-side rules that fire signals when a watched source wallet trades. Delivered via webhook (HMAC-signed) and/or WebSocket.
90
+
91
+ ```ts
92
+ await agent.methods.copyTradeList(agent);
93
+ await agent.methods.copyTradeCreate(agent, {
94
+ name: "Track Whale",
95
+ source_wallet: "WALLET",
96
+ delivery: "webhook",
97
+ webhook_url: "https://you.com/hook",
98
+ });
99
+ await agent.methods.copyTradeSignals(agent, { limit: 50 }); // up to 7 days
100
+ ```
101
+
102
+ ### Rate-limit headers
103
+
104
+ Every successful request populates a module-level `lastRateLimit` (limit / remaining / reset / requestId):
105
+
106
+ ```ts
107
+ import { lastRateLimit } from "solana-agent-kit-plugin-madeonsol";
108
+ await agent.methods.kolFeed(agent, { limit: 10 });
109
+ console.log(lastRateLimit); // { limit: "10000", remaining: "9999", reset: "...", requestId: "..." }
110
+ ```
111
+
64
112
  ## Tiers
65
113
 
66
114
  | Tier | Price | Wallets tracked | Requests/day |
@@ -24,8 +24,8 @@ export declare const deployerAlertsAction: {
24
24
  tier?: "elite" | "good" | "moderate" | "rising" | "cold" | undefined;
25
25
  }, {
26
26
  limit?: number | undefined;
27
- offset?: number | undefined;
28
27
  since?: string | undefined;
28
+ offset?: number | undefined;
29
29
  tier?: "elite" | "good" | "moderate" | "rising" | "cold" | undefined;
30
30
  }>;
31
31
  handler: (agent: unknown, input: {
@@ -0,0 +1,46 @@
1
+ import { z } from "zod";
2
+ export declare const kolAlertsRecentAction: {
3
+ name: string;
4
+ similes: string[];
5
+ description: string;
6
+ examples: {
7
+ input: {
8
+ window: string;
9
+ limit: number;
10
+ };
11
+ output: {
12
+ status: string;
13
+ };
14
+ explanation: string;
15
+ }[][];
16
+ schema: z.ZodObject<{
17
+ window: z.ZodDefault<z.ZodEnum<["5m", "15m", "1h", "6h", "24h"]>>;
18
+ types: z.ZodOptional<z.ZodArray<z.ZodEnum<["consensus_cluster", "fresh_token_kol_buy", "heating_up"]>, "many">>;
19
+ min_severity: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
20
+ limit: z.ZodDefault<z.ZodNumber>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ limit: number;
23
+ window: "24h" | "1h" | "6h" | "5m" | "15m";
24
+ types?: ("consensus_cluster" | "fresh_token_kol_buy" | "heating_up")[] | undefined;
25
+ min_severity?: "low" | "medium" | "high" | undefined;
26
+ }, {
27
+ limit?: number | undefined;
28
+ types?: ("consensus_cluster" | "fresh_token_kol_buy" | "heating_up")[] | undefined;
29
+ window?: "24h" | "1h" | "6h" | "5m" | "15m" | undefined;
30
+ min_severity?: "low" | "medium" | "high" | undefined;
31
+ }>;
32
+ handler: (agent: unknown, input: {
33
+ window?: string;
34
+ types?: string[];
35
+ min_severity?: string;
36
+ limit?: number;
37
+ }) => Promise<{
38
+ status: string;
39
+ result: any;
40
+ message?: undefined;
41
+ } | {
42
+ status: string;
43
+ message: string;
44
+ result?: undefined;
45
+ }>;
46
+ };
@@ -0,0 +1,27 @@
1
+ import { z } from "zod";
2
+ import { kolAlertsRecent } from "../tools/index.js";
3
+ export const kolAlertsRecentAction = {
4
+ name: "MADEONSOL_KOL_ALERTS_RECENT_ACTION",
5
+ similes: ["kol alerts", "recent kol alerts", "kol signals", "live kol feed", "kol events"],
6
+ description: "Live KOL alert feed from MadeOnSol — consensus clusters, fresh-token KOL buys, and heating-up wallets unified into one stream. Sorted by detected_at DESC then severity.",
7
+ examples: [
8
+ [
9
+ { input: { window: "15m", limit: 20 }, output: { status: "success" }, explanation: "Show recent KOL alerts in the last 15 minutes" },
10
+ ],
11
+ ],
12
+ schema: z.object({
13
+ window: z.enum(["5m", "15m", "1h", "6h", "24h"]).default("15m").describe("Lookback window"),
14
+ types: z.array(z.enum(["consensus_cluster", "fresh_token_kol_buy", "heating_up"])).optional().describe("Filter to specific alert types"),
15
+ min_severity: z.enum(["low", "medium", "high"]).optional().describe("Minimum severity to include"),
16
+ limit: z.number().min(1).max(200).default(50).describe("Max alerts"),
17
+ }),
18
+ handler: async (agent, input) => {
19
+ try {
20
+ const data = await kolAlertsRecent(agent, input);
21
+ return { status: "success", result: data };
22
+ }
23
+ catch (err) {
24
+ return { status: "error", message: err.message };
25
+ }
26
+ },
27
+ };
@@ -0,0 +1,33 @@
1
+ import { z } from "zod";
2
+ export declare const kolCompareAction: {
3
+ name: string;
4
+ similes: string[];
5
+ description: string;
6
+ examples: {
7
+ input: {
8
+ wallets: string[];
9
+ };
10
+ output: {
11
+ status: string;
12
+ };
13
+ explanation: string;
14
+ }[][];
15
+ schema: z.ZodObject<{
16
+ wallets: z.ZodArray<z.ZodString, "many">;
17
+ }, "strip", z.ZodTypeAny, {
18
+ wallets: string[];
19
+ }, {
20
+ wallets: string[];
21
+ }>;
22
+ handler: (agent: unknown, input: {
23
+ wallets: string[];
24
+ }) => Promise<{
25
+ status: string;
26
+ result: any;
27
+ message?: undefined;
28
+ } | {
29
+ status: string;
30
+ message: string;
31
+ result?: undefined;
32
+ }>;
33
+ };
@@ -0,0 +1,24 @@
1
+ import { z } from "zod";
2
+ import { kolCompare } from "../tools/index.js";
3
+ export const kolCompareAction = {
4
+ name: "MADEONSOL_KOL_COMPARE_ACTION",
5
+ similes: ["compare kols", "compare wallets", "kol comparison", "side by side kols"],
6
+ description: "Side-by-side comparison of 2-5 Solana KOL wallets on MadeOnSol — strategy, winrates, ROI, PnL percentiles. PRO+ adds overlap tokens (bought by 2+ in last 30d). BASIC=2, PRO=4, ULTRA=5.",
7
+ examples: [
8
+ [
9
+ { input: { wallets: ["WalletA", "WalletB"] }, output: { status: "success" }, explanation: "Compare two KOL wallets side-by-side" },
10
+ ],
11
+ ],
12
+ schema: z.object({
13
+ wallets: z.array(z.string()).min(2).max(5).describe("2-5 wallet addresses"),
14
+ }),
15
+ handler: async (agent, input) => {
16
+ try {
17
+ const data = await kolCompare(agent, input);
18
+ return { status: "success", result: data };
19
+ }
20
+ catch (err) {
21
+ return { status: "error", message: err.message };
22
+ }
23
+ },
24
+ };
@@ -22,8 +22,8 @@ export declare const kolFeedAction: {
22
22
  action?: "buy" | "sell" | undefined;
23
23
  kol?: string | undefined;
24
24
  }, {
25
- action?: "buy" | "sell" | undefined;
26
25
  limit?: number | undefined;
26
+ action?: "buy" | "sell" | undefined;
27
27
  kol?: string | undefined;
28
28
  }>;
29
29
  handler: (agent: unknown, input: {
@@ -0,0 +1,38 @@
1
+ import { z } from "zod";
2
+ export declare const kolTokenEntryOrderAction: {
3
+ name: string;
4
+ similes: string[];
5
+ description: string;
6
+ examples: {
7
+ input: {
8
+ mint: string;
9
+ limit: number;
10
+ };
11
+ output: {
12
+ status: string;
13
+ };
14
+ explanation: string;
15
+ }[][];
16
+ schema: z.ZodObject<{
17
+ mint: z.ZodString;
18
+ limit: z.ZodDefault<z.ZodNumber>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ mint: string;
21
+ limit: number;
22
+ }, {
23
+ mint: string;
24
+ limit?: number | undefined;
25
+ }>;
26
+ handler: (agent: unknown, input: {
27
+ mint: string;
28
+ limit?: number;
29
+ }) => Promise<{
30
+ status: string;
31
+ result: any;
32
+ message?: undefined;
33
+ } | {
34
+ status: string;
35
+ message: string;
36
+ result?: undefined;
37
+ }>;
38
+ };
@@ -0,0 +1,23 @@
1
+ import { z } from "zod";
2
+ import { kolTokenEntryOrder } from "../tools/index.js";
3
+ export const kolTokenEntryOrderAction = {
4
+ name: "MADEONSOL_KOL_TOKEN_ENTRY_ORDER_ACTION",
5
+ similes: ["who bought first", "first kol buyers", "kol entry order", "token entry ranking"],
6
+ description: "Get the ranked order of KOL first-buyers for a specific Solana token. Each entry includes seconds_after_first relative to the first KOL entry. PRO+ adds percentile_pnl_7d per entry.",
7
+ examples: [
8
+ [{ input: { mint: "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", limit: 20 }, output: { status: "success" }, explanation: "Who were the first 20 KOLs to buy this token?" }],
9
+ ],
10
+ schema: z.object({
11
+ mint: z.string().describe("Token mint address (base58)"),
12
+ limit: z.number().min(1).max(200).default(50).describe("Max ranked entries"),
13
+ }),
14
+ handler: async (agent, input) => {
15
+ try {
16
+ const data = await kolTokenEntryOrder(agent, input);
17
+ return { status: "success", result: data };
18
+ }
19
+ catch (err) {
20
+ return { status: "error", message: err.message };
21
+ }
22
+ },
23
+ };
@@ -116,10 +116,10 @@ export declare const walletTrackerTradesAction: {
116
116
  event_type?: "swap" | "transfer" | undefined;
117
117
  before?: number | undefined;
118
118
  }, {
119
+ limit?: number | undefined;
119
120
  wallet?: string | undefined;
120
121
  action?: "buy" | "sell" | "transfer_in" | "transfer_out" | undefined;
121
122
  event_type?: "swap" | "transfer" | undefined;
122
- limit?: number | undefined;
123
123
  before?: number | undefined;
124
124
  }>;
125
125
  handler: (agent: unknown, input: {
package/dist/index.d.ts CHANGED
@@ -5,7 +5,10 @@ import { deployerAlertsAction } from "./actions/deployerAlerts.js";
5
5
  import { kolPnlAction } from "./actions/kolPnl.js";
6
6
  import { kolTrendingTokensAction } from "./actions/kolTrendingTokens.js";
7
7
  import { walletTrackerWatchlistAction, walletTrackerAddAction, walletTrackerRemoveAction, walletTrackerTradesAction, walletTrackerSummaryAction } from "./actions/walletTracker.js";
8
- import { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, kolPnl, kolTrendingTokens, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken, walletTrackerWatchlist, walletTrackerAdd, walletTrackerRemove, walletTrackerTrades, walletTrackerSummary } from "./tools/index.js";
8
+ import { kolTokenEntryOrderAction } from "./actions/kolTokenEntryOrder.js";
9
+ import { kolCompareAction } from "./actions/kolCompare.js";
10
+ import { kolAlertsRecentAction } from "./actions/kolAlertsRecent.js";
11
+ 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 } from "./tools/index.js";
9
12
  declare const MadeOnSolPlugin: {
10
13
  name: string;
11
14
  methods: {
@@ -15,6 +18,9 @@ declare const MadeOnSolPlugin: {
15
18
  deployerAlerts: typeof deployerAlerts;
16
19
  kolPnl: typeof kolPnl;
17
20
  kolTrendingTokens: typeof kolTrendingTokens;
21
+ kolTokenEntryOrder: typeof kolTokenEntryOrder;
22
+ kolCompare: typeof kolCompare;
23
+ kolAlertsRecent: typeof kolAlertsRecent;
18
24
  createWebhook: typeof createWebhook;
19
25
  listWebhooks: typeof listWebhooks;
20
26
  deleteWebhook: typeof deleteWebhook;
@@ -25,6 +31,17 @@ declare const MadeOnSolPlugin: {
25
31
  walletTrackerRemove: typeof walletTrackerRemove;
26
32
  walletTrackerTrades: typeof walletTrackerTrades;
27
33
  walletTrackerSummary: typeof walletTrackerSummary;
34
+ alphaLeaderboard: typeof alphaLeaderboard;
35
+ alphaWallet: typeof alphaWallet;
36
+ alphaLinked: typeof alphaLinked;
37
+ tokenCapTable: typeof tokenCapTable;
38
+ tokenBuyerQuality: typeof tokenBuyerQuality;
39
+ copyTradeList: typeof copyTradeList;
40
+ copyTradeCreate: typeof copyTradeCreate;
41
+ copyTradeGet: typeof copyTradeGet;
42
+ copyTradeUpdate: typeof copyTradeUpdate;
43
+ copyTradeDelete: typeof copyTradeDelete;
44
+ copyTradeSignals: typeof copyTradeSignals;
28
45
  };
29
46
  actions: ({
30
47
  name: string;
@@ -49,8 +66,8 @@ declare const MadeOnSolPlugin: {
49
66
  action?: "buy" | "sell" | undefined;
50
67
  kol?: string | undefined;
51
68
  }, {
52
- action?: "buy" | "sell" | undefined;
53
69
  limit?: number | undefined;
70
+ action?: "buy" | "sell" | undefined;
54
71
  kol?: string | undefined;
55
72
  }>;
56
73
  handler: (agent: unknown, input: {
@@ -167,8 +184,8 @@ declare const MadeOnSolPlugin: {
167
184
  tier?: "elite" | "good" | "moderate" | "rising" | "cold" | undefined;
168
185
  }, {
169
186
  limit?: number | undefined;
170
- offset?: number | undefined;
171
187
  since?: string | undefined;
188
+ offset?: number | undefined;
172
189
  tier?: "elite" | "good" | "moderate" | "rising" | "cold" | undefined;
173
190
  }>;
174
191
  handler: (agent: unknown, input: {
@@ -375,10 +392,10 @@ declare const MadeOnSolPlugin: {
375
392
  event_type?: "swap" | "transfer" | undefined;
376
393
  before?: number | undefined;
377
394
  }, {
395
+ limit?: number | undefined;
378
396
  wallet?: string | undefined;
379
397
  action?: "buy" | "sell" | "transfer_in" | "transfer_out" | undefined;
380
398
  event_type?: "swap" | "transfer" | undefined;
381
- limit?: number | undefined;
382
399
  before?: number | undefined;
383
400
  }>;
384
401
  handler: (agent: unknown, input: {
@@ -431,10 +448,121 @@ declare const MadeOnSolPlugin: {
431
448
  message: string;
432
449
  result?: undefined;
433
450
  }>;
451
+ } | {
452
+ name: string;
453
+ similes: string[];
454
+ description: string;
455
+ examples: {
456
+ input: {
457
+ mint: string;
458
+ limit: number;
459
+ };
460
+ output: {
461
+ status: string;
462
+ };
463
+ explanation: string;
464
+ }[][];
465
+ schema: import("zod").ZodObject<{
466
+ mint: import("zod").ZodString;
467
+ limit: import("zod").ZodDefault<import("zod").ZodNumber>;
468
+ }, "strip", import("zod").ZodTypeAny, {
469
+ mint: string;
470
+ limit: number;
471
+ }, {
472
+ mint: string;
473
+ limit?: number | undefined;
474
+ }>;
475
+ handler: (agent: unknown, input: {
476
+ mint: string;
477
+ limit?: number;
478
+ }) => Promise<{
479
+ status: string;
480
+ result: any;
481
+ message?: undefined;
482
+ } | {
483
+ status: string;
484
+ message: string;
485
+ result?: undefined;
486
+ }>;
487
+ } | {
488
+ name: string;
489
+ similes: string[];
490
+ description: string;
491
+ examples: {
492
+ input: {
493
+ wallets: string[];
494
+ };
495
+ output: {
496
+ status: string;
497
+ };
498
+ explanation: string;
499
+ }[][];
500
+ schema: import("zod").ZodObject<{
501
+ wallets: import("zod").ZodArray<import("zod").ZodString, "many">;
502
+ }, "strip", import("zod").ZodTypeAny, {
503
+ wallets: string[];
504
+ }, {
505
+ wallets: string[];
506
+ }>;
507
+ handler: (agent: unknown, input: {
508
+ wallets: string[];
509
+ }) => Promise<{
510
+ status: string;
511
+ result: any;
512
+ message?: undefined;
513
+ } | {
514
+ status: string;
515
+ message: string;
516
+ result?: undefined;
517
+ }>;
518
+ } | {
519
+ name: string;
520
+ similes: string[];
521
+ description: string;
522
+ examples: {
523
+ input: {
524
+ window: string;
525
+ limit: number;
526
+ };
527
+ output: {
528
+ status: string;
529
+ };
530
+ explanation: string;
531
+ }[][];
532
+ schema: import("zod").ZodObject<{
533
+ window: import("zod").ZodDefault<import("zod").ZodEnum<["5m", "15m", "1h", "6h", "24h"]>>;
534
+ types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<["consensus_cluster", "fresh_token_kol_buy", "heating_up"]>, "many">>;
535
+ min_severity: import("zod").ZodOptional<import("zod").ZodEnum<["low", "medium", "high"]>>;
536
+ limit: import("zod").ZodDefault<import("zod").ZodNumber>;
537
+ }, "strip", import("zod").ZodTypeAny, {
538
+ limit: number;
539
+ window: "24h" | "1h" | "6h" | "5m" | "15m";
540
+ types?: ("consensus_cluster" | "fresh_token_kol_buy" | "heating_up")[] | undefined;
541
+ min_severity?: "low" | "medium" | "high" | undefined;
542
+ }, {
543
+ limit?: number | undefined;
544
+ types?: ("consensus_cluster" | "fresh_token_kol_buy" | "heating_up")[] | undefined;
545
+ window?: "24h" | "1h" | "6h" | "5m" | "15m" | undefined;
546
+ min_severity?: "low" | "medium" | "high" | undefined;
547
+ }>;
548
+ handler: (agent: unknown, input: {
549
+ window?: string;
550
+ types?: string[];
551
+ min_severity?: string;
552
+ limit?: number;
553
+ }) => Promise<{
554
+ status: string;
555
+ result: any;
556
+ message?: undefined;
557
+ } | {
558
+ status: string;
559
+ message: string;
560
+ result?: undefined;
561
+ }>;
434
562
  })[];
435
563
  initialize(_agent: unknown): void;
436
564
  };
437
565
  export default MadeOnSolPlugin;
438
- export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, kolPnl, kolTrendingTokens, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken, walletTrackerWatchlist, walletTrackerAdd, walletTrackerRemove, walletTrackerTrades, walletTrackerSummary };
439
- export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction, kolPnlAction, kolTrendingTokensAction };
566
+ 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, };
567
+ export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction, kolPnlAction, kolTrendingTokensAction, kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction };
440
568
  export { walletTrackerWatchlistAction, walletTrackerAddAction, walletTrackerRemoveAction, walletTrackerTradesAction, walletTrackerSummaryAction };
package/dist/index.js CHANGED
@@ -5,7 +5,10 @@ import { deployerAlertsAction } from "./actions/deployerAlerts.js";
5
5
  import { kolPnlAction } from "./actions/kolPnl.js";
6
6
  import { kolTrendingTokensAction } from "./actions/kolTrendingTokens.js";
7
7
  import { walletTrackerWatchlistAction, walletTrackerAddAction, walletTrackerRemoveAction, walletTrackerTradesAction, walletTrackerSummaryAction } from "./actions/walletTracker.js";
8
- import { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, kolPnl, kolTrendingTokens, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken, walletTrackerWatchlist, walletTrackerAdd, walletTrackerRemove, walletTrackerTrades, walletTrackerSummary } from "./tools/index.js";
8
+ import { kolTokenEntryOrderAction } from "./actions/kolTokenEntryOrder.js";
9
+ import { kolCompareAction } from "./actions/kolCompare.js";
10
+ import { kolAlertsRecentAction } from "./actions/kolAlertsRecent.js";
11
+ 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, } from "./tools/index.js";
9
12
  const MadeOnSolPlugin = {
10
13
  name: "madeonsol",
11
14
  methods: {
@@ -15,6 +18,9 @@ const MadeOnSolPlugin = {
15
18
  deployerAlerts,
16
19
  kolPnl,
17
20
  kolTrendingTokens,
21
+ kolTokenEntryOrder,
22
+ kolCompare,
23
+ kolAlertsRecent,
18
24
  createWebhook,
19
25
  listWebhooks,
20
26
  deleteWebhook,
@@ -25,6 +31,17 @@ const MadeOnSolPlugin = {
25
31
  walletTrackerRemove,
26
32
  walletTrackerTrades,
27
33
  walletTrackerSummary,
34
+ alphaLeaderboard,
35
+ alphaWallet,
36
+ alphaLinked,
37
+ tokenCapTable,
38
+ tokenBuyerQuality,
39
+ copyTradeList,
40
+ copyTradeCreate,
41
+ copyTradeGet,
42
+ copyTradeUpdate,
43
+ copyTradeDelete,
44
+ copyTradeSignals,
28
45
  },
29
46
  actions: [
30
47
  kolFeedAction,
@@ -33,6 +50,9 @@ const MadeOnSolPlugin = {
33
50
  deployerAlertsAction,
34
51
  kolPnlAction,
35
52
  kolTrendingTokensAction,
53
+ kolTokenEntryOrderAction,
54
+ kolCompareAction,
55
+ kolAlertsRecentAction,
36
56
  walletTrackerWatchlistAction,
37
57
  walletTrackerAddAction,
38
58
  walletTrackerRemoveAction,
@@ -44,6 +64,6 @@ const MadeOnSolPlugin = {
44
64
  },
45
65
  };
46
66
  export default MadeOnSolPlugin;
47
- export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, kolPnl, kolTrendingTokens, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken, walletTrackerWatchlist, walletTrackerAdd, walletTrackerRemove, walletTrackerTrades, walletTrackerSummary };
48
- export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction, kolPnlAction, kolTrendingTokensAction };
67
+ 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, };
68
+ export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction, kolPnlAction, kolTrendingTokensAction, kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction };
49
69
  export { walletTrackerWatchlistAction, walletTrackerAddAction, walletTrackerRemoveAction, walletTrackerTradesAction, walletTrackerSummaryAction };
@@ -1,9 +1,20 @@
1
1
  /**
2
2
  * Tool functions — pure logic that calls MadeOnSol API.
3
- * Auth priority: MADEONSOL_API_KEY > RAPIDAPI_KEY > SVM_PRIVATE_KEY (x402).
4
- * These are called by Action handlers and can also be used directly via agent.methods.
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/developer.
5
8
  */
6
9
  type Agent = any;
10
+ export interface RateLimitInfo {
11
+ limit?: string;
12
+ remaining?: string;
13
+ reset?: string;
14
+ requestId?: string;
15
+ }
16
+ /** Most recent rate-limit headers, populated by every successful API request. */
17
+ export declare let lastRateLimit: RateLimitInfo;
7
18
  export declare function initAuth(agent: Agent): Promise<void>;
8
19
  /** @deprecated Use initAuth instead */
9
20
  export declare function initPaidFetch(agent: Agent): Promise<typeof fetch>;
@@ -47,6 +58,19 @@ export declare function kolTrendingTokens(agent: Agent, params?: {
47
58
  min_kols?: number;
48
59
  limit?: number;
49
60
  }): Promise<any>;
61
+ export declare function kolTokenEntryOrder(agent: Agent, params: {
62
+ mint: string;
63
+ limit?: number;
64
+ }): Promise<any>;
65
+ export declare function kolCompare(agent: Agent, params: {
66
+ wallets: string[];
67
+ }): Promise<any>;
68
+ export declare function kolAlertsRecent(agent: Agent, params?: {
69
+ window?: string;
70
+ types?: string[];
71
+ min_severity?: string;
72
+ limit?: number;
73
+ }): Promise<any>;
50
74
  export declare function kolPnl(agent: Agent, params: {
51
75
  wallet: string;
52
76
  period?: string;
@@ -90,4 +114,45 @@ export declare function walletTrackerSummary(agent: Agent, params?: {
90
114
  period?: string;
91
115
  wallet?: string;
92
116
  }): Promise<any>;
117
+ export declare function alphaLeaderboard(agent: Agent, params?: {
118
+ limit?: number;
119
+ min_tokens?: number;
120
+ min_pnl?: number;
121
+ }): Promise<any>;
122
+ export declare function alphaWallet(agent: Agent, params: {
123
+ wallet: string;
124
+ }): Promise<any>;
125
+ export declare function alphaLinked(agent: Agent, params: {
126
+ wallet: string;
127
+ }): Promise<any>;
128
+ export declare function tokenCapTable(agent: Agent, params: {
129
+ mint: string;
130
+ }): Promise<any>;
131
+ export declare function tokenBuyerQuality(agent: Agent, params: {
132
+ mint: string;
133
+ }): Promise<any>;
134
+ export declare function copyTradeList(agent: Agent): Promise<any>;
135
+ export declare function copyTradeCreate(agent: Agent, params: {
136
+ name: string;
137
+ source_wallet: string;
138
+ is_active?: boolean;
139
+ webhook_url?: string;
140
+ delivery?: "webhook" | "websocket" | "both";
141
+ filters?: Record<string, unknown>;
142
+ }): Promise<any>;
143
+ export declare function copyTradeGet(agent: Agent, params: {
144
+ rule_id: string;
145
+ }): Promise<any>;
146
+ export declare function copyTradeUpdate(agent: Agent, params: {
147
+ rule_id: string;
148
+ updates: Record<string, unknown>;
149
+ }): Promise<any>;
150
+ export declare function copyTradeDelete(agent: Agent, params: {
151
+ rule_id: string;
152
+ }): Promise<any>;
153
+ export declare function copyTradeSignals(agent: Agent, params?: {
154
+ rule_id?: string;
155
+ limit?: number;
156
+ since?: string;
157
+ }): Promise<any>;
93
158
  export {};
@@ -1,13 +1,25 @@
1
1
  /**
2
2
  * Tool functions — pure logic that calls MadeOnSol API.
3
- * Auth priority: MADEONSOL_API_KEY > RAPIDAPI_KEY > SVM_PRIVATE_KEY (x402).
4
- * These are called by Action handlers and can also be used directly via agent.methods.
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/developer.
5
8
  */
6
9
  const BASE_URL = "https://madeonsol.com";
7
- const RAPIDAPI_HOST = "madeonsol-solana-kol-tracker-tools-api.p.rapidapi.com";
8
10
  let _authMode = null;
9
11
  let _authHeaders = {};
10
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
+ }
11
23
  function getConfig(agent, key) {
12
24
  return agent.config?.[key] || agent.config?.OTHER_API_KEYS?.[key];
13
25
  }
@@ -15,7 +27,6 @@ export async function initAuth(agent) {
15
27
  if (_authMode)
16
28
  return;
17
29
  const apiKey = getConfig(agent, "MADEONSOL_API_KEY");
18
- const rapidApiKey = getConfig(agent, "RAPIDAPI_KEY");
19
30
  const privateKey = getConfig(agent, "SVM_PRIVATE_KEY");
20
31
  if (apiKey) {
21
32
  _authMode = "madeonsol";
@@ -23,12 +34,6 @@ export async function initAuth(agent) {
23
34
  _paidFetch = fetch;
24
35
  console.log("[madeonsol] Using MadeOnSol API key (Bearer auth)");
25
36
  }
26
- else if (rapidApiKey) {
27
- _authMode = "rapidapi";
28
- _authHeaders = { "x-rapidapi-key": rapidApiKey, "x-rapidapi-host": RAPIDAPI_HOST };
29
- _paidFetch = fetch;
30
- console.log("[madeonsol] Using RapidAPI key");
31
- }
32
37
  else if (privateKey) {
33
38
  const { wrapFetchWithPayment } = await import("@x402/fetch");
34
39
  const { x402Client } = await import("@x402/core/client");
@@ -45,7 +50,7 @@ export async function initAuth(agent) {
45
50
  else {
46
51
  _authMode = "none";
47
52
  _paidFetch = fetch;
48
- console.warn("[madeonsol] No auth configured. Set MADEONSOL_API_KEY (free at madeonsol.com/developer), RAPIDAPI_KEY, or SVM_PRIVATE_KEY.");
53
+ console.warn("[madeonsol] No auth configured. Set MADEONSOL_API_KEY (free at madeonsol.com/developer) or SVM_PRIVATE_KEY.");
49
54
  }
50
55
  }
51
56
  /** @deprecated Use initAuth instead */
@@ -67,6 +72,7 @@ async function query(path, params) {
67
72
  const res = _authMode === "x402"
68
73
  ? await _paidFetch(url.toString())
69
74
  : await fetch(url.toString(), { headers: _authHeaders });
75
+ captureRateLimit(res);
70
76
  if (!res.ok) {
71
77
  const body = await res.text().catch(() => "");
72
78
  throw new Error(`MadeOnSol API error ${res.status}: ${body}`);
@@ -106,6 +112,23 @@ export async function kolTrendingTokens(agent, params = {}) {
106
112
  await initAuth(agent);
107
113
  return query("/api/x402/kol/tokens/trending", params);
108
114
  }
115
+ export async function kolTokenEntryOrder(agent, params) {
116
+ await initAuth(agent);
117
+ const { mint, ...rest } = params;
118
+ return query(`/api/x402/kol/tokens/${encodeURIComponent(mint)}/entry-order`, rest);
119
+ }
120
+ export async function kolCompare(agent, params) {
121
+ await initAuth(agent);
122
+ return query("/api/x402/kol/compare", { wallets: params.wallets.join(",") });
123
+ }
124
+ export async function kolAlertsRecent(agent, params = {}) {
125
+ await initAuth(agent);
126
+ const { types, ...rest } = params;
127
+ const flat = { ...rest };
128
+ if (types && types.length > 0)
129
+ flat.types = types.join(",");
130
+ return query("/api/x402/kol/alerts/recent", flat);
131
+ }
109
132
  export async function kolPnl(agent, params) {
110
133
  const qs = params.period ? `?period=${params.period}` : "";
111
134
  return restQuery(agent, "GET", `/kol/${params.wallet}/pnl${qs}`);
@@ -117,11 +140,11 @@ export async function kolTiming(agent, params) {
117
140
  export async function deployerTrajectory(agent, params) {
118
141
  return restQuery(agent, "GET", `/deployer-hunter/${params.wallet}/trajectory`);
119
142
  }
120
- // ── Webhook & Streaming (requires API key or RapidAPI key) ──
143
+ // ── REST helper (webhooks, streaming, alpha, copy-trade, wallet-tracker) ──
121
144
  async function restQuery(agent, method, path, body) {
122
145
  await initAuth(agent);
123
- if (_authMode !== "madeonsol" && _authMode !== "rapidapi") {
124
- throw new Error("API key or RapidAPI key required for webhook/streaming features. Get a free key at madeonsol.com/developer");
146
+ if (_authMode !== "madeonsol") {
147
+ throw new Error("MadeOnSol API key required for this endpoint. Get a free `msk_` key at madeonsol.com/developer");
125
148
  }
126
149
  const res = await fetch(`${BASE_URL}/api/v1${path}`, {
127
150
  method,
@@ -131,6 +154,7 @@ async function restQuery(agent, method, path, body) {
131
154
  },
132
155
  ...(body ? { body: JSON.stringify(body) } : {}),
133
156
  });
157
+ captureRateLimit(res);
134
158
  if (!res.ok) {
135
159
  const text = await res.text().catch(() => "");
136
160
  throw new Error(`MadeOnSol API error ${res.status}: ${text}`);
@@ -163,30 +187,68 @@ export async function walletTrackerRemove(agent, params) {
163
187
  return restQuery(agent, "DELETE", `/wallet-tracker/watchlist/${encodeURIComponent(params.wallet_address)}`);
164
188
  }
165
189
  export async function walletTrackerTrades(agent, params = {}) {
166
- await initAuth(agent);
167
- const url = new URL(`${BASE_URL}/api/v1/wallet-tracker/trades`);
190
+ const qs = new URLSearchParams();
168
191
  for (const [k, v] of Object.entries(params)) {
169
192
  if (v !== undefined)
170
- url.searchParams.set(k, String(v));
171
- }
172
- const res = await fetch(url.toString(), { headers: { "Content-Type": "application/json", ..._authHeaders } });
173
- if (!res.ok) {
174
- const text = await res.text().catch(() => "");
175
- throw new Error(`MadeOnSol API error ${res.status}: ${text}`);
193
+ qs.set(k, String(v));
176
194
  }
177
- return res.json();
195
+ const query = qs.toString() ? `?${qs.toString()}` : "";
196
+ return restQuery(agent, "GET", `/wallet-tracker/trades${query}`);
178
197
  }
179
198
  export async function walletTrackerSummary(agent, params = {}) {
180
- await initAuth(agent);
181
- const url = new URL(`${BASE_URL}/api/v1/wallet-tracker/summary`);
199
+ const qs = new URLSearchParams();
200
+ if (params.period)
201
+ qs.set("period", params.period);
202
+ if (params.wallet)
203
+ qs.set("wallet", params.wallet);
204
+ const query = qs.toString() ? `?${qs.toString()}` : "";
205
+ return restQuery(agent, "GET", `/wallet-tracker/summary${query}`);
206
+ }
207
+ // ── Alpha Wallet Intelligence ──
208
+ export async function alphaLeaderboard(agent, params = {}) {
209
+ const qs = new URLSearchParams();
182
210
  for (const [k, v] of Object.entries(params)) {
183
211
  if (v !== undefined)
184
- url.searchParams.set(k, v);
212
+ qs.set(k, String(v));
185
213
  }
186
- const res = await fetch(url.toString(), { headers: { "Content-Type": "application/json", ..._authHeaders } });
187
- if (!res.ok) {
188
- const text = await res.text().catch(() => "");
189
- throw new Error(`MadeOnSol API error ${res.status}: ${text}`);
214
+ const query = qs.toString() ? `?${qs.toString()}` : "";
215
+ return restQuery(agent, "GET", `/alpha/leaderboard${query}`);
216
+ }
217
+ export async function alphaWallet(agent, params) {
218
+ return restQuery(agent, "GET", `/alpha/wallet/${encodeURIComponent(params.wallet)}`);
219
+ }
220
+ export async function alphaLinked(agent, params) {
221
+ return restQuery(agent, "GET", `/alpha/wallet/${encodeURIComponent(params.wallet)}/linked`);
222
+ }
223
+ // ── Token Quality ──
224
+ export async function tokenCapTable(agent, params) {
225
+ return restQuery(agent, "GET", `/token/${encodeURIComponent(params.mint)}/cap-table`);
226
+ }
227
+ export async function tokenBuyerQuality(agent, params) {
228
+ return restQuery(agent, "GET", `/token/${encodeURIComponent(params.mint)}/buyer-quality`);
229
+ }
230
+ // ── Copy-Trade Rules (PRO/ULTRA) ──
231
+ export async function copyTradeList(agent) {
232
+ return restQuery(agent, "GET", "/copy-trade/rules");
233
+ }
234
+ export async function copyTradeCreate(agent, params) {
235
+ return restQuery(agent, "POST", "/copy-trade/rules", params);
236
+ }
237
+ export async function copyTradeGet(agent, params) {
238
+ return restQuery(agent, "GET", `/copy-trade/rules/${encodeURIComponent(params.rule_id)}`);
239
+ }
240
+ export async function copyTradeUpdate(agent, params) {
241
+ return restQuery(agent, "PATCH", `/copy-trade/rules/${encodeURIComponent(params.rule_id)}`, params.updates);
242
+ }
243
+ export async function copyTradeDelete(agent, params) {
244
+ return restQuery(agent, "DELETE", `/copy-trade/rules/${encodeURIComponent(params.rule_id)}`);
245
+ }
246
+ export async function copyTradeSignals(agent, params = {}) {
247
+ const qs = new URLSearchParams();
248
+ for (const [k, v] of Object.entries(params)) {
249
+ if (v !== undefined)
250
+ qs.set(k, String(v));
190
251
  }
191
- return res.json();
252
+ const query = qs.toString() ? `?${qs.toString()}` : "";
253
+ return restQuery(agent, "GET", `/copy-trade/signals${query}`);
192
254
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solana-agent-kit-plugin-madeonsol",
3
- "version": "0.6.1",
3
+ "version": "1.0.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",