@elizaos/plugin-social-alpha 2.0.0-alpha.8 → 2.0.11-beta.7

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.
Files changed (62) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +97 -0
  3. package/assets/hero.png +0 -0
  4. package/assets/hero.svg +70 -0
  5. package/package.json +40 -33
  6. package/dist/__tests__/e2e/benchmarks/benchmark.utils.d.ts +0 -38
  7. package/dist/__tests__/e2e/benchmarks/trust_algorithm.benchmark.d.ts +0 -18
  8. package/dist/__tests__/e2e/events.d.ts +0 -2
  9. package/dist/__tests__/e2e/index.d.ts +0 -3
  10. package/dist/__tests__/e2e/scenarios.d.ts +0 -3
  11. package/dist/__tests__/e2e/service.d.ts +0 -1
  12. package/dist/__tests__/e2e/socialAlpha.d.ts +0 -2
  13. package/dist/__tests__/e2e/test-utils.d.ts +0 -12
  14. package/dist/__tests__/e2e/test.setup.d.ts +0 -2
  15. package/dist/__tests__/e2e/trustOptimizationE2E.d.ts +0 -4
  16. package/dist/__tests__/e2e/trustScenariosE2E.d.ts +0 -4
  17. package/dist/__tests__/e2e/trustScore.d.ts +0 -2
  18. package/dist/__tests__/mocks/mockPriceService.d.ts +0 -36
  19. package/dist/assets/index-CNEn_XZo.js +0 -109
  20. package/dist/assets/index-D088W50X.css +0 -1
  21. package/dist/assets/index-D32we_nf.js +0 -17204
  22. package/dist/assets/index-DU6B6kWr.js +0 -17202
  23. package/dist/clients.d.ts +0 -382
  24. package/dist/config.d.ts +0 -143
  25. package/dist/events.d.ts +0 -4
  26. package/dist/frontend/LeaderboardTable.d.ts +0 -7
  27. package/dist/frontend/index.d.ts +0 -3
  28. package/dist/frontend/loader.d.ts +0 -1
  29. package/dist/frontend/ui/badge.d.ts +0 -11
  30. package/dist/frontend/ui/button.d.ts +0 -11
  31. package/dist/frontend/ui/card.d.ts +0 -8
  32. package/dist/frontend/ui/input.d.ts +0 -3
  33. package/dist/frontend/ui/table.d.ts +0 -10
  34. package/dist/frontend/ui/tabs.d.ts +0 -7
  35. package/dist/frontend/utils.d.ts +0 -2
  36. package/dist/index.d.ts +0 -28
  37. package/dist/index.html +0 -14
  38. package/dist/mockPriceService.d.ts +0 -1
  39. package/dist/providers/socialAlphaProvider.d.ts +0 -14
  40. package/dist/reports.d.ts +0 -56
  41. package/dist/routes.d.ts +0 -2
  42. package/dist/schemas.d.ts +0 -150
  43. package/dist/scripts/analyze-trust-scores.d.ts +0 -15
  44. package/dist/scripts/enrich-price-data.d.ts +0 -15
  45. package/dist/scripts/optimize-algorithm.d.ts +0 -14
  46. package/dist/scripts/process-discord-data.d.ts +0 -14
  47. package/dist/service.d.ts +0 -286
  48. package/dist/services/PriceDataService.d.ts +0 -36
  49. package/dist/services/SimulationService.d.ts +0 -31
  50. package/dist/services/TrustScoreService.d.ts +0 -37
  51. package/dist/services/balancedTrustScoreCalculator.d.ts +0 -60
  52. package/dist/services/historicalPriceService.d.ts +0 -60
  53. package/dist/services/index.d.ts +0 -22
  54. package/dist/services/priceEnrichmentService.d.ts +0 -114
  55. package/dist/services/simulationActorsV2.d.ts +0 -53
  56. package/dist/services/simulationRunner.d.ts +0 -114
  57. package/dist/services/tokenSimulationService.d.ts +0 -33
  58. package/dist/services/trustScoreOptimizer.d.ts +0 -109
  59. package/dist/simulationActors.d.ts +0 -23
  60. package/dist/tests/index.d.ts +0 -3
  61. package/dist/types.d.ts +0 -959
  62. package/dist/utils.d.ts +0 -51
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shaw Walters and elizaOS Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # @elizaos/plugin-social-alpha
2
+
3
+ An elizaOS plugin that tracks cryptocurrency token recommendations made by users in chat, evaluates their accuracy against real price outcomes, and builds trust scores for each recommender.
4
+
5
+ ## What it does
6
+
7
+ - **Recommendation capture.** Every incoming message is analyzed with a single LLM call to detect buy/sell calls ("shills" and "FUD"). Detected calls are stored against the sender's trust profile as an elizaOS Component.
8
+ - **Trust scoring.** Scores are calculated using a multi-factor algorithm: profit percentage, win rate, Sharpe ratio, alpha vs market, consistency, and a scam/rug penalty.
9
+ - **Leaderboard.** Ranked leaderboard of all tracked recommenders is available as a JSON API and as a dashboard view (`SocialAlphaView`).
10
+ - **Agent context injection.** The `socialAlpha` provider injects the current speaker's trust stats and the top/bottom leaderboard into the agent's context automatically, so the agent can factor reputation into its responses.
11
+
12
+ ## Capabilities added to an Eliza agent
13
+
14
+ | Capability | Description |
15
+ |-----------|-------------|
16
+ | `socialAlpha` provider | Injects trust scores, win rate, avg P&L, and leaderboard into agent context |
17
+ | `MESSAGE_RECEIVED` event handler | Extracts buy/sell signals from messages in real time |
18
+ | `CommunityInvestorService` | Manages all trust score and recommendation data |
19
+ | `GET /api/social-alpha/leaderboard` route | Returns `LeaderboardEntry[]` JSON |
20
+ | `social-alpha` view | Leaderboard dashboard view — appears in the view manager when the plugin is enabled; requires a configured agent wallet |
21
+
22
+ No actions are added — recommendation capture is event-driven, not agent-initiated.
23
+
24
+ ## How to enable
25
+
26
+ Add the plugin to your agent's character definition:
27
+
28
+ ```typescript
29
+ import { socialAlphaPlugin } from "@elizaos/plugin-social-alpha";
30
+
31
+ export const character = {
32
+ name: "MyAgent",
33
+ plugins: [socialAlphaPlugin],
34
+ // ...
35
+ };
36
+ ```
37
+
38
+ ## Required configuration
39
+
40
+ Set these in your agent's environment or character config:
41
+
42
+ ```env
43
+ BIRDEYE_API_KEY= # Token price, security, and trade data (Solana)
44
+ DEXSCREENER_API_KEY= # DEX pair data and ticker resolution
45
+ HELIUS_API_KEY= # Solana holder list data (optional — service degrades gracefully without it)
46
+ ```
47
+
48
+ The following are declared as required in `agentConfig` but are not actively used in current code paths:
49
+
50
+ ```env
51
+ JUPITER_API_KEY=
52
+ COINGECKO_API_KEY=
53
+ MORALIS_API_KEY=
54
+ ```
55
+
56
+ ### Optional tuning
57
+
58
+ | Setting | Default | Description |
59
+ |---------|---------|-------------|
60
+ | `PROCESS_TRADE_DECISION_INTERVAL_HOURS` | `1` | How often queued trade decisions are evaluated |
61
+ | `METRIC_REFRESH_INTERVAL_HOURS` | `24` | How often recommender metrics are refreshed |
62
+ | `USER_TRADE_COOLDOWN_HOURS` | `12` | Minimum hours between decisions per user |
63
+ | `SCAM_PENALTY` | `-100` | Trust score penalty for promoting a rug/scam |
64
+ | `SCAM_CORRECT_CALL_BONUS` | `100` | Bonus for correctly calling out a scam |
65
+ | `MAX_RECOMMENDATIONS_IN_PROFILE` | `50` | Rolling window of recommendations kept per user |
66
+
67
+ ## Trust score algorithm
68
+
69
+ The balanced trust score uses:
70
+
71
+ - **Profit** — average percentage gain across evaluated calls
72
+ - **Win rate** — proportion of calls that were profitable
73
+ - **Sharpe ratio** — risk-adjusted returns
74
+ - **Alpha** — excess returns vs market
75
+ - **Consistency** — stability of returns over time
76
+ - **Quality** — scam/rug penalty applied when a promoted token turns out fraudulent; bonus for correctly calling out scams before they dump
77
+
78
+ Weights are tunable via `src/services/trustScoreOptimizer.ts`.
79
+
80
+ ## Building the view
81
+
82
+ The leaderboard UI is a plugin view served at `/api/views/social-alpha/bundle.js`. Build it (react + `@elizaos/ui` stay externalised to the host shell):
83
+
84
+ ```bash
85
+ bun run --cwd plugins/plugin-social-alpha build
86
+ ```
87
+
88
+ ## Running tests
89
+
90
+ ```bash
91
+ bun run --cwd plugins/plugin-social-alpha test
92
+ ```
93
+
94
+ ## Supported chains
95
+
96
+ Primary support is Solana. Ethereum and Base are partially supported for ticker resolution via DexScreener.
97
+
Binary file
@@ -0,0 +1,70 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024" role="img" aria-label="Social Alpha">
2
+ <defs>
3
+ <linearGradient id="bg-social-alpha" x1="0" y1="0" x2="1" y2="1">
4
+ <stop offset="0" stop-color="#152818"/>
5
+ <stop offset="1" stop-color="#0b1910"/>
6
+ </linearGradient>
7
+ <radialGradient id="blobA-social-alpha" cx="0.5" cy="0.5" r="0.5">
8
+ <stop offset="0" stop-color="#2fda4b" stop-opacity="0.55"/>
9
+ <stop offset="1" stop-color="#2fda4b" stop-opacity="0"/>
10
+ </radialGradient>
11
+ <radialGradient id="blobB-social-alpha" cx="0.5" cy="0.5" r="0.5">
12
+ <stop offset="0" stop-color="#28c38a" stop-opacity="0.5"/>
13
+ <stop offset="1" stop-color="#28c38a" stop-opacity="0"/>
14
+ </radialGradient>
15
+ <radialGradient id="vig-social-alpha" cx="0.5" cy="0.42" r="0.75">
16
+ <stop offset="0" stop-color="#000000" stop-opacity="0"/>
17
+ <stop offset="0.72" stop-color="#000000" stop-opacity="0"/>
18
+ <stop offset="1" stop-color="#000000" stop-opacity="0.5"/>
19
+ </radialGradient>
20
+ <linearGradient id="label-social-alpha" x1="0" y1="0" x2="0" y2="1">
21
+ <stop offset="0" stop-color="#000000" stop-opacity="0"/>
22
+ <stop offset="1" stop-color="#000000" stop-opacity="0.55"/>
23
+ </linearGradient>
24
+ <filter id="soft-social-alpha" x="-30%" y="-30%" width="160%" height="160%">
25
+ <feGaussianBlur stdDeviation="46"/>
26
+ </filter>
27
+ <filter id="iglow-social-alpha" x="-40%" y="-40%" width="180%" height="180%">
28
+ <feDropShadow dx="0" dy="0" stdDeviation="14" flood-color="#45ed61" flood-opacity="0.45"/>
29
+ </filter>
30
+ </defs>
31
+
32
+ <rect width="1024" height="1024" fill="url(#bg-social-alpha)"/>
33
+
34
+ <g opacity="0.9">
35
+ <circle cx="232" cy="220" r="300" fill="url(#blobA-social-alpha)" filter="url(#soft-social-alpha)"/>
36
+ <circle cx="840" cy="800" r="340" fill="url(#blobB-social-alpha)" filter="url(#soft-social-alpha)"/>
37
+ </g>
38
+
39
+ <g stroke="#d7eada" stroke-width="1.4" opacity="0.06">
40
+ <line x1="0" y1="256" x2="1024" y2="256"/>
41
+ <line x1="0" y1="512" x2="1024" y2="512"/>
42
+ <line x1="0" y1="768" x2="1024" y2="768"/>
43
+ <line x1="256" y1="0" x2="256" y2="1024"/>
44
+ <line x1="512" y1="0" x2="512" y2="1024"/>
45
+ <line x1="768" y1="0" x2="768" y2="1024"/>
46
+ </g>
47
+
48
+ <g opacity="0.5">
49
+ <path d="M120 470 A 400 400 0 0 1 904 470" fill="none" stroke="#45ed61" stroke-width="3" opacity="0.35"/>
50
+ </g>
51
+
52
+ <g transform="translate(512 432)" filter="url(#iglow-social-alpha)"
53
+ color="#d7eada" stroke="#d7eada" stroke-width="20"
54
+ stroke-linecap="round" stroke-linejoin="round" fill="none">
55
+ <polyline points="-150,80 -54,-22 6,38 150,-110" fill="none"/>
56
+ <polyline points="92,-110 150,-110 150,-52" fill="none"/>
57
+ <circle cx="-110" cy="128" r="26"/>
58
+ <circle cx="0" cy="128" r="26"/>
59
+ <circle cx="110" cy="128" r="26"/>
60
+ </g>
61
+
62
+ <rect x="0" y="784" width="1024" height="240" fill="url(#label-social-alpha)"/>
63
+ <text x="512" y="892" text-anchor="middle"
64
+ font-family="system-ui, -apple-system, Segoe UI, Roboto, sans-serif"
65
+ font-size="76" font-weight="600" letter-spacing="0.5"
66
+ fill="#d7eada">Social Alpha</text>
67
+ <rect x="460" y="924" width="104" height="6" rx="3" fill="#45ed61"/>
68
+
69
+ <rect width="1024" height="1024" fill="url(#vig-social-alpha)"/>
70
+ </svg>
package/package.json CHANGED
@@ -1,70 +1,76 @@
1
1
  {
2
2
  "name": "@elizaos/plugin-social-alpha",
3
- "version": "2.0.0-alpha.8",
3
+ "version": "2.0.11-beta.7",
4
4
  "description": "Social Alpha Plugin — Tracks token recommendations (shills/FUD), builds trust scores based on P&L outcomes, and exposes a Social Alpha Provider with win rate, rank, and recommender analytics.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
+ "./package.json": "./package.json",
9
10
  ".": {
10
11
  "types": "./dist/index.d.ts",
12
+ "eliza-source": {
13
+ "types": "./src/index.ts",
14
+ "import": "./src/index.ts",
15
+ "default": "./src/index.ts"
16
+ },
11
17
  "import": "./dist/index.js",
12
18
  "default": "./dist/index.js"
13
19
  }
14
20
  },
