@madeonsol/plugin-madeonsol 1.10.0 → 1.11.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
@@ -11,6 +11,8 @@ ElizaOS plugin for [MadeOnSol](https://madeonsol.com) — Solana KOL trading int
11
11
 
12
12
  > Real-time Solana trading intelligence: track 1,069 KOL wallets with <3s latency, score 23,000+ Pump.fun deployers, surface deshred deploy signals ~500ms before on-chain confirmation, detect multi-KOL coordination, and stream every DEX trade. Free tier: 200 requests/day at [madeonsol.com/pricing](https://madeonsol.com/pricing) — no credit card required.
13
13
 
14
+ > **New in 1.11.0** — **Token risk score.** New action `GET_TOKEN_RISK` + `client.getTokenRisk(mint)` — a transparent 0–100 rug-risk/safety score (higher = riskier) with a `band` (safe/caution/danger), an explainable `factors[]` array, and the raw `inputs` (mint/freeze authority, liquidity, liq-to-MC ratio, transfer fee, launch cohort, deployer bond rate, KOL signal, blacklist). PRO/ULTRA only.
15
+ >
14
16
  > **New in 1.10.0** — `client.getTokensList()` gains three new filter params: `min_liq_mc_ratio`, `max_liq_mc_ratio`, and `deployer_tier`. Response items now include `liquidity_to_mc_ratio` and `deployer_tier`. KOL leaderboard entries now include `median_hold_minutes_30d` and `percentile_early_entry_30d`. Token endpoints now return `liquidity_to_mc_ratio`, `launch_cohort_sol`, and `launch_cohort_size`.
15
17
  >
16
18
  > **New in 1.9.3** — Deployer alerts now surface `runner_rate` + `labeled_tokens` (fraction of a deployer's labeled tokens that ran vs dumped, gate on `labeled_tokens` ≥3) and `avg_time_to_bond_minutes`.
@@ -62,6 +64,7 @@ Gives your ElizaOS agent access to MadeOnSol's Solana intelligence API.
62
64
  | `WALLET_PNL` | **New 1.8** · Full FIFO PnL — realized + unrealized, profit factor, drawdown, hold times, top winners (PRO+) |
63
65
  | `WALLET_POSITIONS` | **New 1.8** · Open positions with live unrealized SOL from market-cap tracker (PRO+) |
64
66
  | `WALLET_TRADES` | **New 1.8** · Recent trades for any wallet, filtered by action (PRO+) |
67
+ | `GET_TOKEN_RISK` | **New 1.11** · Transparent 0–100 rug-risk/safety score with band + explainable factors (PRO+) |
65
68
 
66
69
  ## Install
67
70
 
@@ -0,0 +1,2 @@
1
+ import type { Action } from "@elizaos/core";
2
+ export declare const tokenRiskAction: Action;
@@ -0,0 +1,52 @@
1
+ import { MadeOnSolClient } from "../client.js";
2
+ import { MADEONSOL_CLIENT_KEY } from "../index.js";
3
+ function getClient(runtime) {
4
+ return runtime[MADEONSOL_CLIENT_KEY] ?? new MadeOnSolClient();
5
+ }
6
+ const MINT_RE = /\b([1-9A-HJ-NP-Za-km-z]{32,44})\b/;
7
+ export const tokenRiskAction = {
8
+ name: "GET_TOKEN_RISK",
9
+ description: "Get a transparent 0–100 rug-risk/safety score for a Solana token from MadeOnSol (higher = riskier). Returns a band (safe/caution/danger) and an explainable factors breakdown. PRO+.",
10
+ similes: [
11
+ "token risk",
12
+ "is this a rug",
13
+ "rug risk",
14
+ "safety score",
15
+ "how safe is this token",
16
+ "risk score",
17
+ ],
18
+ validate: async (_runtime, message) => {
19
+ const text = message.content?.text || "";
20
+ return /\b(risk|rug|safe|safety|danger)\b/i.test(text) && MINT_RE.test(text);
21
+ },
22
+ handler: async (runtime, message, _state, _options, callback) => {
23
+ const client = getClient(runtime);
24
+ const mint = (message.content?.text || "").match(MINT_RE)?.[1];
25
+ if (!mint) {
26
+ callback?.({ text: "Please include a token mint address." });
27
+ return undefined;
28
+ }
29
+ const result = await client.getTokenRisk(mint);
30
+ if (result.error) {
31
+ callback?.({ text: result.status === 402
32
+ ? "Authentication required. Set MADEONSOL_API_KEY — free at https://madeonsol.com/pricing — or SVM_PRIVATE_KEY."
33
+ : `Error: ${result.error}` });
34
+ return undefined;
35
+ }
36
+ const data = result.data;
37
+ const lines = (data.factors || [])
38
+ .filter((f) => f.status !== "ok")
39
+ .map((f) => `• ${f.label} [${f.status}] — ${f.detail}`);
40
+ callback?.({
41
+ text: `Risk score for ${mint.slice(0, 8)}…: ${data.risk_score}/100 (${data.band})${lines.length ? `\n${lines.join("\n")}` : ""}`,
42
+ content: data,
43
+ });
44
+ return undefined;
45
+ },
46
+ examples: [
47
+ [
48
+ { name: "user1", content: { text: "Is 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU a rug? Check the risk score." } },
49
+ { name: "assistant", content: { text: "Here's the rug-risk score for that token..." } },
50
+ ],
51
+ ],
52
+ };
package/dist/client.d.ts CHANGED
@@ -279,6 +279,12 @@ export declare class MadeOnSolClient {
279
279
  error?: string;
280
280
  status: number;
281
281
  }>;
282
+ /** Transparent 0–100 rug-risk/safety score (higher = riskier) with band, explainable factors, and raw inputs. PRO+. */
283
+ getTokenRisk(mint: string): Promise<{
284
+ data?: unknown;
285
+ error?: string;
286
+ status: number;
287
+ }>;
282
288
  /** Bulk buyer-quality scoring for up to 50 mints. Shares the single-mint 5-min LRU cache. */
283
289
  getTokenBuyerQualityBatch(mints: string[]): Promise<{
284
290
  data?: unknown;
package/dist/client.js CHANGED
@@ -19,7 +19,7 @@ export class MadeOnSolClient {
19
19
  this.authHeaders = {};
20
20
  if (options.apiKey) {
21
21
  this.authMode = "madeonsol";
22
- this.authHeaders = { Authorization: `Bearer ${options.apiKey}`, "User-Agent": "plugin-madeonsol/1.10.0" };
22
+ this.authHeaders = { Authorization: `Bearer ${options.apiKey}`, "User-Agent": "plugin-madeonsol/1.11.0" };
23
23
  }
24
24
  else if (options.fetchFn) {
25
25
  this.authMode = "x402";
@@ -227,6 +227,10 @@ export class MadeOnSolClient {
227
227
  getTokenBuyerQuality(mint) {
228
228
  return this.restRequest("GET", `/tokens/${encodeURIComponent(mint)}/buyer-quality`);
229
229
  }
230
+ /** Transparent 0–100 rug-risk/safety score (higher = riskier) with band, explainable factors, and raw inputs. PRO+. */
231
+ getTokenRisk(mint) {
232
+ return this.restRequest("GET", `/tokens/${encodeURIComponent(mint)}/risk`);
233
+ }
230
234
  /** Bulk buyer-quality scoring for up to 50 mints. Shares the single-mint 5-min LRU cache. */
231
235
  getTokenBuyerQualityBatch(mints) {
232
236
  return this.restRequest("POST", "/tokens/batch/buyer-quality", { mints });
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ import { walletTrackerWatchlistAction, walletTrackerTradesAction } from "./actio
7
7
  import { kolTokenEntryOrderAction } from "./actions/kol-token-entry-order.js";
8
8
  import { kolCompareAction } from "./actions/kol-compare.js";
9
9
  import { kolAlertsRecentAction } from "./actions/kol-alerts-recent.js";
10
+ import { tokenRiskAction } from "./actions/token-risk.js";
10
11
  import { meAction } from "./actions/me.js";
11
12
  import { tokensListAction } from "./actions/tokens-list.js";
12
13
  import { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction } from "./actions/wallet.js";
@@ -17,6 +18,6 @@ export default madeOnSolPlugin;
17
18
  export { MadeOnSolClient } from "./client.js";
18
19
  export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction };
19
20
  export { walletTrackerWatchlistAction, walletTrackerTradesAction };
20
- export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction };
21
+ export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, tokenRiskAction };
21
22
  export { meAction, tokensListAction };
22
23
  export { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction };
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ import { walletTrackerWatchlistAction, walletTrackerTradesAction } from "./actio
6
6
  import { kolTokenEntryOrderAction } from "./actions/kol-token-entry-order.js";
7
7
  import { kolCompareAction } from "./actions/kol-compare.js";
8
8
  import { kolAlertsRecentAction } from "./actions/kol-alerts-recent.js";
9
+ import { tokenRiskAction } from "./actions/token-risk.js";
9
10
  import { meAction } from "./actions/me.js";
10
11
  import { tokensListAction } from "./actions/tokens-list.js";
11
12
  import { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction } from "./actions/wallet.js";
@@ -25,6 +26,7 @@ export const madeOnSolPlugin = {
25
26
  kolTokenEntryOrderAction,
26
27
  kolCompareAction,
27
28
  kolAlertsRecentAction,
29
+ tokenRiskAction,
28
30
  meAction,
29
31
  tokensListAction,
30
32
  walletStatsAction,
@@ -78,6 +80,6 @@ export default madeOnSolPlugin;
78
80
  export { MadeOnSolClient } from "./client.js";
79
81
  export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction };
80
82
  export { walletTrackerWatchlistAction, walletTrackerTradesAction };
81
- export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction };
83
+ export { kolTokenEntryOrderAction, kolCompareAction, kolAlertsRecentAction, tokenRiskAction };
82
84
  export { meAction, tokensListAction };
83
85
  export { walletStatsAction, walletPnlAction, walletPositionsAction, walletTradesAction };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madeonsol/plugin-madeonsol",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "ElizaOS plugin for MadeOnSol — Solana KOL intelligence and deployer analytics via x402 micropayments",
5
5
  "repository": {
6
6
  "type": "git",