solana-agent-kit-plugin-madeonsol 0.4.0 → 0.5.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.
@@ -0,0 +1,38 @@
1
+ import { z } from "zod";
2
+ export declare const kolPnlAction: {
3
+ name: string;
4
+ similes: string[];
5
+ description: string;
6
+ examples: {
7
+ input: {
8
+ wallet: string;
9
+ period: string;
10
+ };
11
+ output: {
12
+ status: string;
13
+ };
14
+ explanation: string;
15
+ }[][];
16
+ schema: z.ZodObject<{
17
+ wallet: z.ZodString;
18
+ period: z.ZodDefault<z.ZodEnum<["7d", "30d", "90d", "180d"]>>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ period: "7d" | "30d" | "90d" | "180d";
21
+ wallet: string;
22
+ }, {
23
+ wallet: string;
24
+ period?: "7d" | "30d" | "90d" | "180d" | undefined;
25
+ }>;
26
+ handler: (agent: unknown, input: {
27
+ wallet: string;
28
+ period?: string;
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 { kolPnl } from "../tools/index.js";
3
+ export const kolPnlAction = {
4
+ name: "MADEONSOL_KOL_PNL_ACTION",
5
+ similes: ["kol pnl", "kol profit", "kol performance", "wallet pnl", "kol win rate", "kol drawdown"],
6
+ description: "Get deep per-wallet PnL breakdown — realized PnL, win rate, profit factor, max drawdown, daily equity curve, and per-token positions via MadeOnSol API.",
7
+ examples: [
8
+ [{ input: { wallet: "ABC...xyz", period: "30d" }, output: { status: "success" }, explanation: "Get 30-day PnL breakdown for a KOL wallet" }],
9
+ ],
10
+ schema: z.object({
11
+ wallet: z.string().describe("KOL wallet address (base58)"),
12
+ period: z.enum(["7d", "30d", "90d", "180d"]).default("30d").describe("Time period"),
13
+ }),
14
+ handler: async (agent, input) => {
15
+ try {
16
+ const data = await kolPnl(agent, input);
17
+ return { status: "success", result: data };
18
+ }
19
+ catch (err) {
20
+ return { status: "error", message: err.message };
21
+ }
22
+ },
23
+ };
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ export declare const kolTrendingTokensAction: {
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<["5m", "15m", "30m", "1h", "2h", "4h", "12h"]>>;
18
+ min_kols: z.ZodDefault<z.ZodNumber>;
19
+ limit: z.ZodDefault<z.ZodNumber>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ limit: number;
22
+ period: "1h" | "5m" | "15m" | "30m" | "2h" | "4h" | "12h";
23
+ min_kols: number;
24
+ }, {
25
+ limit?: number | undefined;
26
+ period?: "1h" | "5m" | "15m" | "30m" | "2h" | "4h" | "12h" | 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
+ };
@@ -0,0 +1,24 @@
1
+ import { z } from "zod";
2
+ import { kolTrendingTokens } from "../tools/index.js";
3
+ export const kolTrendingTokensAction = {
4
+ name: "MADEONSOL_KOL_TRENDING_TOKENS_ACTION",
5
+ similes: ["trending tokens", "kol volume", "what are kols buying now", "hot buys", "kol capital flow"],
6
+ description: "Get tokens ranked by KOL buy volume — pure capital-flow signal. Sub-hour periods (5m/15m/30m) require PRO/ULTRA. Costs $0.005 USDC per request.",
7
+ examples: [
8
+ [{ input: { period: "1h", min_kols: 2 }, output: { status: "success" }, explanation: "Get tokens with highest KOL buy volume in the last hour, with at least 2 KOLs buying" }],
9
+ ],
10
+ schema: z.object({
11
+ period: z.enum(["5m", "15m", "30m", "1h", "2h", "4h", "12h"]).default("1h").describe("Time window"),
12
+ min_kols: z.number().min(1).max(20).default(1).describe("Minimum KOL buyers"),
13
+ limit: z.number().min(1).max(50).default(20).describe("Number of tokens"),
14
+ }),
15
+ handler: async (agent, input) => {
16
+ try {
17
+ const data = await kolTrendingTokens(agent, input);
18
+ return { status: "success", result: data };
19
+ }
20
+ catch (err) {
21
+ return { status: "error", message: err.message };
22
+ }
23
+ },
24
+ };
package/dist/index.d.ts CHANGED
@@ -2,7 +2,9 @@ import { kolFeedAction } from "./actions/kolFeed.js";
2
2
  import { kolCoordinationAction } from "./actions/kolCoordination.js";
3
3
  import { kolLeaderboardAction } from "./actions/kolLeaderboard.js";
4
4
  import { deployerAlertsAction } from "./actions/deployerAlerts.js";
5
- import { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken } from "./tools/index.js";
5
+ import { kolPnlAction } from "./actions/kolPnl.js";
6
+ import { kolTrendingTokensAction } from "./actions/kolTrendingTokens.js";
7
+ import { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, kolPnl, kolTrendingTokens, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken } from "./tools/index.js";
6
8
  declare const MadeOnSolPlugin: {
7
9
  name: string;
8
10
  methods: {
@@ -10,6 +12,8 @@ declare const MadeOnSolPlugin: {
10
12
  kolCoordination: typeof kolCoordination;
11
13
  kolLeaderboard: typeof kolLeaderboard;
12
14
  deployerAlerts: typeof deployerAlerts;
15
+ kolPnl: typeof kolPnl;
16
+ kolTrendingTokens: typeof kolTrendingTokens;
13
17
  createWebhook: typeof createWebhook;
14
18
  listWebhooks: typeof listWebhooks;
15
19
  deleteWebhook: typeof deleteWebhook;
@@ -175,9 +179,85 @@ declare const MadeOnSolPlugin: {
175
179
  message: string;
176
180
  result?: undefined;
177
181
  }>;
182
+ } | {
183
+ name: string;
184
+ similes: string[];
185
+ description: string;
186
+ examples: {
187
+ input: {
188
+ wallet: string;
189
+ period: string;
190
+ };
191
+ output: {
192
+ status: string;
193
+ };
194
+ explanation: string;
195
+ }[][];
196
+ schema: import("zod").ZodObject<{
197
+ wallet: import("zod").ZodString;
198
+ period: import("zod").ZodDefault<import("zod").ZodEnum<["7d", "30d", "90d", "180d"]>>;
199
+ }, "strip", import("zod").ZodTypeAny, {
200
+ period: "7d" | "30d" | "90d" | "180d";
201
+ wallet: string;
202
+ }, {
203
+ wallet: string;
204
+ period?: "7d" | "30d" | "90d" | "180d" | undefined;
205
+ }>;
206
+ handler: (agent: unknown, input: {
207
+ wallet: string;
208
+ period?: string;
209
+ }) => Promise<{
210
+ status: string;
211
+ result: any;
212
+ message?: undefined;
213
+ } | {
214
+ status: string;
215
+ message: string;
216
+ result?: undefined;
217
+ }>;
218
+ } | {
219
+ name: string;
220
+ similes: string[];
221
+ description: string;
222
+ examples: {
223
+ input: {
224
+ period: string;
225
+ min_kols: number;
226
+ };
227
+ output: {
228
+ status: string;
229
+ };
230
+ explanation: string;
231
+ }[][];
232
+ schema: import("zod").ZodObject<{
233
+ period: import("zod").ZodDefault<import("zod").ZodEnum<["5m", "15m", "30m", "1h", "2h", "4h", "12h"]>>;
234
+ min_kols: import("zod").ZodDefault<import("zod").ZodNumber>;
235
+ limit: import("zod").ZodDefault<import("zod").ZodNumber>;
236
+ }, "strip", import("zod").ZodTypeAny, {
237
+ limit: number;
238
+ period: "1h" | "5m" | "15m" | "30m" | "2h" | "4h" | "12h";
239
+ min_kols: number;
240
+ }, {
241
+ limit?: number | undefined;
242
+ period?: "1h" | "5m" | "15m" | "30m" | "2h" | "4h" | "12h" | undefined;
243
+ min_kols?: number | undefined;
244
+ }>;
245
+ handler: (agent: unknown, input: {
246
+ period?: string;
247
+ min_kols?: number;
248
+ limit?: number;
249
+ }) => Promise<{
250
+ status: string;
251
+ result: any;
252
+ message?: undefined;
253
+ } | {
254
+ status: string;
255
+ message: string;
256
+ result?: undefined;
257
+ }>;
178
258
  })[];
179
259
  initialize(_agent: unknown): void;
180
260
  };
181
261
  export default MadeOnSolPlugin;
182
- export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken };
183
- export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction };
262
+ export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, kolPnl, kolTrendingTokens, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken };
263
+ export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction, kolPnlAction, kolTrendingTokensAction };
package/dist/index.js CHANGED
@@ -2,7 +2,9 @@ import { kolFeedAction } from "./actions/kolFeed.js";
2
2
  import { kolCoordinationAction } from "./actions/kolCoordination.js";