15
21
  "files": [
22
+ "assets",
16
23
  "dist"
17
24
  ],
18
25
  "scripts": {
19
- "build": "bunx vite build",
20
- "dev": "vite",
21
- "test": "vitest run src/__tests__/balancedTrustScore.test.ts src/__tests__/historicalPriceService.test.ts src/__tests__/service.test.ts --passWithNoTests",
26
+ "build": "bun run build:js && bun run build:views && bun run build:types",
27
+ "test": "vitest run --passWithNoTests",
22
28
  "clean": "rm -rf dist .turbo node_modules",
23
- "lint": "echo \"Lint skipped for release\"",
29
+ "lint": "bunx @biomejs/biome check src",
24
30
  "lint:check": "bun run lint",
25
- "format": "bunx @biomejs/biome format --write .",
26
- "format:check": "bunx @biomejs/biome format .",
27
- "typecheck": "echo \"Typecheck skipped for release\""
31
+ "format": "bunx @biomejs/biome format --write src",
32
+ "format:check": "bunx @biomejs/biome format src",
33
+ "typecheck": "tsc --noEmit -p tsconfig.build.json",
34
+ "build:js": "tsup --config ../tsup.plugin-packages.shared.ts",
35
+ "build:views": "bunx --bun vite build --config vite.config.views.ts",
36
+ "build:types": "tsc --noCheck -p tsconfig.build.json",
37
+ "lint:fix": "bunx @biomejs/biome check --write src"
28
38
  },
