solana-agent-kit-plugin-madeonsol 0.7.0 → 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: {
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import { walletTrackerWatchlistAction, walletTrackerAddAction, walletTrackerRemo
8
8
  import { kolTokenEntryOrderAction } from "./actions/kolTokenEntryOrder.js";
9
9
  import { kolCompareAction } from "./actions/kolCompare.js";
10
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 } from "./tools/index.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";
12
12
  declare const MadeOnSolPlugin: {
13
13
  name: string;
14
14
  methods: {
@@ -31,6 +31,17 @@ declare const MadeOnSolPlugin: {
31
31
  walletTrackerRemove: typeof walletTrackerRemove;
32
32
  walletTrackerTrades: typeof walletTrackerTrades;
33
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;
34
45
  };
35
46
  actions: ({
36
47
  name: string;
@@ -173,8 +184,8 @@ declare const MadeOnSolPlugin: {
173
184
  tier?: "elite" | "good" | "moderate" | "rising" | "cold" | undefined;
174
185
  }, {
175
186
  limit?: number | undefined;
176
- offset?: number | undefined;
177
187
  since?: string | undefined;
188
+ offset?: number | undefined;
178
189
  tier?: "elite" | "good" | "moderate" | "rising" | "cold" | undefined;
179
190
  }>;
180
191
  handler: (agent: unknown, input: {
@@ -552,6 +563,6 @@ declare const MadeOnSolPlugin: {
552
563
  initialize(_agent: unknown): void;
553
564
  };
554
565
  export default MadeOnSolPlugin;
555
- export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, kolPnl, kolTrendingTokens, kolTokenEntryOrder, kolCompare, kolAlertsRecent, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken, walletTrackerWatchlist, walletTrackerAdd, walletTrackerRemove, walletTrackerTrades, walletTrackerSummary };
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, };
556
567
  export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction, kolPnlAction, kolTrendingTokensAction, kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction };
557
568
  export { walletTrackerWatchlistAction, walletTrackerAddAction, walletTrackerRemoveAction, walletTrackerTradesAction, walletTrackerSummaryAction };
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { walletTrackerWatchlistAction, walletTrackerAddAction, walletTrackerRemo
8
8
  import { kolTokenEntryOrderAction } from "./actions/kolTokenEntryOrder.js";
9
9
  import { kolCompareAction } from "./actions/kolCompare.js";
10
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 } from "./tools/index.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";
12
12
  const MadeOnSolPlugin = {
13
13
  name: "madeonsol",
14
14
  methods: {
@@ -31,6 +31,17 @@ const MadeOnSolPlugin = {
31
31
  walletTrackerRemove,
32
32
  walletTrackerTrades,
33
33
  walletTrackerSummary,
34
+ alphaLeaderboard,
35
+ alphaWallet,
36
+ alphaLinked,
37
+ tokenCapTable,
38
+ tokenBuyerQuality,
39
+ copyTradeList,
40
+ copyTradeCreate,
41
+ copyTradeGet,
42
+ copyTradeUpdate,
43
+ copyTradeDelete,
44
+ copyTradeSignals,
34
45
  },
35
46
  actions: [
36
47
  kolFeedAction,
@@ -53,6 +64,6 @@ const MadeOnSolPlugin = {
53
64
  },
54
65
  };
55
66
  export default MadeOnSolPlugin;
56
- export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, kolPnl, kolTrendingTokens, kolTokenEntryOrder, kolCompare, kolAlertsRecent, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken, walletTrackerWatchlist, walletTrackerAdd, walletTrackerRemove, walletTrackerTrades, walletTrackerSummary };
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, };
57
68
  export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction, kolPnlAction, kolTrendingTokensAction, kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction };
58
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>;
@@ -103,4 +114,45 @@ export declare function walletTrackerSummary(agent: Agent, params?: {
103
114
  period?: string;
104
115
  wallet?: string;
105
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>;
106
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}`);
@@ -134,11 +140,11 @@ export async function kolTiming(agent, params) {
134
140
  export async function deployerTrajectory(agent, params) {
135
141
  return restQuery(agent, "GET", `/deployer-hunter/${params.wallet}/trajectory`);
136
142
  }
137
- // ── Webhook & Streaming (requires API key or RapidAPI key) ──
143
+ // ── REST helper (webhooks, streaming, alpha, copy-trade, wallet-tracker) ──
138
144
  async function restQuery(agent, method, path, body) {
139
145
  await initAuth(agent);
140
- if (_authMode !== "madeonsol" && _authMode !== "rapidapi") {
141
- 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");
142
148
  }
143
149
  const res = await fetch(`${BASE_URL}/api/v1${path}`, {
144
150
  method,
@@ -148,6 +154,7 @@ async function restQuery(agent, method, path, body) {
148
154
  },
149
155
  ...(body ? { body: JSON.stringify(body) } : {}),
150
156
  });
157
+ captureRateLimit(res);
151
158
  if (!res.ok) {
152
159
  const text = await res.text().catch(() => "");
153
160
  throw new Error(`MadeOnSol API error ${res.status}: ${text}`);
@@ -180,30 +187,68 @@ export async function walletTrackerRemove(agent, params) {
180
187
  return restQuery(agent, "DELETE", `/wallet-tracker/watchlist/${encodeURIComponent(params.wallet_address)}`);
181
188
  }
182
189
  export async function walletTrackerTrades(agent, params = {}) {
183
- await initAuth(agent);
184
- const url = new URL(`${BASE_URL}/api/v1/wallet-tracker/trades`);
190
+ const qs = new URLSearchParams();
185
191
  for (const [k, v] of Object.entries(params)) {
186
192
  if (v !== undefined)
187
- url.searchParams.set(k, String(v));
193
+ qs.set(k, String(v));
188
194
  }
189
- const res = await fetch(url.toString(), { headers: { "Content-Type": "application/json", ..._authHeaders } });
190
- if (!res.ok) {
191
- const text = await res.text().catch(() => "");
192
- throw new Error(`MadeOnSol API error ${res.status}: ${text}`);
193
- }
194
- return res.json();
195
+ const query = qs.toString() ? `?${qs.toString()}` : "";
196
+ return restQuery(agent, "GET", `/wallet-tracker/trades${query}`);
195
197
  }
196
198
  export async function walletTrackerSummary(agent, params = {}) {
197
- await initAuth(agent);
198
- 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();
199
210
  for (const [k, v] of Object.entries(params)) {
200
211
  if (v !== undefined)
201
- url.searchParams.set(k, v);
212
+ qs.set(k, String(v));
202
213
  }
203
- const res = await fetch(url.toString(), { headers: { "Content-Type": "application/json", ..._authHeaders } });
204
- if (!res.ok) {
205
- const text = await res.text().catch(() => "");
206
- 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));
207
251
  }
208
- return res.json();
252
+ const query = qs.toString() ? `?${qs.toString()}` : "";
253
+ return restQuery(agent, "GET", `/copy-trade/signals${query}`);
209
254
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solana-agent-kit-plugin-madeonsol",
3
- "version": "0.7.0",
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",