solana-agent-kit-plugin-madeonsol 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,54 +1,69 @@
1
- # solana-agent-kit-plugin-madeonsol
2
-
3
- [Solana Agent Kit](https://github.com/sendaifun/solana-agent-kit) plugin for [MadeOnSol](https://madeonsol.com) — Solana KOL intelligence and deployer analytics via x402 micropayments.
4
-
5
- ## Install
6
-
7
- ```bash
8
- npm install solana-agent-kit-plugin-madeonsol @x402/fetch @x402/svm @x402/core @solana/kit @scure/base
9
- ```
10
-
11
- ## Usage
12
-
13
- ```typescript
14
- import { SolanaAgentKit } from "solana-agent-kit";
15
- import MadeOnSolPlugin from "solana-agent-kit-plugin-madeonsol";
16
-
17
- const agent = new SolanaAgentKit(privateKey, rpcUrl, {
18
- SVM_PRIVATE_KEY: "your_solana_private_key_base58",
19
- });
20
-
21
- agent.use(MadeOnSolPlugin);
22
-
23
- // Use via methods
24
- const trades = await agent.methods.kolFeed(agent, { limit: 10, action: "buy" });
25
-
26
- // Or let the LLM trigger actions via natural language
27
- // "What are KOLs buying right now?" → MADEONSOL_KOL_FEED_ACTION
28
- ```
29
-
30
- ## Actions
31
-
32
- | Action | Price | Triggers on |
33
- |---|---|---|
34
- | `MADEONSOL_KOL_FEED_ACTION` | $0.005 | "kol trades", "what are kols buying" |
35
- | `MADEONSOL_KOL_COORDINATION_ACTION` | $0.02 | "kol convergence", "tokens kols accumulating" |
36
- | `MADEONSOL_KOL_LEADERBOARD_ACTION` | $0.005 | "top kols", "kol rankings", "best kol" |
37
- | `MADEONSOL_DEPLOYER_ALERTS_ACTION` | $0.01 | "deployer alerts", "pump fun launches" |
38
-
39
- ## Config
40
-
41
- Set `SVM_PRIVATE_KEY` in your agent config for automatic x402 USDC payments. The wallet needs SOL (fees) and USDC on Solana mainnet.
42
-
43
- ## Also Available
44
-
45
- | Platform | Package |
46
- |---|---|
47
- | TypeScript SDK | [`madeonsol-x402`](https://www.npmjs.com/package/madeonsol-x402) |
48
- | Python (LangChain, CrewAI) | [`madeonsol-x402`](https://github.com/LamboPoewert/madeonsol-python) on PyPI |
49
- | MCP Server (Claude, Cursor) | [`mcp-server-madeonsol`](https://www.npmjs.com/package/mcp-server-madeonsol) |
50
- | ElizaOS | [`@madeonsol/plugin-madeonsol`](https://www.npmjs.com/package/@madeonsol/plugin-madeonsol) |
51
-
52
- ## License
53
-
54
- MIT
1
+ # solana-agent-kit-plugin-madeonsol
2
+
3
+ [Solana Agent Kit](https://github.com/sendaifun/solana-agent-kit) plugin for [MadeOnSol](https://madeonsol.com) — Solana KOL intelligence and deployer analytics.
4
+
5
+ ## Authentication
6
+
7
+ Three options (in priority order):
8
+
9
+ | Method | Config key | Best for |
10
+ |---|---|---|
11
+ | **MadeOnSol API key** (recommended) | `MADEONSOL_API_KEY` | Developers — [get a free key](https://madeonsol.com/developer) |
12
+ | RapidAPI key | `RAPIDAPI_KEY` | RapidAPI subscribers |
13
+ | x402 micropayments | `SVM_PRIVATE_KEY` | AI agents with Solana wallets |
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ npm install solana-agent-kit-plugin-madeonsol
19
+ ```
20
+
21
+ > x402 peer deps (`@x402/fetch @x402/svm @x402/core @solana/kit @scure/base`) are only needed when using `SVM_PRIVATE_KEY`.
22
+
23
+ ## Usage
24
+
25
+ ```typescript
26
+ import { SolanaAgentKit } from "solana-agent-kit";
27
+ import MadeOnSolPlugin from "solana-agent-kit-plugin-madeonsol";
28
+
29
+ const agent = new SolanaAgentKit(privateKey, rpcUrl, {
30
+ // Option 1: API key (simplest)
31
+ MADEONSOL_API_KEY: "msk_your_api_key_here",
32
+
33
+ // Option 2: RapidAPI key
34
+ // RAPIDAPI_KEY: "your_rapidapi_key",
35
+
36
+ // Option 3: x402 micropayments
37
+ // SVM_PRIVATE_KEY: "your_solana_private_key_base58",
38
+ });
39
+
40
+ agent.use(MadeOnSolPlugin);
41
+
42
+ // Use via methods
43
+ const trades = await agent.methods.kolFeed(agent, { limit: 10, action: "buy" });
44
+
45
+ // Or let the LLM trigger actions via natural language
46
+ // "What are KOLs buying right now?" → MADEONSOL_KOL_FEED_ACTION
47
+ ```
48
+
49
+ ## Actions
50
+
51
+ | Action | Triggers on |
52
+ |---|---|
53
+ | `MADEONSOL_KOL_FEED_ACTION` | "kol trades", "what are kols buying" |
54
+ | `MADEONSOL_KOL_COORDINATION_ACTION` | "kol convergence", "tokens kols accumulating" |
55
+ | `MADEONSOL_KOL_LEADERBOARD_ACTION` | "top kols", "kol rankings", "best kol" |
56
+ | `MADEONSOL_DEPLOYER_ALERTS_ACTION` | "deployer alerts", "pump fun launches" |
57
+
58
+ ## Also Available
59
+
60
+ | Platform | Package |
61
+ |---|---|
62
+ | TypeScript SDK | [`madeonsol-x402`](https://www.npmjs.com/package/madeonsol-x402) |
63
+ | Python (LangChain, CrewAI) | [`madeonsol-x402`](https://github.com/LamboPoewert/madeonsol-python) on PyPI |
64
+ | MCP Server (Claude, Cursor) | [`mcp-server-madeonsol`](https://www.npmjs.com/package/mcp-server-madeonsol) |
65
+ | ElizaOS | [`@madeonsol/plugin-madeonsol`](https://www.npmjs.com/package/@madeonsol/plugin-madeonsol) |
66
+
67
+ ## License
68
+
69
+ MIT
@@ -1,41 +1,41 @@
1
- import { z } from "zod";
2
- export declare const deployerAlertsAction: {
3
- name: string;
4
- similes: string[];
5
- description: string;
6
- examples: {
7
- input: {
8
- limit: number;
9
- };
10
- output: {
11
- status: string;
12
- };
13
- explanation: string;
14
- }[][];
15
- schema: z.ZodObject<{
16
- limit: z.ZodDefault<z.ZodNumber>;
17
- offset: z.ZodDefault<z.ZodNumber>;
18
- since: z.ZodOptional<z.ZodString>;
19
- }, "strip", z.ZodTypeAny, {
20
- limit: number;
21
- offset: number;
22
- since?: string | undefined;
23
- }, {
24
- limit?: number | undefined;
25
- offset?: number | undefined;
26
- since?: string | undefined;
27
- }>;
28
- handler: (agent: unknown, input: {
29
- limit?: number;
30
- offset?: number;
31
- since?: string;
32
- }) => Promise<{
33
- status: string;
34
- result: any;
35
- message?: undefined;
36
- } | {
37
- status: string;
38
- message: string;
39
- result?: undefined;
40
- }>;
41
- };
1
+ import { z } from "zod";
2
+ export declare const deployerAlertsAction: {
3
+ name: string;
4
+ similes: string[];
5
+ description: string;
6
+ examples: {
7
+ input: {
8
+ limit: number;
9
+ };
10
+ output: {
11
+ status: string;
12
+ };
13
+ explanation: string;
14
+ }[][];
15
+ schema: z.ZodObject<{
16
+ limit: z.ZodDefault<z.ZodNumber>;
17
+ offset: z.ZodDefault<z.ZodNumber>;
18
+ since: z.ZodOptional<z.ZodString>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ limit: number;
21
+ offset: number;
22
+ since?: string | undefined;
23
+ }, {
24
+ limit?: number | undefined;
25
+ offset?: number | undefined;
26
+ since?: string | undefined;
27
+ }>;
28
+ handler: (agent: unknown, input: {
29
+ limit?: number;
30
+ offset?: number;
31
+ since?: string;
32
+ }) => Promise<{
33
+ status: string;
34
+ result: any;
35
+ message?: undefined;
36
+ } | {
37
+ status: string;
38
+ message: string;
39
+ result?: undefined;
40
+ }>;
41
+ };
@@ -1,24 +1,24 @@
1
- import { z } from "zod";
2
- import { deployerAlerts } from "../tools/index.js";
3
- export const deployerAlertsAction = {
4
- name: "MADEONSOL_DEPLOYER_ALERTS_ACTION",
5
- similes: ["deployer alerts", "pump fun launches", "new token alerts", "elite deployer tokens"],
6
- description: "Get real-time alerts from elite Pump.fun deployers with KOL buy enrichment. Costs $0.01 USDC per request.",
7
- examples: [
8
- [{ input: { limit: 10 }, output: { status: "success" }, explanation: "Get the 10 most recent deployer alerts" }],
9
- ],
10
- schema: z.object({
11
- limit: z.number().min(1).max(100).default(10).describe("Number of alerts"),
12
- offset: z.number().min(0).default(0).describe("Pagination offset"),
13
- since: z.string().optional().describe("ISO8601 timestamp to filter alerts after"),
14
- }),
15
- handler: async (agent, input) => {
16
- try {
17
- const data = await deployerAlerts(agent, input);
18
- return { status: "success", result: data };
19
- }
20
- catch (err) {
21
- return { status: "error", message: err.message };
22
- }
23
- },
24
- };
1
+ import { z } from "zod";
2
+ import { deployerAlerts } from "../tools/index.js";
3
+ export const deployerAlertsAction = {
4
+ name: "MADEONSOL_DEPLOYER_ALERTS_ACTION",
5
+ similes: ["deployer alerts", "pump fun launches", "new token alerts", "elite deployer tokens"],
6
+ description: "Get real-time alerts from elite Pump.fun deployers with KOL buy enrichment. Costs $0.01 USDC per request.",
7
+ examples: [
8
+ [{ input: { limit: 10 }, output: { status: "success" }, explanation: "Get the 10 most recent deployer alerts" }],
9
+ ],
10
+ schema: z.object({
11
+ limit: z.number().min(1).max(100).default(10).describe("Number of alerts"),
12
+ offset: z.number().min(0).default(0).describe("Pagination offset"),
13
+ since: z.string().optional().describe("ISO8601 timestamp to filter alerts after"),
14
+ }),
15
+ handler: async (agent, input) => {
16
+ try {
17
+ const data = await deployerAlerts(agent, input);
18
+ return { status: "success", result: data };
19
+ }
20
+ catch (err) {
21
+ return { status: "error", message: err.message };
22
+ }
23
+ },
24
+ };
@@ -1,42 +1,42 @@
1
- import { z } from "zod";
2
- export declare const kolCoordinationAction: {
3
- name: string;
4
- similes: string[];
5
- description: string;
6
- examples: {
7
- input: {
8
- period: string;
9
- min_kols: number;
10
- };
11
- output: {
12
- status: string;
13
- };
14
- explanation: string;
15
- }[][];
16
- schema: z.ZodObject<{
17
- period: z.ZodDefault<z.ZodEnum<["1h", "6h", "24h", "7d"]>>;
18
- min_kols: z.ZodDefault<z.ZodNumber>;
19
- limit: z.ZodDefault<z.ZodNumber>;
20
- }, "strip", z.ZodTypeAny, {
21
- limit: number;
22
- period: "24h" | "1h" | "6h" | "7d";
23
- min_kols: number;
24
- }, {
25
- limit?: number | undefined;
26
- period?: "24h" | "1h" | "6h" | "7d" | undefined;
27
- min_kols?: number | undefined;
28
- }>;
29
- handler: (agent: unknown, input: {
30
- period?: string;
31
- min_kols?: number;
32
- limit?: number;
33
- }) => Promise<{
34
- status: string;
35
- result: any;
36
- message?: undefined;
37
- } | {
38
- status: string;
39
- message: string;
40
- result?: undefined;
41
- }>;
42
- };
1
+ import { z } from "zod";
2
+ export declare const kolCoordinationAction: {
3
+ name: string;
4
+ similes: string[];
5
+ description: string;
6
+ examples: {
7
+ input: {
8
+ period: string;
9
+ min_kols: number;
10
+ };
11
+ output: {
12
+ status: string;
13
+ };
14
+ explanation: string;
15
+ }[][];
16
+ schema: z.ZodObject<{
17
+ period: z.ZodDefault<z.ZodEnum<["1h", "6h", "24h", "7d"]>>;
18
+ min_kols: z.ZodDefault<z.ZodNumber>;
19
+ limit: z.ZodDefault<z.ZodNumber>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ limit: number;
22
+ period: "24h" | "1h" | "6h" | "7d";
23
+ min_kols: number;
24
+ }, {
25
+ limit?: number | undefined;
26
+ period?: "24h" | "1h" | "6h" | "7d" | undefined;
27
+ min_kols?: number | undefined;
28
+ }>;
29
+ handler: (agent: unknown, input: {
30
+ period?: string;
31
+ min_kols?: number;
32
+ limit?: number;
33
+ }) => Promise<{
34
+ status: string;
35
+ result: any;
36
+ message?: undefined;
37
+ } | {
38
+ status: string;
39
+ message: string;
40
+ result?: undefined;
41
+ }>;
42
+ };
@@ -1,24 +1,24 @@
1
- import { z } from "zod";
2
- import { kolCoordination } from "../tools/index.js";
3
- export const kolCoordinationAction = {
4
- name: "MADEONSOL_KOL_COORDINATION_ACTION",
5
- similes: ["kol convergence", "what tokens are kols accumulating", "kol coordination", "smart money convergence"],
6
- description: "Get KOL convergence signals — tokens being accumulated by multiple KOLs simultaneously. Costs $0.02 USDC per request.",
7
- examples: [
8
- [{ input: { period: "24h", min_kols: 3 }, output: { status: "success" }, explanation: "Get tokens where 3+ KOLs are converging in the last 24 hours" }],
9
- ],
10
- schema: z.object({
11
- period: z.enum(["1h", "6h", "24h", "7d"]).default("24h").describe("Time period"),
12
- min_kols: z.number().min(2).max(50).default(3).describe("Minimum KOLs converging"),
13
- limit: z.number().min(1).max(50).default(20).describe("Number of results"),
14
- }),
15
- handler: async (agent, input) => {
16
- try {
17
- const data = await kolCoordination(agent, input);
18
- return { status: "success", result: data };
19
- }
20
- catch (err) {
21
- return { status: "error", message: err.message };
22
- }
23
- },
24
- };
1
+ import { z } from "zod";
2
+ import { kolCoordination } from "../tools/index.js";
3
+ export const kolCoordinationAction = {
4
+ name: "MADEONSOL_KOL_COORDINATION_ACTION",
5
+ similes: ["kol convergence", "what tokens are kols accumulating", "kol coordination", "smart money convergence"],
6
+ description: "Get KOL convergence signals — tokens being accumulated by multiple KOLs simultaneously. Costs $0.02 USDC per request.",
7
+ examples: [
8
+ [{ input: { period: "24h", min_kols: 3 }, output: { status: "success" }, explanation: "Get tokens where 3+ KOLs are converging in the last 24 hours" }],
9
+ ],
10
+ schema: z.object({
11
+ period: z.enum(["1h", "6h", "24h", "7d"]).default("24h").describe("Time period"),
12
+ min_kols: z.number().min(2).max(50).default(3).describe("Minimum KOLs converging"),
13
+ limit: z.number().min(1).max(50).default(20).describe("Number of results"),
14
+ }),
15
+ handler: async (agent, input) => {
16
+ try {
17
+ const data = await kolCoordination(agent, input);
18
+ return { status: "success", result: data };
19
+ }
20
+ catch (err) {
21
+ return { status: "error", message: err.message };
22
+ }
23
+ },
24
+ };
@@ -1,42 +1,42 @@
1
- import { z } from "zod";
2
- export declare const kolFeedAction: {
3
- name: string;
4
- similes: string[];
5
- description: string;
6
- examples: {
7
- input: {
8
- limit: number;
9
- action: string;
10
- };
11
- output: {
12
- status: string;
13
- };
14
- explanation: string;
15
- }[][];
16
- schema: z.ZodObject<{
17
- limit: z.ZodDefault<z.ZodNumber>;
18
- action: z.ZodOptional<z.ZodEnum<["buy", "sell"]>>;
19
- kol: z.ZodOptional<z.ZodString>;
20
- }, "strip", z.ZodTypeAny, {
21
- limit: number;
22
- action?: "buy" | "sell" | undefined;
23
- kol?: string | undefined;
24
- }, {
25
- limit?: number | undefined;
26
- action?: "buy" | "sell" | undefined;
27
- kol?: string | undefined;
28
- }>;
29
- handler: (agent: unknown, input: {
30
- limit?: number;
31
- action?: string;
32
- kol?: string;
33
- }) => Promise<{
34
- status: string;
35
- result: any;
36
- message?: undefined;
37
- } | {
38
- status: string;
39
- message: string;
40
- result?: undefined;
41
- }>;
42
- };
1
+ import { z } from "zod";
2
+ export declare const kolFeedAction: {
3
+ name: string;
4
+ similes: string[];
5
+ description: string;
6
+ examples: {
7
+ input: {
8
+ limit: number;
9
+ action: string;
10
+ };
11
+ output: {
12
+ status: string;
13
+ };
14
+ explanation: string;
15
+ }[][];
16
+ schema: z.ZodObject<{
17
+ limit: z.ZodDefault<z.ZodNumber>;
18
+ action: z.ZodOptional<z.ZodEnum<["buy", "sell"]>>;
19
+ kol: z.ZodOptional<z.ZodString>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ limit: number;
22
+ action?: "buy" | "sell" | undefined;
23
+ kol?: string | undefined;
24
+ }, {
25
+ limit?: number | undefined;
26
+ action?: "buy" | "sell" | undefined;
27
+ kol?: string | undefined;
28
+ }>;
29
+ handler: (agent: unknown, input: {
30
+ limit?: number;
31
+ action?: string;
32
+ kol?: string;
33
+ }) => Promise<{
34
+ status: string;
35
+ result: any;
36
+ message?: undefined;
37
+ } | {
38
+ status: string;
39
+ message: string;
40
+ result?: undefined;
41
+ }>;
42
+ };
@@ -1,24 +1,24 @@
1
- import { z } from "zod";
2
- import { kolFeed } from "../tools/index.js";
3
- export const kolFeedAction = {
4
- name: "MADEONSOL_KOL_FEED_ACTION",
5
- similes: ["kol trades", "what are kols buying", "kol feed", "smart money trades", "kol activity"],
6
- description: "Get real-time Solana KOL trades from 946 tracked wallets via MadeOnSol x402 API. Costs $0.005 USDC per request.",
7
- examples: [
8
- [{ input: { limit: 10, action: "buy" }, output: { status: "success" }, explanation: "Fetch the 10 most recent KOL buy trades" }],
9
- ],
10
- schema: z.object({
11
- limit: z.number().min(1).max(100).default(10).describe("Number of trades"),
12
- action: z.enum(["buy", "sell"]).optional().describe("Filter by trade type"),
13
- kol: z.string().optional().describe("Filter by KOL wallet address"),
14
- }),
15
- handler: async (agent, input) => {
16
- try {
17
- const data = await kolFeed(agent, input);
18
- return { status: "success", result: data };
19
- }
20
- catch (err) {
21
- return { status: "error", message: err.message };
22
- }
23
- },
24
- };
1
+ import { z } from "zod";
2
+ import { kolFeed } from "../tools/index.js";
3
+ export const kolFeedAction = {
4
+ name: "MADEONSOL_KOL_FEED_ACTION",
5
+ similes: ["kol trades", "what are kols buying", "kol feed", "smart money trades", "kol activity"],
6
+ description: "Get real-time Solana KOL trades from 946 tracked wallets via MadeOnSol x402 API. Costs $0.005 USDC per request.",
7
+ examples: [
8
+ [{ input: { limit: 10, action: "buy" }, output: { status: "success" }, explanation: "Fetch the 10 most recent KOL buy trades" }],
9
+ ],
10
+ schema: z.object({
11
+ limit: z.number().min(1).max(100).default(10).describe("Number of trades"),
12
+ action: z.enum(["buy", "sell"]).optional().describe("Filter by trade type"),
13
+ kol: z.string().optional().describe("Filter by KOL wallet address"),
14
+ }),
15
+ handler: async (agent, input) => {
16
+ try {
17
+ const data = await kolFeed(agent, input);
18
+ return { status: "success", result: data };
19
+ }
20
+ catch (err) {
21
+ return { status: "error", message: err.message };
22
+ }
23
+ },
24
+ };
@@ -1,38 +1,38 @@
1
- import { z } from "zod";
2
- export declare const kolLeaderboardAction: {
3
- name: string;
4
- similes: string[];
5
- description: string;
6
- examples: {
7
- input: {
8
- period: string;
9
- limit: number;
10
- };
11
- output: {
12
- status: string;
13
- };
14
- explanation: string;
15
- }[][];
16
- schema: z.ZodObject<{
17
- period: z.ZodDefault<z.ZodEnum<["today", "7d", "30d"]>>;
18
- limit: z.ZodDefault<z.ZodNumber>;
19
- }, "strip", z.ZodTypeAny, {
20
- limit: number;
21
- period: "7d" | "today" | "30d";
22
- }, {
23
- limit?: number | undefined;
24
- period?: "7d" | "today" | "30d" | undefined;
25
- }>;
26
- handler: (agent: unknown, input: {
27
- period?: 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
- };
1
+ import { z } from "zod";
2
+ export declare const kolLeaderboardAction: {
3
+ name: string;
4
+ similes: string[];
5
+ description: string;
6
+ examples: {
7
+ input: {
8
+ period: string;
9
+ limit: number;
10
+ };
11
+ output: {
12
+ status: string;
13
+ };
14
+ explanation: string;
15
+ }[][];
16
+ schema: z.ZodObject<{
17
+ period: z.ZodDefault<z.ZodEnum<["today", "7d", "30d"]>>;
18
+ limit: z.ZodDefault<z.ZodNumber>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ limit: number;
21
+ period: "7d" | "today" | "30d";
22
+ }, {
23
+ limit?: number | undefined;
24
+ period?: "7d" | "today" | "30d" | undefined;
25
+ }>;
26
+ handler: (agent: unknown, input: {
27
+ period?: 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
+ };
@@ -1,23 +1,23 @@
1
- import { z } from "zod";
2
- import { kolLeaderboard } from "../tools/index.js";
3
- export const kolLeaderboardAction = {
4
- name: "MADEONSOL_KOL_LEADERBOARD_ACTION",
5
- similes: ["kol leaderboard", "top kols", "best performing kols", "kol rankings", "kol pnl"],
6
- description: "Get KOL performance rankings by PnL and win rate. Costs $0.005 USDC per request.",
7
- examples: [
8
- [{ input: { period: "7d", limit: 10 }, output: { status: "success" }, explanation: "Get the top 10 KOLs by PnL this week" }],
9
- ],
10
- schema: z.object({
11
- period: z.enum(["today", "7d", "30d"]).default("7d").describe("Time period"),
12
- limit: z.number().min(1).max(50).default(20).describe("Number of KOLs"),
13
- }),
14
- handler: async (agent, input) => {
15
- try {
16
- const data = await kolLeaderboard(agent, input);
17
- return { status: "success", result: data };
18
- }
19
- catch (err) {
20
- return { status: "error", message: err.message };
21
- }
22
- },
23
- };
1
+ import { z } from "zod";
2
+ import { kolLeaderboard } from "../tools/index.js";
3
+ export const kolLeaderboardAction = {
4
+ name: "MADEONSOL_KOL_LEADERBOARD_ACTION",
5
+ similes: ["kol leaderboard", "top kols", "best performing kols", "kol rankings", "kol pnl"],
6
+ description: "Get KOL performance rankings by PnL and win rate. Costs $0.005 USDC per request.",
7
+ examples: [
8
+ [{ input: { period: "7d", limit: 10 }, output: { status: "success" }, explanation: "Get the top 10 KOLs by PnL this week" }],
9
+ ],
10
+ schema: z.object({
11
+ period: z.enum(["today", "7d", "30d"]).default("7d").describe("Time period"),
12
+ limit: z.number().min(1).max(50).default(20).describe("Number of KOLs"),
13
+ }),
14
+ handler: async (agent, input) => {
15
+ try {
16
+ const data = await kolLeaderboard(agent, input);
17
+ return { status: "success", result: data };
18
+ }
19
+ catch (err) {
20
+ return { status: "error", message: err.message };
21
+ }
22
+ },
23
+ };