solana-agent-kit-plugin-madeonsol 1.4.0 → 1.6.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 +82 -5
- package/dist/actions/deployerAlerts.d.ts +45 -0
- package/dist/actions/deployerAlerts.js +28 -0
- package/dist/actions/kolAlertsRecent.d.ts +46 -0
- package/dist/actions/kolAlertsRecent.js +27 -0
- package/dist/actions/kolCompare.d.ts +33 -0
- package/dist/actions/kolCompare.js +24 -0
- package/dist/actions/kolCoordination.d.ts +42 -0
- package/dist/actions/kolCoordination.js +24 -0
- package/dist/actions/kolFeed.d.ts +42 -0
- package/dist/actions/kolFeed.js +24 -0
- package/dist/actions/kolFirstTouches.d.ts +82 -0
- package/dist/actions/kolFirstTouches.js +47 -0
- package/dist/actions/kolLeaderboard.d.ts +38 -0
- package/dist/actions/kolLeaderboard.js +23 -0
- package/dist/actions/kolPnl.d.ts +38 -0
- package/dist/actions/kolPnl.js +23 -0
- package/dist/actions/kolTokenEntryOrder.d.ts +38 -0
- package/dist/actions/kolTokenEntryOrder.js +23 -0
- package/dist/actions/kolTrendingTokens.d.ts +42 -0
- package/dist/actions/kolTrendingTokens.js +24 -0
- package/dist/actions/walletTracker.d.ts +176 -0
- package/dist/actions/walletTracker.js +106 -0
- package/dist/index.d.ts +660 -0
- package/dist/index.js +82 -0
- package/dist/tools/index.d.ts +248 -0
- package/dist/tools/index.js +314 -0
- package/package.json +1 -1
|
@@ -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,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
|
+
limit: number;
|
|
21
|
+
mint: string;
|
|
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
|
+
};
|
|
@@ -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
|
+
period: "1h" | "5m" | "15m" | "30m" | "2h" | "4h" | "12h";
|
|
22
|
+
min_kols: number;
|
|
23
|
+
limit: number;
|
|
24
|
+
}, {
|
|
25
|
+
period?: "1h" | "5m" | "15m" | "30m" | "2h" | "4h" | "12h" | undefined;
|
|
26
|
+
min_kols?: number | undefined;
|
|
27
|
+
limit?: 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
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const walletTrackerWatchlistAction: {
|
|
3
|
+
name: string;
|
|
4
|
+
similes: string[];
|
|
5
|
+
description: string;
|
|
6
|
+
examples: {
|
|
7
|
+
input: {};
|
|
8
|
+
output: {
|
|
9
|
+
status: string;
|
|
10
|
+
};
|
|
11
|
+
explanation: string;
|
|
12
|
+
}[][];
|
|
13
|
+
schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
14
|
+
handler: (agent: unknown) => Promise<{
|
|
15
|
+
status: string;
|
|
16
|
+
result: any;
|
|
17
|
+
message?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
status: string;
|
|
20
|
+
message: string;
|
|
21
|
+
result?: undefined;
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
export declare const walletTrackerAddAction: {
|
|
25
|
+
name: string;
|
|
26
|
+
similes: string[];
|
|
27
|
+
description: string;
|
|
28
|
+
examples: {
|
|
29
|
+
input: {
|
|
30
|
+
wallet_address: string;
|
|
31
|
+
label: string;
|
|
32
|
+
};
|
|
33
|
+
output: {
|
|
34
|
+
status: string;
|
|
35
|
+
};
|
|
36
|
+
explanation: string;
|
|
37
|
+
}[][];
|
|
38
|
+
schema: z.ZodObject<{
|
|
39
|
+
wallet_address: z.ZodString;
|
|
40
|
+
label: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
wallet_address: string;
|
|
43
|
+
label?: string | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
wallet_address: string;
|
|
46
|
+
label?: string | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
handler: (agent: unknown, input: {
|
|
49
|
+
wallet_address: string;
|
|
50
|
+
label?: string;
|
|
51
|
+
}) => Promise<{
|
|
52
|
+
status: string;
|
|
53
|
+
result: any;
|
|
54
|
+
message?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
status: string;
|
|
57
|
+
message: string;
|
|
58
|
+
result?: undefined;
|
|
59
|
+
}>;
|
|
60
|
+
};
|
|
61
|
+
export declare const walletTrackerRemoveAction: {
|
|
62
|
+
name: string;
|
|
63
|
+
similes: string[];
|
|
64
|
+
description: string;
|
|
65
|
+
examples: {
|
|
66
|
+
input: {
|
|
67
|
+
wallet_address: string;
|
|
68
|
+
};
|
|
69
|
+
output: {
|
|
70
|
+
status: string;
|
|
71
|
+
};
|
|
72
|
+
explanation: string;
|
|
73
|
+
}[][];
|
|
74
|
+
schema: z.ZodObject<{
|
|
75
|
+
wallet_address: z.ZodString;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
wallet_address: string;
|
|
78
|
+
}, {
|
|
79
|
+
wallet_address: string;
|
|
80
|
+
}>;
|
|
81
|
+
handler: (agent: unknown, input: {
|
|
82
|
+
wallet_address: string;
|
|
83
|
+
}) => Promise<{
|
|
84
|
+
status: string;
|
|
85
|
+
result: any;
|
|
86
|
+
message?: undefined;
|
|
87
|
+
} | {
|
|
88
|
+
status: string;
|
|
89
|
+
message: string;
|
|
90
|
+
result?: undefined;
|
|
91
|
+
}>;
|
|
92
|
+
};
|
|
93
|
+
export declare const walletTrackerTradesAction: {
|
|
94
|
+
name: string;
|
|
95
|
+
similes: string[];
|
|
96
|
+
description: string;
|
|
97
|
+
examples: {
|
|
98
|
+
input: {
|
|
99
|
+
limit: number;
|
|
100
|
+
};
|
|
101
|
+
output: {
|
|
102
|
+
status: string;
|
|
103
|
+
};
|
|
104
|
+
explanation: string;
|
|
105
|
+
}[][];
|
|
106
|
+
schema: z.ZodObject<{
|
|
107
|
+
wallet: z.ZodOptional<z.ZodString>;
|
|
108
|
+
action: z.ZodOptional<z.ZodEnum<["buy", "sell", "transfer_in", "transfer_out"]>>;
|
|
109
|
+
event_type: z.ZodOptional<z.ZodEnum<["swap", "transfer"]>>;
|
|
110
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
111
|
+
before: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
limit: number;
|
|
114
|
+
wallet?: string | undefined;
|
|
115
|
+
action?: "buy" | "sell" | "transfer_in" | "transfer_out" | undefined;
|
|
116
|
+
event_type?: "swap" | "transfer" | undefined;
|
|
117
|
+
before?: number | undefined;
|
|
118
|
+
}, {
|
|
119
|
+
limit?: number | undefined;
|
|
120
|
+
wallet?: string | undefined;
|
|
121
|
+
action?: "buy" | "sell" | "transfer_in" | "transfer_out" | undefined;
|
|
122
|
+
event_type?: "swap" | "transfer" | undefined;
|
|
123
|
+
before?: number | undefined;
|
|
124
|
+
}>;
|
|
125
|
+
handler: (agent: unknown, input: {
|
|
126
|
+
wallet?: string;
|
|
127
|
+
action?: string;
|
|
128
|
+
event_type?: string;
|
|
129
|
+
limit?: number;
|
|
130
|
+
before?: number;
|
|
131
|
+
}) => Promise<{
|
|
132
|
+
status: string;
|
|
133
|
+
result: any;
|
|
134
|
+
message?: undefined;
|
|
135
|
+
} | {
|
|
136
|
+
status: string;
|
|
137
|
+
message: string;
|
|
138
|
+
result?: undefined;
|
|
139
|
+
}>;
|
|
140
|
+
};
|
|
141
|
+
export declare const walletTrackerSummaryAction: {
|
|
142
|
+
name: string;
|
|
143
|
+
similes: string[];
|
|
144
|
+
description: string;
|
|
145
|
+
examples: {
|
|
146
|
+
input: {
|
|
147
|
+
period: string;
|
|
148
|
+
};
|
|
149
|
+
output: {
|
|
150
|
+
status: string;
|
|
151
|
+
};
|
|
152
|
+
explanation: string;
|
|
153
|
+
}[][];
|
|
154
|
+
schema: z.ZodObject<{
|
|
155
|
+
period: z.ZodDefault<z.ZodEnum<["24h", "7d", "30d"]>>;
|
|
156
|
+
wallet: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, "strip", z.ZodTypeAny, {
|
|
158
|
+
period: "24h" | "7d" | "30d";
|
|
159
|
+
wallet?: string | undefined;
|
|
160
|
+
}, {
|
|
161
|
+
period?: "24h" | "7d" | "30d" | undefined;
|
|
162
|
+
wallet?: string | undefined;
|
|
163
|
+
}>;
|
|
164
|
+
handler: (agent: unknown, input: {
|
|
165
|
+
period?: string;
|
|
166
|
+
wallet?: string;
|
|
167
|
+
}) => Promise<{
|
|
168
|
+
status: string;
|
|
169
|
+
result: any;
|
|
170
|
+
message?: undefined;
|
|
171
|
+
} | {
|
|
172
|
+
status: string;
|
|
173
|
+
message: string;
|
|
174
|
+
result?: undefined;
|
|
175
|
+
}>;
|
|
176
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { walletTrackerWatchlist, walletTrackerAdd, walletTrackerRemove, walletTrackerTrades, walletTrackerSummary } from "../tools/index.js";
|
|
3
|
+
export const walletTrackerWatchlistAction = {
|
|
4
|
+
name: "MADEONSOL_WALLET_TRACKER_WATCHLIST_ACTION",
|
|
5
|
+
similes: ["wallet watchlist", "tracked wallets", "my watchlist", "wallet tracker list"],
|
|
6
|
+
description: "List wallets in your MadeOnSol watchlist with labels and remaining capacity.",
|
|
7
|
+
examples: [
|
|
8
|
+
[{ input: {}, output: { status: "success" }, explanation: "Get your tracked wallet list" }],
|
|
9
|
+
],
|
|
10
|
+
schema: z.object({}),
|
|
11
|
+
handler: async (agent) => {
|
|
12
|
+
try {
|
|
13
|
+
const data = await walletTrackerWatchlist(agent);
|
|
14
|
+
return { status: "success", result: data };
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
return { status: "error", message: err.message };
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export const walletTrackerAddAction = {
|
|
22
|
+
name: "MADEONSOL_WALLET_TRACKER_ADD_ACTION",
|
|
23
|
+
similes: ["track wallet", "add wallet to watchlist", "watch wallet", "monitor wallet"],
|
|
24
|
+
description: "Add a Solana wallet to your MadeOnSol watchlist for swap/transfer tracking.",
|
|
25
|
+
examples: [
|
|
26
|
+
[{ input: { wallet_address: "ABC...xyz", label: "whale #1" }, output: { status: "success" }, explanation: "Add a wallet to watchlist" }],
|
|
27
|
+
],
|
|
28
|
+
schema: z.object({
|
|
29
|
+
wallet_address: z.string().describe("Solana wallet address (base58) to track"),
|
|
30
|
+
label: z.string().optional().describe("Optional human-readable label"),
|
|
31
|
+
}),
|
|
32
|
+
handler: async (agent, input) => {
|
|
33
|
+
try {
|
|
34
|
+
const data = await walletTrackerAdd(agent, input);
|
|
35
|
+
return { status: "success", result: data };
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
return { status: "error", message: err.message };
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export const walletTrackerRemoveAction = {
|
|
43
|
+
name: "MADEONSOL_WALLET_TRACKER_REMOVE_ACTION",
|
|
44
|
+
similes: ["untrack wallet", "remove wallet from watchlist", "stop watching wallet"],
|
|
45
|
+
description: "Remove a Solana wallet from your MadeOnSol watchlist.",
|
|
46
|
+
examples: [
|
|
47
|
+
[{ input: { wallet_address: "ABC...xyz" }, output: { status: "success" }, explanation: "Remove a wallet from watchlist" }],
|
|
48
|
+
],
|
|
49
|
+
schema: z.object({
|
|
50
|
+
wallet_address: z.string().describe("Solana wallet address (base58) to remove"),
|
|
51
|
+
}),
|
|
52
|
+
handler: async (agent, input) => {
|
|
53
|
+
try {
|
|
54
|
+
const data = await walletTrackerRemove(agent, input);
|
|
55
|
+
return { status: "success", result: data };
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
return { status: "error", message: err.message };
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
export const walletTrackerTradesAction = {
|
|
63
|
+
name: "MADEONSOL_WALLET_TRACKER_TRADES_ACTION",
|
|
64
|
+
similes: ["wallet tracker trades", "tracked wallet trades", "watchlist activity", "wallet swaps", "wallet transfers"],
|
|
65
|
+
description: "Get recent swap and transfer events from wallets in your MadeOnSol watchlist.",
|
|
66
|
+
examples: [
|
|
67
|
+
[{ input: { limit: 20 }, output: { status: "success" }, explanation: "Get recent trades from tracked wallets" }],
|
|
68
|
+
],
|
|
69
|
+
schema: z.object({
|
|
70
|
+
wallet: z.string().optional().describe("Filter to a specific wallet address"),
|
|
71
|
+
action: z.enum(["buy", "sell", "transfer_in", "transfer_out"]).optional().describe("Filter by action type"),
|
|
72
|
+
event_type: z.enum(["swap", "transfer"]).optional().describe("Filter by event type"),
|
|
73
|
+
limit: z.number().min(1).max(200).default(50).describe("Max results (1-200)"),
|
|
74
|
+
before: z.number().optional().describe("Pagination cursor: block_time of last event"),
|
|
75
|
+
}),
|
|
76
|
+
handler: async (agent, input) => {
|
|
77
|
+
try {
|
|
78
|
+
const data = await walletTrackerTrades(agent, input);
|
|
79
|
+
return { status: "success", result: data };
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
return { status: "error", message: err.message };
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
export const walletTrackerSummaryAction = {
|
|
87
|
+
name: "MADEONSOL_WALLET_TRACKER_SUMMARY_ACTION",
|
|
88
|
+
similes: ["wallet tracker summary", "tracked wallet stats", "watchlist summary", "wallet activity stats"],
|
|
89
|
+
description: "Get per-wallet stats (swap counts, SOL bought/sold, last activity) for your MadeOnSol watchlist.",
|
|
90
|
+
examples: [
|
|
91
|
+
[{ input: { period: "7d" }, output: { status: "success" }, explanation: "Get 7d stats for all tracked wallets" }],
|
|
92
|
+
],
|
|
93
|
+
schema: z.object({
|
|
94
|
+
period: z.enum(["24h", "7d", "30d"]).default("7d").describe("Time window for stats"),
|
|
95
|
+
wallet: z.string().optional().describe("Filter to a specific wallet address"),
|
|
96
|
+
}),
|
|
97
|
+
handler: async (agent, input) => {
|
|
98
|
+
try {
|
|
99
|
+
const data = await walletTrackerSummary(agent, input);
|
|
100
|
+
return { status: "success", result: data };
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
return { status: "error", message: err.message };
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
};
|