madeonsol 4.3.0 → 4.5.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 +13 -9
- package/dist/index.d.ts +465 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +52 -12
- 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 +1 -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
|
@@ -10,10 +10,14 @@
|
|
|
10
10
|
> ⭐ **[Star on GitHub](https://github.com/madeonsol/madeonsol-sdk)** if you find this useful · 📂 **[Examples](./examples/)** · 📚 **[API docs](https://madeonsol.com/api-docs)**
|
|
11
11
|
|
|
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
|
-
> 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
|
|
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 early deploy observations with separate execution evidence, 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
15
|
> **Migrating to 4.0.0.** Runtime API behaviour is not intentionally changing: the server sends exactly what it sent before. The breaking change is the corrected public **type contract**. Several 3.x response types described field names and shapes the API never returned, so code that compiled against them read `undefined` at runtime. Rewritten or renamed types: `KolWalletProfile` (`kol` / `stats` / `scores` / `peer_ranks` / `recent_trades` / `pnl_by_token`), `KolTokenActivity` (`token_mint` / `summary` / `kols[]`), alpha linked wallets (`linked`, was `linked_wallets`), `DeployerTokenRow` (`token_mint`, was `mint`), wallet-tracker trade events (`slot`, `ingested_at`, `ordered_by`, `next_cursor_slot`; keys the API never sent are now optional and `@deprecated`), `DeployerProfileResponse` (from 3.0.0). Several previously required fields are now optional because the API omits or nulls them. Update the field names your code reads; no request-side change is needed.
|
|
16
16
|
|
|
17
|
+
> **New in 4.5.0 (2026-10-15, bundle clusters + terminal fields).** `client.alpha.bundles(mint, { window, min_wallets, limit, include_balances })` lists every coordinated buy cluster on a token, the launch bundle and clusters that enter later, with `phase`, `new_wallets`, `atomic_txs` and the cluster's sells so far (`exit`); a cluster is evidence, not a verdict. `client.alpha.bundleShare(mint, { window, min_wallets })` returns one figure, `bundled_pct_of_supply_now` (0 to 1), read from chain balances and null rather than a partial sum when a wallet could not be read. `client.kol.tokenTrades(mint, { limit, action, kol, since, cursor })` returns every stored KOL trade on one token, keyset paged. The stream gains the PRO+ `token:bundles` channel (`token:bundle_cluster`, `token:bundle_exit`; filters `TokenBundlesFilters`). Opt-in parameters now typed: `include_balances` on `bundle()` / `buyerQuality()` (`held_now`, `balance_now`, `dump_cluster_held_now`), `verify_current_balances` / `include_scout_scores` on `capTable()`, `include_wallet_flags` on `holders()` (`wallet_flags`, `wallet_flags_meta`), `include_launches_24h` on `deployer.tokens()`. Also typed: top-traders `cost_method` (`"fifo"`) with `unmatched_sell_tokens` / `cost_basis_complete` (and `unrealized_pnl_sol` / `total_pnl_sol` / `held_value_sol` are `null` when a holding cannot be priced), sniper `finalized_at`, depth `unsupported_pools[].fillable_up_to_sol`, and deployer activity `actor_wallet` / `actor_role` / `token_amount_raw` / `counterparty_class`. All new response fields are optional.
|
|
18
|
+
|
|
19
|
+
> **New in 4.4.0 (early deploy observations).** The sniper feed (`client.sniper.*`, the `sniper:deploys` channel and the `sniper:deploy` webhook) is ULTRA, BUSINESS and ENTERPRISE only, and it reports observed deploy instructions, not executions. `SniperDeploy` gains `event_id` (deduplicate on it), `source` (`"shredprism"` or `"deshred"`), `outer_instruction_index`, `observation_stage`, `execution_status` (`"unknown"` until separate chain evidence resolves it), `transaction_version` (`"legacy"`, `0` or `1`), `transaction_config` (`EarlyTransactionConfig`: the requested compute and fee settings, `priority_fee_lamports` as a decimal string, unset resources `null`) and `fee_payer`. `StreamToken` gains `early_ws_url` and `early_stream`, present only when the early stream is active and the key is ULTRA or above. Every new field is optional and absent on older responses. No timing lead is promised.
|
|
20
|
+
|
|
17
21
|
> **New in 4.3.0 (stream handshake fix + contract parity).** `MadeOnSolStream` no longer opens a second WebSocket (or requests a second stream token) when `connect()` or `subscribe()` is called while the first socket is still connecting; channels requested during the handshake are sent once it opens, and `close()` during the handshake leaves no socket behind. Response types gain the fields the API already serves: copy-trade identity v2 on `CopyTradeSignal` (`economic_action_id`, `source_actor`, `co_actors`, `identity_version`), LP security on `TokenSummary` (`lp_secured_pct`, `lp_secured_basis`, `lp_locked_until`), `AlmostBondedToken.launchpad` / `venue_source`, cap-table `ranks_completeness`, depth `pool_selection` and per-pool `model_detail` / `pool_account` / `fee_basis` / `bins_window` / `ticks_window`, batch-classify `label_coverage` / `rule_version` / `evidence_horizon`, proven-holding fields on wallet PnL and positions (`holding_check`, `position_basis`, `holding_status`, `holding_unverified_reason`, `cost_basis_status`, `holding`) and funding `wallet_coverage`. All additive and optional.
|
|
18
22
|
|
|
19
23
|
> **New in 4.2.0 (any-wallet copy-trade).** Copy-trade rules can now follow any wallet, KOL or not (server 2026-10-04; KOL membership is enrichment only and copy-trade sources do not use Wallet Tracker quota). `CopyTradeSubscription` gains `source_admission` (`CopyTradeSourceAdmission`: `"any_wallet"` | legacy `"kol_only"`), `operational_state` (`CopyTradeOperationalState`: `eligible`, or an infrastructure state `monitoring_pending` / `monitoring_unavailable` / `source_capacity_unavailable`; legacy `no_tracked_sources` / `unknown`) and `monitoring_reasons`; `source_wallets_tracked` / `source_wallets_untracked` are deprecated (kept and still filled). **Token locks:** `TokenLockProgram` adds `smithii_vesting` and `sablier_lockup`; `TokenLock` gains the Sablier stream-NFT holder proof (`holder_status`, `last_proven_holder`, `holder_proven_at_slot`; `recipient` is only the CURRENT proven holder) and `withdrawn_tracked` — `withdrawn_raw` / `claimable_raw` are now `string | null` (null when the program does not expose withdrawals, e.g. Smithii). Additive on the wire; the two nullable changes can surface as compile-time errors under `strictNullChecks`.
|
|
@@ -72,7 +76,7 @@ Official TypeScript/JavaScript SDK for the **[MadeOnSol](https://madeonsol.com)
|
|
|
72
76
|
>
|
|
73
77
|
> **New in 2.11** — **Graduation events + dump-cluster detection.** Subscribe `token:graduations` for every pump.fun bond in real time — tracked deployer or not — with typed `GraduationEvent` payloads (mint, deployer tier, time-to-bond, MC at bond). Buyer-quality `breakdown` adds `dump_cluster_count` (out-of-sample validated: 3+ such wallets in the first-20 → 94% dump vs 61% base) and `recycled_early_buyer_count` (high count with zero cluster leans runner). DEX firehose: replay buffer deepened to ~5 minutes; mint-scoped subs now receive in-band `dex:graduations` frames — the bond lands on the same connection as your position's trade flow.
|
|
74
78
|
|
|
75
|
-
> **
|
|
79
|
+
> **Historical 2.9 release:** introduced the sniper endpoints. The current contract requires ULTRA/BUSINESS/ENTERPRISE and exposes observed intent separately from execution; see the early sniper section below.
|
|
76
80
|
>
|
|
77
81
|
> **New in 2.8** — **Price alerts, scout leaderboard, wallet derived stats.** `client.priceAlerts.*` — CRUD for token MC dip/recovery alerts delivered via webhook or WebSocket (PRO=5, ULTRA=25). `client.kol.scoutLeaderboard()` — top scouts ranked by first-touch follow-on rate. `client.kol.coordinationHistory()` and `client.token.peakHistory()` expose the historical record. `client.wallet.stats()` now returns a `derived` block: `win_rate`, `roi`, `verdict`, and `biggest_miss`.
|
|
78
82
|
>
|
|
@@ -99,7 +103,7 @@ const { trades } = await client.kol.feed({ limit: 5, action: "buy" });
|
|
|
99
103
|
| Feature | Description |
|
|
100
104
|
|---|---|
|
|
101
105
|
| **KOL Tracker** | Real-time trade feed, PnL leaderboard with five time windows (today, 7d, 30d, 90d, 180d), coordination detection, per-wallet profiles, and deep PnL analytics for 1,069 tracked KOL wallets. **180 days of trade history** retained. |
|
|
102
|
-
| **
|
|
106
|
+
| **Early Sniper** | Early deploy observations and watchlists for ULTRA/BUSINESS/ENTERPRISE. Execution starts unknown; no guaranteed timing lead. Use WebSocket/webhook for live push. |
|
|
103
107
|
| **Alpha Wallet Intel** | Leaderboard of 1M+ scored early-buyer wallets, full wallet profiles, linked-wallet clustering, token cap-table enrichment, and 0–100 buyer quality scores with dump-cluster wallet detection. |
|
|
104
108
|
| **Token Risk Score** | Transparent 0–100 rug-risk/safety score per token with a `safe`/`caution`/`danger` band, explainable factor breakdown, and the raw inputs (authorities, liquidity, transfer fee, launch cohort, deployer bond rate, KOL signal, blacklist). PRO/ULTRA. |
|
|
105
109
|
| **Bundle Cohort** | The wallets that bought a token together (one atomic tx or the same slot) and — headline first — `held_pct_of_supply` still held, plus `held_ratio`, `fully_exited`, and buy volume. Every tier gets the summary; PRO adds top-10 wallet flags; ULTRA adds KOL identity, win rate, bot confidence, and per-wallet balances. |
|
|
@@ -145,7 +149,7 @@ const client = new MadeOnSol({ apiKey: "msk_your_api_key_here" });
|
|
|
145
149
|
const { trades } = await client.kol.feed({ limit: 10, action: "buy" });
|
|
146
150
|
console.log(trades[0].kol_name, "bought", trades[0].token_symbol);
|
|
147
151
|
|
|
148
|
-
//
|
|
152
|
+
// Early sniper — execution initially unknown (ULTRA/BUSINESS/ENTERPRISE)
|
|
149
153
|
const { deploys } = await client.sniper.recent({ limit: 20, min_bond_rate: 0.5 });
|
|
150
154
|
console.log(deploys[0].token_name, "deployed by", deploys[0].deployer_tier, "tier deployer");
|
|
151
155
|
|
|
@@ -165,7 +169,7 @@ const { tools } = await client.tools.search({ q: "trading", limit: 10 });
|
|
|
165
169
|
## Use cases
|
|
166
170
|
|
|
167
171
|
- **Copy-trading bot** — stream KOL buys via `client.kol.feed()` and mirror trades
|
|
168
|
-
- **
|
|
172
|
+
- **Early sniper** — `client.sniper.recent()` or subscribe to `sniper:deploys` WebSocket for early observations with separate execution evidence
|
|
169
173
|
- **DEX trade sniping** — subscribe to the all-DEX stream filtered by token, wallet, or deployer tier
|
|
170
174
|
- **Graduation sniper / position manager** — subscribe `token:graduations` for every pump.fun bond in real time, or hold a mint-scoped firehose sub and get the bond in-band with your position's trade flow
|
|
171
175
|
- **Coordination detector** — flag tokens with `client.kol.coordination({ min_kols: 3, min_score: 70 })`
|
|
@@ -333,12 +337,12 @@ WebSocket: subscribe to channel `price_alert:events` — user-scoped. Webhook: p
|
|
|
333
337
|
|
|
334
338
|
---
|
|
335
339
|
|
|
336
|
-
#### `client.sniper.*` —
|
|
340
|
+
#### `client.sniper.*` — Early Sniper Alerts *(new in 2.9)*
|
|
337
341
|
|
|
338
|
-
|
|
342
|
+
Early deploy observations require **ULTRA/BUSINESS/ENTERPRISE**. With ShredPrism activated, stream-token discovery includes `early_ws_url` and `early_stream` for `early:deploys`. Execution starts unknown; use separate execution evidence and deduplicate by `event_id`. No timing lead or settlement rate is guaranteed. REST, legacy sniper WebSocket/webhook delivery and watchlists use the same tier gate.
|
|
339
343
|
|
|
340
344
|
```ts
|
|
341
|
-
// Newest-first
|
|
345
|
+
// Newest-first early deploy feed (ULTRA/BUSINESS/ENTERPRISE)
|
|
342
346
|
const { deploys } = await client.sniper.recent({ limit: 50, min_bond_rate: 0.5 });
|
|
343
347
|
|
|
344
348
|
// Audit one deployer's recent launches (ULTRA)
|
|
@@ -351,7 +355,7 @@ const { deploys: tracked } = await client.sniper.recent({ watchlist: true });
|
|
|
351
355
|
await client.sniper.removeFromWatchlist("7dEx...4pQ8");
|
|
352
356
|
```
|
|
353
357
|
|
|
354
|
-
|
|
358
|
+
An observation is not proof of execution. `confirmed_on_chain` stays null until separate evidence is available. `transaction_config` carries encoded requests, with absent resource fields null and fees as decimal strings. Legacy push uses `sniper:deploy` / `sniper:deploys`; direct early delivery uses the separately advertised early WebSocket endpoint.
|
|
355
359
|
|
|
356
360
|
**v2.20** — each deploy also carries a `footprint` block (`SniperFootprint | null`): the slot-window snipe rollup for slots [-1..+3] around the deploy — `buys`, `buyers`, `sol`, `supply_pct`, `sniper_wallet_buys`, `data_available`, `as_of`. `null` until the ~10-min settle window has passed (or when the mint is outside the pump.fun-pipeline write-gate) — absent, not zero.
|
|
357
361
|
|