madeonsol 2.30.0 → 3.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 +21 -21
- package/README.md +33 -3
- package/dist/index.d.ts +779 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/dist/stream.d.ts +2 -2
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +3 -0
- package/dist/stream.js.map +1 -1
- package/llms.txt +117 -117
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,21 +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.
|
|
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
CHANGED
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
Official TypeScript/JavaScript SDK for the **[MadeOnSol](https://madeonsol.com) Solana API** — zero dependencies, fully typed, works in Node.js ≥ 18 and edge runtimes.
|
|
13
13
|
> Real-time Solana trading intelligence: track 1,069 KOL wallets with <3s latency on paid keys and x402 pay-per-call (free-tier live feeds are 5-min delayed), score 23,000+ Pump.fun deployers, surface deshred deploy signals **~500ms before on-chain confirmation**, detect multi-KOL coordination, score token rug-risk 0–100 with a transparent factor breakdown, expose the bundle cohort that bought a token together and how much of supply it still holds, verify any wallet's current on-chain holdings with airdrop/insider `transfer_delta` detection, push every pump.fun graduation the second it bonds, and stream every DEX trade across 9+ programs. Free tier: 200 requests/day across 40+ endpoints (live feeds 5-min delayed) — no signup payment. Get a key at [madeonsol.com/pricing](https://madeonsol.com/pricing).
|
|
14
14
|
|
|
15
|
+
> **New in 3.0.0 (API parity 2026-10-03).** **Type fixes:** `KolConsensusResponse` now nests the figures under `consensus` (new `KolConsensus`) and `PeakHistoryResponse` under `peak_history` (new `PeakHistory`) — that is what the API has always returned; the old flat types read `undefined`. **New fields:** `TradeCoverage.size_floor` (`TradeSizeFloor`: the stored tape drops buys under 0.05 SOL / $3.50 in stables; live streams, prices and candles are unaffected) plus `data_observed` / `eligibility` / `eligibility_basis` / `completeness`; `WalletStatsResponse.stats_unavailable` / `enrichment_unavailable` / `degraded_fields` (a degraded read is UNKNOWN, never "no data"); token-lock provenance and countdowns on `TokenLock` (`provider`, `explorer`, `price_usd`, `seconds_until_end`, `seconds_until_next_unlock`, Bonfida `schedule`) and `cursor` / `next_cursor` + `degraded_fields` on the locks feed; copy-trade `min_mc_usd` / `max_mc_usd`, `source_wallets_tracked` / `source_wallets_untracked` / `warnings`; `ApiTier` adds `BUSINESS` / `ENTERPRISE`. **New method:** `client.token.topTraders(mint, params?)` → `GET /tokens/{mint}/top-traders` (PRO+).
|
|
16
|
+
|
|
17
|
+
> **New in 3.0.0, continued (API parity 2026-10-03, second pass).** **Pagination:** `client.kol.feed()`, `client.kol.firstTouches()` and `client.deployer.alerts()` accept `cursor` (opaque strict keyset, preferred over the legacy `before`), and their responses carry `next_cursor`, `has_more` (false only at the real end of the feed), `scan` (`FeedScanInfo`, on post-filtered pages) and the free-tier delay fields (`FreeTierDelayMeta`); the KOL feed and first-touches also return `next_since` / `since` and a `stream` pointer, and `kol.feed()` accepts `since` and `include: "token"` (each trade gains `token`). `deployer.alerts()` accepts `token_mint` and returns `kol_buys_complete`. **New fields:** `KolLeaderboardResponse.pagination` / `universe` / `entry_mc_window_start` / `entry_mc_complete`, `KolLeaderboardEntry.entry_mc_samples` / `avg_entry_mc_usd`, `DeployerAlert.launchpad`, `DeployerSummary.instant_bonds` / `runner_tokens`. **Type corrections (breaking at compile time, matching what the API has always returned):** `client.deployer.profile()` returns `DeployerProfileResponse` (`is_deployer`, `deployer` row, `pump_stats`, `pump_tokens`, `pump_error`, `launchpad_tokens`, PRO+ `funding`) instead of the flat `DeployerProfile` (now deprecated); `TokenSurgeStreamEvent.kol` / `early_buyers` are nullable (null when `enrichment_available` is false); wallet tracker `addToWatchlist()` returns `{ wallet }`, `updateLabel()` returns `{ wallet }`, `removeFromWatchlist()` returns `{ removed }`; webhooks use `is_active` (the `status` field never existed on the wire, and `status` in an update was ignored), `create()` returns `{ webhook, note }` (the only response with `secret`), `update()` returns `{ webhook }`, `delete()` returns `{ deleted }`, events are typed `WebhookEvent` and filters `WebhookFilters`. **New methods:** `client.webhooks.get(id)` → `GET /webhooks/{id}` (with `recent_deliveries`); `client.webhooks.test(id, event?)` takes the optional event to sample.
|
|
18
|
+
|
|
19
|
+
> **New in 2.31.0 — WS Phase 4 stream types.** `token:candles`, `token:risk` and `wallet:scores` channels, event names, payload and filter types (README example).
|
|
20
|
+
|
|
21
|
+
> **New in 2.30.0 — WS Phase 3 stream types.** `token:locks` lifecycle event names plus payload / filter types; README covers lock lifecycle and `dex:liquidity`.
|
|
22
|
+
|
|
15
23
|
> **New in 2.29.0 — named subscriptions: several independent subscriptions per socket.** `subscribe({ subId, channels, filters })`, `updateSubscription(subId, filters)`, `unsubscribe(subId)`, `getSubscriptions()` / `listSubscriptions()`. Each named subscription has its own channels and filters (the server caps the total per connection, default included: PRO 5, ULTRA 10, BUSINESS 20); frames carry `evt.sub_id`; an event matching several subscriptions is delivered once per subscription (dedupe per `(sub_id, id)`). Resume is per subscription with one commit for the connection. The plain `subscribe(channels, filters)` API is unchanged. See "Named subscriptions" in the stream section.
|
|
16
24
|
|
|
17
25
|
> **New in 2.28.0 — stream recovery: resume cursor, de-duplication, honest gaps.** The managed stream now tracks the cursor `{ instance, seq, ts }` of the last frame your handlers finished and resumes after it on every reconnect (the v1 `resume` request, with an automatic fallback to `replay_since_seq` / `replay_since_ts` on older servers). Delivery is at-least-once, de-duplicated by event `id`; new lifecycle events `cursor`, `replay`, `gap` (what could not be recovered — a `seq` gap is never loss) and `fatal`. Close codes are handled: 4001 re-fetches the token (bounded), 4002 waits ≥ 60 s instead of looping every second, 4003 stops, 4008 resumes; the backoff resets only after a `subscribed` ack. Every server `warning` frame is emitted (incl. `channels_rejected` / `channels_revoked`). `STREAM_CHANNELS` lists every Solana channel and `token:prices` joins the `StreamChannel` type. See the stream section's "Recovery" notes.
|
|
@@ -351,7 +359,9 @@ const data = await client.kol.coordinationHistory({ limit: 50, min_score: 70 });
|
|
|
351
359
|
KOL consensus on a token: how many bought/sold, exit rate, net flow, median entry MC. **ULTRA** gets individual wallet arrays.
|
|
352
360
|
|
|
353
361
|
```ts
|
|
354
|
-
const consensus = await client.token.kolConsensus("4sVahM4U8js62mQV58ABSkNRhf6Ztc7Xs2LXUznNpump");
|
|
362
|
+
const { consensus } = await client.token.kolConsensus("4sVahM4U8js62mQV58ABSkNRhf6Ztc7Xs2LXUznNpump");
|
|
363
|
+
// figures are nested under `consensus` (null when no KOL traded the mint)
|
|
364
|
+
console.log(consensus?.total_kol_buyers, consensus?.kol_exit_rate);
|
|
355
365
|
```
|
|
356
366
|
|
|
357
367
|
---
|
|
@@ -361,7 +371,9 @@ const consensus = await client.token.kolConsensus("4sVahM4U8js62mQV58ABSkNRhf6Zt
|
|
|
361
371
|
Peak MC history: ATH, decline from peak, MC at bond and at 1h/6h/24h/7d after bond.
|
|
362
372
|
|
|
363
373
|
```ts
|
|
364
|
-
const
|
|
374
|
+
const { found, peak_history } = await client.token.peakHistory("4sVahM4U8js62mQV58ABSkNRhf6Ztc7Xs2LXUznNpump");
|
|
375
|
+
// figures are nested under `peak_history` (null with found: false for an unknown mint)
|
|
376
|
+
console.log(found, peak_history?.peak_mc_usd);
|
|
365
377
|
```
|
|
366
378
|
|
|
367
379
|
---
|
|
@@ -1301,7 +1313,7 @@ stream.subscribe(["kol:trades", "deployer:alerts"]);
|
|
|
1301
1313
|
// stream.unsubscribe([...]) / stream.close() when done
|
|
1302
1314
|
```
|
|
1303
1315
|
|
|
1304
|
-
Channels: `kol:trades`, `kol:coordination`, `kol:first_touches`, `deployer:alerts`, `wallet_tracker:events`, `copytrade:signals`, `price_alert:events`, `sniper:deploys`, `token:graduations`, `token:prices` (**new** in the channel list — event `token:price`, per-mint price/MC ticks; PRO+, REQUIRES `filters.mints` — PRO 25 / ULTRA 100 / BUSINESS 250 per connection; a state stream, so ticks carry no id/seq and are never replayed) (every pump.fun graduation in real time, tracked deployer or not — typed `GraduationEvent`), `token:locks` (**new 2.25** — event `token:lock` for every NEW Streamflow / Jupiter Lock / Bonfida lock or vesting contract, typed `TokenLockStreamEvent`; PRO+; updates are not pushed — poll `client.token.locks()`), `token:fee_claims` (**new 2.25** — event `token:fee_claim` for every pump.fun fee event: distributions, social-handle claims, config changes, typed `TokenFeeClaimStreamEvent`; PRO+), `token:surges` (**new 2.26** — events `token:surge` / `token:revival` the moment a momentum fire is confirmed, typed `TokenSurgeStreamEvent` with `tape` / `kol` / `early_buyers` / `deployer` / `risk_flags[]`; server-side filters `kinds[]`, `tiers[]`, `launchpads[]`, `exclude_flags[]`, `min_mc_usd` / `max_mc_usd`, `deployer_tier[]` — typed `TokenSurgesSubscribeFilters`; PRO+; the +1 h `outcome` is REST-only — poll `client.token.surges()`). Lifecycle: `open`, `close`, `reconnect`, `subscribed`, `heartbeat`, `warning`, `cursor`, `replay`, `gap`, `fatal`, `error`. Node 22+ uses the global `WebSocket`; on Node < 22 also `npm i ws`.
|
|
1316
|
+
Channels: `kol:trades`, `kol:coordination`, `kol:first_touches`, `deployer:alerts`, `wallet_tracker:events`, `copytrade:signals`, `price_alert:events`, `sniper:deploys`, `token:graduations`, `token:prices` (**new** in the channel list — event `token:price`, per-mint price/MC ticks; PRO+, REQUIRES `filters.mints` — PRO 25 / ULTRA 100 / BUSINESS 250 per connection; a state stream, so ticks carry no id/seq and are never replayed) (every pump.fun graduation in real time, tracked deployer or not — typed `GraduationEvent`), `token:locks` (**new 2.25** — event `token:lock` for every NEW Streamflow / Jupiter Lock / Bonfida lock or vesting contract, typed `TokenLockStreamEvent`; PRO+; updates are not pushed — poll `client.token.locks()`), `token:fee_claims` (**new 2.25** — event `token:fee_claim` for every pump.fun fee event: distributions, social-handle claims, config changes, typed `TokenFeeClaimStreamEvent`; PRO+), `token:surges` (**new 2.26** — events `token:surge` / `token:revival` the moment a momentum fire is confirmed, typed `TokenSurgeStreamEvent` with `tape` / `kol` / `early_buyers` / `deployer` / `risk_flags[]`; server-side filters `kinds[]`, `tiers[]`, `launchpads[]`, `exclude_flags[]`, `min_mc_usd` / `max_mc_usd`, `deployer_tier[]` — typed `TokenSurgesSubscribeFilters`; PRO+; the +1 h `outcome` is REST-only — poll `client.token.surges()`), `token:candles`, `token:risk`, `wallet:scores` (**new, server 2026-09-23** — live 1-minute candles, risk-input changes and wallet-score changes; all PRO+ and scoped, see below). Lifecycle: `open`, `close`, `reconnect`, `subscribed`, `heartbeat`, `warning`, `cursor`, `replay`, `gap`, `fatal`, `error`. Node 22+ uses the global `WebSocket`; on Node < 22 also `npm i ws`.
|
|
1305
1317
|
|
|
1306
1318
|
##### Recovery: cursor, resume, de-duplication *(new in 2.28.0)*
|
|
1307
1319
|
|
|
@@ -1354,6 +1366,24 @@ stream.subscribe({ subId: "locks", channels: ["token:locks"], filters: { lifecyc
|
|
|
1354
1366
|
stream.on("token:unlock_available", (e: TokenUnlockScheduleEvent) => console.log(e.unlock_kind, e.amount_raw, "claimable, not claimed"));
|
|
1355
1367
|
```
|
|
1356
1368
|
|
|
1369
|
+
#### Candles, risk inputs and wallet scores *(server 2026-09-23)*
|
|
1370
|
+
|
|
1371
|
+
Three PRO+ channels, all **scoped** (per-connection cap PRO 25 / ULTRA 100 / BUSINESS 250, counted across named subscriptions; over the cap or without a scope the channel is rejected, never truncated):
|
|
1372
|
+
|
|
1373
|
+
- **`token:candles`** — `filters.mints` (REQUIRED, a budget separate from `token:prices`). `candle:closed` carries the stored 1-minute row (`TokenCandleClosedEvent`, id `candle:solana:<mint>:<bucket epoch s>`, ≈ ≤ 25 s after the minute ends; fully flat zero-trade minutes are skipped) and resumes durably. `filters.updates: true` adds `candle:update`, the in-progress minute (`TokenCandleUpdateEvent`, ≤ 1 per mint per second, a state stream: no id, never replayed, no snapshot). Filters `TokenCandlesFilters`.
|
|
1374
|
+
- **`token:risk`** — `filters.mints` (REQUIRED). Risk-INPUT changes, not a score stream: `risk:authority_changed` (mint / freeze authority revoked, Token-2022 transfer fee changed) and `risk:supply_inflated` (first crossing of 0.5 % / 5 % supply drift), plus one `risk:inputs` snapshot frame per mint (`frame.snapshot === true`) on subscribe, scope change and resume. Optional `risk_events[]`, `risk_snapshot` (default `true`). Types `TokenRiskFilters`, `TokenRiskAuthorityChangedEvent`, `TokenRiskSupplyInflatedEvent`, `TokenRiskInputsSnapshot`.
|
|
1375
|
+
- **`wallet:scores`** — `filters.wallets` (REQUIRED, base58). `deployer:tier_changed` (`DeployerTierChangedEvent`; `entered_ranking: true` when a wallet leaves `unranked`) and `kol:score_state_changed` (`is_cold` / `is_heating_up` / `auto_strategy_tag`, `KolScoreStateChangedEvent`). Every frame carries `computed_at` + `source` (`live_write` / `scheduled_recompute` / `matview_refresh`): "recomputed at T", not "changed at T". Optional `score_events[]`.
|
|
1376
|
+
|
|
1377
|
+
```ts
|
|
1378
|
+
const stream = client.stream.connect();
|
|
1379
|
+
stream.subscribe({ subId: "candles", channels: ["token:candles"], filters: { mints: [MINT], updates: true } });
|
|
1380
|
+
stream.subscribe({ subId: "risk", channels: ["token:risk"], filters: { mints: [MINT] } });
|
|
1381
|
+
stream.subscribe({ subId: "scores", channels: ["wallet:scores"], filters: { wallets: [DEPLOYER] } });
|
|
1382
|
+
stream.on("candle:closed", (c: TokenCandleClosedEvent) => console.log(c.bucket_start, c.open_price_usd, c.close_price_usd, c.volume_usd));
|
|
1383
|
+
stream.on("risk:authority_changed", (e: TokenRiskAuthorityChangedEvent) => console.log(e.mint, e.field, e.before, "→", e.after));
|
|
1384
|
+
stream.on("deployer:tier_changed", (e: DeployerTierChangedEvent) => console.log(e.wallet, e.tier_before, "→", e.tier_after, e.source));
|
|
1385
|
+
```
|
|
1386
|
+
|
|
1357
1387
|
#### `client.stream.sessions()` / `client.stream.deleteSession(id)` *(new in 2.17 — PRO+)*
|
|
1358
1388
|
|
|
1359
1389
|
Audit and evict your **live** WebSocket sessions across the KOL/deployer (`ws-streaming`) and all-DEX (`dex-stream`) services. `sessions()` lists each open connection; `deleteSession(id)` force-closes one — handy for freeing a connection slot held by a ghost/stale socket after a network drop.
|