madeonsol 4.3.0 → 4.4.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 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,12 @@
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 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).
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.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.
18
+
17
19
  > **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
20
 
19
21
  > **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 +74,7 @@ Official TypeScript/JavaScript SDK for the **[MadeOnSol](https://madeonsol.com)
72
74
  >
73
75
  > **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
76
 
75
- > **New in 2.9** — **Deshred Sniper Alerts.** `client.sniper.recent()` surfaces new pump.fun deploys reconstructed from shred-level data ~500ms before the chain confirms them — a measured head start over any confirmed-stream feed. PRO sees elite/good deployers; ULTRA sees every tier and maintains a custom deployer watchlist (`client.sniper.addToWatchlist()`). Use the `sniper:deploys` WebSocket channel or `sniper:deploy` webhook for live push instead of polling.
77
+ > **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
78
  >
77
79
  > **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
80
  >
@@ -99,7 +101,7 @@ const { trades } = await client.kol.feed({ limit: 5, action: "buy" });
99
101
  | Feature | Description |
100
102
  |---|---|
101
103
  | **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
- | **Deshred Sniper** | Deploy feed reconstructed from shred-level data — surfaces new pump.fun launches **~500ms before on-chain confirmation**. PRO: elite/good deployers. ULTRA: all tiers + custom watchlist. Use WebSocket/webhook for live push. |
104
+ | **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
105
  | **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
106
  | **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
107
  | **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 +147,7 @@ const client = new MadeOnSol({ apiKey: "msk_your_api_key_here" });
145
147
  const { trades } = await client.kol.feed({ limit: 10, action: "buy" });
146
148
  console.log(trades[0].kol_name, "bought", trades[0].token_symbol);
147
149
 
148
- // Deshred sniper — ~500ms before on-chain confirmation (PRO/ULTRA)
150
+ // Early sniper — execution initially unknown (ULTRA/BUSINESS/ENTERPRISE)
149
151
  const { deploys } = await client.sniper.recent({ limit: 20, min_bond_rate: 0.5 });
150
152
  console.log(deploys[0].token_name, "deployed by", deploys[0].deployer_tier, "tier deployer");
151
153
 
@@ -165,7 +167,7 @@ const { tools } = await client.tools.search({ q: "trading", limit: 10 });
165
167
  ## Use cases
166
168
 
167
169
  - **Copy-trading bot** — stream KOL buys via `client.kol.feed()` and mirror trades
168
- - **Deshred sniper** — `client.sniper.recent()` or subscribe to `sniper:deploys` WebSocket for ~500ms pre-confirm deploy signals
170
+ - **Early sniper** — `client.sniper.recent()` or subscribe to `sniper:deploys` WebSocket for early observations with separate execution evidence
169
171
  - **DEX trade sniping** — subscribe to the all-DEX stream filtered by token, wallet, or deployer tier
170
172
  - **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
173
  - **Coordination detector** — flag tokens with `client.kol.coordination({ min_kols: 3, min_score: 70 })`
@@ -333,12 +335,12 @@ WebSocket: subscribe to channel `price_alert:events` — user-scoped. Webhook: p
333
335
 
334
336
  ---
335
337
 
336
- #### `client.sniper.*` — Deshred Sniper Alerts *(new in 2.9)*
338
+ #### `client.sniper.*` — Early Sniper Alerts *(new in 2.9)*
337
339
 
338
- **The fastest path to a new pump.fun launch.** Deploys are reconstructed from shred-level (**deshred**) data and surface in the feed **~500ms before the chain confirms them** — a measured head start versus any confirmed-stream feed. **PRO** sees elite + good deployers; **ULTRA** sees every tier and can keep a custom deployer watchlist.
340
+ 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
341
 
340
342
  ```ts
341
- // Newest-first deshred deploy feed (PRO: elite/good · ULTRA: all tiers)
343
+ // Newest-first early deploy feed (ULTRA/BUSINESS/ENTERPRISE)
342
344
  const { deploys } = await client.sniper.recent({ limit: 50, min_bond_rate: 0.5 });
343
345
 
344
346
  // Audit one deployer's recent launches (ULTRA)
@@ -351,7 +353,7 @@ const { deploys: tracked } = await client.sniper.recent({ watchlist: true });
351
353
  await client.sniper.removeFromWatchlist("7dEx...4pQ8");
352
354
  ```
353
355
 
354
- Detection is pre-execution, so payloads carry no MC/logs/balances — `confirmed_on_chain` is `"deshred"`. For **live** push (not polling), use the `sniper:deploy` webhook event or the `sniper:deploys` WebSocket channel. ~1–3% of detected deploys may abandon before settlement.
356
+ 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
357
 
356
358
  **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
359
 
package/dist/index.d.ts CHANGED
@@ -1839,6 +1839,14 @@ export interface DeployerActivityEvent {
1839
1839
  /** Time of the event itself (the window applies to this). */
1840
1840
  at: string;
1841
1841
  time_basis: "chain" | "ingest" | "chain_or_ingest";
1842
+ /** dev transfer / dev trade rows restored after a delivery gap (history only, never delivered live). getBlock recovery has `time_basis: "chain"`; spool replay keeps the original receive time (`"ingest"`). */
1843
+ recovered?: boolean;
1844
+ /** When the recovery wrote the row (only with `recovered: true`). */
1845
+ recovered_at?: string | null;
1846
+ /** Received live but classified after a parked creator lookup (broad transfer source); `at` stays the receive time. */
1847
+ late_classified?: boolean;
1848
+ /** Transfers aggregate per (tx, token, direction, actor): how many counterparties the aggregate has (null on rows written before 2026-10-06). */
1849
+ counterparty_count?: number | null;
1842
1850
  mint?: string | null;
1843
1851
  name?: string | null;
1844
1852
  symbol?: string | null;
@@ -4986,6 +4994,17 @@ export interface ToolsSearchResponse {
4986
4994
  _rid?: string;
4987
4995
  }
4988
4996
  export interface StreamToken {
4997
+ /** Only present when ShredPrism is active and the subscriber is ULTRA/BUSINESS/ENTERPRISE. */
4998
+ early_ws_url?: string;
4999
+ early_stream?: {
5000
+ channels: "early:deploys"[];
5001
+ subscribe_example: {
5002
+ type: "subscribe";
5003
+ channels: "early:deploys"[];
5004
+ };
5005
+ execution_status: "unknown";
5006
+ note: string;
5007
+ };
4989
5008
  token: string;
4990
5009
  /** Always `null` since 2026-08-27 — stream tokens never expire. Kept for wire compatibility; do not schedule refreshes on it. */
4991
5010
  expires_at: string | null;
@@ -6214,7 +6233,24 @@ declare class WalletTrackerClient {
6214
6233
  */
6215
6234
  summary(params?: WalletTrackerSummaryParams): Promise<WalletTrackerSummaryResponse>;
6216
6235
  }
6236
+ /** Encoded requests, not execution measurements. Missing resource bits stay null. */
6237
+ export interface EarlyTransactionConfig {
6238
+ config_mask: number;
6239
+ priority_fee_lamports: string | null;
6240
+ compute_unit_limit: number | null;
6241
+ loaded_accounts_data_size_limit: number | null;
6242
+ heap_size: number | null;
6243
+ }
6217
6244
  export interface SniperDeploy {
6245
+ /** Deduplicate by event_id; execution remains unknown until separately resolved. */
6246
+ event_id?: string;
6247
+ source?: "shredprism" | "deshred";
6248
+ outer_instruction_index?: number | null;
6249
+ observation_stage?: "observed";
6250
+ execution_status?: "unknown" | "succeeded" | "failed" | "unresolved";
6251
+ transaction_version?: "legacy" | 0 | 1 | null;
6252
+ transaction_config?: EarlyTransactionConfig | null;
6253
+ fee_payer?: string | null;
6218
6254
  mint: string;
6219
6255
  name: string | null;
6220
6256
  symbol: string | null;
@@ -6235,7 +6271,7 @@ export interface SniperDeploy {
6235
6271
  deployer_runner_rate?: number | null;
6236
6272
  /** Confidence denominator; gate on >=3. */
6237
6273
  deployer_labeled_tokens?: number | null;
6238
- /** "deshred" — detection is pre-execution, so the payload carries no MC/logs/balances. */
6274
+ /** Null until separate chain evidence is available; observation is not execution. */
6239
6275
  confirmed_on_chain: boolean | null;
6240
6276
  confirmed_at: string | null;
6241
6277
  /** v2.20 — slot-window snipe rollup for this deploy (slots [-1..+3]). `null`
@@ -6295,7 +6331,7 @@ export interface SniperWatchlistRemoveResponse {
6295
6331
  removed: string;
6296
6332
  }
6297
6333
  /**
6298
- * Deshred pre-confirm pump.fun sniper feed. PRO + ULTRA.
6334
+ * Early deploy observations. ULTRA/BUSINESS/ENTERPRISE; no guaranteed timing lead.
6299
6335
  * Live alerts flow via webhook (`sniper:deploy`), the `sniper:deploys` WebSocket
6300
6336
  * channel; these methods are for catch-up,
6301
6337
  * backtesting, and managing the ULTRA custom watchlist.
@@ -6307,11 +6343,11 @@ declare class SniperClient {
6307
6343
  private readonly _baseUrl;
6308
6344
  constructor(_get: <T>(url: string) => Promise<T>, _post: <T>(url: string, body?: unknown) => Promise<T>, _delete: <T>(url: string) => Promise<T>, _baseUrl: string);
6309
6345
  /**
6310
- * Newest-first deshred deploy feed. PRO sees elite/good deployers; ULTRA sees all.
6346
+ * Newest-first early deploy feed. ULTRA/BUSINESS/ENTERPRISE only.
6311
6347
  * Pass `watchlist: true` (ULTRA) to narrow to your custom deployer watchlist.
6312
6348
  */
6313
6349
  recent(params?: SniperRecentParams): Promise<SniperRecentResponse>;
6314
- /** Deshred deploys filtered to a single deployer wallet. ULTRA only. */
6350
+ /** Early deploys filtered to a single deployer wallet. ULTRA+ only. */
6315
6351
  byDeployer(wallet: string, params?: {
6316
6352
  limit?: number;
6317
6353
  }): Promise<SniperByDeployerResponse>;
@@ -6833,7 +6869,7 @@ export declare class MadeOnSol {
6833
6869
  readonly firstTouchSubscriptions: FirstTouchSubscriptionsClient;
6834
6870
  /** Price alerts CRUD — PRO/ULTRA. Sub-second dip/recovery detection. */
6835
6871
  readonly priceAlerts: PriceAlertsClient;
6836
- /** Deshred pre-confirm pump.fun sniper feed + custom watchlist — PRO/ULTRA. */
6872
+ /** Early deploy observations + custom watchlist — ULTRA/BUSINESS/ENTERPRISE. */
6837
6873
  readonly sniper: SniperClient;
6838
6874
  /** Copy-trade rules + fired signals — PRO/ULTRA. */
6839
6875
  readonly copytrade: CopyTradeClient;