madeonsol 4.2.0 → 4.3.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
@@ -14,6 +14,8 @@ Official TypeScript/JavaScript SDK for the **[MadeOnSol](https://madeonsol.com)
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.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
+
17
19
  > **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`.
18
20
 
19
21
  > **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`.
package/dist/index.d.ts CHANGED
@@ -2095,6 +2095,20 @@ export interface AlphaCapTableResponse {
2095
2095
  summary: AlphaCapTableSummary;
2096
2096
  /** v2.22.4 — trade-coverage disclosure (additive; absent on older cached responses). */
2097
2097
  coverage?: TradeCoverage;
2098
+ /** 2026-10: whether early-buyer ranks 1..20 can be trusted. `gap_overlap` = a
2099
+ * recorded ingest gap overlaps launch to the last ranked buy, so a true early
2100
+ * buyer may be missing. Absent on older responses. */
2101
+ ranks_completeness?: {
2102
+ ranks_complete: "observed_from_launch" | "gap_overlap" | "not_verified" | "no_ranks";
2103
+ rank_basis: "first_persisted_buys_at_or_above_floor";
2104
+ window: {
2105
+ from: string;
2106
+ to: string;
2107
+ } | null;
2108
+ gaps_overlapping: number;
2109
+ open_slots: number;
2110
+ gaps_in_open_slots: number;
2111
+ };
2098
2112
  }
2099
2113
  export interface AlphaBuyerQualityBreakdown {
2100
2114
  alpha_wallet_count: number;
@@ -3953,8 +3967,29 @@ export interface TokenDepthPool extends TokenDepthPoolBase {
3953
3967
  depth_available: true;
3954
3968
  /** The model the depth math ran on (matches `pool_model`). */
3955
3969
  model: string;
3970
+ /** Concentrated pools only: the program-exact model that produced the numbers. */
3971
+ model_detail?: "meteora_dlmm_bins" | "raydium_clmm_ticks" | "meteora_damm_v2_full_range";
3972
+ /** Meteora DAMM v2 only: the proven Pool account (`pool_address` is the vault). */
3973
+ pool_account?: string;
3956
3974
  /** Swap fee, % (e.g. 0.25). */
3957
3975
  fee_pct: number;
3976
+ /** `observed_event` (PumpSwap virtual-reserve model), `dynamic_fee_at_quote_time`
3977
+ * (Meteora DLMM base + variable fee) or `amm_config_at_quote_time`. Absent =
3978
+ * static venue fee. */
3979
+ fee_basis?: "observed_event" | "dynamic_fee_at_quote_time" | "amm_config_at_quote_time";
3980
+ /** Meteora DLMM only: the loaded bin range and its slot; quotes never walk outside it. */
3981
+ bins_window?: {
3982
+ from_bin: number;
3983
+ to_bin: number;
3984
+ slot: number;
3985
+ };
3986
+ /** Raydium CLMM only: the loaded tick range [from_tick, to_tick) in the buy
3987
+ * direction and its slot. */
3988
+ ticks_window?: {
3989
+ from_tick: number;
3990
+ to_tick: number;
3991
+ slot: number;
3992
+ };
3958
3993
  source: TokenDepthSource;
3959
3994
  /** Age of the stream reserves in ms (time since the pool's last swap); 0 for
3960
3995
  * `live_rpc` reads. */
@@ -3989,6 +4024,14 @@ export interface TokenDepthResponse {
3989
4024
  pools: TokenDepthPool[];
3990
4025
  unsupported_pools: TokenDepthUnsupportedPool[];
3991
4026
  note?: string;
4027
+ /** Only with a concentrated depth model enabled: largest known pool vs the
4028
+ * reported pool; routing is single-pool only. */
4029
+ pool_selection?: {
4030
+ largest_known_pool: string;
4031
+ largest_known_pool_supported: boolean;
4032
+ primary_pool: string | null;
4033
+ routing: "single_pool_only";
4034
+ };
3992
4035
  _rid?: string;
3993
4036
  }
3994
4037
  /** Payload of a `token:graduation` stream event — every pump.fun graduation
@@ -4084,11 +4127,28 @@ export interface WalletClassification {
4084
4127
  kol_name: string | null;
4085
4128
  bot_confidence: BotConfidence | null;
4086
4129
  dump_cluster: DumpClusterStats | null;
4130
+ /** 2026-10: whether each flag's rule actually evaluated this wallet.
4131
+ * `evaluated: false` means the boolean is "no evidence", not "verified clean". */
4132
+ label_coverage?: Record<"sniper" | "bundler" | "dumper" | "kol", LabelCoverageEntry>;
4133
+ }
4134
+ export type LabelCoverageReason = "flagged" | "rule_evaluated" | "insufficient_sample" | "not_checked_budget" | "sample_unavailable" | "population_not_checked" | "no_cohort_stats" | "registry";
4135
+ export interface LabelCoverageEntry {
4136
+ evaluated: boolean;
4137
+ reason: LabelCoverageReason;
4087
4138
  }
4088
4139
  export interface WalletBatchClassifyResponse {
4089
4140
  wallets: WalletClassification[];
4090
4141
  count: number;
4091
4142
  as_of: string;
4143
+ /** 2026-10: label rule version, e.g. `wallet-labels/368-v1`. */
4144
+ rule_version?: string;
4145
+ /** 2026-10: one sentence per label describing its population and window. */
4146
+ evidence_horizon?: {
4147
+ sniper: string;
4148
+ bundler: string;
4149
+ dumper: string;
4150
+ kol: string;
4151
+ };
4092
4152
  _rid?: string;
4093
4153
  }
4094
4154
  export interface WalletTopToken {
@@ -4262,6 +4322,42 @@ export interface WalletOpenPosition {
4262
4322
  unrealized_pct: number | null;
4263
4323
  first_buy_at: string | null;
4264
4324
  buys_in_position: number;
4325
+ /** 2026-10: positions are FIFO-open DEX buys (a trade position), not a proven holding. */
4326
+ position_basis?: "swap_derived";
4327
+ /** 2026-10: `verified` = an on-chain balance snapshot confirmed this position. */
4328
+ holding_status?: "verified" | "unverified";
4329
+ holding_unverified_reason?: "not_checked" | "no_fresh_snapshot" | "snapshot_unreadable" | "snapshot_older_than_trades" | "decimals_mismatch" | "balance_invalid" | null;
4330
+ /** `partial` = a verified balance exceeds the trade position; the excess
4331
+ * arrived without a swap and has no cost basis. */
4332
+ cost_basis_status?: "known" | "partial";
4333
+ /** Present (non-null) only when `holding_status` is `verified`. */
4334
+ holding?: WalletPositionHolding | null;
4335
+ }
4336
+ /** 2026-10: proven on-chain holding for one swap-derived position. */
4337
+ export interface WalletPositionHolding {
4338
+ status: "HELD" | "PARTIALLY_REDUCED" | "TRANSFERRED_OR_DISPOSED" | "EXTERNAL_INFLOW";
4339
+ onchain_balance: number;
4340
+ held_known_amount: number;
4341
+ external_inflow_amount: number;
4342
+ cost_basis_held_sol: number;
4343
+ unrealized_known_sol: number | null;
4344
+ /** Cost of FIFO lots no longer in the wallet. Outcome unknown: neither realized nor unrealized. */
4345
+ cost_basis_not_held_sol: number;
4346
+ verified_at: string;
4347
+ source: "wallet_holdings_cache";
4348
+ }
4349
+ /** 2026-10: summary of the proven-holding check over the returned open positions. */
4350
+ export interface WalletHoldingCheck {
4351
+ mode: "off" | "cache";
4352
+ source: "wallet_holdings_cache" | null;
4353
+ verified_at: string | null;
4354
+ verified: number;
4355
+ unverified: number;
4356
+ held: number;
4357
+ partially_reduced: number;
4358
+ transferred_or_disposed: number;
4359
+ external_inflow: number;
4360
+ note: string;
4265
4361
  }
4266
4362
  export interface WalletPnlNotes {
4267
4363
  /** Cost basis is observable only from this timestamp onwards (data window cutoff). */
@@ -4279,6 +4375,8 @@ export interface WalletPnlResponse {
4279
4375
  closed_positions: WalletClosedPosition[];
4280
4376
  open_positions: WalletOpenPosition[];
4281
4377
  notes: WalletPnlNotes;
4378
+ /** 2026-10: proven-holding check summary. Absent on older responses. */
4379
+ holding_check?: WalletHoldingCheck;
4282
4380
  cache_hit?: boolean;
4283
4381
  /** Only present on cache hits. */
4284
4382
  computed_at?: string;
@@ -4298,6 +4396,8 @@ export interface WalletPnlResponse {
4298
4396
  export interface WalletPositionsResponse {
4299
4397
  address: string;
4300
4398
  positions: WalletOpenPosition[];
4399
+ /** 2026-10: proven-holding check summary. Absent on older responses. */
4400
+ holding_check?: WalletHoldingCheck;
4301
4401
  cache_hit?: boolean;
4302
4402
  computed_at?: string | null;
4303
4403
  ttl_seconds?: number | null;
@@ -4594,6 +4694,15 @@ export interface TokenSummary {
4594
4694
  /** VERIFIED LP evidence only; null = unknown (the honest answer for nearly every token today). */
4595
4695
  lp_burned?: boolean | null;
4596
4696
  lp_burn_status?: LpBurnStatus;
4697
+ /** Burned + non-cancelable LOCKED share of the LP (0-100), from LP evidence;
4698
+ * null = unknown (never 0 for unknown). `lp_burnt_pct` stays burn-only. */
4699
+ lp_secured_pct?: number | null;
4700
+ /** `permanent` = burn and/or permanent locks only; `temporary` = only
4701
+ * time-limited locks; `mixed` = both; null = nothing secured or unknown. */
4702
+ lp_secured_basis?: "permanent" | "temporary" | "mixed" | null;
4703
+ /** Earliest end of a counted TEMPORARY LP lock (ISO); null when none.
4704
+ * Permanent locks have no date. */
4705
+ lp_locked_until?: string | null;
4597
4706
  /** Token-SUPPLY burn observed (not LP evidence); null = unknown. */
4598
4707
  token_supply_burn_detected?: boolean | null;
4599
4708
  }
@@ -4645,6 +4754,11 @@ export interface AlmostBondedToken {
4645
4754
  mint: string;
4646
4755
  symbol: string | null;
4647
4756
  name: string | null;
4757
+ /** Launch venue: pump.fun curve or bonk/LetsBonk (Raydium LaunchLab). */
4758
+ launchpad?: "pumpfun" | "launchlab";
4759
+ /** 2026-10: where `launchpad` came from: `primary_dex`, or the token's single
4760
+ * curve pool in `token_pools` when primary_dex is unset. */
4761
+ venue_source?: "primary_dex" | "token_pools";
4648
4762
  /** Bonding-curve progress %, from on-chain real_token_reserves depletion. */
4649
4763
  progress_pct: number | null;
4650
4764
  /** Δprogress per minute; null until a 5m-ago snapshot exists. */
@@ -5404,9 +5518,23 @@ export interface WalletFundingResponse {
5404
5518
  observed: boolean;
5405
5519
  [key: string]: unknown;
5406
5520
  };
5521
+ /** 2026-10: what the funding collector can see for THIS address.
5522
+ * `not_tracked` = no evidence is collected for it at all. */
5523
+ wallet_coverage?: WalletFundingCoverage;
5407
5524
  disclaimer: string;
5408
5525
  _rid?: string;
5409
5526
  }
5527
+ /** Per-address funding collector coverage (`wallet_coverage`). */
5528
+ export interface WalletFundingCoverage {
5529
+ /** `internal_transfers_not_visible` only occurs on Robinhood Chain. */
5530
+ state: "tracked" | "not_tracked" | "internal_transfers_not_visible";
5531
+ currently_tracked: boolean;
5532
+ ever_tracked: boolean;
5533
+ /** Robinhood Chain only; always null on Solana. */
5534
+ address_kind: "eoa" | "eoa_7702" | "contract" | "unknown" | null;
5535
+ /** Solana: `spl_token_transfers_not_visible`. */
5536
+ limitations: Array<"spl_token_transfers_not_visible" | "internal_eth_transfers_not_visible" | "erc20_only_eth_weth_usdg_classified_as_funding">;
5537
+ }
5410
5538
  export interface MadeOnSolConfig {
5411
5539
  /**
5412
5540
  * MadeOnSol API key (starts with `msk_`).
@@ -6534,6 +6662,16 @@ export interface CopyTradeSignal {
6534
6662
  market_cap_usd?: number | null;
6535
6663
  /** Current last-trade price (USD). */
6536
6664
  last_price_usd?: number | null;
6665
+ /** Copy-trade identity v2: the independent action this signal copies (null on
6666
+ * `identity_version` 1 rows). Several signals can share one `tx_signature`:
6667
+ * dedupe on `id` or `economic_action_id`, never on `tx_signature`. */
6668
+ economic_action_id?: string | null;
6669
+ /** Copy-trade identity v2: the followed wallet that performed the action. */
6670
+ source_actor?: string | null;
6671
+ /** Copy-trade identity v2: other followed wallets in the same action. */
6672
+ co_actors?: string[];
6673
+ /** 1 = one signal per (rule, tx); 2 = one signal per (rule, economic action). */
6674
+ identity_version?: 1 | 2;
6537
6675
  }
6538
6676
  export interface CopyTradeSignalsParams {
6539
6677
  subscription_id?: number;