3
3
  import { kolLeaderboardAction } from "./actions/kolLeaderboard.js";
4
4
  import { deployerAlertsAction } from "./actions/deployerAlerts.js";
5
- import { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken } from "./tools/index.js";
5
+ import { kolPnlAction } from "./actions/kolPnl.js";
6
+ import { kolTrendingTokensAction } from "./actions/kolTrendingTokens.js";
7
+ import { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, kolPnl, kolTrendingTokens, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken } from "./tools/index.js";
6
8
  const MadeOnSolPlugin = {
7
9
  name: "madeonsol",
8
10
  methods: {
@@ -10,6 +12,8 @@ const MadeOnSolPlugin = {
10
12
  kolCoordination,
11
13
  kolLeaderboard,
12
14
  deployerAlerts,
15
+ kolPnl,
16
+ kolTrendingTokens,
13
17
  createWebhook,
14
18
  listWebhooks,
15
19
  deleteWebhook,
@@ -21,11 +25,13 @@ const MadeOnSolPlugin = {
21
25
  kolCoordinationAction,
22
26
  kolLeaderboardAction,
23
27
  deployerAlertsAction,
28
+ kolPnlAction,
29
+ kolTrendingTokensAction,
24
30
  ],
25
31
  initialize(_agent) {
26
32
  // No-op — payment setup is lazy in tool functions
27
33
  },
28
34
  };
29
35
  export default MadeOnSolPlugin;
30
- export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken };
31
- export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction };
36
+ export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, kolPnl, kolTrendingTokens, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken };
37
+ export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction, kolPnlAction, kolTrendingTokensAction };
@@ -42,6 +42,15 @@ export declare function kolHotTokens(agent: Agent, params?: {
42
42
  min_kols?: number;
43
43
  limit?: number;
44
44
  }): Promise<any>;
