madeonsol 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 MadeOnSol
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,352 @@
1
+ # madeonsol
2
+
3
+ [![npm version](https://img.shields.io/npm/v/madeonsol?style=flat-square)](https://www.npmjs.com/package/madeonsol)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](LICENSE)
5
+
6
+ Official TypeScript/JavaScript SDK for the **MadeOnSol Solana API** — zero dependencies, fully typed, works in Node.js ≥ 18 and edge runtimes.
7
+
8
+ | Feature | Description |
9
+ |---|---|
10
+ | **KOL Tracker** | Real-time trade feed, PnL leaderboard, coordination detection, and per-wallet profiles for 463 tracked KOL wallets |
11
+ | **Deployer Hunter** | Pump.fun deployer scoring, tier leaderboard, deploy alerts, and bonding intelligence |
12
+ | **Tool Directory** | Search 950+ Solana tools and dApps indexed on MadeOnSol |
13
+
14
+ **Links:** [Full docs](https://madeonsol.com/api-docs) · [Website](https://madeonsol.com) · [RapidAPI listing](https://rapidapi.com/ClaudeTools/api/madeonsol-solana-kol-tracker-tools-api)
15
+
16
+ ---
17
+
18
+ ## Install
19
+
20
+ ```bash
21
+ npm install madeonsol
22
+ # or
23
+ yarn add madeonsol
24
+ # or
25
+ pnpm add madeonsol
26
+ ```
27
+
28
+ Requires **Node.js ≥ 18** (uses native `fetch`). Works out of the box in Cloudflare Workers, Vercel Edge, and Bun.
29
+
30
+ ---
31
+
32
+ ## Quick start
33
+
34
+ ```ts
35
+ import { MadeOnSol } from "madeonsol";
36
+
37
+ const client = new MadeOnSol({ apiKey: "your-rapidapi-key" });
38
+
39
+ // Latest KOL buy trades
40
+ const { trades } = await client.kol.feed({ limit: 10, action: "buy" });
41
+ console.log(trades[0].kol_name, "bought", trades[0].token_symbol);
42
+
43
+ // Elite deployer leaderboard
44
+ const { deployers } = await client.deployer.leaderboard({ tier: "elite" });
45
+
46
+ // Recent deploy alerts
47
+ const { alerts } = await client.deployer.alerts({ limit: 5 });
48
+
49
+ // Search Solana tools
50
+ const { tools } = await client.tools.search({ q: "trading", limit: 10 });
51
+ ```
52
+
53
+ Get your API key at [RapidAPI](https://rapidapi.com/ClaudeTools/api/madeonsol-solana-kol-tracker-tools-api).
54
+
55
+ ---
56
+
57
+ ## API Reference
58
+
59
+ ### KOL Tracker — `client.kol`
60
+
61
+ #### `client.kol.feed(params?)`
62
+
63
+ Live feed of trades made by tracked KOL wallets.
64
+
65
+ ```ts
66
+ const { trades, count } = await client.kol.feed({
67
+ limit: 50, // 1–100, default 50
68
+ action: "buy", // "buy" | "sell"
69
+ kol: "7xKX...", // filter by specific wallet
70
+ });
71
+ ```
72
+
73
+ Returns: `KolFeedResponse` — `{ trades: KolTrade[], count: number }`
74
+
75
+ ---
76
+
77
+ #### `client.kol.leaderboard(params?)`
78
+
79
+ KOL PnL leaderboard ranked by realized profit.
80
+
81
+ ```ts
82
+ const { leaderboard, period } = await client.kol.leaderboard({
83
+ period: "7d", // "today" | "7d" | "30d", default "7d"
84
+ });
85
+ ```
86
+
87
+ Returns: `KolLeaderboardResponse`
88
+
89
+ ---
90
+
91
+ #### `client.kol.wallet(wallet, params?)`
92
+
93
+ Full profile for a single KOL wallet, including trade history and optional per-token PnL breakdown.
94
+
95
+ ```ts
96
+ const profile = await client.kol.wallet("7xKX...", {
97
+ include: "pnl_by_token",
98
+ });
99
+ ```
100
+
101
+ Returns: `KolWalletProfile`
102
+
103
+ ---
104
+
105
+ #### `client.kol.coordination(params?)`
106
+
107
+ Detect tokens where multiple KOLs are buying simultaneously — a strong signal of coordinated pumps.
108
+
109
+ ```ts
110
+ const { tokens } = await client.kol.coordination({
111
+ period: "24h", // "1h" | "6h" | "24h" | "7d", default "24h"
112
+ min_kols: 3, // 2–50, default 3
113
+ limit: 20, // 1–50, default 20
114
+ });
115
+ ```
116
+
117
+ Returns: `KolCoordinationResponse`
118
+
119
+ ---
120
+
121
+ #### `client.kol.token(mint)`
122
+
123
+ KOL buy/sell activity for a specific token mint.
124
+
125
+ ```ts
126
+ const activity = await client.kol.token("EPjFW...");
127
+ ```
128
+
129
+ Returns: `KolTokenActivity`
130
+
131
+ ---
132
+
133
+ ### Deployer Hunter — `client.deployer`
134
+
135
+ #### `client.deployer.stats()`
136
+
137
+ Global statistics across all tracked deployer wallets.
138
+
139
+ ```ts
140
+ const stats = await client.deployer.stats();
141
+ console.log(stats.overall_bonding_rate); // e.g. 0.043
142
+ ```
143
+
144
+ Returns: `DeployerStats`
145
+
146
+ ---
147
+
148
+ #### `client.deployer.leaderboard(params?)`
149
+
150
+ Deployers ranked by bonding rate or recent performance.
151
+
152
+ ```ts
153
+ const { deployers } = await client.deployer.leaderboard({
154
+ tier: "elite", // "elite" | "good" | "moderate" | "rising" | "cold"
155
+ sort: "bonding_rate", // "bonding_rate" | "recent_bond_rate" | "total_bonded" | "last_deploy_at"
156
+ limit: 20, // 1–50, default 20
157
+ offset: 0,
158
+ });
159
+ ```
160
+
161
+ Returns: `DeployerLeaderboardResponse`
162
+
163
+ ---
164
+
165
+ #### `client.deployer.profile(wallet)`
166
+
167
+ Full profile for a single deployer wallet.
168
+
169
+ ```ts
170
+ const deployer = await client.deployer.profile("3xAB...");
171
+ console.log(deployer.tier, deployer.bonding_rate);
172
+ ```
173
+
174
+ Returns: `DeployerProfile`
175
+
176
+ ---
177
+
178
+ #### `client.deployer.tokens(wallet, params?)`
179
+
180
+ All tokens deployed by a specific wallet.
181
+
182
+ ```ts
183
+ const { tokens } = await client.deployer.tokens("3xAB...", {
184
+ limit: 20,
185
+ offset: 0,
186
+ });
187
+ ```
188
+
189
+ Returns: `DeployerTokensResponse`
190
+
191
+ ---
192
+
193
+ #### `client.deployer.alerts(params?)`
194
+
195
+ Real-time deploy alerts — fired when a tracked deployer launches a new token.
196
+
197
+ ```ts
198
+ const { alerts } = await client.deployer.alerts({
199
+ since: "2025-01-01T00:00:00Z", // ISO 8601
200
+ limit: 20,
201
+ offset: 0,
202
+ });
203
+ ```
204
+
205
+ Returns: `DeployerAlertsResponse`
206
+
207
+ ---
208
+
209
+ #### `client.deployer.alertStats(params?)`
210
+
211
+ Aggregated alert statistics by tier.
212
+
213
+ ```ts
214
+ const stats = await client.deployer.alertStats({ period: "7d" });
215
+ // "7d" | "30d" | "all", default "all"
216
+ ```
217
+
218
+ Returns: `DeployerAlertStats`
219
+
220
+ ---
221
+
222
+ #### `client.deployer.bestTokens(params?)`
223
+
224
+ Top-performing tokens from tracked deployers by peak market cap.
225
+
226
+ ```ts
227
+ const { tokens } = await client.deployer.bestTokens({
228
+ period: "7d", // "7d" | "30d" | "all", default "7d"
229
+ limit: 5, // 1–20, default 5
230
+ });
231
+ ```
232
+
233
+ Returns: `BestTokensResponse`
234
+
235
+ ---
236
+
237
+ #### `client.deployer.recentBonds(params?)`
238
+
239
+ Most recently bonded tokens from tracked deployers.
240
+
241
+ ```ts
242
+ const { bonds } = await client.deployer.recentBonds({ limit: 20 });
243
+ ```
244
+
245
+ Returns: `RecentBondsResponse`
246
+
247
+ ---
248
+
249
+ ### Tool Directory — `client.tools`
250
+
251
+ #### `client.tools.search(params?)`
252
+
253
+ Search 950+ Solana tools indexed on MadeOnSol.
254
+
255
+ ```ts
256
+ const { tools, count } = await client.tools.search({
257
+ q: "trading bot", // full-text search
258
+ category: "trading", // category slug filter
259
+ limit: 20, // 1–50, default 20
260
+ });
261
+ ```
262
+
263
+ Returns: `ToolsSearchResponse`
264
+
265
+ ---
266
+
267
+ ## Error handling
268
+
269
+ All methods throw `MadeOnSolError` on non-2xx responses.
270
+
271
+ ```ts
272
+ import { MadeOnSol, MadeOnSolError } from "madeonsol";
273
+
274
+ try {
275
+ const profile = await client.kol.wallet("invalid-wallet");
276
+ } catch (err) {
277
+ if (err instanceof MadeOnSolError) {
278
+ console.error(err.message); // human-readable message
279
+ console.error(err.status); // HTTP status code, e.g. 404
280
+ console.error(err.body); // raw response body
281
+ }
282
+ }
283
+ ```
284
+
285
+ ---
286
+
287
+ ## Exported types
288
+
289
+ All types are exported from the main entry point:
290
+
291
+ ```ts
292
+ import type {
293
+ // Errors
294
+ MadeOnSolError,
295
+
296
+ // KOL
297
+ KolTrade,
298
+ KolFeedParams,
299
+ KolFeedResponse,
300
+ KolLeaderboardParams,
301
+ KolLeaderboardResponse,
302
+ KolLeaderboardEntry,
303
+ KolWalletParams,
304
+ KolWalletProfile,
305
+ KolCoordinationParams,
306
+ KolCoordinationResponse,
307
+ CoordinatedToken,
308
+ KolTokenActivity,
309
+ KolPnlByToken,
310
+
311
+ // Deployer
312
+ DeployerStats,
313
+ DeployerLeaderboardParams,
314
+ DeployerLeaderboardResponse,
315
+ DeployerLeaderboardEntry,
316
+ DeployerProfile,
317
+ DeployerToken,
318
+ DeployerTokensParams,
319
+ DeployerTokensResponse,
320
+ DeployerAlertsParams,
321
+ DeployerAlertsResponse,
322
+ DeployerAlert,
323
+ DeployerAlertStatsParams,
324
+ DeployerAlertStats,
325
+ BestTokensParams,
326
+ BestTokensResponse,
327
+ BestToken,
328
+ RecentBondsParams,
329
+ RecentBondsResponse,
330
+ RecentBond,
331
+
332
+ // Tools
333
+ ToolsSearchParams,
334
+ ToolsSearchResponse,
335
+ Tool,
336
+
337
+ // Enums / unions
338
+ KolAction,
339
+ LeaderboardPeriod,
340
+ CoordinationPeriod,
341
+ DeployerTier,
342
+ DeployerSortField,
343
+ AlertPeriod,
344
+ BestTokensPeriod,
345
+ } from "madeonsol";
346
+ ```
347
+
348
+ ---
349
+
350
+ ## License
351
+
352
+ MIT © [MadeOnSol](https://madeonsol.com)
@@ -0,0 +1,375 @@
1
+ export declare class MadeOnSolError extends Error {
2
+ readonly status: number;
3
+ readonly body: unknown;
4
+ constructor(message: string, status: number, body: unknown);
5
+ }
6
+ export interface PaginationParams {
7
+ limit?: number;
8
+ offset?: number;
9
+ }
10
+ export type KolAction = "buy" | "sell";
11
+ export type LeaderboardPeriod = "today" | "7d" | "30d";
12
+ export type CoordinationPeriod = "1h" | "6h" | "24h" | "7d";
13
+ export interface KolFeedParams {
14
+ /** Number of trades to return (1–100). Default: 50. */
15
+ limit?: number;
16
+ /** Filter by trade direction. */
17
+ action?: KolAction;
18
+ /** Filter by a specific KOL wallet address. */
19
+ kol?: string;
20
+ }
21
+ export interface KolLeaderboardParams {
22
+ /** Time window for ranking. Default: "7d". */
23
+ period?: LeaderboardPeriod;
24
+ }
25
+ export interface KolWalletParams {
26
+ /** Comma-separated extras to include, e.g. "pnl_by_token". */
27
+ include?: "pnl_by_token";
28
+ }
29
+ export interface KolCoordinationParams {
30
+ /** Look-back window. Default: "24h". */
31
+ period?: CoordinationPeriod;
32
+ /** Minimum number of KOLs required to flag coordination (2–50). Default: 3. */
33
+ min_kols?: number;
34
+ /** Max results (1–50). Default: 20. */
35
+ limit?: number;
36
+ }
37
+ export interface KolTrade {
38
+ signature: string;
39
+ wallet: string;
40
+ kol_name: string | null;
41
+ kol_twitter: string | null;
42
+ action: KolAction;
43
+ mint: string;
44
+ token_name: string | null;
45
+ token_symbol: string | null;
46
+ sol_amount: number;
47
+ token_amount: number;
48
+ price_usd: number | null;
49
+ timestamp: string;
50
+ }
51
+ export interface KolFeedResponse {
52
+ trades: KolTrade[];
53
+ count: number;
54
+ }
55
+ export interface KolLeaderboardEntry {
56
+ wallet: string;
57
+ kol_name: string | null;
58
+ kol_twitter: string | null;
59
+ total_pnl_usd: number;
60
+ win_rate: number;
61
+ trade_count: number;
62
+ rank: number;
63
+ }
64
+ export interface KolLeaderboardResponse {
65
+ leaderboard: KolLeaderboardEntry[];
66
+ period: LeaderboardPeriod;
67
+ }
68
+ export interface KolPnlByToken {
69
+ mint: string;
70
+ token_name: string | null;
71
+ token_symbol: string | null;
72
+ realized_pnl_usd: number;
73
+ buy_count: number;
74
+ sell_count: number;
75
+ }
76
+ export interface KolWalletProfile {
77
+ wallet: string;
78
+ kol_name: string | null;
79
+ kol_twitter: string | null;
80
+ total_pnl_usd: number;
81
+ win_rate: number;
82
+ trade_count: number;
83
+ pnl_by_token?: KolPnlByToken[];
84
+ }
85
+ export interface CoordinatedToken {
86
+ mint: string;
87
+ token_name: string | null;
88
+ token_symbol: string | null;
89
+ kol_count: number;
90
+ wallets: string[];
91
+ total_sol_volume: number;
92
+ first_seen: string;
93
+ last_seen: string;
94
+ }
95
+ export interface KolCoordinationResponse {
96
+ tokens: CoordinatedToken[];
97
+ period: CoordinationPeriod;
98
+ count: number;
99
+ }
100
+ export interface KolTokenActivity {
101
+ mint: string;
102
+ token_name: string | null;
103
+ token_symbol: string | null;
104
+ kol_buyers: string[];
105
+ kol_sellers: string[];
106
+ buy_count: number;
107
+ sell_count: number;
108
+ total_sol_volume: number;
109
+ recent_trades: KolTrade[];
110
+ }
111
+ export type DeployerTier = "elite" | "good" | "moderate" | "rising" | "cold";
112
+ export type DeployerSortField = "bonding_rate" | "recent_bond_rate" | "total_bonded" | "last_deploy_at";
113
+ export type AlertPeriod = "7d" | "30d" | "all";
114
+ export type BestTokensPeriod = "7d" | "30d" | "all";
115
+ export interface DeployerLeaderboardParams extends PaginationParams {
116
+ /** Filter by tier. */
117
+ tier?: DeployerTier;
118
+ /** Sort field. Default: "bonding_rate". */
119
+ sort?: DeployerSortField;
120
+ /** Max results (1–50). Default: 20. */
121
+ limit?: number;
122
+ }
123
+ export interface DeployerTokensParams extends PaginationParams {
124
+ /** Max results (1–50). Default: 20. */
125
+ limit?: number;
126
+ }
127
+ export interface DeployerAlertsParams extends PaginationParams {
128
+ /** ISO 8601 datetime — return alerts since this time. */
129
+ since?: string;
130
+ /** Max results (1–50). Default: 20. */
131
+ limit?: number;
132
+ }
133
+ export interface DeployerAlertStatsParams {
134
+ /** Time window. Default: "all". */
135
+ period?: AlertPeriod;
136
+ }
137
+ export interface BestTokensParams {
138
+ /** Time window. Default: "7d". */
139
+ period?: BestTokensPeriod;
140
+ /** Max results (1–20). Default: 5. */
141
+ limit?: number;
142
+ }
143
+ export interface RecentBondsParams {
144
+ /** Max results (1–50). Default: 20. */
145
+ limit?: number;
146
+ }
147
+ export interface DeployerStats {
148
+ total_deployers: number;
149
+ elite_count: number;
150
+ good_count: number;
151
+ moderate_count: number;
152
+ rising_count: number;
153
+ cold_count: number;
154
+ total_tokens_deployed: number;
155
+ total_bonded: number;
156
+ overall_bonding_rate: number;
157
+ }
158
+ export interface DeployerLeaderboardEntry {
159
+ wallet: string;
160
+ tier: DeployerTier;
161
+ bonding_rate: number;
162
+ recent_bond_rate: number;
163
+ total_deployed: number;
164
+ total_bonded: number;
165
+ last_deploy_at: string | null;
166
+ }
167
+ export interface DeployerLeaderboardResponse {
168
+ deployers: DeployerLeaderboardEntry[];
169
+ count: number;
170
+ total: number;
171
+ }
172
+ export interface DeployerProfile extends DeployerLeaderboardEntry {
173
+ first_seen: string | null;
174
+ tokens?: DeployerToken[];
175
+ }
176
+ export interface DeployerToken {
177
+ mint: string;
178
+ name: string | null;
179
+ symbol: string | null;
180
+ bonded: boolean;
181
+ deployed_at: string;
182
+ bonded_at: string | null;
183
+ peak_market_cap_usd: number | null;
184
+ }
185
+ export interface DeployerTokensResponse {
186
+ tokens: DeployerToken[];
187
+ count: number;
188
+ total: number;
189
+ }
190
+ export interface DeployerAlert {
191
+ id: string;
192
+ wallet: string;
193
+ tier: DeployerTier;
194
+ mint: string;
195
+ token_name: string | null;
196
+ token_symbol: string | null;
197
+ deployed_at: string;
198
+ bonding_rate_at_deploy: number;
199
+ }
200
+ export interface DeployerAlertsResponse {
201
+ alerts: DeployerAlert[];
202
+ count: number;
203
+ }
204
+ export interface DeployerAlertStats {
205
+ period: AlertPeriod;
206
+ total_alerts: number;
207
+ by_tier: Record<DeployerTier, number>;
208
+ bonded_count: number;
209
+ bonding_rate: number;
210
+ }
211
+ export interface BestToken {
212
+ mint: string;
213
+ name: string | null;
214
+ symbol: string | null;
215
+ deployer_wallet: string;
216
+ deployer_tier: DeployerTier;
217
+ peak_market_cap_usd: number | null;
218
+ bonded_at: string | null;
219
+ }
220
+ export interface BestTokensResponse {
221
+ tokens: BestToken[];
222
+ period: BestTokensPeriod;
223
+ }
224
+ export interface RecentBond {
225
+ mint: string;
226
+ name: string | null;
227
+ symbol: string | null;
228
+ deployer_wallet: string;
229
+ deployer_tier: DeployerTier;
230
+ bonded_at: string;
231
+ peak_market_cap_usd: number | null;
232
+ }
233
+ export interface RecentBondsResponse {
234
+ bonds: RecentBond[];
235
+ count: number;
236
+ }
237
+ export interface ToolsSearchParams {
238
+ /** Full-text search query. */
239
+ q?: string;
240
+ /** Category slug filter. */
241
+ category?: string;
242
+ /** Max results (1–50). Default: 20. */
243
+ limit?: number;
244
+ }
245
+ export interface Tool {
246
+ id: string;
247
+ name: string;
248
+ slug: string;
249
+ tagline: string;
250
+ description: string;
251
+ website_url: string;
252
+ logo_url: string | null;
253
+ categories: string[];
254
+ pricing_model: string | null;
255
+ upvote_count: number;
256
+ twitter_url: string | null;
257
+ }
258
+ export interface ToolsSearchResponse {
259
+ tools: Tool[];
260
+ count: number;
261
+ }
262
+ export interface MadeOnSolConfig {
263
+ /** Your RapidAPI key. Get one at https://rapidapi.com. */
264
+ apiKey: string;
265
+ }
266
+ declare class KolClient {
267
+ private readonly _fetch;
268
+ constructor(_fetch: <T>(url: string) => Promise<T>);
269
+ /**
270
+ * Live feed of KOL trades.
271
+ * @param params Optional filters: limit (1–100), action, kol wallet.
272
+ */
273
+ feed(params?: KolFeedParams): Promise<KolFeedResponse>;
274
+ /**
275
+ * KOL PnL leaderboard.
276
+ * @param params Optional period filter ("today" | "7d" | "30d").
277
+ */
278
+ leaderboard(params?: KolLeaderboardParams): Promise<KolLeaderboardResponse>;
279
+ /**
280
+ * Full profile for a single KOL wallet.
281
+ * @param wallet Solana wallet address.
282
+ * @param params Optional: include "pnl_by_token" for per-token breakdown.
283
+ */
284
+ wallet(wallet: string, params?: KolWalletParams): Promise<KolWalletProfile>;
285
+ /**
286
+ * Detect coordinated buying activity across KOL wallets.
287
+ * @param params Optional filters: period, min_kols, limit.
288
+ */
289
+ coordination(params?: KolCoordinationParams): Promise<KolCoordinationResponse>;
290
+ /**
291
+ * KOL activity for a specific token mint.
292
+ * @param mint Token mint address.
293
+ */
294
+ token(mint: string): Promise<KolTokenActivity>;
295
+ }
296
+ declare class DeployerClient {
297
+ private readonly _fetch;
298
+ constructor(_fetch: <T>(url: string) => Promise<T>);
299
+ /**
300
+ * Global deployer statistics.
301
+ */
302
+ stats(): Promise<DeployerStats>;
303
+ /**
304
+ * Ranked list of deployers.
305
+ * @param params Optional filters: tier, sort, limit, offset.
306
+ */
307
+ leaderboard(params?: DeployerLeaderboardParams): Promise<DeployerLeaderboardResponse>;
308
+ /**
309
+ * Full profile for a single deployer wallet.
310
+ * @param wallet Solana wallet address.
311
+ */
312
+ profile(wallet: string): Promise<DeployerProfile>;
313
+ /**
314
+ * Tokens deployed by a specific wallet.
315
+ * @param wallet Solana wallet address.
316
+ * @param params Optional: limit, offset.
317
+ */
318
+ tokens(wallet: string, params?: DeployerTokensParams): Promise<DeployerTokensResponse>;
319
+ /**
320
+ * Recent deploy alerts from high-quality deployers.
321
+ * @param params Optional filters: since (ISO datetime), limit, offset.
322
+ */
323
+ alerts(params?: DeployerAlertsParams): Promise<DeployerAlertsResponse>;
324
+ /**
325
+ * Alert statistics over a time period.
326
+ * @param params Optional: period ("7d" | "30d" | "all").
327
+ */
328
+ alertStats(params?: DeployerAlertStatsParams): Promise<DeployerAlertStats>;
329
+ /**
330
+ * Best-performing tokens deployed by tracked wallets.
331
+ * @param params Optional: period, limit.
332
+ */
333
+ bestTokens(params?: BestTokensParams): Promise<BestTokensResponse>;
334
+ /**
335
+ * Most recently bonded tokens from tracked deployers.
336
+ * @param params Optional: limit.
337
+ */
338
+ recentBonds(params?: RecentBondsParams): Promise<RecentBondsResponse>;
339
+ }
340
+ declare class ToolsClient {
341
+ private readonly _fetch;
342
+ constructor(_fetch: <T>(url: string) => Promise<T>);
343
+ /**
344
+ * Search the MadeOnSol tool directory.
345
+ * @param params Optional: q (search query), category (slug), limit.
346
+ */
347
+ search(params?: ToolsSearchParams): Promise<ToolsSearchResponse>;
348
+ }
349
+ /**
350
+ * MadeOnSol API client.
351
+ *
352
+ * @example
353
+ * ```ts
354
+ * import { MadeOnSol } from "madeonsol";
355
+ *
356
+ * const client = new MadeOnSol({ apiKey: "your-rapidapi-key" });
357
+ *
358
+ * const { trades } = await client.kol.feed({ limit: 10, action: "buy" });
359
+ * const { deployers } = await client.deployer.leaderboard({ tier: "elite" });
360
+ * const { alerts } = await client.deployer.alerts({ limit: 5 });
361
+ * ```
362
+ */
363
+ export declare class MadeOnSol {
364
+ /** KOL wallet tracking endpoints. */
365
+ readonly kol: KolClient;
366
+ /** Pump.fun deployer intelligence endpoints. */
367
+ readonly deployer: DeployerClient;
368
+ /** Solana tool directory endpoints. */
369
+ readonly tools: ToolsClient;
370
+ private readonly _apiKey;
371
+ constructor(config: MadeOnSolConfig);
372
+ private _request;
373
+ }
374
+ export type { MadeOnSolConfig as Config };
375
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;gBAEX,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;CAM3D;AAID,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AACvC,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,CAAC;AACvD,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC5B,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,WAAW,eAAe;IAC9B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC,wCAAwC;IACxC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM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,CAAC,OAAO,CAAS;gBAErB,MAAM,EAAE,eAAe;YAYrB,QAAQ;CA+BvB;AAGD,YAAY,EAAE,eAAe,IAAI,MAAM,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,201 @@
1
+ // ─────────────────────────────────────────────────────────────────────────────
2
+ // MadeOnSol SDK
3
+ // Official TypeScript wrapper for the MadeOnSol Solana API on RapidAPI.
4
+ // Zero dependencies — uses native fetch (Node ≥ 18).
5
+ // ─────────────────────────────────────────────────────────────────────────────
6
+ const BASE_URL = "https://madeonsol-solana-kol-tracker-tools-api.p.rapidapi.com";
7
+ const RAPIDAPI_HOST = "madeonsol-solana-kol-tracker-tools-api.p.rapidapi.com";
8
+ // ─── Error ───────────────────────────────────────────────────────────────────
9
+ export class MadeOnSolError extends Error {
10
+ constructor(message, status, body) {
11
+ super(message);
12
+ this.name = "MadeOnSolError";
13
+ this.status = status;
14
+ this.body = body;
15
+ }
16
+ }
17
+ // ─── Internal helpers ────────────────────────────────────────────────────────
18
+ function buildUrl(path, params) {
19
+ const url = new URL(`${BASE_URL}${path}`);
20
+ if (params) {
21
+ for (const [key, value] of Object.entries(params)) {
22
+ if (value !== undefined && value !== null) {
23
+ url.searchParams.set(key, String(value));
24
+ }
25
+ }
26
+ }
27
+ return url.toString();
28
+ }
29
+ // ─── KOL namespace ───────────────────────────────────────────────────────────
30
+ class KolClient {
31
+ constructor(_fetch) {
32
+ this._fetch = _fetch;
33
+ }
34
+ /**
35
+ * Live feed of KOL trades.
36
+ * @param params Optional filters: limit (1–100), action, kol wallet.
37
+ */
38
+ feed(params) {
39
+ return this._fetch(buildUrl("/kol/feed", params));
40
+ }
41
+ /**
42
+ * KOL PnL leaderboard.
43
+ * @param params Optional period filter ("today" | "7d" | "30d").
44
+ */
45
+ leaderboard(params) {
46
+ return this._fetch(buildUrl("/kol/leaderboard", params));
47
+ }
48
+ /**
49
+ * Full profile for a single KOL wallet.
50
+ * @param wallet Solana wallet address.
51
+ * @param params Optional: include "pnl_by_token" for per-token breakdown.
52
+ */
53
+ wallet(wallet, params) {
54
+ return this._fetch(buildUrl(`/kol/${encodeURIComponent(wallet)}`, params));
55
+ }
56
+ /**
57
+ * Detect coordinated buying activity across KOL wallets.
58
+ * @param params Optional filters: period, min_kols, limit.
59
+ */
60
+ coordination(params) {
61
+ return this._fetch(buildUrl("/kol/coordination", params));
62
+ }
63
+ /**
64
+ * KOL activity for a specific token mint.
65
+ * @param mint Token mint address.
66
+ */
67
+ token(mint) {
68
+ return this._fetch(buildUrl(`/kol/tokens/${encodeURIComponent(mint)}`));
69
+ }
70
+ }
71
+ // ─── Deployer namespace ───────────────────────────────────────────────────────
72
+ class DeployerClient {
73
+ constructor(_fetch) {
74
+ this._fetch = _fetch;
75
+ }
76
+ /**
77
+ * Global deployer statistics.
78
+ */
79
+ stats() {
80
+ return this._fetch(buildUrl("/deployer-hunter/stats"));
81
+ }
82
+ /**
83
+ * Ranked list of deployers.
84
+ * @param params Optional filters: tier, sort, limit, offset.
85
+ */
86
+ leaderboard(params) {
87
+ return this._fetch(buildUrl("/deployer-hunter/leaderboard", params));
88
+ }
89
+ /**
90
+ * Full profile for a single deployer wallet.
91
+ * @param wallet Solana wallet address.
92
+ */
93
+ profile(wallet) {
94
+ return this._fetch(buildUrl(`/deployer-hunter/${encodeURIComponent(wallet)}`));
95
+ }
96
+ /**
97
+ * Tokens deployed by a specific wallet.
98
+ * @param wallet Solana wallet address.
99
+ * @param params Optional: limit, offset.
100
+ */
101
+ tokens(wallet, params) {
102
+ return this._fetch(buildUrl(`/deployer-hunter/${encodeURIComponent(wallet)}/tokens`, params));
103
+ }
104
+ /**
105
+ * Recent deploy alerts from high-quality deployers.
106
+ * @param params Optional filters: since (ISO datetime), limit, offset.
107
+ */
108
+ alerts(params) {
109
+ return this._fetch(buildUrl("/deployer-hunter/alerts", params));
110
+ }
111
+ /**
112
+ * Alert statistics over a time period.
113
+ * @param params Optional: period ("7d" | "30d" | "all").
114
+ */
115
+ alertStats(params) {
116
+ return this._fetch(buildUrl("/deployer-hunter/alert-stats", params));
117
+ }
118
+ /**
119
+ * Best-performing tokens deployed by tracked wallets.
120
+ * @param params Optional: period, limit.
121
+ */
122
+ bestTokens(params) {
123
+ return this._fetch(buildUrl("/deployer-hunter/best-tokens", params));
124
+ }
125
+ /**
126
+ * Most recently bonded tokens from tracked deployers.
127
+ * @param params Optional: limit.
128
+ */
129
+ recentBonds(params) {
130
+ return this._fetch(buildUrl("/deployer-hunter/recent-bonds", params));
131
+ }
132
+ }
133
+ // ─── Tools namespace ─────────────────────────────────────────────────────────
134
+ class ToolsClient {
135
+ constructor(_fetch) {
136
+ this._fetch = _fetch;
137
+ }
138
+ /**
139
+ * Search the MadeOnSol tool directory.
140
+ * @param params Optional: q (search query), category (slug), limit.
141
+ */
142
+ search(params) {
143
+ return this._fetch(buildUrl("/tools/search", params));
144
+ }
145
+ }
146
+ // ─── Main client ─────────────────────────────────────────────────────────────
147
+ /**
148
+ * MadeOnSol API client.
149
+ *
150
+ * @example
151
+ * ```ts
152
+ * import { MadeOnSol } from "madeonsol";
153
+ *
154
+ * const client = new MadeOnSol({ apiKey: "your-rapidapi-key" });
155
+ *
156
+ * const { trades } = await client.kol.feed({ limit: 10, action: "buy" });
157
+ * const { deployers } = await client.deployer.leaderboard({ tier: "elite" });
158
+ * const { alerts } = await client.deployer.alerts({ limit: 5 });
159
+ * ```
160
+ */
161
+ export class MadeOnSol {
162
+ constructor(config) {
163
+ if (!config.apiKey || typeof config.apiKey !== "string") {
164
+ throw new Error("MadeOnSol: apiKey is required.");
165
+ }
166
+ this._apiKey = config.apiKey;
167
+ const bound = this._request.bind(this);
168
+ this.kol = new KolClient(bound);
169
+ this.deployer = new DeployerClient(bound);
170
+ this.tools = new ToolsClient(bound);
171
+ }
172
+ async _request(url) {
173
+ const response = await fetch(url, {
174
+ method: "GET",
175
+ headers: {
176
+ "X-RapidAPI-Key": this._apiKey,
177
+ "X-RapidAPI-Host": RAPIDAPI_HOST,
178
+ "Accept": "application/json",
179
+ },
180
+ });
181
+ let body;
182
+ const contentType = response.headers.get("content-type") ?? "";
183
+ if (contentType.includes("application/json")) {
184
+ body = await response.json();
185
+ }
186
+ else {
187
+ body = await response.text();
188
+ }
189
+ if (!response.ok) {
190
+ const message = typeof body === "object" &&
191
+ body !== null &&
192
+ "message" in body &&
193
+ typeof body.message === "string"
194
+ ? body.message
195
+ : `Request failed with status ${response.status}`;
196
+ throw new MadeOnSolError(message, response.status, body);
197
+ }
198
+ return body;
199
+ }
200
+ }
201
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,gBAAgB;AAChB,wEAAwE;AACxE,qDAAqD;AACrD,gFAAgF;AAEhF,MAAM,QAAQ,GAAG,+DAA+D,CAAC;AACjF,MAAM,aAAa,GAAG,uDAAuD,CAAC;AAE9E,gFAAgF;AAEhF,MAAM,OAAO,cAAe,SAAQ,KAAK;IAIvC,YAAY,OAAe,EAAE,MAAc,EAAE,IAAa;QACxD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AA2TD,gFAAgF;AAEhF,SAAS,QAAQ,CAAC,IAAY,EAAE,MAA8D;IAC5F,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,QAAQ,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,IAAI,MAAM,EAAE,CAAC;QACX,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAClD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBAC1C,GAAG,CAAC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QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,OAAO,GACX,OAAO,IAAI,KAAK,QAAQ;gBACxB,IAAI,KAAK,IAAI;gBACb,SAAS,IAAI,IAAI;gBACjB,OAAQ,IAAgC,CAAC,OAAO,KAAK,QAAQ;gBAC3D,CAAC,CAAE,IAA+B,CAAC,OAAO;gBAC1C,CAAC,CAAC,8BAA8B,QAAQ,CAAC,MAAM,EAAE,CAAC;YACtD,MAAM,IAAI,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO,IAAS,CAAC;IACnB,CAAC;CACF"}
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "madeonsol",
3
+ "version": "1.0.0",
4
+ "description": "Official SDK for the MadeOnSol Solana API — KOL wallet tracking, Pump.fun deployer intelligence, and tool directory",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsc"
19
+ },
20
+ "keywords": [
21
+ "solana",
22
+ "api",
23
+ "sdk",
24
+ "kol",
25
+ "kol-tracker",
26
+ "trading",
27
+ "pump.fun",
28
+ "pumpfun",
29
+ "deployer",
30
+ "deployer-hunter",
31
+ "wallet-tracking",
32
+ "defi",
33
+ "web3",
34
+ "blockchain",
35
+ "solana-tools",
36
+ "token",
37
+ "madeonsol",
38
+ "rapidapi",
39
+ "bonding-curve",
40
+ "smart-money"
41
+ ],
42
+ "license": "MIT",
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "https://github.com/LamboPoewert/madeonsol-sdk.git"
46
+ },
47
+ "homepage": "https://madeonsol.com/solana-api",
48
+ "bugs": {
49
+ "url": "https://github.com/LamboPoewert/madeonsol-sdk/issues"
50
+ },
51
+ "engines": {
52
+ "node": ">=18"
53
+ },
54
+ "devDependencies": {
55
+ "typescript": "^5.4.0"
56
+ }
57
+ }