solana-agent-kit-plugin-madeonsol 0.1.0 → 0.2.1
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 +11 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +7 -2
- package/dist/tools/index.d.ts +13 -0
- package/dist/tools/index.js +35 -0
- package/package.json +13 -3
- package/LICENSE +0 -1
package/README.md
CHANGED
|
@@ -40,6 +40,17 @@ const trades = await agent.methods.kolFeed(agent, { limit: 10, action: "buy" });
|
|
|
40
40
|
|
|
41
41
|
Set `SVM_PRIVATE_KEY` in your agent config for automatic x402 USDC payments. The wallet needs SOL (fees) and USDC on Solana mainnet.
|
|
42
42
|
|
|
43
|
+
With `RAPIDAPI_KEY`, webhook and streaming methods are also available. Ultra subscribers get the **DEX Trade Stream** — a real-time WebSocket feed of all Solana DEX trades via `wss://madeonsol.com/ws/v1/dex-stream`.
|
|
44
|
+
|
|
45
|
+
## Also Available
|
|
46
|
+
|
|
47
|
+
| Platform | Package |
|
|
48
|
+
|---|---|
|
|
49
|
+
| TypeScript SDK | [`madeonsol-x402`](https://www.npmjs.com/package/madeonsol-x402) |
|
|
50
|
+
| Python (LangChain, CrewAI) | [`madeonsol-x402`](https://github.com/LamboPoewert/madeonsol-python) on PyPI |
|
|
51
|
+
| MCP Server (Claude, Cursor) | [`mcp-server-madeonsol`](https://www.npmjs.com/package/mcp-server-madeonsol) |
|
|
52
|
+
| ElizaOS | [`@madeonsol/plugin-madeonsol`](https://www.npmjs.com/package/@madeonsol/plugin-madeonsol) |
|
|
53
|
+
|
|
43
54
|
## License
|
|
44
55
|
|
|
45
56
|
MIT
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ 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 } from "./tools/index.js";
|
|
5
|
+
import { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken } from "./tools/index.js";
|
|
6
6
|
declare const MadeOnSolPlugin: {
|
|
7
7
|
name: string;
|
|
8
8
|
methods: {
|
|
@@ -10,6 +10,11 @@ declare const MadeOnSolPlugin: {
|
|
|
10
10
|
kolCoordination: typeof kolCoordination;
|
|
11
11
|
kolLeaderboard: typeof kolLeaderboard;
|
|
12
12
|
deployerAlerts: typeof deployerAlerts;
|
|
13
|
+
createWebhook: typeof createWebhook;
|
|
14
|
+
listWebhooks: typeof listWebhooks;
|
|
15
|
+
deleteWebhook: typeof deleteWebhook;
|
|
16
|
+
testWebhook: typeof testWebhook;
|
|
17
|
+
getStreamToken: typeof getStreamToken;
|
|
13
18
|
};
|
|
14
19
|
actions: ({
|
|
15
20
|
name: string;
|
|
@@ -170,5 +175,5 @@ declare const MadeOnSolPlugin: {
|
|
|
170
175
|
initialize(_agent: unknown): void;
|
|
171
176
|
};
|
|
172
177
|
export default MadeOnSolPlugin;
|
|
173
|
-
export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts };
|
|
178
|
+
export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken };
|
|
174
179
|
export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction };
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ 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 } from "./tools/index.js";
|
|
5
|
+
import { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken } from "./tools/index.js";
|
|
6
6
|
const MadeOnSolPlugin = {
|
|
7
7
|
name: "madeonsol",
|
|
8
8
|
methods: {
|
|
@@ -10,6 +10,11 @@ const MadeOnSolPlugin = {
|
|
|
10
10
|
kolCoordination,
|
|
11
11
|
kolLeaderboard,
|
|
12
12
|
deployerAlerts,
|
|
13
|
+
createWebhook,
|
|
14
|
+
listWebhooks,
|
|
15
|
+
deleteWebhook,
|
|
16
|
+
testWebhook,
|
|
17
|
+
getStreamToken,
|
|
13
18
|
},
|
|
14
19
|
actions: [
|
|
15
20
|
kolFeedAction,
|
|
@@ -22,5 +27,5 @@ const MadeOnSolPlugin = {
|
|
|
22
27
|
},
|
|
23
28
|
};
|
|
24
29
|
export default MadeOnSolPlugin;
|
|
25
|
-
export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts };
|
|
30
|
+
export { kolFeed, kolCoordination, kolLeaderboard, deployerAlerts, createWebhook, listWebhooks, deleteWebhook, testWebhook, getStreamToken };
|
|
26
31
|
export { kolFeedAction, kolCoordinationAction, kolLeaderboardAction, deployerAlertsAction };
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -23,4 +23,17 @@ export declare function deployerAlerts(agent: Agent, params?: {
|
|
|
23
23
|
since?: string;
|
|
24
24
|
offset?: number;
|
|
25
25
|
}): Promise<any>;
|
|
26
|
+
export declare function createWebhook(agent: Agent, params: {
|
|
27
|
+
url: string;
|
|
28
|
+
events: string[];
|
|
29
|
+
filters?: Record<string, unknown>;
|
|
30
|
+
}): Promise<any>;
|
|
31
|
+
export declare function listWebhooks(agent: Agent): Promise<any>;
|
|
32
|
+
export declare function deleteWebhook(agent: Agent, params: {
|
|
33
|
+
id: number;
|
|
34
|
+
}): Promise<any>;
|
|
35
|
+
export declare function testWebhook(agent: Agent, params: {
|
|
36
|
+
webhook_id: number;
|
|
37
|
+
}): Promise<any>;
|
|
38
|
+
export declare function getStreamToken(agent: Agent): Promise<any>;
|
|
26
39
|
export {};
|
package/dist/tools/index.js
CHANGED
|
@@ -55,3 +55,38 @@ export async function deployerAlerts(agent, params = {}) {
|
|
|
55
55
|
const f = await initPaidFetch(agent);
|
|
56
56
|
return query(f, "/api/x402/deployer-hunter/alerts", params);
|
|
57
57
|
}
|
|
58
|
+
// ── Webhook & Streaming (RapidAPI key required) ──
|
|
59
|
+
async function restQuery(agent, method, path, body) {
|
|
60
|
+
const apiKey = agent.config?.RAPIDAPI_KEY || agent.config?.OTHER_API_KEYS?.RAPIDAPI_KEY;
|
|
61
|
+
if (!apiKey)
|
|
62
|
+
throw new Error("RAPIDAPI_KEY required for webhook/streaming features");
|
|
63
|
+
const res = await fetch(`${BASE_URL}/api/v1${path}`, {
|
|
64
|
+
method,
|
|
65
|
+
headers: {
|
|
66
|
+
"Content-Type": "application/json",
|
|
67
|
+
"x-rapidapi-key": apiKey,
|
|
68
|
+
"x-rapidapi-host": "madeonsol-solana-kol-tracker-tools-api.p.rapidapi.com",
|
|
69
|
+
},
|
|
70
|
+
...(body ? { body: JSON.stringify(body) } : {}),
|
|
71
|
+
});
|
|
72
|
+
if (!res.ok) {
|
|
73
|
+
const text = await res.text().catch(() => "");
|
|
74
|
+
throw new Error(`MadeOnSol API error ${res.status}: ${text}`);
|
|
75
|
+
}
|
|
76
|
+
return res.json();
|
|
77
|
+
}
|
|
78
|
+
export async function createWebhook(agent, params) {
|
|
79
|
+
return restQuery(agent, "POST", "/webhooks", params);
|
|
80
|
+
}
|
|
81
|
+
export async function listWebhooks(agent) {
|
|
82
|
+
return restQuery(agent, "GET", "/webhooks");
|
|
83
|
+
}
|
|
84
|
+
export async function deleteWebhook(agent, params) {
|
|
85
|
+
return restQuery(agent, "DELETE", `/webhooks/${params.id}`);
|
|
86
|
+
}
|
|
87
|
+
export async function testWebhook(agent, params) {
|
|
88
|
+
return restQuery(agent, "POST", "/webhooks/test", params);
|
|
89
|
+
}
|
|
90
|
+
export async function getStreamToken(agent) {
|
|
91
|
+
return restQuery(agent, "POST", "/stream/token");
|
|
92
|
+
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solana-agent-kit-plugin-madeonsol",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
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",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
9
12
|
"scripts": {
|
|
10
13
|
"build": "tsc",
|
|
11
14
|
"prepublishOnly": ""
|
|
12
15
|
},
|
|
13
|
-
"keywords": [
|
|
16
|
+
"keywords": [
|
|
17
|
+
"solana",
|
|
18
|
+
"agent-kit",
|
|
19
|
+
"x402",
|
|
20
|
+
"kol",
|
|
21
|
+
"trading",
|
|
22
|
+
"madeonsol"
|
|
23
|
+
],
|
|
14
24
|
"license": "MIT",
|
|
15
25
|
"repository": {
|
|
16
26
|
"type": "git",
|
package/LICENSE
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
MIT License
|