45
+ export declare function kolTrendingTokens(agent: Agent, params?: {
46
+ period?: string;
47
+ min_kols?: number;
48
+ limit?: number;
49
+ }): Promise<any>;
50
+ export declare function kolPnl(agent: Agent, params: {
51
+ wallet: string;
52
+ period?: string;
53
+ }): Promise<any>;
45
54
  export declare function kolTiming(agent: Agent, params: {
46
55
  wallet: string;
47
56
  period?: string;
@@ -102,6 +102,14 @@ export async function kolHotTokens(agent, params = {}) {
102
102
  await initAuth(agent);
103
103
  return query("/api/x402/kol/tokens/hot", params);
104
104
  }
105
+ export async function kolTrendingTokens(agent, params = {}) {
106
+ await initAuth(agent);
107
+ return query("/api/x402/kol/tokens/trending", params);
108
+ }
109
+ export async function kolPnl(agent, params) {
110
+ const qs = params.period ? `?period=${params.period}` : "";
111
+ return restQuery(agent, "GET", `/kol/${params.wallet}/pnl${qs}`);
112
+ }
105
113
  export async function kolTiming(agent, params) {
106
114
  const qs = params.period ? `?period=${params.period}` : "";
107
115
  return restQuery(agent, "GET", `/kol/${params.wallet}/timing${qs}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solana-agent-kit-plugin-madeonsol",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Solana Agent Kit plugin for MadeOnSol \u00e2\u20ac\u201d KOL intelligence and deployer analytics via x402 micropayments",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",