madeonsol 3.0.0 → 4.1.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
@@ -12,6 +12,12 @@
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
+ > **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
+
17
+ > **New in 4.1.0 (deployer activity timeline).** `client.deployer.deployerActivity(wallet, { limit?, cursor?, since?, types? })` (typed `DeployerActivityResponse`) binds `GET /deployer-hunter/{wallet}/activity`: one newest-first timeline of launches, the deployer's own dev buys/sells, creator transfers, fee claims, funding in and capital out, windowed on each event's own time (PRO 30 d, ULTRA 365 d, BUSINESS unbounded; page clamped to 100 / 100 / 500 and echoed in `plan`). History is served from the online store only for now: read `coverage.families.<family>.complete`, `archive_required_before` and `plan.history.archive_only` before treating an empty range as "nothing happened". A wallet with no attributed launch reports `dev_trades.skipped_reason: "no_attributed_launch"`. PRO responses never carry an identity block or a fee-payer address; ULTRA/BUSINESS `identity` is `not_available` until identity stitching is released. **PRO+**. New types: `DeployerActivityResponse`, `DeployerActivityParams`, `DeployerActivityEvent`, `DeployerActivityEventType`, `DeployerActivityFamilyCoverage`, `DeployerActivityHistoryPlan`, `DeployerActivityRange`.
18
+
19
+ > **New in 4.0.0 (SDK contract parity, 2026-10-03).** **New methods:** `client.kol.wallets(params?)` → `GET /kol/wallets` (tracked KOL roster, any key); `client.token.search({ q, limit? })` → `GET /tokens/search` (ticker/name → candidate mints, any key); `client.listSignals()` → `GET /signals`; `client.manifests(params?)` → `GET /manifests` (nightly as-of dataset manifests with `fingerprint`, any key); `client.wallet.flags(address, { as_of?, history? })` → `GET /wallet/{address}/flags` (point-in-time flags, PRO+); `client.wallet.batchTrades({ wallets, since?, limit_per_wallet?, action? })` → `POST /wallet/batch/trades` (PRO+); `client.wallet.scoreList(wallets)` → `POST /wallet-list/score` (Enterprise); `client.wallet.funding(address, { limit?, offset? })` → `GET /wallet/{address}/funding` (shared-funder evidence, PRO+; `relationships` ULTRA+). `client.token.get(mint, { include })` accepts `buyer_quality` / `deployer`. **Typed (was `unknown`):** `kol.scoutLeaderboard()`, `kol.coordinationHistory()`, `getSignalPerformance()` (now also takes `{ history }`). **Type corrections (compile-time breaking, matching what the API has always returned):** `KolWalletProfile` (`kol`, `stats`, `scores`, `peer_ranks`, `recent_trades`, `pnl_by_token` with `total_bought`/`total_sold`), `KolTokenActivity` (`token_mint`, `summary`, `kols[]`), `AlphaLinkedResponse.linked` (with `avg_time_diff_secs`/`avg_sol_diff`), `DeployerTokensResponse.tokens` (`DeployerTokenRow`, with `instant_bond`), `WalletTrackerEvent` (`slot`, `replayed`, `ingested_at`, `timestamp`; `action` nullable) — the old never-sent keys stay as optional `@deprecated`. **New fields:** token snapshot (`/token/{mint}`, `/token/batch`) price provenance (`price_source`, `price_observed_at`, `price_is_stale`, `price_age_seconds`), `vwap_price_*`, `primary_pool_address`, `deployer_identity`, `lp_burn_status`, `token_supply_burn_detected`; `/tokens` rows `lp_burn_status` / `lp_burned` / `token_supply_burn_detected` + `deprecations`; risk `dev_status` / `resolved_from` and batch `unavailable` errors with `unavailable_inputs`; buyer-quality `signal_stats`; candles plan-floor fields; wallet PnL/positions `cache_age_seconds` / `cache_validation` / `cache_invalidated`; wallet-tracker `ordered_by` / `next_cursor` / `next_cursor_slot`; deployer stats MC-at-alert maps, alert-stats `sampled_rows`, `instant_bond` on recent bonds, typed `pump_tokens`; sniper `attribution_status`; stream-token channel registry + named-subscription hints; KOL PnL open-position `is_priced`; KOL compare `overlap_meta`.
20
+
15
21
  > **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
22
 
17
23
  > **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.
@@ -219,12 +225,25 @@ Full profile for a single KOL wallet, including trade history and optional per-t
219
225
  const profile = await client.kol.wallet("7xKX...", {
220
226
  include: "pnl_by_token",
221
227
  });