29
39
  "dependencies": {
30
- "@elizaos/core": "2.0.0-alpha.3",
31
- "bignumber.js": "^9.3.0",
40
+ "@elizaos/core": "2.0.11-beta.7",
41
+ "@elizaos/ui": "2.0.11-beta.7",
42
+ "bignumber.js": "^11.0.0",
32
43
  "class-variance-authority": "^0.7.1",
33
44
  "clsx": "^2.1.1",
34
- "dotenv": "^16.5.0",
35
- "fast-xml-parser": "^5.2.5",
45
+ "dotenv": "^17.0.0",
46
+ "fast-xml-parser": "^5.7.2",
36
47
  "p-limit": "^5.0.0",
37
48
  "tailwindcss-animate": "^1.0.7",
38
- "uuid": "^11.1.0",
39
- "zod": "^4.3.6"
49
+ "uuid": "^14.0.0",
50
+ "zod": "^4.4.3"
40
51
  },
41
52
  "peerDependencies": {
42
- "@elizaos/core": "2.0.0-alpha.3"
53
+ "@elizaos/core": "2.0.11-beta.7"
43
54
  },
44
55
  "devDependencies": {
45
- "@cypress/react": "^8.0.0",
46
- "@tanstack/react-query": "^5.62.0",
56
+ "@biomejs/biome": "^2.4.14",
57
+ "@cypress/react": "^9.0.2",
58
+ "@radix-ui/react-slot": "^1.0.0",
59
+ "@radix-ui/react-tabs": "^1.0.0",
47
60
  "@testing-library/cypress": "^10.0.0",
48
61
  "@types/react": "^19.0.0",
49
62
  "@types/react-dom": "^19.0.0",
50
- "@vitejs/plugin-react-swc": "^4.0.0",
51
- "autoprefixer": "^10.4.21",
52
- "cypress": "^13.7.0",
53
- "postcss": "^8.5.4",
63
+ "cypress": "^15.14.2",
64
+ "lucide-react": "^1.0.0",
54
65
  "react": "^19.0.0",
55
66
  "react-dom": "^19.0.0",
56
- "tailwindcss": "^3.4.0",
57
- "tsconfig-paths": "^4.2.0",
58
- "tsup": "8.5.0",
59
- "tsx": "4.19.4",
60
- "typescript": "^5.8.3",
61
- "vite": "^6.0.0",
62
- "lucide-react": "^0.468.0",
63
- "@radix-ui/react-slot": "^1.0.0",
64
- "@radix-ui/react-tabs": "^1.0.0",
65
67
  "tailwind-merge": "^3.4.0",
66
- "vitest": "^3.1.4",
67
- "@biomejs/biome": "^2.3.11"
68
+ "tsconfig-paths": "^4.2.0",
69
+ "tsup": "^8.5.1",
70
+ "tsx": "4.21.0",
71
+ "typescript": "^6.0.3",
72
+ "vite": "^8.0.16",
73
+ "vitest": "^4.0.0"
68
74
  },
