/** * robinhood-chain-x402 — TypeScript client for the MadeOnSol Robinhood Chain * (chain id 4663) API. * * Robinhood Chain is an Arbitrum Orbit L2. Two auth modes: * * • **Key mode** — `{ apiKey: "msk_…" }`: Bearer key against every * /api/v1/rhc/… endpoint (all tiers, RHC bundled at no extra cost). * • **Keyless x402 mode** (since 0.7.0) — `{ privateKey: "0x…", paymentPolicy }`: an EVM * wallet holding USDG on Robinhood Chain pays per call on the x402 rail * (/api/x402/rhc/…, 10 endpoints, from $0.04). The client handles the * 402 → sign EIP-3009 `transferWithAuthorization` (EIP-712, viem) → retry * flow itself; the wallet never needs ETH — our facilitator relays gas. * Needs the optional peer dependency `viem` (npm i viem). * * Get a free API key (200 req/day, no card) at https://madeonsol.com/pricing. */ import { type PaymentPolicy } from "./payment-policy.js"; import { type PaidResultProvenance, type RecoveryOptions } from "./x402-recovery.js"; export { PaymentPolicyError, type PaymentPolicy, type PaymentProposal } from "./payment-policy.js"; export { X402PaymentError, readPaidResult, x402RequestHash, recoveryMessage, paymentIdFromProof, classifyPaidResponse, PAYMENT_RECOVERY_HEADER, type PaidResultProvenance, type RecoveryOptions, } from "./x402-recovery.js"; import type { KolFeedParams, KolFeedResponse, KolLeaderboardParams, KolLeaderboardResponse, KolHotTokensParams, KolHotTokensResponse, RhcKolProfileResponse, TradesParams, TradesResponse, LpEventsParams, LpEventsResponse, TokenLocksParams, TokenLocksResponse, TokenLockSummaryParams, TokenLockSummaryResponse, TokenUnlocksParams, TokenUnlocksResponse, TokensParams, TokensResponse, EquitiesParams, EquitiesResponse, RhcTokenDetailResponse, CandlesParams, CandlesResponse, RhcKolConsensusResponse, RhcBuyerQualityResponse, RhcTokenIntelligenceParams, RhcTokenIntelligenceResponse, RhcBundleResponse, DeployerAlertsParams, DeployerAlertsResponse, DeployerLeaderboardParams, DeployerLeaderboardResponse, RhcDeployerProfileResponse, AlphaWalletsParams, AlphaWalletsResponse, RhcDeletedResponse, CopyTradeListResponse, CopyTradeCreateParams, CopyTradeCreateResponse, CopyTradeGetResponse, CopyTradeUpdateParams, CopyTradeSignalsParams, CopyTradeSignalsResponse, PriceAlertListResponse, PriceAlertCreateParams, PriceAlertCreateResponse, PriceAlertGetResponse, PriceAlertUpdateParams, PriceAlertEventsParams, PriceAlertEventsResponse, CoordinationAlertListResponse, CoordinationAlertCreateParams, CoordinationAlertCreateResponse, CoordinationAlertGetResponse, CoordinationAlertUpdateParams, FirstTouchSubscriptionListResponse, FirstTouchSubscriptionCreateParams, FirstTouchSubscriptionCreateResponse, FirstTouchSubscriptionGetResponse, FirstTouchSubscriptionUpdateParams, RhcWalletProfileResponse, RhcWalletPnlResponse, RhcWalletPositionsResponse, WalletTradesParams, RhcWalletTradesResponse, WalletTrackerWatchlistResponse, WalletTrackerAddParams, WalletTrackerWalletResponse, WalletTrackerRemovedResponse, WalletTrackerTradesParams, WalletTrackerTradesResponse, WalletTrackerSummaryParams, WalletTrackerSummaryResponse, StreamToken } from "./types.js"; import { RobinhoodChainStream } from "./stream.js"; import { type RobinhoodTerminalWatchOptions } from "./terminal.js"; import type { TerminalTokenView as TerminalTokenViewType } from "./terminal-watch.js"; export { createRobinhoodTerminalWatch, terminalStreamPort } from "./terminal.js"; export { createTerminalTokenView, TerminalTokenView } from "./terminal-watch.js"; export { planTerminalWatch, TERMINAL_MODULE_COSTS } from "./terminal-policy.js"; export type { RobinhoodTerminalWatchOptions } from "./terminal.js"; export type { TerminalView, TerminalViewOptions, TerminalStreamPort, TerminalStreamFrame, TerminalSnapshotResponse, TerminalModuleResponse, TerminalPhase, TerminalContinuityStatus, TerminalContinuity } from "./terminal-watch.js"; export type { TerminalModule, TerminalTier, TerminalWatchPlan } from "./terminal-policy.js"; import type { StreamClientOptions } from "./stream.js"; export { RobinhoodChainStream, STREAM_CHANNELS } from "./stream.js"; export type { StreamClientOptions, StreamChannel, StreamEventName, StreamEvent, StreamLifecycleEvent, StreamWarning, StreamCursor, StreamReplayResult, StreamGap, StreamFatal, StreamSubscription, StreamSubscribeOptions, } from "./stream.js"; export type { Chain, TradeAction, DeployerTier, Dex, RhcError, RhcLiquidityBasis, RhcTokenRiskSummary, CandleTimeframe, KolFeedParams, RhcKolTrade, RhcKolScore, KolFeedResponse, KolLeaderboardPeriod, KolLeaderboardParams, RhcKolLeaderboardEntry, KolLeaderboardResponse, KolHotTokensWindow, KolHotTokensParams, RhcHotToken, KolHotTokensResponse, RhcKolProfileStats, RhcKolProfileTrade, RhcKolProfileResponse, TradesParams, RhcTrade, TradesResponse, LpEventsParams, RhcLpEvent, LpEventsResponse, RhcLpAction, RhcLpActiveShareReason, RhcLpStreamEvent, RhcLpEventsFilters, RhcTokenLockLifecycleEventName, RhcTokenLockLifecycleFilters, RhcTokenUnlockScheduleEvent, RhcTokenCandlesFilters, RhcCandleClosedEvent, RhcCandleUpdateEvent, RhcTokenRiskFilters, RhcRiskVerdict, RhcRiskVerdictChangedEvent, RhcRiskVerdictSnapshot, RhcWalletScoresFilters, RhcDeployerTierChangedEvent, RhcDevActivityEvent, RhcTokenBundlesFilters, RhcTokenBundleClusterEvent, RhcTokenBundleExitEvent, RhcDevActivityFilters, TokenLocksParams, TokenLocksResponse, TokenLockSummaryParams, TokenLockSummaryResponse, TokenUnlocksParams, TokenUnlocksResponse, RhcTokenLock, RhcTokenUnlock, RhcLockCoverage, RhcLockFamily, RhcLockNextUnlock, RhcLockProvider, RhcLockExplorer, TokensSort, TokensParams, RhcTokenListItem, TokensResponse, EquitiesSort, EquitiesParams, RhcEquity, EquitiesResponse, RhcTokenDeployer, RhcTokenKolActivity, RhcKolParticipant, RhcTokenDetailResponse, CandlesParams, RhcCandle, CandlesResponse, RhcKolConsensus, RhcKolConsensusResponse, BuyerQualityConfidence, BuyerQualitySignal, RhcBuyerQualityBreakdown, RhcBuyerQuality, RhcBuyerQualityCoverage, RhcBuyerQualityResponse, RhcTokenIntelligenceModuleId, RhcTokenIntelligenceModuleStatus, RhcTokenIntelligenceParams, RhcTokenIntelligenceModule, RhcTokenIntelligenceResponse, BundleKind, RhcBundleSummary, RhcBundleWallet, RhcBundleResponse, DeployerAlertsParams, DeployerAlert, DeployerAlertsResponse, DeployerLeaderboardSort, DeployerLeaderboardParams, RhcDeployer, DeployerLeaderboardResponse, RhcDeployerProfile, RhcDeployerReputationSummary, RhcDeployerV2Fields, RhcTokenOutcome, RhcDeployerRecentToken, RhcDeployerProfileResponse, AlphaClassificationFilter, AlphaIdentityFilter, AlphaSort, AlphaOrder, AlphaWalletClassification, AlphaWalletsParams, RhcAlphaWallet, AlphaWalletsResponse, DeliveryMode, RhcDeletedResponse, CopyTradeOnlyAction, CopyTradeSizingMode, RhcCopyTradeSubscription, CopyTradeListResponse, CopyTradeCreateParams, CopyTradeCreateResponse, CopyTradeGetResponse, CopyTradeUpdateParams, CopyTradeSignalsParams, RhcCopyTradeSignal, CopyTradeSignalsResponse, PriceAlertStatus, RhcPriceAlert, PriceAlertListResponse, PriceAlertCreateParams, PriceAlertEvaluation, PriceAlertCreateResponse, PriceAlertGetResponse, PriceAlertUpdateParams, PriceAlertEventType, PriceAlertEventsParams, RhcPriceAlertEvent, PriceAlertEventsResponse, RhcSideIdentity, RhcMetadataStatus, RhcPriceStatus, RhcPriceSource, RhcMcStatus, RhcSideReason, RhcDexTradeEvent, RhcDexTradeUnattributedEvent, RhcTickQualityReason, RhcTokenPriceTick, RhcCoordinationAlertRule, CoordinationAlertListResponse, CoordinationAlertCreateParams, CoordinationAlertScoring, CoordinationAlertCreateResponse, CoordinationAlertGetResponse, CoordinationAlertUpdateParams, FirstTouchStrategy, FirstTouchFilters, RhcFirstTouchSubscription, FirstTouchSubscriptionListResponse, FirstTouchSubscriptionCreateParams, FirstTouchSubscriptionCreateResponse, FirstTouchSubscriptionGetResponse, FirstTouchSubscriptionUpdateParams, RhcWalletStats, RhcWalletFlags, RhcWalletDerived, RhcWalletProfileResponse, RhcPositionResult, RhcWalletPnlSummary, RhcPnlCurvePoint, RhcClosedPosition, RhcOpenPosition, RhcVerifiedOpenPosition, RhcHoldingStatus, RhcHoldingUnverifiedReason, RhcHoldingsSummary, RhcWalletPnlNotes, RhcWalletPnlResponse, RhcWalletPositionsSummary, RhcWalletPositionsResponse, WalletTradesParams, RhcWalletTrade, RhcWalletTradesResponse, RhcTrackedWallet, WalletTrackerWatchlistResponse, WalletTrackerAddParams, WalletTrackerWalletResponse, WalletTrackerRemovedResponse, WalletTrackerTradesParams, RhcTrackedWalletTrade, WalletTrackerTradesResponse, WalletTrackerSummaryParams, RhcTrackedWalletStats, RhcTrackedWalletSummary, WalletTrackerSummaryResponse, StreamToken, } from "./types.js"; export interface RobinhoodChainOptions { /** MadeOnSol API key (`msk_...`) — get one free at https://madeonsol.com/pricing. Key mode. */ apiKey?: string; /** * Keyless x402 mode: hex private key (`0x…`) of an EVM wallet holding USDG on * Robinhood Chain (chain 4663). Pays per call on the 10 keyless endpoints * (see `RobinhoodChainX402.KEYLESS_ENDPOINTS`). Needs `viem` installed. * Ignored when `apiKey` is also given. NEVER hard-code this — read it from * an env var or a secrets manager. */ privateKey?: string; /** API base URL (default: https://madeonsol.com). */ baseUrl?: string; /** Required in keyless mode; binds the merchant and caps signed authorizations. */ paymentPolicy?: PaymentPolicy; /** * PAY-05 recovery bounds for a paid call whose answer was lost or is pending: * the SAME signed authorization is re-sent with a payer-signed * PAYMENT-RECOVERY header (EIP-191). Never a new payment; no budget use. */ recovery?: RecoveryOptions; } /** Decoded PAYMENT-RESPONSE of the last paid call (x402 mode). */ export interface X402Settlement { success: boolean; transaction?: string; network?: string; payer?: string; errorReason?: string; } /** Thrown when a key-mode-only method is called on an x402 (keyless) client. */ export declare class KeylessNotAvailableError extends Error { constructor(path: string); } export declare const KEYLESS_ENDPOINTS: readonly ["/rhc/kol/feed", "/rhc/kol/hot-tokens", "/rhc/kol/leaderboard", "/rhc/tokens/{address}", "/rhc/tokens/{address}/buyer-quality", "/rhc/tokens/{address}/kol-consensus", "/rhc/tokens/{address}/risk", "/rhc/tokens/{address}/holders", "/rhc/wallet/{address}/pnl", "/rhc/deployer-hunter/alerts"]; /** Rate-limit headers exposed alongside every successful response. */ export interface RateLimitInfo { limit: number | null; remaining: number | null; reset: number | null; requestId: string | null; } /** * Key-mode client for the Robinhood Chain (chain id 4663) API surface — live KOL * trades, the DEX trade tape, token discovery/bundles/candles, deployer * reputation, smart-money wallets, and the four push rule engines (copy-trade, * price alerts, KOL coordination, first touches). Every method maps 1:1 to an * /api/v1/rhc/… endpoint. RHC coverage is bundled into every tier. */ export declare class RobinhoodChainX402 { private baseUrl; private headers; /** "key" (msk_ Bearer, every method) or "x402" (keyless USDG pay-per-call, 10 methods). */ readonly authMode: "key" | "x402"; private privateKey?; private paymentBudget?; /** Authorized/reserved USDG atomic units for this client, including uncertain outcomes. */ get authorizedAmountAtomic(): string; private account; private recovery?; /** * x402 mode: provenance of the last paid answer (payment id, original vs * deferred, live vs stored replay, paid/generated times, body sha256). A * `deferred` answer was produced AFTER the payment and is not data from paidAt. */ lastPaidResult: PaidResultProvenance | null; /** Last response's rate-limit headers (X-RateLimit-*, X-Request-Id). */ lastRateLimit: RateLimitInfo; /** x402 mode: decoded PAYMENT-RESPONSE of the last paid call (settlement tx). */ lastPayment: X402Settlement | null; /** The 10 endpoints available without an API key (USDG pay-per-call). */ static readonly KEYLESS_ENDPOINTS: readonly ["/rhc/kol/feed", "/rhc/kol/hot-tokens", "/rhc/kol/leaderboard", "/rhc/tokens/{address}", "/rhc/tokens/{address}/buyer-quality", "/rhc/tokens/{address}/kol-consensus", "/rhc/tokens/{address}/risk", "/rhc/tokens/{address}/holders", "/rhc/wallet/{address}/pnl", "/rhc/deployer-hunter/alerts"]; constructor(opts: RobinhoodChainOptions); private signer; /** * One paid call: GET → 402 challenge → sign the USDG-on-RHC leg (EIP-3009 * transferWithAuthorization, EIP-712 domain "Global Dollar" v1 chain 4663) → * retry with PAYMENT-SIGNATURE. Exactly one payment attempt; a second 402 * surfaces the facilitator's reason (insufficient USDG, expired, replayed). */ private requestX402; private request; /** * Body-capable sibling of `request()` for the rule-engine writes. Same * `/api/v1` prefix, same rate-limit capture, same error shape — it only adds * the method and an optional JSON body. DELETE sends no body. */ private send; /** * Real-time KOL trade feed on Robinhood Chain — every buy/sell from tracked * Solana KOLs' verified EVM wallets, attributed to the effective trading * account (`tx.from`, or the ERC-4337 userOp sender when the trade was * bundled — never the bundler). Tier: **BASIC**. * `GET /rhc/kol/feed` */ kolFeed(params?: KolFeedParams): Promise; /** * KOL activity leaderboard — RHC KOLs ranked by trade count then net ETH flow * over the window. Tier: **BASIC**. `GET /rhc/kol/leaderboard` */ kolLeaderboard(params?: KolLeaderboardParams): Promise; /** * Scout leaderboard (PRO+): KOLs whose first touches (a buy of a token no KOL * bought before) drew other KOLs within 4 h, over the last 30 days. Identity * is the KOL, not the address; scout_tier null below 30 first touches. * `GET /rhc/kol/scouts/leaderboard` */ kolScoutLeaderboard(params?: { limit?: number; scout_tier?: "S" | "A" | "B" | "C"; sort?: "scout_score" | "n_first_touches_30d" | "swarm_3plus_pct" | "swarm_5plus_pct" | "avg_followers_4h"; min_first_touches?: number; }): Promise; /** * Consensus tokens — bought by 2+ distinct tracked KOLs inside the window. * Tier: **BASIC**. `GET /rhc/kol/hot-tokens` */ kolHotTokens(params?: KolHotTokensParams): Promise; /** * Single KOL profile — aggregate stats over one KOL's last 200 RHC trades plus * their 50 most recent trades. Tier: **BASIC**. `GET /rhc/kol/{wallet}` * @param wallet KOL EVM wallet address (0x, 40 hex). * @param params `include_performance: true` (PRO+) adds `performance`: 7d/30d * win rate, realized PnL and strategy classification from the FIFO wallet snapshot. */ kol(wallet: string, params?: { include_performance?: boolean; }): Promise; /** * KOL coordination clustering — tokens multiple tracked KOLs bought in the * same window. Tier: BASIC. `GET /rhc/kol/coordination`. Added 2026-09-10 * (previously covered on MCP/ElizaOS/SAK but not this client). */ kolCoordination(params?: { period?: "1h" | "6h" | "24h" | "7d"; min_kols?: number; limit?: number; min_mc_usd?: number; max_mc_usd?: number; }): Promise; /** * The globally earliest buy by any tracked KOL per token — the discovery * signal. Tier: BASIC. `GET /rhc/kol/first-touches`. Added 2026-09-10. */ kolFirstTouches(params?: { limit?: number; since?: string; before?: string; /** Preferred: next_cursor from the previous page (strict keyset). */ cursor?: string; min_eth?: number; token_age_max_min?: number; launchpad?: string; min_mc_usd?: number; max_mc_usd?: number; }): Promise; /** * Robinhood Chain DEX trade tape — every Uniswap v2/v3/v4 swap, each row * carrying the effective trading account (`trader_eoa` — `tx.from`, or the * ERC-4337 userOp sender when bundled; never the router or the bundler), * gas/ordering for MEV analysis, and KOL/deployer flags. Cursor via * `next_before`. Tier: **PRO+**. * `GET /rhc/trades` */ trades(params?: TradesParams): Promise; /** * Liquidity REMOVALS feed — the rug signal. Uniswap v2/v3 `Burn` and v4 * `ModifyLiquidity` with a negative delta on tracked pools, from our own * node's log subscription. **Removals only** — adds are not persisted, so an * empty page means "no removals seen", never "no liquidity activity" (the * `coverage` block says `adds_persisted: false`). Amounts are raw uint256 * STRINGS; v4 rows carry `liquidity` only. `provider_is_token_deployer` is * the classic rug tell. Cursor via `next_before`. Data since 2026-08-05. * Since 2026-09-23 `action: "add" | "pool_created" | "all"` opts into adds * (kept 7 days) and pool creations (the default stays removals only), and * every row carries the depth fields (`in_range`, `active_share`, * `share_of_reserves`, `material`, …). Live push: WS `rhc:lp_events` (ULTRA+). * Tier: **PRO+**. Key mode only (not on the x402 rail). `GET /rhc/lp-events` */ lpEvents(params?: LpEventsParams): Promise; /** * Robinhood Chain token locks & vesting feed — newest lock / vesting * contracts CREATED on chain across all tokens, decoded from the locker * contracts' own events on our node (PinkLock-compatible, HoodLock, Team * Finance-compatible, Titan Locker, UNCX-compatible LP lockers, Sablier * Lockup v4). Each row carries the on-chain schedule plus a live derived * view (`locked_*`, `unlocked_*`, `next_unlock`, `status`); `sender` is the * depositor (dev-lock key), `recipient` the beneficiary. **Create-only**: * withdrawals are not tracked (`withdrawn` is null, the `coverage` block * says `withdrawals_tracked: false`). LP locks are excluded unless * `subject: "lp" | "all"` and never claim usd/pct. Amounts are raw base * units as STRINGS. Cursor via `pagination.next_since` / `next_before`. * Tier: **PRO+**. Key mode only. `GET /rhc/tokens/locks` */ tokenLocks(params?: TokenLocksParams): Promise; /** * Every lock / vesting contract on ONE Robinhood Chain token with a live * summary: locked / deposited (raw + ui + usd + % of supply), `unlocking_7d` * / `unlocking_30d`, nearest `next_unlock`, `active_cancelable_by_sender`, * counts by family / kind; LP locks counted apart. Tier: **PRO+**. * `GET /rhc/tokens/{address}/locks` */ tokenLockSummary(address: string, params?: TokenLockSummaryParams): Promise; /** * Upcoming unlock EVENTS across all active Robinhood Chain lock / vesting * contracts — each contract's next cliff / tranche / final unlock inside the * window with the event amount and the contract's total release over the * window. Token subject only. Tier: **PRO+**. `GET /rhc/tokens/unlocks` */ tokenUnlocks(params?: TokenUnlocksParams): Promise; /** * Robinhood Chain token discovery — live-priced tokens with MC, liquidity, * peak MC + drawdown, launchpad, and deployer tier. Tier: **PRO+**. * `GET /rhc/tokens` */ tokens(params?: TokensParams): Promise; /** * Tokenized stocks & ETFs on Robinhood Chain — every official Robinhood * tokenized equity (NVDA, SPY, AAPL, …) with live price / MC / liquidity and * 24h trades / ETH volume / buyer-seller split. **Identity is the issuer * BEACON, never the name**: listed only if the contract is an EIP-1967 beacon * proxy on Robinhood's issuer beacon, read from our own node — the 20 fake * "GameStop • Robinhood Token" contracts never appear. 24h stats cached 60 s. * Tier: **BASIC**. Key mode only (not on the x402 rail). `GET /rhc/equities` */ equities(params?: EquitiesParams): Promise; /** * Full token snapshot — metadata, live price/MC/FDV, peak MC + drawdown, * graduation, deployer reputation, KOL activity, and pool inventory. * Tier: **BASIC**. `GET /rhc/tokens/{address}` * @param address Token address (0x, 40 hex). */ token(address: string): Promise; /** * 1-minute OHLC candles — price + market-cap OHLC, close liquidity, volume * with buy/sell split, and trade/buy/sell counts. Tier: **PRO+**. * `GET /rhc/tokens/{address}/candles` */ tokenCandles(address: string, params?: CandlesParams): Promise; /** * KOL consensus on a token — distinct KOL buyers vs sellers, exit rate, net * ETH flow (`net_flow_eth`), median entry MC, and first-touch. ULTRA adds the * `buyers`/`exited` wallet lists. Tier: **PRO+**. * `GET /rhc/tokens/{address}/kol-consensus` */ tokenKolConsensus(address: string): Promise; /** * Early-buyer quality — a 0–100 read on a token's first-20 buyer cohort: * win-rate, KOL-presence, bot-domination, bundle-buyer, and the informational * dump-cluster ensemble. Tier: **BASIC**. * `GET /rhc/tokens/{address}/buyer-quality` */ tokenBuyerQuality(address: string, params?: { include_balances?: boolean; }): Promise; /** * Live since 2026-10-10. Include-scoped token intelligence for terminal * panels. Name every module you render (no default; at most 5 modules and * total cost 8; `holders` is opt-in only). Each module carries its own * `status` (ready / partial_history / unverified / unavailable / timeout), the * source's `as_of`, `provenance` and history coverage; a non-ready module * carries no `data`. The address is answered lowercased; `chain_id` 4663, * `native_asset` ETH. Key mode only (not on the keyless x402 rail). Tier: **PRO+**. * `GET /rhc/tokens/{address}/intelligence` */ tokenIntelligence(address: string, params: RhcTokenIntelligenceParams): Promise; /** * Realtime terminal integration (opt-in, API key PRO+): * A token-scoped REST intelligence snapshot + bounded WS invalidation. * * Reuse ONE shared stream across widgets, and use a UNIQUE subId per watch: * `const stream = client.stream();` * `const view = client.watchTokenIntelligence(token, { stream, subId: "panel1", tier: "PRO", include: ["snapshot", "risk"] });` * `view.dispose();` detaches only this watch. Close the shared stream separately. */ watchTokenIntelligence(address: string, options: RobinhoodTerminalWatchOptions): TerminalTokenViewType; /** * Launch-bundle detection — flags a `same_block` bundle in the earliest-buyer * cohort and reports how much of what it bought it still holds. Field-gated by * tier: BASIC scalar `bundle`; PRO top-10 wallets; ULTRA full cohort with * identity. Tier: **BASIC**. `GET /rhc/tokens/{address}/bundle` */ /** ONE figure: share of supply held now by all bundle wallets (launch ∪ clusters), cached 30 s (PRO+). GET /rhc/tokens/{address}/bundle-share */ tokenBundleShare(address: string, params?: { window?: "1h" | "6h" | "24h"; min_wallets?: number; }): Promise; /** Every coordinated buy cluster in a window, launch AND later (PRO+). GET /rhc/tokens/{address}/bundles */ tokenBundleClusters(address: string, params?: { window?: "1h" | "6h" | "24h"; min_wallets?: number; limit?: number; include_balances?: boolean; }): Promise; tokenBundle(address: string, params?: { include_balances?: boolean; }): Promise; /** * Top traders of one token, ranked by REALIZED ETH flow (`sell − buy`), * enriched with wallet reputation, dump-cluster membership and early-buyer * rank. **`net_eth` is not PnL** — it does not value a trader's remaining bag, * so a wallet that bought and still holds ranks last. Each trader also carries * `fifo` (FIFO realized PnL on this token, the `/rhc/wallet/{address}/pnl` * method; null unless `fifo_status` is `ok`). Tier: **PRO+** (50 rows; * ULTRA/BUSINESS 200). `GET /rhc/tokens/{address}/top-traders` */ tokenTopTraders(address: string, params?: { limit?: number; offset?: number; }): Promise; /** * Net buy/sell flow split by mutually-exclusive trader cohort. Sign * convention: `net_eth = sell − buy`, so POSITIVE means that cohort * **distributed**. Ladder order is priority order: kol → bot → dump_cluster → * early_buyer → unprofiled → smart_money → retail. Tier: **PRO+**. * `GET /rhc/tokens/{address}/flow` */ tokenFlow(address: string, window?: "1h" | "6h" | "24h" | "7d"): Promise; /** * Peak market cap, drawdown and running high-water curve. Returns **two peaks * because they disagree**: `peak_mc_usd_recorded` is the stored high-water mark * other RHC surfaces key off (sampled from write batches, so it can undercount * an intra-batch spike), and `peak_mc_usd_observed` is the max of 1-minute * candle highs — trade-level truth, always ≥ recorded. Tier: **PRO+**. * `GET /rhc/tokens/{address}/peak-history` */ tokenPeakHistory(address: string, params?: { window?: "24h" | "7d" | "30d" | "all"; curve?: "true" | "false"; }): Promise; /** * EVM-native risk, computed **live** on-chain. Not the Solana model: EVM has no * mint/freeze authority, and only ~2% of RHC tokens expose an owner function, * so an absent flag is the norm rather than a safety signal. The discriminating * signals are proxy upgradeability, LP custody and **sellability**, which is * simulated at the chain head and never cached. Tier: **PRO+**. * `GET /rhc/tokens/{address}/risk` */ tokenRisk(address: string): Promise; /** * Exact holder set + concentration, folded from ERC-20 `Transfer` logs (not * trade-derived) and reconciled against on-chain `totalSupply()`. **Check * `verified` first.** Concentration excludes pools and burns from the * circulating denominator and reports them separately; `balance` is a raw * uint256 returned as a decimal string. `holder_growth.{1h,24h,7d}` adds * `entered` (first Transfer at-or-after the window's `cutoff_block`), * `entered_still_holding`, `exited` (pre-existing holders whose last Transfer * in the window left them at zero) and `net` ≈ Δ `holder_count`; a window is * null only when the chain had no ingested trades in it. Tier: **PRO+** (50 * rows; ULTRA/BUSINESS 200). Page with `after` (the previous page's * `next_after` keyset cursor) rather than `offset`. * `GET /rhc/tokens/{address}/holders` */ tokenHolders(address: string, params?: { limit?: number; offset?: number; after?: string; include_wallet_flags?: boolean; }): Promise; /** * Deployer reputation leaderboard — RHC deployers ranked by reputation over * every indexed launchpad token (99k+ deployers). `graduation_rate` = share at * $40K+ peak MC; `runner_rate` = share at $100K+. * * Since migrations 267 + 269 the `elite`/`good` **tier** rides `runner_rate` * ($100K) AND requires 24h of deployer history — elite = 5+ tokens, 24h+ old, * `runner_rate >= 0.50`; good = same with `>= 0.25`. `graduation_rate` still * means the $40K bar and is still returned, but it no longer sets the tier (it * proved farmable); only `spammer` still keys off it (20+ tokens, * `graduation_rate < 0.05`). Tier: **BASIC**. * `GET /rhc/deployer-hunter/leaderboard` */ /** * GET /rhc/deployer-hunter/alerts — launch alerts from tracked (graded) * deployers: token, tier, lifetime bond rate, MC at alert. `since` is the * polling cursor (feed back `next_since`). Available in keyless x402 mode ($0.01). */ deployerAlerts(params?: DeployerAlertsParams): Promise; deployerLeaderboard(params?: DeployerLeaderboardParams): Promise; /** Deployer reputation trend (rising/falling/stable). Tier: BASIC. `GET /rhc/deployer-hunter/{address}/trajectory` */ deployerTrajectory(address: string): Promise; /** Full token-deploy history for a deployer. Tier: BASIC. `GET /rhc/deployer-hunter/{address}/tokens` */ deployerTokens(address: string, params?: { limit?: number; offset?: number; sort?: "first_seen_at" | "peak_mc_usd"; include_launches_24h?: boolean; }): Promise; /** Deployer token-launch history, paginated. Tier: PRO+. `GET /rhc/deployer-hunter/{address}/history` */ deployerHistory(address: string, params?: { limit?: number; offset?: number; }): Promise; /** Top recent launches from good/elite deployers. Tier: BASIC. `GET /rhc/deployer-hunter/best-tokens` */ deployerBestTokens(params?: { period?: "24h" | "7d" | "30d" | "all"; limit?: number; }): Promise; /** Chain-wide deployer census. Tier: BASIC. `GET /rhc/deployer-hunter/stats` */ deployerStats(): Promise; /** Recent graduations (defined purely by peak MC, no bonding-curve milestone on RHC). Tier: BASIC. `GET /rhc/deployer-hunter/recent-bonds` */ recentBonds(params?: { deployer_tier?: "elite" | "good" | "neutral" | "spammer"; min_peak?: number; limit?: number; /** `next_cursor` from the previous page. */ cursor?: string; }): Promise; /** Up to 50 tokens in one call. Tier: BASIC. `POST /rhc/token/batch`. Key-mode only (write-shaped request). */ tokenBatch(addresses: string[]): Promise; /** Buyer-quality score for up to 50 tokens. Tier: BASIC. `POST /rhc/tokens/batch/buyer-quality`. Key-mode only. */ tokenBatchBuyerQuality(addresses: string[]): Promise; /** Every stored KOL trade on one token, newest first (keyset paged with * next_cursor). include_balances (PRO+): current balanceOf(token) per KOL * address on the page from our node; a failed read is unverified, never 0. * GET /rhc/tokens/{address}/kol-trades */ tokenKolTrades(address: string, params?: { limit?: number; action?: "buy" | "sell"; kol?: string; since?: string; cursor?: string; include_balances?: boolean; }): Promise; /** A developer's launches and own-token buys/sells as one timeline (PRO+). * event_id equals the rhc:dev_activity WS id. Transfers and linked wallets are * not included (coverage block). GET /rhc/deployer-hunter/{address}/activity */ deployerActivity(address: string, params?: { limit?: number; since?: string; types?: string; cursor?: string; }): Promise; /** First buyers of a token, ranked, with evidence-gated holding status (PRO+). * verify_current_balances: ULTRA+ opt-in for ≤20 pinned-block Hood balanceOf * reads, strict 503 on any missing buyer balance/stat; no added RPC by default. * "realized_eth" remains observed net ETH flow, NOT certified FIFO PnL. * include_scout_scores: adds is_kol + scout_score per buyer, each KOL's score * as of its own first buy (no hindsight). * GET /rhc/tokens/{address}/early-buyers */ tokenEarlyBuyers(address: string, params?: { limit?: number; verify_current_balances?: boolean; include_scout_scores?: boolean; }): Promise; /** * Single deployer profile — full reputation row plus the 50 most recent tokens * enriched with live MC and peak MC. Unknown wallets return 200 with * `is_deployer: false`. Tier: **BASIC**. `GET /rhc/deployer-hunter/{address}` * @param address Deployer EVM wallet address (0x, 40 hex). */ deployer(address: string): Promise; /** * Smart-money wallet ranking — RHC trader wallets ranked by realized on-chain * performance (`net_eth`, `win_rate`, `memecoin_share`, `likely_bot`). Tier: * **PRO+**. `GET /rhc/alpha-wallets` */ alphaWallets(params?: AlphaWalletsParams): Promise; /** * Any Robinhood Chain wallet's 90-day trading profile — FIFO cost-basis PnL, * per-token breakdown, recent trades, and a reputation block (tracked KOL, * known deployer + tier, alpha-ranked, dump-cluster membership, early-buyer * count). Tier: **PRO+**. `GET /rhc/wallet/{address}` * * FIFO figures (`stats.held_value_eth`, `open_positions`, * `top_tokens[].still_holding`) count DEX buys not matched by a DEX sell; * `holdings` and `top_tokens[].holding_status` check them against the chain * (server 2026-10-02), so a token sent away by transfer is * `TRANSFERRED_OR_DISPOSED`. A contract address answers 404 with * `address_type: "contract"` (the thrown error message carries the body). * @param address Wallet EVM address (0x, 40 hex). Case-insensitive. */ wallet(address: string): Promise; /** * Full FIFO cost-basis PnL for one RHC wallet over 90 days: realized and * unrealized split, a daily realized curve, every closed position with ROI * and hold time, and every open position marked to the current price. Same * FIFO implementation as the Solana `/wallet/{address}/pnl`, so the two * chains are directly comparable. Tier: **PRO+**. * `GET /rhc/wallet/{address}/pnl` * @param address Wallet EVM address (0x, 40 hex). */ walletPnl(address: string): Promise; /** * Only what the wallet still holds, marked to the current price — the same * FIFO pass as {@link walletPnl} without the curve and closed positions, for * clients polling "what is this wallet in right now". Check * `positions[].liquidity_basis`: `v4_virtual_ceiling` means `liquidity_usd` * is a bonding-curve ceiling, not withdrawable TVL. "Open" is FIFO (a trading * position): since server 2026-10-02 each position also carries * `current_onchain_balance` + `holding_status`, and * `summary.holdings.verified_value_eth` counts proven balances only. * Tier: **PRO+**. * `GET /rhc/wallet/{address}/positions` * @param address Wallet EVM address (0x, 40 hex). */ walletPositions(address: string): Promise; /** * One wallet's swaps, newest first, cursor-paginated on an opaque * `next_before` keyset. Distinct from `trades({ token })` — that filters the * global tape by TOKEN, this filters by WALLET (a different index path). * Tier: **PRO+**. `GET /rhc/wallet/{address}/trades` * @param address Wallet EVM address (0x, 40 hex). */ walletTrades(address: string, params?: WalletTradesParams): Promise; /** * Your Robinhood Chain watchlist. Quotas are **per chain** — PRO 50 / * ULTRA 100 / BUSINESS 500 RHC wallets, independent of your Solana * watchlist, so adopting RHC never shrinks an existing Solana list. * Tier: **PRO+**. `GET /rhc/wallet-tracker/watchlist` */ walletTrackerList(): Promise; /** * Add a wallet to your RHC watchlist. The address is stored lowercase so it * matches `rhc_trades.trader_eoa` — a checksummed `0xAbC…` would join to * nothing and look like a permanently silent wallet. Returns 409 if the * wallet is already tracked. Tier: **PRO+**. * `POST /rhc/wallet-tracker/watchlist` */ walletTrackerAdd(params: WalletTrackerAddParams): Promise; /** * Remove a wallet from your RHC watchlist. Tier: **PRO+**. * `DELETE /rhc/wallet-tracker/watchlist/{address}` * @param address Tracked wallet EVM address. */ walletTrackerRemove(address: string): Promise; /** * Relabel a tracked wallet. Tier: **PRO+**. * `PATCH /rhc/wallet-tracker/watchlist/{address}` * @param address Tracked wallet EVM address. * @param label New label — pass `null` to clear it. */ walletTrackerRelabel(address: string, label: string | null): Promise; /** * Every trade by every wallet on your RHC watchlist, newest first, each row * labelled with its watchlist label. The cursor is an opaque keyset * (`next_before`) matching the rest of the RHC tree, not the Solana * tracker's integer epoch. A `wallet` filter must already be tracked. * Tier: **PRO+**. `GET /rhc/wallet-tracker/trades` */ walletTrackerTrades(params?: WalletTrackerTradesParams): Promise; /** * Per-wallet buy/sell/volume rollup across your tracked RHC wallets. Sourced * from `rhc_trades` directly, not from a per-subscriber capture log — on RHC * every swap is already recorded, so adding a wallet gives you its history * immediately rather than only from the moment you tracked it. * Tier: **PRO+**. `GET /rhc/wallet-tracker/summary` */ walletTrackerSummary(params?: WalletTrackerSummaryParams): Promise; /** * Your Robinhood Chain copy-trade rules. Quotas are **per chain** — a full set * of Solana copy-trade rules does not consume RHC capacity. Tier: **PRO+**. * `GET /rhc/copytrade/subscriptions` */ copyTradeList(): Promise; /** * Create a copy-trade rule — fires when one of `source_wallets` trades on RHC. * Amounts are ETH, not SOL, and there is no MC band: the RHC notify payload * carries no market cap, so a band could only be a per-event DB lookup in the * hot path of a ~3.3M trades/day chain. The response carries the * `webhook_secret` **once**. Tier: **PRO+**. * `POST /rhc/copytrade/subscriptions` */ copyTradeCreate(params: CopyTradeCreateParams): Promise; /** * Fetch one copy-trade rule. Tier: **PRO+**. * `GET /rhc/copytrade/subscriptions/{id}` * @param id Numeric rule id. */ copyTradeGet(id: number): Promise; /** * Partially update a copy-trade rule. The per-tier wallet cap is re-checked, * so a PRO rule cannot be PATCHed past its limit. Tier: **PRO+**. * `PATCH /rhc/copytrade/subscriptions/{id}` * @param id Numeric rule id. */ copyTradeUpdate(id: number, params: CopyTradeUpdateParams): Promise; /** * Delete a copy-trade rule (its fired signals cascade). Tier: **PRO+**. * `DELETE /rhc/copytrade/subscriptions/{id}` * @param id Numeric rule id. */ copyTradeDelete(id: number): Promise; /** * Fire history for your copy-trade rules — the catch-up path when a webhook * was missed or the WS channel dropped. Retained 7 days. Tier: **PRO+**. * `GET /rhc/copytrade/signals` */ copyTradeSignals(params?: CopyTradeSignalsParams): Promise; /** * Your Robinhood Chain price alerts. Quota is per chain. Tier: **PRO+**. * `GET /rhc/price-alerts` */ priceAlertsList(): Promise; /** * Create a price alert. The baseline MC is captured **now**, so the alert is a * delta from the moment you set it, and the token must already be tracked with * a market cap. RHC alerts are evaluated as trades land on the `rhc:dex_trade` * feed (price-table polls are the safety net) — a few seconds, not sub-second * like Solana; the response's `evaluation` block says so. * Tier: **PRO+**. `POST /rhc/price-alerts` */ priceAlertsCreate(params: PriceAlertCreateParams): Promise; /** * Fetch one price alert. Tier: **PRO+**. `GET /rhc/price-alerts/{id}` * @param id Numeric alert id. */ priceAlertsGet(id: number): Promise; /** * Update a price alert. Only `name`, `delivery_mode`, `webhook_url` and * `is_active` are mutable — retuning a threshold mid-flight would make the * alert's recorded events uninterpretable. Tier: **PRO+**. * `PATCH /rhc/price-alerts/{id}` * @param id Numeric alert id. */ priceAlertsUpdate(id: number, params: PriceAlertUpdateParams): Promise; /** * Delete a price alert (its events cascade). Tier: **PRO+**. * `DELETE /rhc/price-alerts/{id}` * @param id Numeric alert id. */ priceAlertsDelete(id: number): Promise; /** * Dip and recovery events for your price alerts — the catch-up path for a * missed webhook or a dropped WS channel. Retained 30 days. Tier: **PRO+**. * `GET /rhc/price-alerts/events` */ priceAlertsEvents(params?: PriceAlertEventsParams): Promise; /** * Your RHC coordination rules — fire when N+ tracked KOLs buy the same token * inside a rolling window. Quota is per chain. Tier: **PRO+**. * `GET /rhc/kol/coordination/alerts` */ coordinationAlertsList(): Promise; /** * Create a coordination rule. Scoring is the shared v1 scorer so the number is * comparable to Solana, but the `earliness` component is defaulted on RHC * (no early-entry equivalent) while `quality` is a real KOL win-rate — the * response's `scoring` block records which components are real. * Tier: **PRO+**. `POST /rhc/kol/coordination/alerts` */ coordinationAlertsCreate(params: CoordinationAlertCreateParams): Promise; /** * Fetch one coordination rule. Tier: **PRO+**. * `GET /rhc/kol/coordination/alerts/{id}` * @param id Rule UUID. */ coordinationAlertsGet(id: string): Promise; /** * Partially update a coordination rule. Tier: **PRO+**. * `PATCH /rhc/kol/coordination/alerts/{id}` * @param id Rule UUID. */ coordinationAlertsUpdate(id: string, params: CoordinationAlertUpdateParams): Promise; /** * Delete a coordination rule (its cooldown state and fired signals cascade). * Tier: **PRO+**. `DELETE /rhc/kol/coordination/alerts/{id}` * @param id Rule UUID. */ coordinationAlertsDelete(id: string): Promise; /** * Your RHC first-touch subscriptions — push when a token gets its FIRST * tracked-KOL buy. Quota is per chain. Tier: **ULTRA+**. * `GET /rhc/kol/first-touches/subscriptions` */ firstTouchSubscriptionsList(): Promise; /** * Create a first-touch subscription. The filter set is deliberately not the * Solana one: RHC has no scout score, so `min_scout_tier` / `min_n_touches` * are absent rather than silently matching nothing — `min_kol_winrate` and * `strategy` are the quality gates. Unknown filter keys are rejected, not * ignored. Tier: **ULTRA+**. `POST /rhc/kol/first-touches/subscriptions` */ firstTouchSubscriptionsCreate(params: FirstTouchSubscriptionCreateParams): Promise; /** * Fetch one first-touch subscription. Tier: **ULTRA+**. * `GET /rhc/kol/first-touches/subscriptions/{id}` * @param id Subscription UUID. */ firstTouchSubscriptionsGet(id: string): Promise; /** * Update a first-touch subscription. `filters` is a whole-object **replace**, * not a merge — merging would make "remove this filter" inexpressible. * Tier: **ULTRA+**. `PATCH /rhc/kol/first-touches/subscriptions/{id}` * @param id Subscription UUID. */ firstTouchSubscriptionsUpdate(id: string, params: FirstTouchSubscriptionUpdateParams): Promise; /** * Delete a first-touch subscription. Tier: **ULTRA+**. * `DELETE /rhc/kol/first-touches/subscriptions/{id}` * @param id Subscription UUID. */ firstTouchSubscriptionsDelete(id: string): Promise; /** * Get your WebSocket streaming token (PRO/ULTRA). Stream tokens **never * expire** (since 2026-08-27): every call returns the same token and nothing * needs refreshing — `expires_at` / `next_refresh_at` are always `null`. * A token only stops working when the subscription lapses or you pass * `{ rotate: true }`, which replaces it (the previous value keeps working * for 60 s; the response then carries `rotated: true`). The server never * rotates on its own, and a `4001` close means "mint again", never a timer. * Authenticate the handshake with `Authorization: Bearer ` (`?token=` * still works and is masked in access logs); RHC channels ride the same * socket and token as Solana. `POST /api/v1/stream/token` * @param opts.rotate Replace the current token instead of returning it. */ getStreamToken(opts?: { rotate?: boolean; }): Promise; /** * Open a managed real-time Robinhood Chain WebSocket stream. Handles the * token fetch on every (re)connect (stream tokens never expire, so there is * no refresh timer), auto-reconnect with backoff, heartbeat liveness, and * typed events for you. Channels: `rhc:kol_trades`, `rhc:dex_trades` (ULTRA+), plus * the four rule-engine channels (`rhc:copytrade:signals`, * `rhc:price_alert:events`, `rhc:kol:coordination`, `rhc:kol:first_touches`). * Listen on `"warning"` to catch server `channels_rejected` frames. * * @example * const stream = client.stream(); * stream.on("rhc:kol_trade", (t) => console.log(t)); * stream.subscribe(["rhc:kol_trades"]); */ stream(opts?: Omit): RobinhoodChainStream; } /** * Create a Robinhood Chain client with API-key auth. * @param apiKey Your `msk_` API key — get one free at https://madeonsol.com/pricing. * @param baseUrl Optional API base URL override. */ export declare function createClient(apiKey: string, baseUrl?: string): RobinhoodChainX402; /** * Keyless x402 client — pays per call in USDG on Robinhood Chain from the * given EVM wallet (no signup, no key; wallet needs USDG, not ETH). Needs viem. * @param privateKey 0x-prefixed private key of the payer wallet — read it from an env var, never hard-code. */ export declare function createKeylessClient(privateKey: string, baseUrl?: string, paymentPolicy?: PaymentPolicy): RobinhoodChainX402; //# sourceMappingURL=index.d.ts.map