228
+ console.log(profile.kol.name, profile.scores.winrate_7d, profile.peer_ranks.percentile_pnl_7d);
222
229
  ```
223
230
 
224
231
  Returns: `KolWalletProfile`
225
232
 
226
233
  ---
227
234
 
235
+ #### `client.kol.wallets(params?)` *(unreleased)*
236
+
237
+ The tracked KOL roster every `/kol/*` route is keyed on (`GET /kol/wallets`): address, name, X handle, strategy tag, follower counts, tracked-since. Roster only; performance is in `leaderboard()` / `wallet()`. Any key.
238
+
239
+ ```ts
240
+ const { wallets, total, has_more } = await client.kol.wallets({ limit: 200, active: "true" });
241
+ ```
242
+
243
+ Returns: `KolWalletsResponse`
244
+
245
+ ---
246
+
228
247
  #### `client.kol.coordination(params?)`
229
248
 
230
249
  Detect tokens where multiple KOLs are buying simultaneously — a strong signal of coordinated pumps. **v1.1** adds peak-density windows, exit tracking, and a composite 0–100 coordination score.
@@ -432,7 +451,8 @@ Same HMAC scheme as coordination alerts. WebSocket channel: `kol:first_touches`.
432
451
  KOL buy/sell activity for a specific token mint.
433
452
 
434
453
  ```ts
435
- const activity = await client.kol.token("EPjFW...");
454
+ const { summary, kols } = await client.kol.token("EPjFW...");
455
+ console.log(summary.kol_count, summary.signal, kols[0]?.total_bought);
436
456
  ```
437
457
 
438
458
  Returns: `KolTokenActivity`
@@ -804,6 +824,46 @@ Returns: `WalletHoldingsResponse` — `holdings[]` (typed `Holding`), `sol_balan
804
824
 
805
825
  ---
806
826
 
827
+ #### `client.wallet.flags(address, params?)` *(unreleased — PRO+)*
828
+
829
+ Point-in-time wallet flags (`GET /wallet/{address}/flags`): for each source (`deployer`, `alpha`, `dump_cluster`, `kol`, `sniper`, `bundler`) the latest write-on-change snapshot at or before `as_of` (default now). `null` = we had no snapshot on the wallet then; `carried: true` = recorded earlier and unchanged by `as_of`. `history: true` adds the change series. Snapshots exist from 2026-08-28.
830
+
831
+ ```ts
832
+ const f = await client.wallet.flags("ASVz...ybJk", { as_of: "2026-09-01T00:00:00Z" });
833
+ console.log(f.flagged, f.sources.deployer?.carried);
834
+ ```
835
+
836
+ Returns: `WalletFlagsResponse`
837
+
838
+ #### `client.wallet.batchTrades(params)` *(unreleased — PRO+)*
839
+
840
+ Recent trades for up to 50 wallets in one call (`POST /wallet/batch/trades`), up to 100 each, newest first, 90-day window. Pass `next_since` back as `since` to poll. One quota unit. `coverage` states the pipeline scope: an empty `trades` array means "not observed", not "inactive".
841
+
842
+ ```ts
843
+ const page = await client.wallet.batchTrades({ wallets: [a, b, c], limit_per_wallet: 20 });
844
+ for (const w of page.wallets) console.log(w.wallet, w.count);
845
+ const next = await client.wallet.batchTrades({ wallets: [a, b, c], since: page.next_since });
846
+ ```
847
+
848
+ Returns: `WalletBatchTradesResponse`
849
+
850
+ #### `client.wallet.funding(address, params?)` *(unreleased — PRO+)*
851
+
852
+ Shared-funder evidence (`GET /wallet/{address}/funding`): addresses that sent a qualifying SOL transfer to this wallet AND to other tracked wallets (active KOLs, elite/good deployers), with the supporting transactions, plus `direct_funding` ("where was this wallet funded from"). Evidence of a funding connection, not proof of common ownership. Forward-looking coverage only; read `status` and `coverage` before treating an empty list as "none". Amounts are raw base-unit strings. Cross-wallet `relationships` counts inside `direct_funding` are ULTRA+.
853
+
854
+ ```ts
855
+ const f = await client.wallet.funding("ASVz...ybJk", { limit: 10 });
856
+ for (const s of f.shared_funders.filter((s) => !s.service_funder)) console.log(s.funder, s.connected_wallets.length);
857
+ ```
858
+
859
+ Returns: `WalletFundingResponse`
860
+
861
+ #### `client.wallet.scoreList(wallets)` *(unreleased — Enterprise)*
862
+
863
+ Score up to 200 customer-supplied wallets on FIFO trading performance (`POST /wallet-list/score`): a 0–100 `score` (50 % win rate + 50 % profit factor), the PnL `summary`, and reputation flags. Only the first 25 UNCACHED wallets are computed per call; the rest come back `status: "not_computed"`, so call again.
864
+
865
+ Returns: `WalletListScoreResponse`
866
+
807
867
  #### `client.wallet.trades(address, params?)`
808
868
 
809
869
  Cursor-paginated raw trades. Default window is the last 90 days; override via `since` / `until` (Unix epoch seconds). Default limit 100, max 500.
@@ -999,6 +1059,19 @@ Invalid mints return a 400 with `code: "invalid_mint"`, `reason`, `received_leng
999
1059
 
1000
1060
  Returns: `TokenResponse` (with `mc_change_pct` / `volume_usd` / `mev_volume_pct` (each keyed by 5m/15m/1h/2h/4h) + `history_age_seconds` as of 1.7). **New in 2.12:** also returns `liquidity_to_mc_ratio` (liquidity_usd / market_cap), `launch_cohort_sol` (total SOL spent by the first-20 buyers), and `launch_cohort_size` (count of first-20 buyers, 0–20).
1001
1061
 
1062
+ #### `client.token.get(mint, { include })` / `client.token.search(params)` *(unreleased)*
1063
+
1064
+ `include: "buyer_quality"` and/or `"deployer"` embeds the `/tokens/{mint}/buyer-quality` body as `buyer_quality` and the deployer profile as `deployer_profile` in the same call (each keeps its own tier gate; a failing include lands in `include_errors`, never fails the token).
1065
+
1066
+ `client.token.search({ q, limit? })` (`GET /tokens/search`, any key) resolves a ticker or name to candidate mints, ranked exact ticker, symbol prefix, name prefix, fuzzy, and by liquidity inside each tier. Memecoin/launchpad universe only: `q: "SOL"` returns tokens *named* SOL and `note` says so.
1067
+
1068
+ ```ts
1069
+ const { results } = await client.token.search({ q: "bonk", limit: 5 });
1070
+ const { token, buyer_quality } = await client.token.get(results[0].mint, { include: ["buyer_quality"] });
1071
+ ```
1072
+
1073
+ Returns: `TokenSearchResponse` / `TokenResponse`
1074
+
1002
1075
  #### `client.token.batch(mints)`
1003
1076
 
1004
1077
  Batch lookup up to 50 mints in one round-trip. ~10–20× cheaper than N sequential calls. Each item returns the same shape as `get()` — including `liquidity_to_mc_ratio`, `launch_cohort_sol`, and `launch_cohort_size` *(new in 2.12)*.
@@ -1255,13 +1328,24 @@ Returns: `MeResponse`
1255
1328
  Performance stats for a named signal: hit rate, precision, sample count, and lookback window.
1256
1329
 
1257
1330
  ```ts
1258
- const perf = await client.getSignalPerformance("kol_coordination");
1259
- console.log(perf.precision, perf.hit_rate);
1331
+ const { signals } = await client.listSignals(); // GET /signals — the catalog
1332
+ const perf = await client.getSignalPerformance("dump_cluster_count", { history: true });
1333
+ for (const b of perf.buckets) console.log(b.bucket, b.hit_rate, b.base_rate, b.lift, b.sample_n);
1260
1334
  ```
1261
1335
 
1262
- Params: `name` — signal name (e.g. `"kol_coordination"`, `"first_touch_scout"`, `"deployer_elite"`).
1336
+ Params: `name` — a signal from `listSignals()` (`dump_cluster_count`, `runner_rate`, `recycled_early_buyer_count`, `coordination_count`, `scout_first_touch`); `history` adds the per-snapshot series.
1337
+
1338
+ Returns: `SignalPerformanceResponse` (`listSignals()` → `SignalsCatalogResponse`).
1339
+
1340
+ #### `client.manifests(params?)` *(unreleased)*
1341
+
1342
+ Nightly as-of dataset manifests (`GET /manifests`): per dataset `rows_24h`, `min_ts` / `max_ts`, `row_count_estimate` (planner estimate), `schema_hash` and `fingerprint`. Cite the fingerprint to name the exact data state a report used; `dataset` walks one dataset's history. Any key.
1343
+
1344
+ ```ts
1345
+ const { manifests } = await client.manifests({ dataset: "token_trades", limit: 7 });
1346
+ ```
1263
1347
 
1264
- Returns: `Promise<unknown>` — shape varies by signal name; see `/api-docs` for the full schema.
1348
+ Returns: `ManifestsResponse`
1265
1349
 
1266
1350
  ---
1267
1351