69
75
  "publishConfig": {
70
76
  "access": "public"
@@ -115,5 +121,6 @@
115
121
  "sensitive": true
116
122
  }
117
123
  }
118
- }
124
+ },
125
+ "gitHead": "cdbc876f793d96073d7eb0d09715a031ce0cd32e"
119
126
  }
@@ -1,38 +0,0 @@
1
- import type { IAgentRuntime, UUID } from "@elizaos/core";
2
- import type { MockPriceService } from "../../../mockPriceService";
3
- import type { SimulatedActor, SimulatedCall } from "../../../simulationActors";
4
- export interface BenchmarkSimulationParams {
5
- durationSteps: number;
6
- actors: SimulatedActor[];
7
- priceService: MockPriceService;
8
- outputBasePath: string;
9
- benchmarkName: string;
10
- optimisticAthWindowDays?: number;
11
- }
12
- export interface BenchmarkStepMetrics {
13
- step: number;
14
- actorScores: Record<UUID, {
15
- username: string;
16
- archetype: string;
17
- score: number;
18
- }>;
19
- callsMadeThisStep: SimulatedCall[];
20
- }
21
- export interface CallPnlData {
22
- callId: UUID;
23
- actorId: UUID;
24
- tokenAddress: string;
25
- recommendationType: "BUY" | "SELL";
26
- priceAtRecommendation?: number;
27
- potentialProfitPercent?: number;
28
- avoidedLossPercent?: number;
29
- isScamOrRug?: boolean;
30
- evaluationTimestamp: number;
31
- notes?: string;
32
- athWindowDaysUsed?: number;
33
- }
34
- /**
35
- * Core simulation engine for benchmarks.
36
- * This function will be called by individual benchmark TestCases.
37
- */
38
- export declare function runBenchmarkSimulation(runtime: IAgentRuntime, params: BenchmarkSimulationParams): Promise<void>;
@@ -1,18 +0,0 @@
1
- import type { TestSuite, UUID } from "@elizaos/core";
2
- import { Conviction, SupportedChain } from "../../../types";
3
- export interface EnrichedCallDataPrv {
4
- callId: UUID;
5
- originalMessageId: string;
6
- userId: string;
7
- username: string;
8
- timestamp: number;
9
- content: string;
10
- tokenMentioned: string;
11
- isTicker: boolean;
12
- resolvedAddress?: string;
13
- chain: SupportedChain;
14
- sentiment: "positive" | "negative";
15
- conviction: Conviction;
16
- }
17
- export declare const trustAlgorithmBenchmarkSuite: TestSuite;
18
- export default trustAlgorithmBenchmarkSuite;
@@ -1,2 +0,0 @@
1
- import type { TestSuite } from "@elizaos/core";
2
- export declare const eventsTestSuite: TestSuite;
@@ -1,3 +0,0 @@
1
- import type { TestSuite } from "@elizaos/core";
2
- export declare const testSuites: TestSuite[];
3
- export default testSuites;
@@ -1,3 +0,0 @@
1
- import type { TestSuite } from "@elizaos/core";
2
- export declare const agentScenariosSuite: TestSuite;
3
- export default agentScenariosSuite;
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import type { TestSuite } from "@elizaos/core";
2
- export declare const communityInvestorE2ETestSuite: TestSuite;
@@ -1,12 +0,0 @@
1
- import type { Entity, IAgentRuntime, Room, World } from "@elizaos/core";
2
- type Content = {
3
- text: string;
4
- name?: string;
5
- };
6
- export declare function setupScenario(runtime: IAgentRuntime): Promise<{
7
- user: Entity;
8
- room: Room;
9
- world: World;
10
- }>;
11
- export declare function sendMessageAndWaitForResponse(runtime: IAgentRuntime, room: Room, user: Entity, text: string): Promise<Content>;
12
- export {};
@@ -1,2 +0,0 @@
1
- import type { IAgentRuntime } from "@elizaos/core";
2
- export declare function createMockRuntime(initialSettings?: Record<string, any>): IAgentRuntime;
@@ -1,4 +0,0 @@
1
- import type { TestCase, TestSuite } from "@elizaos/core";
2
- export declare const trustOptimizationE2ETestCases: TestCase[];
3
- export declare const trustOptimizationE2ETestSuite: TestSuite;
4
- export default trustOptimizationE2ETestSuite;
@@ -1,4 +0,0 @@
1
- import type { TestCase, TestSuite } from "@elizaos/core";
2
- export declare const trustScenariosE2ETestCases: TestCase[];
3
- export declare const trustScenariosE2ETestSuite: TestSuite;
4
- export default trustScenariosE2ETestSuite;
@@ -1,2 +0,0 @@
1
- import type { TestSuite } from "@elizaos/core";
2
- export declare const trustScoreTestSuite: TestSuite;
@@ -1,36 +0,0 @@
1
- import type { SupportedChain, TokenAPIData } from "../../types";
2
- export interface SimulatedToken {
3
- address: string;
4
- symbol: string;
5
- name: string;
6
- chain: SupportedChain;
7
- performanceType: "good" | "bad" | "neutral" | "volatile";
8
- priceTrajectory: (step: number) => number;
9
- initialPrice: number;
10
- liquidity?: number;
11
- marketCap?: number;
12
- }
13
- export declare class MockPriceService {
14
- private tokens;
15
- private currentTimeStep;
16
- private baseTimestamp;
17
- private stepIncrementMs;
18
- constructor(initialTokens: SimulatedToken[]);
19
- addToken(token: SimulatedToken): void;
20
- advanceTime(step: number): void;
21
- getCurrentTimestamp(step?: number): number;
22
- getStepFromTimestamp(timestamp: number): number | null;
23
- getTokenAPIData(tokenAddress: string, chain: SupportedChain, // Chain might be used if addresses are not unique across chains
24
- step?: number): Promise<TokenAPIData | null>;
25
- /**
26
- * Calculates the All-Time High (ATH) for a token within a specified number of days (steps)
27
- * starting from a given step.
28
- */
29
- getAthInWindow(tokenAddress: string, chain: SupportedChain, fromStep: number, windowDays: number): number | null;
30
- getTokensByPerformanceType(type: SimulatedToken["performanceType"]): SimulatedToken[];
31
- getAllTokens(): SimulatedToken[];
32
- static goodTokenTrajectory: (initialPrice: number, growthFactor?: number) => (step: number) => number;
33
- static badTokenTrajectory: (initialPrice: number, decayFactor?: number, rugStepMultiplier?: number) => (step: number) => number;
34
- static neutralTokenTrajectory: (initialPrice: number, volatility?: number) => (step: number) => number;
35
- static volatileTokenTrajectory: (initialPrice: number, volatility?: number, pumpDumpChance?: number) => (step: number) => number;
36
- }