@metamask/social-controllers 3.7.0 → 3.9.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.
@@ -142,6 +142,12 @@ export type TraderProfile = {
142
142
  allAddresses: string[];
143
143
  name: string;
144
144
  imageUrl?: string | null;
145
+ /**
146
+ * When the social-api profile row was created, as an ISO-8601 timestamp.
147
+ * Omitted on older social-api builds. This is the row insert time, which can
148
+ * predate the trader claiming a username and avatar.
149
+ */
150
+ createdAt?: string | null;
145
151
  };
146
152
  export type TraderStats = {
147
153
  pnl30d?: number | null;
@@ -238,6 +244,8 @@ export type Position = {
238
244
  pnlValueUsd?: number | null;
239
245
  /** PnL as a percentage of cost basis. */
240
246
  pnlPercent?: number | null;
247
+ /** Number of detected copy trades for this position. */
248
+ copyCount?: number;
241
249
  /** Perp side of the position. `null`/absent for spot positions. */
242
250
  perpPositionType?: 'long' | 'short' | null;
243
251
  /** Leverage multiplier for perp positions. `null`/absent for spot. */
@@ -319,6 +327,8 @@ export type FeedItem = Position & {
319
327
  commentCount?: number;
320
328
  /** Replies across those comments. Absent on older social-api builds. */
321
329
  replyCount?: number;
330
+ /** Detected copies of this position. Absent on older social-api builds. */
331
+ copyCount?: number;
322
332
  /**
323
333
  * Unix seconds of the position's first fill. Count from this to render a
324
334
  * live hold on a position that is still open, where {@link holdTimeMs} is
@@ -337,6 +347,12 @@ export type FeedItem = Position & {
337
347
  * `null` when the position is flat. Absent on older social-api builds.
338
348
  */
339
349
  entryPriceUsd?: number | null;
350
+ /** Stable event ID for the shared feed-all projection. */
351
+ eventId?: string;
352
+ /** Projection revision for the shared feed-all item. */
353
+ revision?: number;
354
+ /** ISO timestamp for the shared feed-all projection event. */
355
+ occurredAt?: string;
340
356
  };
341
357
  export type ReactToCommentOptions = {
342
358
  commentId: string;
@@ -404,6 +420,69 @@ export type SwapCommentResponse = {
404
420
  isAppUserComment: boolean;
405
421
  metrics: CommentEngagement;
406
422
  };
423
+ /**
424
+ * Social resource a copy trade was started from. Only comments are supported.
425
+ */
426
+ export type CopyTradeOrigin = {
427
+ kind: 'comment';
428
+ /** Comment UUID. */
429
+ id: string;
430
+ };
431
+ /**
432
+ * Trade being copied. Swaps are identified by their Bridge quote id, perps by
433
+ * the Hyperliquid order id returned on submission.
434
+ */
435
+ export type CopyTradeExecution = {
436
+ product: 'swaps';
437
+ quoteId: string;
438
+ } | {
439
+ product: 'perps';
440
+ oid: string;
441
+ };
442
+ /**
443
+ * Options for `POST /v1/copy-trade-intents`.
444
+ */
445
+ export type CreateCopyTradeIntentOptions = {
446
+ origin: CopyTradeOrigin;
447
+ copierAccount: {
448
+ /**
449
+ * CAIP-10 id of the account placing the trade. The social-api verifies it
450
+ * belongs to the authenticated profile.
451
+ */
452
+ caip10: string;
453
+ };
454
+ execution: CopyTradeExecution;
455
+ };
456
+ /**
457
+ * Account on a copy-trade intent response.
458
+ */
459
+ export type CopyTradeAccount = {
460
+ profileId: string;
461
+ caip10: string;
462
+ };
463
+ /**
464
+ * Payout eligibility snapshotted when the intent is created. `reason` is one
465
+ * of `comment_source`, `source_account_unavailable`, or `unknown_reason`;
466
+ * newer social-api builds may add more.
467
+ */
468
+ export type CopyTradePayoutEligibility = {
469
+ status: 'payable' | 'non_payable';
470
+ reason: string;
471
+ };
472
+ /**
473
+ * Response from `POST /v1/copy-trade-intents`. The endpoint is idempotent, so
474
+ * a retry returns the existing intent.
475
+ */
476
+ export type CopyTradeIntentResponse = {
477
+ id: string;
478
+ origin: CopyTradeOrigin;
479
+ copierAccount: CopyTradeAccount;
480
+ sourceAccount: CopyTradeAccount | null;
481
+ execution: CopyTradeExecution;
482
+ payoutEligibility: CopyTradePayoutEligibility;
483
+ /** ISO 8601 timestamp. */
484
+ createdAt: string;
485
+ };
407
486
  /**
408
487
  * Cursor pagination for the feed. Pass `olderCursor` back as `olderThan` to
409
488
  * load older items (infinite scroll), and `newerCursor` as `newerThan` to
@@ -526,10 +605,11 @@ export type FetchTokenFeedOptions = {
526
605
  export type FetchFeedOptions = {
527
606
  /**
528
607
  * Which feed to fetch: `following` (personalized to the current user,
529
- * identified server-side from the JWT) or `leaderboard` (generic, shared by
530
- * all users). Defaults to `following` server-side when omitted.
608
+ * identified server-side from the JWT), `leaderboard` (generic, shared by
609
+ * all users), or `all` (the shared feed-all projection). Defaults to
610
+ * `following` server-side when omitted.
531
611
  */
532
- scope?: 'following' | 'leaderboard';
612
+ scope?: FeedScope;
533
613
  /**
534
614
  * Filter by one or more chains, given as CAIP-2 chain ids (e.g.
535
615
  * `eip155:8453`). Omit for the server defaults.
@@ -542,6 +622,7 @@ export type FetchFeedOptions = {
542
622
  /** Cursor for newer items (pull to refresh). Use `pagination.newerCursor`. */
543
623
  newerThan?: string;
544
624
  };
625
+ export type FeedScope = 'following' | 'leaderboard' | 'all' | 'trending';
545
626
  export type FetchPositionByIdOptions = {
546
627
  /** Unique position ID (UUID). */
547
628
  positionId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"social-types.d.ts","sourceRoot":"","sources":["../src/social-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAcnD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG;IAC9C,sCAAsC;IACtC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;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import type { Infer } from '@metamask/superstruct';\nimport {\n enums,\n nullable,\n number,\n optional,\n string,\n type as structType,\n} from '@metamask/superstruct';\n\n// ---------------------------------------------------------------------------\n// Shared sub-types\n// ---------------------------------------------------------------------------\n\n/**\n * Minimal profile summary used across follow/follower responses.\n */\nexport type ProfileSummary = {\n /** Clicker profile ID (UUID). */\n profileId: string;\n /** Primary wallet address. */\n address: string;\n /** Display name or truncated address. */\n name: string;\n /** Profile avatar URL. */\n imageUrl?: string | null;\n};\n\n/**\n * Trader attached to a feed item. Extends {@link ProfileSummary} with the\n * profile stats the feed hydrator already loaded and used to drop.\n *\n * Every field is optional: a social-api that predates them omits the keys,\n * and `null` means the window has no data (distinct from \"not sent\").\n */\nexport type FeedActorSummary = ProfileSummary & {\n /** 30-day win rate as a 0–1 ratio. */\n winRate30d?: number | null;\n /** 30-day realized PnL in USD. */\n pnl30d?: number | null;\n /** 30-day sell count behind `winRate30d`. */\n tradeCount30d?: number | null;\n /** Profiles following this trader. */\n followerCount?: number | null;\n};\n\n/**\n * Social media handles attached to a trader profile.\n */\nexport type SocialHandles = {\n twitter?: string | null;\n farcaster?: string | null;\n ens?: string | null;\n lens?: string | null;\n};\n\n/**\n * Where a fill sits in its position's lifecycle.\n *\n * Deliberately asset-agnostic so the classification is computed once, upstream:\n * clients render `opened / added / reduced / closed` for perps and\n * `bought / bought more / sold some / sold all` for spot from the same value.\n *\n * Distinct from `intent`, which only says whether the fill grew or shrank the\n * position — `intent: 'exit'` covers both a partial trim and a full close.\n */\nexport type TradeAction = 'opened' | 'added' | 'reduced' | 'closed';\n\nexport const TradeStruct = structType({\n direction: enums(['buy', 'sell']),\n intent: enums(['enter', 'exit']),\n /**\n * Lifecycle stage of this fill. Absent on responses from a social-api that\n * predates the field, so treat it as a hint and keep a client-side fallback.\n */\n action: optional(enums(['opened', 'added', 'reduced', 'closed'])),\n category: optional(string()),\n /** High-level trade classification. `null` when Clicker does not classify. */\n classification: optional(\n nullable(enums(['spot', 'perp', 'send', 'receive'])),\n ),\n /** Perp side for this fill. `null` for spot trades. */\n perpPositionType: optional(nullable(enums(['long', 'short']))),\n /** Leverage multiplier for perp trades (e.g. `5` for 5x). `null` for spot. */\n perpLeverage: optional(nullable(number())),\n tokenAmount: number(),\n usdCost: number(),\n /** Token market cap in USD at trade time. `null` when Clicker has no mark. */\n marketCap: optional(nullable(number())),\n timestamp: number(),\n transactionHash: string(),\n});\n\nexport type Trade = Infer<typeof TradeStruct>;\n\n// ---------------------------------------------------------------------------\n// Leaderboard\n// ---------------------------------------------------------------------------\n\n/**\n * A single entry in the leaderboard response.\n */\nexport type LeaderboardEntry = {\n rank: number;\n addresses: string[];\n profileId: string;\n name: string;\n imageUrl?: string | null;\n pnl30d: number;\n winRate30d?: number | null;\n /** Renamed from roi30d. */\n roiPercent30d?: number | null;\n /** Renamed from tradeCount. */\n tradeCount30d?: number | null;\n pnl7d?: number | null;\n winRate7d?: number | null;\n roiPercent7d?: number | null;\n tradeCount7d?: number | null;\n pnlPerChain: Record<string, number>;\n followerCount: number;\n socialHandles: SocialHandles;\n};\n\n/**\n * Response from `GET /v1/leaderboard`.\n */\nexport type LeaderboardResponse = {\n traders: LeaderboardEntry[];\n};\n\n// ---------------------------------------------------------------------------\n// Trader profile\n// ---------------------------------------------------------------------------\n\n/** Values for `TraderProfileResponse.rankingTag` from social-api. */\nexport const TRADER_RANKING_TAGS = ['shrimp', 'dolphin', 'whale'] as const;\n\nexport type TraderRankingTag = (typeof TRADER_RANKING_TAGS)[number];\n\nexport type TraderProfile = {\n profileId: string;\n address: string;\n allAddresses: string[];\n name: string;\n imageUrl?: string | null;\n};\n\nexport type TraderStats = {\n pnl30d?: number | null;\n winRate30d?: number | null;\n /** Renamed from roi30d. */\n roiPercent30d?: number | null;\n /** Renamed from tradeCount. */\n tradeCount30d?: number | null;\n /** 30-day trading volume in USD. */\n volumeUsd30d?: number | null;\n pnl7d?: number | null;\n winRate7d?: number | null;\n roiPercent7d?: number | null;\n tradeCount7d?: number | null;\n /** Median holding time in minutes. */\n medianHoldMinutes?: number | null;\n};\n\nexport type CopytradedAllTime = {\n count: number;\n volumeUSD: number;\n distinctActors: number;\n};\n\nexport type PerChainBreakdown = {\n perChainPnl: Record<string, number>;\n /** ROI can be null for chains with no trading activity (zero cost-basis). */\n perChainRoi: Record<string, number | null>;\n perChainVolume: Record<string, number>;\n /**\n * 7-day per-chain PnL in USD. Optional: older social-api versions only\n * return the 30-day breakdown (`perChainPnl`). The unsuffixed fields above\n * remain the 30-day window for backward compatibility.\n */\n perChainPnl7d?: Record<string, number>;\n /** 7-day per-chain ROI. Null for chains with no trading activity. */\n perChainRoi7d?: Record<string, number | null>;\n /** 7-day per-chain volume in USD. */\n perChainVolume7d?: Record<string, number>;\n};\n\n/**\n * Response from `GET /v1/traders/:addressOrId/profile`.\n */\nexport type TraderProfileResponse = {\n profile: TraderProfile;\n stats: TraderStats;\n perChainBreakdown: PerChainBreakdown;\n socialHandles: SocialHandles;\n followerCount: number;\n followingCount: number;\n /**\n * Linked copy-swap stats for this trader. Social-api always sends zeros\n * when there are none.\n */\n copytradedAllTime: CopytradedAllTime;\n /**\n * Backend-derived tier from the Auth primary account 30d PnL. Omitted on older\n * social-api builds; `null` when unclaimed or activity is insufficient.\n */\n rankingTag?: TraderRankingTag | null;\n};\n\n// ---------------------------------------------------------------------------\n// Positions\n// ---------------------------------------------------------------------------\n\nexport type Position = {\n positionId: string;\n tokenSymbol: string;\n tokenName: string;\n tokenAddress: string;\n chain: string;\n positionAmount: number;\n /**\n * Whether the position still carries exposure. Clicker's own verdict, which\n * beats a `positionAmount === 0` check: it survives precision dust and\n * distinguishes \"no position\" from \"a position of size ~0\". Absent on\n * responses from a social-api that predates the field.\n */\n isOpen?: boolean;\n /**\n * Total USD spent buying into the position. `null` when Clicker stats are\n * incomplete (the social-api used to JSON-serialize `NaN` as `null`).\n */\n boughtUsd: number | null;\n /** Total USD received from sells. `null` when stats are incomplete. */\n soldUsd: number | null;\n /** Realized profit or loss in USD. `null` when stats are incomplete. */\n realizedPnl: number | null;\n /**\n * USD cost basis of the remaining holdings. `null` when stats are incomplete.\n */\n costBasis: number | null;\n trades: Trade[];\n lastTradeAt: number;\n /** Daylight-hosted token image URL. */\n tokenImageUrl?: string | null;\n /** Current USD value of the remaining position (open positions only). */\n currentValueUSD?: number | null;\n /** Unrealized + realized PnL in USD. */\n pnlValueUsd?: number | null;\n /** PnL as a percentage of cost basis. */\n pnlPercent?: number | null;\n /** Perp side of the position. `null`/absent for spot positions. */\n perpPositionType?: 'long' | 'short' | null;\n /** Leverage multiplier for perp positions. `null`/absent for spot. */\n perpLeverage?: number | null;\n /**\n * Leveraged/notional position size as reported by Clicker. NOT necessarily\n * `positionAmount` × `perpLeverage` — the ratio varies for positions built\n * across fills at different leverage, so use this field directly rather than\n * deriving it, and treat `perpLeverage` as the authoritative leverage. This is\n * notional exposure, not capital at risk (the margin/capital at risk is\n * `costBasis`). Hyperliquid/perp positions only; absent for spot.\n */\n positionAmountWithLeverage?: number | null;\n};\n\nexport type Pagination = {\n hasMore: boolean;\n nextPage?: number;\n};\n\n/**\n * Response from `GET /v1/traders/:addressOrId/positions/open`\n * and `GET /v1/traders/:addressOrId/positions/closed`.\n */\nexport type PositionsResponse = {\n positions: Position[];\n pagination: Pagination;\n /** ISO 8601 timestamp indicating when the response was computed server-side. */\n computedAt?: string | null;\n};\n\n// ---------------------------------------------------------------------------\n// Feed\n// ---------------------------------------------------------------------------\n\n/**\n * One emotion's aggregated count on a Call (swap comment), plus an optional\n * facepile sample. `profiles` is always present on the wire and is often empty.\n */\nexport type CommentReaction = {\n emotion: string;\n count: number;\n profiles: CommentReactionProfile[];\n};\n\nexport type CommentReactionProfile = {\n id: string;\n name: string;\n};\n\n/**\n * Engagement on a Call. Counts live on `reactions`; do not read deprecated\n * `likeCount` / `isLikedByUser` even if the social-api still emits them as 0/false.\n */\nexport type CommentEngagement = {\n reactions: CommentReaction[];\n /** Viewer's own emotion, when the hydrator was given their profile. */\n userReaction: string | null;\n /** Reply count on the comment. Present on feed `authorComment`, not on write responses. */\n replyCount?: number;\n};\n\n/**\n * Position thesis for the feed big card. `null` when that intent phase has no Call.\n */\nexport type AuthorComment = {\n uid: string;\n text: string;\n /** Unix timestamp (seconds) when the comment was created. */\n timestamp: number;\n engagement: CommentEngagement;\n};\n\n/**\n * A single trader-activity feed item: a {@link Position} the trade belongs to,\n * plus the {@link FeedActorSummary} of the trader who made it (`actor`) and the\n * item's creation `timestamp` (Unix seconds).\n */\nexport type FeedItem = Position & {\n /** The trader who made this trade. */\n actor: FeedActorSummary;\n /** Unix timestamp (seconds) when the feed item was created. */\n timestamp: number;\n /**\n * Latest author Call in the current intent phase. Absent on older social-api\n * builds; `null` when that phase has no comment.\n */\n authorComment?: AuthorComment | null;\n /** Author comments on this position. Absent on older social-api builds. */\n commentCount?: number;\n /** Replies across those comments. Absent on older social-api builds. */\n replyCount?: number;\n /**\n * Unix seconds of the position's first fill. Count from this to render a\n * live hold on a position that is still open, where {@link holdTimeMs} is\n * `null`. `null` when unknown. Absent on older social-api builds.\n */\n firstTradeAt?: number | null;\n /**\n * Final hold in milliseconds, first fill to last. Only set once the\n * position is closed; `null` while it is still running, because that span\n * grows every second — use {@link firstTradeAt} for those. Absent on older\n * social-api builds.\n */\n holdTimeMs?: number | null;\n /**\n * Average entry price in USD from remaining cost basis / remaining holding.\n * `null` when the position is flat. Absent on older social-api builds.\n */\n entryPriceUsd?: number | null;\n};\n\nexport type ReactToCommentOptions = {\n commentId: string;\n /** Emoji or short code (1–64 chars), e.g. `👍`. */\n emotion: string;\n};\n\nexport type RemoveCommentReactionOptions = {\n commentId: string;\n};\n\n/**\n * Identifies a swap that may not be indexed yet. Prefer {@link CreateSwapCommentOptions.positionUid}\n * when the client already has a feed or positions `positionId`.\n */\nexport type TradeInFlight = {\n transactionHash: string;\n chain: string;\n tokenAddress: string;\n};\n\n/**\n * Options for `POST /v1/swap-comments`. Provide exactly one of `positionUid`\n * or `tradeInFlight`; the social-api rejects a body that names both or neither.\n */\nexport type CreateSwapCommentOptions = {\n /**\n * Message body of the post. May include a `https://static.klipy.com/...gif`\n * file URL (the social-api allowlists that host); other links are rejected.\n */\n commentText: string;\n /** Free-form origin label stored on the comment. */\n source?: string;\n /**\n * Position UUID (`positionId` / feed `itemId`). The comment attaches to that\n * position's most recent trade, which must be the caller's own.\n */\n positionUid?: string;\n /** Swap made seconds ago that may not have a position yet. */\n tradeInFlight?: TradeInFlight;\n};\n\n/**\n * Author profile on a swap-comment write response. Matches social-api\n * `ProfileResponseV1`; extra fields from newer builds are allowed.\n */\nexport type SwapCommentAuthor = {\n id: string;\n name: string;\n images?: {\n raw: string | null;\n xs: string | null;\n sm: string | null;\n };\n addresses?: string[];\n externalId?: string;\n};\n\n/**\n * Response from `POST /v1/swap-comments`.\n */\nexport type SwapCommentResponse = {\n uid: string;\n transactionHash: string;\n chain: string;\n tokenAddress: string;\n commentText: string;\n author: SwapCommentAuthor;\n timestamp: number;\n isAppUserComment: boolean;\n metrics: CommentEngagement;\n};\n\n/**\n * Cursor pagination for the feed. Pass `olderCursor` back as `olderThan` to\n * load older items (infinite scroll), and `newerCursor` as `newerThan` to\n * fetch newer items. `null` when there are no items in that direction.\n */\nexport type FeedPagination = {\n olderCursor: string | null;\n newerCursor: string | null;\n};\n\n/**\n * Response from `GET /v1/feed`.\n */\nexport type FeedResponse = {\n items: FeedItem[];\n pagination: FeedPagination;\n};\n\n// ---------------------------------------------------------------------------\n// Followers\n// ---------------------------------------------------------------------------\n\n/**\n * Response from `GET /v1/users/me/followers` and bearer-authenticated\n * `GET /v1/traders/:addressOrId/followers` (optionally `?mutuals=true`).\n */\nexport type FollowersResponse = {\n followers: ProfileSummary[];\n count: number;\n};\n\n// ---------------------------------------------------------------------------\n// Following\n// ---------------------------------------------------------------------------\n\n/**\n * Response from `GET /v1/users/me/following` and bearer-authenticated\n * `GET /v1/traders/:addressOrId/following`.\n */\nexport type FollowingResponse = {\n following: ProfileSummary[];\n count: number;\n};\n\n// ---------------------------------------------------------------------------\n// Follow / Unfollow\n// ---------------------------------------------------------------------------\n\n/**\n * Response from `PUT /v1/users/me/follows`.\n */\nexport type FollowResponse = {\n followed: ProfileSummary[];\n};\n\n/**\n * Response from `DELETE /v1/users/me/follows`.\n */\nexport type UnfollowResponse = {\n unfollowed: ProfileSummary[];\n};\n\n// ---------------------------------------------------------------------------\n// Fetch options\n// ---------------------------------------------------------------------------\n\nexport type FetchLeaderboardOptions = {\n sort?: 'pnl' | 'winRate' | 'roi';\n chains?: string[];\n limit?: number;\n};\n\nexport type FetchTraderProfileOptions = {\n /** Wallet address or Clicker profile ID. */\n addressOrId: string;\n};\n\nexport type FetchPositionsOptions = {\n /** Wallet address or Clicker profile ID. */\n addressOrId: string;\n chain?: string;\n sort?: 'value' | 'latest';\n limit?: number;\n page?: number;\n};\n\nexport type FetchFollowersOptions = {\n /** Wallet address or Clicker profile ID. */\n addressOrId: string;\n /**\n * When true, requests `GET .../followers?mutuals=true` so `followers` are\n * profiles that follow both this trader and the authenticated user; `count` is\n * the mutual total. Omit or false returns the trader's full follower list.\n */\n mutuals?: boolean;\n};\n\nexport type FetchTraderFollowingOptions = {\n /** Wallet address or Clicker profile ID. */\n addressOrId: string;\n};\n\nexport type FetchTraderFeedOptions = {\n /** Wallet address or Clicker profile ID. */\n addressOrId: string;\n /**\n * When true, return only positions that carry an author comment.\n * Omitted from the request when false or unset (API default is false).\n */\n commentedOnly?: boolean;\n /** Number of results to return. */\n limit?: number;\n /** Cursor for older items (infinite scroll). Use `pagination.olderCursor`. */\n olderThan?: string;\n /** Cursor for newer items (pull to refresh). Use `pagination.newerCursor`. */\n newerThan?: string;\n};\n\n/**\n * Position status filter for a token feed.\n * Omit to return both open and recently closed positions.\n */\nexport type TokenFeedStatus = 'open' | 'closed';\n\n/**\n * Chain name accepted by `GET /v1/tokens/:chain/:contractAddress/feed`.\n */\nexport type TokenFeedChain =\n | 'base'\n | 'bsc'\n | 'ethereum'\n | 'hyperliquid'\n | 'robinhood'\n | 'solana';\n\n/**\n * Options for `GET /v1/tokens/:chain/:contractAddress/feed`.\n */\nexport type FetchTokenFeedOptions = {\n /** Chain name where the token is deployed. */\n chain: TokenFeedChain;\n /** Token contract address. */\n contractAddress: string;\n /**\n * Only open or only closed positions. Omit for both. Closed positions are\n * limited to the API's recent lookback.\n */\n status?: TokenFeedStatus;\n /** Number of results to return (1–100). Server default is 25. */\n limit?: number;\n /** Cursor for older items (infinite scroll). Use `pagination.olderCursor`. */\n olderThan?: string;\n /** Cursor for newer items (pull to refresh). Use `pagination.newerCursor`. */\n newerThan?: string;\n};\n\nexport type FetchFeedOptions = {\n /**\n * Which feed to fetch: `following` (personalized to the current user,\n * identified server-side from the JWT) or `leaderboard` (generic, shared by\n * all users). Defaults to `following` server-side when omitted.\n */\n scope?: 'following' | 'leaderboard';\n /**\n * Filter by one or more chains, given as CAIP-2 chain ids (e.g.\n * `eip155:8453`). Omit for the server defaults.\n */\n chains?: string[];\n /** Number of results to return. */\n limit?: number;\n /** Cursor for older items (infinite scroll). Use `pagination.olderCursor`. */\n olderThan?: string;\n /** Cursor for newer items (pull to refresh). Use `pagination.newerCursor`. */\n newerThan?: string;\n};\n\nexport type FetchPositionByIdOptions = {\n /** Unique position ID (UUID). */\n positionId: string;\n};\n\nexport type FollowOptions = {\n /** Array of wallet addresses or profile IDs to follow. */\n targets: string[];\n};\n\nexport type UnfollowOptions = {\n /** Array of wallet addresses or profile IDs to unfollow. */\n targets: string[];\n};\n\n// ---------------------------------------------------------------------------\n// Moderation blocks\n// ---------------------------------------------------------------------------\n\n/**\n * Options for `PUT /v1/moderation/block`. Provide exactly one target. Blocking\n * the same target again replaces `reason` when one is given.\n */\nexport type BlockOptions =\n | {\n /** Profile id (UUID) of the trader to block. */\n profileId: string;\n /** Free-form reason stored on the block. Max 1000 characters. */\n reason?: string;\n }\n | {\n /** Swap comment (post) to block. */\n commentId: string;\n /** Free-form reason stored on the block. Max 1000 characters. */\n reason?: string;\n }\n | {\n /** Comment reply to block. */\n replyId: string;\n /** Free-form reason stored on the block. Max 1000 characters. */\n reason?: string;\n };\n\n/**\n * Options for the cursor-paginated moderation list endpoints. Omit `cursor`\n * for the first page.\n */\nexport type FetchBlockedListOptions = {\n /** The `cursor` from the previous page. */\n cursor?: string;\n};\n\n/**\n * A trader the current user has blocked.\n */\nexport type BlockedProfile = {\n /** When the block was placed, in Unix epoch seconds. */\n blockedAt: number;\n /** Reason given when the block was placed, if any. */\n reason: string | null;\n /** The blocked trader. */\n profile: ProfileSummary;\n};\n\n/**\n * Response from `GET /v1/moderation/blocks/profiles`.\n */\nexport type BlockedProfilesResponse = {\n /** Blocked traders, most recently blocked first. */\n items: BlockedProfile[];\n /** Pass as `cursor` for the next page. `null` on the last page. */\n cursor: string | null;\n};\n\n/**\n * Whether a blocked content row is a swap comment or a reply.\n */\nexport type BlockedContentType = 'comment' | 'reply';\n\n/**\n * A comment or reply the current user has blocked.\n */\nexport type BlockedContent = {\n /** When the block was placed, in Unix epoch seconds. */\n blockedAt: number;\n /** Reason given when the block was placed, if any. */\n reason: string | null;\n /** Whether `id` refers to a swap comment or a reply. */\n type: BlockedContentType;\n /** Comment or reply id (UUID). */\n id: string;\n /** Text of the blocked comment or reply. */\n text: string;\n /** When the content was posted, in Unix epoch seconds. */\n createdAt: number;\n /** Author of the content. `null` when the profile cannot be resolved. */\n author: ProfileSummary | null;\n};\n\n/**\n * Response from `GET /v1/moderation/blocks/content`.\n */\nexport type BlockedContentResponse = {\n /** Blocked comments and replies, most recently blocked first. */\n items: BlockedContent[];\n /** Pass as `cursor` for the next page. `null` on the last page. */\n cursor: string | null;\n};\n\n// ---------------------------------------------------------------------------\n// Controller state\n// ---------------------------------------------------------------------------\n\n/**\n * State managed by the SocialController.\n *\n * The controller acts as a simple store — no TTL or eviction logic.\n * The UI decides when to re-fetch; the social-api's own cache layer\n * handles upstream rate-limiting.\n */\nexport type SocialControllerState = {\n /** Cached ranked trader list from the last `updateLeaderboard` call. */\n leaderboardEntries: LeaderboardEntry[];\n /** Wallet addresses the current user follows. */\n followingAddresses: string[];\n /** Clicker profile IDs the current user follows — used by mobile UI. */\n followingProfileIds: string[];\n};\n"]}
1
+ {"version":3,"file":"social-types.js","sourceRoot":"","sources":["../src/social-types.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,MAAM,EACN,IAAI,IAAI,UAAU,GACnB,MAAM,uBAAuB,CAAC;AA4D/B,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;IACpC,SAAS,EAAE,KAAK,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAChC;;;OAGG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjE,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC5B,8EAA8E;IAC9E,cAAc,EAAE,QAAQ,CACtB,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CACrD;IACD,uDAAuD;IACvD,gBAAgB,EAAE,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC9D,8EAA8E;IAC9E,YAAY,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1C,WAAW,EAAE,MAAM,EAAE;IACrB,OAAO,EAAE,MAAM,EAAE;IACjB,8EAA8E;IAC9E,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACvC,SAAS,EAAE,MAAM,EAAE;IACnB,eAAe,EAAE,MAAM,EAAE;CAC1B,CAAC,CAAC;AAuCH,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E,qEAAqE;AACrE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC","sourcesContent":["import type { Infer } from '@metamask/superstruct';\nimport {\n enums,\n nullable,\n number,\n optional,\n string,\n type as structType,\n} from '@metamask/superstruct';\n\n// ---------------------------------------------------------------------------\n// Shared sub-types\n// ---------------------------------------------------------------------------\n\n/**\n * Minimal profile summary used across follow/follower responses.\n */\nexport type ProfileSummary = {\n /** Clicker profile ID (UUID). */\n profileId: string;\n /** Primary wallet address. */\n address: string;\n /** Display name or truncated address. */\n name: string;\n /** Profile avatar URL. */\n imageUrl?: string | null;\n};\n\n/**\n * Trader attached to a feed item. Extends {@link ProfileSummary} with the\n * profile stats the feed hydrator already loaded and used to drop.\n *\n * Every field is optional: a social-api that predates them omits the keys,\n * and `null` means the window has no data (distinct from \"not sent\").\n */\nexport type FeedActorSummary = ProfileSummary & {\n /** 30-day win rate as a 0–1 ratio. */\n winRate30d?: number | null;\n /** 30-day realized PnL in USD. */\n pnl30d?: number | null;\n /** 30-day sell count behind `winRate30d`. */\n tradeCount30d?: number | null;\n /** Profiles following this trader. */\n followerCount?: number | null;\n};\n\n/**\n * Social media handles attached to a trader profile.\n */\nexport type SocialHandles = {\n twitter?: string | null;\n farcaster?: string | null;\n ens?: string | null;\n lens?: string | null;\n};\n\n/**\n * Where a fill sits in its position's lifecycle.\n *\n * Deliberately asset-agnostic so the classification is computed once, upstream:\n * clients render `opened / added / reduced / closed` for perps and\n * `bought / bought more / sold some / sold all` for spot from the same value.\n *\n * Distinct from `intent`, which only says whether the fill grew or shrank the\n * position — `intent: 'exit'` covers both a partial trim and a full close.\n */\nexport type TradeAction = 'opened' | 'added' | 'reduced' | 'closed';\n\nexport const TradeStruct = structType({\n direction: enums(['buy', 'sell']),\n intent: enums(['enter', 'exit']),\n /**\n * Lifecycle stage of this fill. Absent on responses from a social-api that\n * predates the field, so treat it as a hint and keep a client-side fallback.\n */\n action: optional(enums(['opened', 'added', 'reduced', 'closed'])),\n category: optional(string()),\n /** High-level trade classification. `null` when Clicker does not classify. */\n classification: optional(\n nullable(enums(['spot', 'perp', 'send', 'receive'])),\n ),\n /** Perp side for this fill. `null` for spot trades. */\n perpPositionType: optional(nullable(enums(['long', 'short']))),\n /** Leverage multiplier for perp trades (e.g. `5` for 5x). `null` for spot. */\n perpLeverage: optional(nullable(number())),\n tokenAmount: number(),\n usdCost: number(),\n /** Token market cap in USD at trade time. `null` when Clicker has no mark. */\n marketCap: optional(nullable(number())),\n timestamp: number(),\n transactionHash: string(),\n});\n\nexport type Trade = Infer<typeof TradeStruct>;\n\n// ---------------------------------------------------------------------------\n// Leaderboard\n// ---------------------------------------------------------------------------\n\n/**\n * A single entry in the leaderboard response.\n */\nexport type LeaderboardEntry = {\n rank: number;\n addresses: string[];\n profileId: string;\n name: string;\n imageUrl?: string | null;\n pnl30d: number;\n winRate30d?: number | null;\n /** Renamed from roi30d. */\n roiPercent30d?: number | null;\n /** Renamed from tradeCount. */\n tradeCount30d?: number | null;\n pnl7d?: number | null;\n winRate7d?: number | null;\n roiPercent7d?: number | null;\n tradeCount7d?: number | null;\n pnlPerChain: Record<string, number>;\n followerCount: number;\n socialHandles: SocialHandles;\n};\n\n/**\n * Response from `GET /v1/leaderboard`.\n */\nexport type LeaderboardResponse = {\n traders: LeaderboardEntry[];\n};\n\n// ---------------------------------------------------------------------------\n// Trader profile\n// ---------------------------------------------------------------------------\n\n/** Values for `TraderProfileResponse.rankingTag` from social-api. */\nexport const TRADER_RANKING_TAGS = ['shrimp', 'dolphin', 'whale'] as const;\n\nexport type TraderRankingTag = (typeof TRADER_RANKING_TAGS)[number];\n\nexport type TraderProfile = {\n profileId: string;\n address: string;\n allAddresses: string[];\n name: string;\n imageUrl?: string | null;\n /**\n * When the social-api profile row was created, as an ISO-8601 timestamp.\n * Omitted on older social-api builds. This is the row insert time, which can\n * predate the trader claiming a username and avatar.\n */\n createdAt?: string | null;\n};\n\nexport type TraderStats = {\n pnl30d?: number | null;\n winRate30d?: number | null;\n /** Renamed from roi30d. */\n roiPercent30d?: number | null;\n /** Renamed from tradeCount. */\n tradeCount30d?: number | null;\n /** 30-day trading volume in USD. */\n volumeUsd30d?: number | null;\n pnl7d?: number | null;\n winRate7d?: number | null;\n roiPercent7d?: number | null;\n tradeCount7d?: number | null;\n /** Median holding time in minutes. */\n medianHoldMinutes?: number | null;\n};\n\nexport type CopytradedAllTime = {\n count: number;\n volumeUSD: number;\n distinctActors: number;\n};\n\nexport type PerChainBreakdown = {\n perChainPnl: Record<string, number>;\n /** ROI can be null for chains with no trading activity (zero cost-basis). */\n perChainRoi: Record<string, number | null>;\n perChainVolume: Record<string, number>;\n /**\n * 7-day per-chain PnL in USD. Optional: older social-api versions only\n * return the 30-day breakdown (`perChainPnl`). The unsuffixed fields above\n * remain the 30-day window for backward compatibility.\n */\n perChainPnl7d?: Record<string, number>;\n /** 7-day per-chain ROI. Null for chains with no trading activity. */\n perChainRoi7d?: Record<string, number | null>;\n /** 7-day per-chain volume in USD. */\n perChainVolume7d?: Record<string, number>;\n};\n\n/**\n * Response from `GET /v1/traders/:addressOrId/profile`.\n */\nexport type TraderProfileResponse = {\n profile: TraderProfile;\n stats: TraderStats;\n perChainBreakdown: PerChainBreakdown;\n socialHandles: SocialHandles;\n followerCount: number;\n followingCount: number;\n /**\n * Linked copy-swap stats for this trader. Social-api always sends zeros\n * when there are none.\n */\n copytradedAllTime: CopytradedAllTime;\n /**\n * Backend-derived tier from the Auth primary account 30d PnL. Omitted on older\n * social-api builds; `null` when unclaimed or activity is insufficient.\n */\n rankingTag?: TraderRankingTag | null;\n};\n\n// ---------------------------------------------------------------------------\n// Positions\n// ---------------------------------------------------------------------------\n\nexport type Position = {\n positionId: string;\n tokenSymbol: string;\n tokenName: string;\n tokenAddress: string;\n chain: string;\n positionAmount: number;\n /**\n * Whether the position still carries exposure. Clicker's own verdict, which\n * beats a `positionAmount === 0` check: it survives precision dust and\n * distinguishes \"no position\" from \"a position of size ~0\". Absent on\n * responses from a social-api that predates the field.\n */\n isOpen?: boolean;\n /**\n * Total USD spent buying into the position. `null` when Clicker stats are\n * incomplete (the social-api used to JSON-serialize `NaN` as `null`).\n */\n boughtUsd: number | null;\n /** Total USD received from sells. `null` when stats are incomplete. */\n soldUsd: number | null;\n /** Realized profit or loss in USD. `null` when stats are incomplete. */\n realizedPnl: number | null;\n /**\n * USD cost basis of the remaining holdings. `null` when stats are incomplete.\n */\n costBasis: number | null;\n trades: Trade[];\n lastTradeAt: number;\n /** Daylight-hosted token image URL. */\n tokenImageUrl?: string | null;\n /** Current USD value of the remaining position (open positions only). */\n currentValueUSD?: number | null;\n /** Unrealized + realized PnL in USD. */\n pnlValueUsd?: number | null;\n /** PnL as a percentage of cost basis. */\n pnlPercent?: number | null;\n /** Number of detected copy trades for this position. */\n copyCount?: number;\n /** Perp side of the position. `null`/absent for spot positions. */\n perpPositionType?: 'long' | 'short' | null;\n /** Leverage multiplier for perp positions. `null`/absent for spot. */\n perpLeverage?: number | null;\n /**\n * Leveraged/notional position size as reported by Clicker. NOT necessarily\n * `positionAmount` × `perpLeverage` — the ratio varies for positions built\n * across fills at different leverage, so use this field directly rather than\n * deriving it, and treat `perpLeverage` as the authoritative leverage. This is\n * notional exposure, not capital at risk (the margin/capital at risk is\n * `costBasis`). Hyperliquid/perp positions only; absent for spot.\n */\n positionAmountWithLeverage?: number | null;\n};\n\nexport type Pagination = {\n hasMore: boolean;\n nextPage?: number;\n};\n\n/**\n * Response from `GET /v1/traders/:addressOrId/positions/open`\n * and `GET /v1/traders/:addressOrId/positions/closed`.\n */\nexport type PositionsResponse = {\n positions: Position[];\n pagination: Pagination;\n /** ISO 8601 timestamp indicating when the response was computed server-side. */\n computedAt?: string | null;\n};\n\n// ---------------------------------------------------------------------------\n// Feed\n// ---------------------------------------------------------------------------\n\n/**\n * One emotion's aggregated count on a Call (swap comment), plus an optional\n * facepile sample. `profiles` is always present on the wire and is often empty.\n */\nexport type CommentReaction = {\n emotion: string;\n count: number;\n profiles: CommentReactionProfile[];\n};\n\nexport type CommentReactionProfile = {\n id: string;\n name: string;\n};\n\n/**\n * Engagement on a Call. Counts live on `reactions`; do not read deprecated\n * `likeCount` / `isLikedByUser` even if the social-api still emits them as 0/false.\n */\nexport type CommentEngagement = {\n reactions: CommentReaction[];\n /** Viewer's own emotion, when the hydrator was given their profile. */\n userReaction: string | null;\n /** Reply count on the comment. Present on feed `authorComment`, not on write responses. */\n replyCount?: number;\n};\n\n/**\n * Position thesis for the feed big card. `null` when that intent phase has no Call.\n */\nexport type AuthorComment = {\n uid: string;\n text: string;\n /** Unix timestamp (seconds) when the comment was created. */\n timestamp: number;\n engagement: CommentEngagement;\n};\n\n/**\n * A single trader-activity feed item: a {@link Position} the trade belongs to,\n * plus the {@link FeedActorSummary} of the trader who made it (`actor`) and the\n * item's creation `timestamp` (Unix seconds).\n */\nexport type FeedItem = Position & {\n /** The trader who made this trade. */\n actor: FeedActorSummary;\n /** Unix timestamp (seconds) when the feed item was created. */\n timestamp: number;\n /**\n * Latest author Call in the current intent phase. Absent on older social-api\n * builds; `null` when that phase has no comment.\n */\n authorComment?: AuthorComment | null;\n /** Author comments on this position. Absent on older social-api builds. */\n commentCount?: number;\n /** Replies across those comments. Absent on older social-api builds. */\n replyCount?: number;\n /** Detected copies of this position. Absent on older social-api builds. */\n copyCount?: number;\n /**\n * Unix seconds of the position's first fill. Count from this to render a\n * live hold on a position that is still open, where {@link holdTimeMs} is\n * `null`. `null` when unknown. Absent on older social-api builds.\n */\n firstTradeAt?: number | null;\n /**\n * Final hold in milliseconds, first fill to last. Only set once the\n * position is closed; `null` while it is still running, because that span\n * grows every second — use {@link firstTradeAt} for those. Absent on older\n * social-api builds.\n */\n holdTimeMs?: number | null;\n /**\n * Average entry price in USD from remaining cost basis / remaining holding.\n * `null` when the position is flat. Absent on older social-api builds.\n */\n entryPriceUsd?: number | null;\n /** Stable event ID for the shared feed-all projection. */\n eventId?: string;\n /** Projection revision for the shared feed-all item. */\n revision?: number;\n /** ISO timestamp for the shared feed-all projection event. */\n occurredAt?: string;\n};\n\nexport type ReactToCommentOptions = {\n commentId: string;\n /** Emoji or short code (1–64 chars), e.g. `👍`. */\n emotion: string;\n};\n\nexport type RemoveCommentReactionOptions = {\n commentId: string;\n};\n\n/**\n * Identifies a swap that may not be indexed yet. Prefer {@link CreateSwapCommentOptions.positionUid}\n * when the client already has a feed or positions `positionId`.\n */\nexport type TradeInFlight = {\n transactionHash: string;\n chain: string;\n tokenAddress: string;\n};\n\n/**\n * Options for `POST /v1/swap-comments`. Provide exactly one of `positionUid`\n * or `tradeInFlight`; the social-api rejects a body that names both or neither.\n */\nexport type CreateSwapCommentOptions = {\n /**\n * Message body of the post. May include a `https://static.klipy.com/...gif`\n * file URL (the social-api allowlists that host); other links are rejected.\n */\n commentText: string;\n /** Free-form origin label stored on the comment. */\n source?: string;\n /**\n * Position UUID (`positionId` / feed `itemId`). The comment attaches to that\n * position's most recent trade, which must be the caller's own.\n */\n positionUid?: string;\n /** Swap made seconds ago that may not have a position yet. */\n tradeInFlight?: TradeInFlight;\n};\n\n/**\n * Author profile on a swap-comment write response. Matches social-api\n * `ProfileResponseV1`; extra fields from newer builds are allowed.\n */\nexport type SwapCommentAuthor = {\n id: string;\n name: string;\n images?: {\n raw: string | null;\n xs: string | null;\n sm: string | null;\n };\n addresses?: string[];\n externalId?: string;\n};\n\n/**\n * Response from `POST /v1/swap-comments`.\n */\nexport type SwapCommentResponse = {\n uid: string;\n transactionHash: string;\n chain: string;\n tokenAddress: string;\n commentText: string;\n author: SwapCommentAuthor;\n timestamp: number;\n isAppUserComment: boolean;\n metrics: CommentEngagement;\n};\n\n// ---------------------------------------------------------------------------\n// Copy-trade intents\n// ---------------------------------------------------------------------------\n\n/**\n * Social resource a copy trade was started from. Only comments are supported.\n */\nexport type CopyTradeOrigin = {\n kind: 'comment';\n /** Comment UUID. */\n id: string;\n};\n\n/**\n * Trade being copied. Swaps are identified by their Bridge quote id, perps by\n * the Hyperliquid order id returned on submission.\n */\nexport type CopyTradeExecution =\n | { product: 'swaps'; quoteId: string }\n | { product: 'perps'; oid: string };\n\n/**\n * Options for `POST /v1/copy-trade-intents`.\n */\nexport type CreateCopyTradeIntentOptions = {\n origin: CopyTradeOrigin;\n copierAccount: {\n /**\n * CAIP-10 id of the account placing the trade. The social-api verifies it\n * belongs to the authenticated profile.\n */\n caip10: string;\n };\n execution: CopyTradeExecution;\n};\n\n/**\n * Account on a copy-trade intent response.\n */\nexport type CopyTradeAccount = {\n profileId: string;\n caip10: string;\n};\n\n/**\n * Payout eligibility snapshotted when the intent is created. `reason` is one\n * of `comment_source`, `source_account_unavailable`, or `unknown_reason`;\n * newer social-api builds may add more.\n */\nexport type CopyTradePayoutEligibility = {\n status: 'payable' | 'non_payable';\n reason: string;\n};\n\n/**\n * Response from `POST /v1/copy-trade-intents`. The endpoint is idempotent, so\n * a retry returns the existing intent.\n */\nexport type CopyTradeIntentResponse = {\n id: string;\n origin: CopyTradeOrigin;\n copierAccount: CopyTradeAccount;\n sourceAccount: CopyTradeAccount | null;\n execution: CopyTradeExecution;\n payoutEligibility: CopyTradePayoutEligibility;\n /** ISO 8601 timestamp. */\n createdAt: string;\n};\n\n/**\n * Cursor pagination for the feed. Pass `olderCursor` back as `olderThan` to\n * load older items (infinite scroll), and `newerCursor` as `newerThan` to\n * fetch newer items. `null` when there are no items in that direction.\n */\nexport type FeedPagination = {\n olderCursor: string | null;\n newerCursor: string | null;\n};\n\n/**\n * Response from `GET /v1/feed`.\n */\nexport type FeedResponse = {\n items: FeedItem[];\n pagination: FeedPagination;\n};\n\n// ---------------------------------------------------------------------------\n// Followers\n// ---------------------------------------------------------------------------\n\n/**\n * Response from `GET /v1/users/me/followers` and bearer-authenticated\n * `GET /v1/traders/:addressOrId/followers` (optionally `?mutuals=true`).\n */\nexport type FollowersResponse = {\n followers: ProfileSummary[];\n count: number;\n};\n\n// ---------------------------------------------------------------------------\n// Following\n// ---------------------------------------------------------------------------\n\n/**\n * Response from `GET /v1/users/me/following` and bearer-authenticated\n * `GET /v1/traders/:addressOrId/following`.\n */\nexport type FollowingResponse = {\n following: ProfileSummary[];\n count: number;\n};\n\n// ---------------------------------------------------------------------------\n// Follow / Unfollow\n// ---------------------------------------------------------------------------\n\n/**\n * Response from `PUT /v1/users/me/follows`.\n */\nexport type FollowResponse = {\n followed: ProfileSummary[];\n};\n\n/**\n * Response from `DELETE /v1/users/me/follows`.\n */\nexport type UnfollowResponse = {\n unfollowed: ProfileSummary[];\n};\n\n// ---------------------------------------------------------------------------\n// Fetch options\n// ---------------------------------------------------------------------------\n\nexport type FetchLeaderboardOptions = {\n sort?: 'pnl' | 'winRate' | 'roi';\n chains?: string[];\n limit?: number;\n};\n\nexport type FetchTraderProfileOptions = {\n /** Wallet address or Clicker profile ID. */\n addressOrId: string;\n};\n\nexport type FetchPositionsOptions = {\n /** Wallet address or Clicker profile ID. */\n addressOrId: string;\n chain?: string;\n sort?: 'value' | 'latest';\n limit?: number;\n page?: number;\n};\n\nexport type FetchFollowersOptions = {\n /** Wallet address or Clicker profile ID. */\n addressOrId: string;\n /**\n * When true, requests `GET .../followers?mutuals=true` so `followers` are\n * profiles that follow both this trader and the authenticated user; `count` is\n * the mutual total. Omit or false returns the trader's full follower list.\n */\n mutuals?: boolean;\n};\n\nexport type FetchTraderFollowingOptions = {\n /** Wallet address or Clicker profile ID. */\n addressOrId: string;\n};\n\nexport type FetchTraderFeedOptions = {\n /** Wallet address or Clicker profile ID. */\n addressOrId: string;\n /**\n * When true, return only positions that carry an author comment.\n * Omitted from the request when false or unset (API default is false).\n */\n commentedOnly?: boolean;\n /** Number of results to return. */\n limit?: number;\n /** Cursor for older items (infinite scroll). Use `pagination.olderCursor`. */\n olderThan?: string;\n /** Cursor for newer items (pull to refresh). Use `pagination.newerCursor`. */\n newerThan?: string;\n};\n\n/**\n * Position status filter for a token feed.\n * Omit to return both open and recently closed positions.\n */\nexport type TokenFeedStatus = 'open' | 'closed';\n\n/**\n * Chain name accepted by `GET /v1/tokens/:chain/:contractAddress/feed`.\n */\nexport type TokenFeedChain =\n | 'base'\n | 'bsc'\n | 'ethereum'\n | 'hyperliquid'\n | 'robinhood'\n | 'solana';\n\n/**\n * Options for `GET /v1/tokens/:chain/:contractAddress/feed`.\n */\nexport type FetchTokenFeedOptions = {\n /** Chain name where the token is deployed. */\n chain: TokenFeedChain;\n /** Token contract address. */\n contractAddress: string;\n /**\n * Only open or only closed positions. Omit for both. Closed positions are\n * limited to the API's recent lookback.\n */\n status?: TokenFeedStatus;\n /** Number of results to return (1–100). Server default is 25. */\n limit?: number;\n /** Cursor for older items (infinite scroll). Use `pagination.olderCursor`. */\n olderThan?: string;\n /** Cursor for newer items (pull to refresh). Use `pagination.newerCursor`. */\n newerThan?: string;\n};\n\nexport type FetchFeedOptions = {\n /**\n * Which feed to fetch: `following` (personalized to the current user,\n * identified server-side from the JWT), `leaderboard` (generic, shared by\n * all users), or `all` (the shared feed-all projection). Defaults to\n * `following` server-side when omitted.\n */\n scope?: FeedScope;\n /**\n * Filter by one or more chains, given as CAIP-2 chain ids (e.g.\n * `eip155:8453`). Omit for the server defaults.\n */\n chains?: string[];\n /** Number of results to return. */\n limit?: number;\n /** Cursor for older items (infinite scroll). Use `pagination.olderCursor`. */\n olderThan?: string;\n /** Cursor for newer items (pull to refresh). Use `pagination.newerCursor`. */\n newerThan?: string;\n};\n\nexport type FeedScope = 'following' | 'leaderboard' | 'all' | 'trending';\n\nexport type FetchPositionByIdOptions = {\n /** Unique position ID (UUID). */\n positionId: string;\n};\n\nexport type FollowOptions = {\n /** Array of wallet addresses or profile IDs to follow. */\n targets: string[];\n};\n\nexport type UnfollowOptions = {\n /** Array of wallet addresses or profile IDs to unfollow. */\n targets: string[];\n};\n\n// ---------------------------------------------------------------------------\n// Moderation blocks\n// ---------------------------------------------------------------------------\n\n/**\n * Options for `PUT /v1/moderation/block`. Provide exactly one target. Blocking\n * the same target again replaces `reason` when one is given.\n */\nexport type BlockOptions =\n | {\n /** Profile id (UUID) of the trader to block. */\n profileId: string;\n /** Free-form reason stored on the block. Max 1000 characters. */\n reason?: string;\n }\n | {\n /** Swap comment (post) to block. */\n commentId: string;\n /** Free-form reason stored on the block. Max 1000 characters. */\n reason?: string;\n }\n | {\n /** Comment reply to block. */\n replyId: string;\n /** Free-form reason stored on the block. Max 1000 characters. */\n reason?: string;\n };\n\n/**\n * Options for the cursor-paginated moderation list endpoints. Omit `cursor`\n * for the first page.\n */\nexport type FetchBlockedListOptions = {\n /** The `cursor` from the previous page. */\n cursor?: string;\n};\n\n/**\n * A trader the current user has blocked.\n */\nexport type BlockedProfile = {\n /** When the block was placed, in Unix epoch seconds. */\n blockedAt: number;\n /** Reason given when the block was placed, if any. */\n reason: string | null;\n /** The blocked trader. */\n profile: ProfileSummary;\n};\n\n/**\n * Response from `GET /v1/moderation/blocks/profiles`.\n */\nexport type BlockedProfilesResponse = {\n /** Blocked traders, most recently blocked first. */\n items: BlockedProfile[];\n /** Pass as `cursor` for the next page. `null` on the last page. */\n cursor: string | null;\n};\n\n/**\n * Whether a blocked content row is a swap comment or a reply.\n */\nexport type BlockedContentType = 'comment' | 'reply';\n\n/**\n * A comment or reply the current user has blocked.\n */\nexport type BlockedContent = {\n /** When the block was placed, in Unix epoch seconds. */\n blockedAt: number;\n /** Reason given when the block was placed, if any. */\n reason: string | null;\n /** Whether `id` refers to a swap comment or a reply. */\n type: BlockedContentType;\n /** Comment or reply id (UUID). */\n id: string;\n /** Text of the blocked comment or reply. */\n text: string;\n /** When the content was posted, in Unix epoch seconds. */\n createdAt: number;\n /** Author of the content. `null` when the profile cannot be resolved. */\n author: ProfileSummary | null;\n};\n\n/**\n * Response from `GET /v1/moderation/blocks/content`.\n */\nexport type BlockedContentResponse = {\n /** Blocked comments and replies, most recently blocked first. */\n items: BlockedContent[];\n /** Pass as `cursor` for the next page. `null` on the last page. */\n cursor: string | null;\n};\n\n// ---------------------------------------------------------------------------\n// Controller state\n// ---------------------------------------------------------------------------\n\n/**\n * State managed by the SocialController.\n *\n * The controller acts as a simple store — no TTL or eviction logic.\n * The UI decides when to re-fetch; the social-api's own cache layer\n * handles upstream rate-limiting.\n */\nexport type SocialControllerState = {\n /** Cached ranked trader list from the last `updateLeaderboard` call. */\n leaderboardEntries: LeaderboardEntry[];\n /** Wallet addresses the current user follows. */\n followingAddresses: string[];\n /** Clicker profile IDs the current user follows — used by mobile UI. */\n followingProfileIds: string[];\n};\n"]}