@metamask/social-controllers 3.5.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -1
- package/dist/SocialRealtimeService.d.ts +1 -1
- package/dist/SocialRealtimeService.d.ts.map +1 -1
- package/dist/SocialRealtimeService.js +13 -6
- package/dist/SocialRealtimeService.js.map +1 -1
- package/dist/SocialService-method-action-types.d.ts +98 -2
- package/dist/SocialService-method-action-types.d.ts.map +1 -1
- package/dist/SocialService-method-action-types.js.map +1 -1
- package/dist/SocialService.d.ts +80 -2
- package/dist/SocialService.d.ts.map +1 -1
- package/dist/SocialService.js +261 -33
- package/dist/SocialService.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/social-constants.d.ts +9 -0
- package/dist/social-constants.d.ts.map +1 -1
- package/dist/social-constants.js +9 -0
- package/dist/social-constants.js.map +1 -1
- package/dist/social-types.d.ts +107 -6
- package/dist/social-types.d.ts.map +1 -1
- package/dist/social-types.js.map +1 -1
- package/package.json +5 -5
package/dist/social-types.d.ts
CHANGED
|
@@ -215,10 +215,19 @@ export type Position = {
|
|
|
215
215
|
* responses from a social-api that predates the field.
|
|
216
216
|
*/
|
|
217
217
|
isOpen?: boolean;
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
218
|
+
/**
|
|
219
|
+
* Total USD spent buying into the position. `null` when Clicker stats are
|
|
220
|
+
* incomplete (the social-api used to JSON-serialize `NaN` as `null`).
|
|
221
|
+
*/
|
|
222
|
+
boughtUsd: number | null;
|
|
223
|
+
/** Total USD received from sells. `null` when stats are incomplete. */
|
|
224
|
+
soldUsd: number | null;
|
|
225
|
+
/** Realized profit or loss in USD. `null` when stats are incomplete. */
|
|
226
|
+
realizedPnl: number | null;
|
|
227
|
+
/**
|
|
228
|
+
* USD cost basis of the remaining holdings. `null` when stats are incomplete.
|
|
229
|
+
*/
|
|
230
|
+
costBasis: number | null;
|
|
222
231
|
trades: Trade[];
|
|
223
232
|
lastTradeAt: number;
|
|
224
233
|
/** Daylight-hosted token image URL. */
|
|
@@ -412,14 +421,16 @@ export type FeedResponse = {
|
|
|
412
421
|
pagination: FeedPagination;
|
|
413
422
|
};
|
|
414
423
|
/**
|
|
415
|
-
* Response from `GET /v1/
|
|
424
|
+
* Response from `GET /v1/users/me/followers` and bearer-authenticated
|
|
425
|
+
* `GET /v1/traders/:addressOrId/followers` (optionally `?mutuals=true`).
|
|
416
426
|
*/
|
|
417
427
|
export type FollowersResponse = {
|
|
418
428
|
followers: ProfileSummary[];
|
|
419
429
|
count: number;
|
|
420
430
|
};
|
|
421
431
|
/**
|
|
422
|
-
* Response from `GET /v1/users/me/following
|
|
432
|
+
* Response from `GET /v1/users/me/following` and bearer-authenticated
|
|
433
|
+
* `GET /v1/traders/:addressOrId/following`.
|
|
423
434
|
*/
|
|
424
435
|
export type FollowingResponse = {
|
|
425
436
|
following: ProfileSummary[];
|
|
@@ -457,6 +468,16 @@ export type FetchPositionsOptions = {
|
|
|
457
468
|
export type FetchFollowersOptions = {
|
|
458
469
|
/** Wallet address or Clicker profile ID. */
|
|
459
470
|
addressOrId: string;
|
|
471
|
+
/**
|
|
472
|
+
* When true, requests `GET .../followers?mutuals=true` so `followers` are
|
|
473
|
+
* profiles that follow both this trader and the authenticated user; `count` is
|
|
474
|
+
* the mutual total. Omit or false returns the trader's full follower list.
|
|
475
|
+
*/
|
|
476
|
+
mutuals?: boolean;
|
|
477
|
+
};
|
|
478
|
+
export type FetchTraderFollowingOptions = {
|
|
479
|
+
/** Wallet address or Clicker profile ID. */
|
|
480
|
+
addressOrId: string;
|
|
460
481
|
};
|
|
461
482
|
export type FetchTraderFeedOptions = {
|
|
462
483
|
/** Wallet address or Clicker profile ID. */
|
|
@@ -533,6 +554,86 @@ export type UnfollowOptions = {
|
|
|
533
554
|
/** Array of wallet addresses or profile IDs to unfollow. */
|
|
534
555
|
targets: string[];
|
|
535
556
|
};
|
|
557
|
+
/**
|
|
558
|
+
* Options for `PUT /v1/moderation/block`. Provide exactly one target. Blocking
|
|
559
|
+
* the same target again replaces `reason` when one is given.
|
|
560
|
+
*/
|
|
561
|
+
export type BlockOptions = {
|
|
562
|
+
/** Profile id (UUID) of the trader to block. */
|
|
563
|
+
profileId: string;
|
|
564
|
+
/** Free-form reason stored on the block. Max 1000 characters. */
|
|
565
|
+
reason?: string;
|
|
566
|
+
} | {
|
|
567
|
+
/** Swap comment (post) to block. */
|
|
568
|
+
commentId: string;
|
|
569
|
+
/** Free-form reason stored on the block. Max 1000 characters. */
|
|
570
|
+
reason?: string;
|
|
571
|
+
} | {
|
|
572
|
+
/** Comment reply to block. */
|
|
573
|
+
replyId: string;
|
|
574
|
+
/** Free-form reason stored on the block. Max 1000 characters. */
|
|
575
|
+
reason?: string;
|
|
576
|
+
};
|
|
577
|
+
/**
|
|
578
|
+
* Options for the cursor-paginated moderation list endpoints. Omit `cursor`
|
|
579
|
+
* for the first page.
|
|
580
|
+
*/
|
|
581
|
+
export type FetchBlockedListOptions = {
|
|
582
|
+
/** The `cursor` from the previous page. */
|
|
583
|
+
cursor?: string;
|
|
584
|
+
};
|
|
585
|
+
/**
|
|
586
|
+
* A trader the current user has blocked.
|
|
587
|
+
*/
|
|
588
|
+
export type BlockedProfile = {
|
|
589
|
+
/** When the block was placed, in Unix epoch seconds. */
|
|
590
|
+
blockedAt: number;
|
|
591
|
+
/** Reason given when the block was placed, if any. */
|
|
592
|
+
reason: string | null;
|
|
593
|
+
/** The blocked trader. */
|
|
594
|
+
profile: ProfileSummary;
|
|
595
|
+
};
|
|
596
|
+
/**
|
|
597
|
+
* Response from `GET /v1/moderation/blocks/profiles`.
|
|
598
|
+
*/
|
|
599
|
+
export type BlockedProfilesResponse = {
|
|
600
|
+
/** Blocked traders, most recently blocked first. */
|
|
601
|
+
items: BlockedProfile[];
|
|
602
|
+
/** Pass as `cursor` for the next page. `null` on the last page. */
|
|
603
|
+
cursor: string | null;
|
|
604
|
+
};
|
|
605
|
+
/**
|
|
606
|
+
* Whether a blocked content row is a swap comment or a reply.
|
|
607
|
+
*/
|
|
608
|
+
export type BlockedContentType = 'comment' | 'reply';
|
|
609
|
+
/**
|
|
610
|
+
* A comment or reply the current user has blocked.
|
|
611
|
+
*/
|
|
612
|
+
export type BlockedContent = {
|
|
613
|
+
/** When the block was placed, in Unix epoch seconds. */
|
|
614
|
+
blockedAt: number;
|
|
615
|
+
/** Reason given when the block was placed, if any. */
|
|
616
|
+
reason: string | null;
|
|
617
|
+
/** Whether `id` refers to a swap comment or a reply. */
|
|
618
|
+
type: BlockedContentType;
|
|
619
|
+
/** Comment or reply id (UUID). */
|
|
620
|
+
id: string;
|
|
621
|
+
/** Text of the blocked comment or reply. */
|
|
622
|
+
text: string;
|
|
623
|
+
/** When the content was posted, in Unix epoch seconds. */
|
|
624
|
+
createdAt: number;
|
|
625
|
+
/** Author of the content. `null` when the profile cannot be resolved. */
|
|
626
|
+
author: ProfileSummary | null;
|
|
627
|
+
};
|
|
628
|
+
/**
|
|
629
|
+
* Response from `GET /v1/moderation/blocks/content`.
|
|
630
|
+
*/
|
|
631
|
+
export type BlockedContentResponse = {
|
|
632
|
+
/** Blocked comments and replies, most recently blocked first. */
|
|
633
|
+
items: BlockedContent[];
|
|
634
|
+
/** Pass as `cursor` for the next page. `null` on the last page. */
|
|
635
|
+
cursor: string | null;
|
|
636
|
+
};
|
|
536
637
|
/**
|
|
537
638
|
* State managed by the SocialController.
|
|
538
639
|
*
|
|
@@ -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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AAG,IAAI,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,OAAO,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,wDAAwD;IACxD,IAAI,EAAE,kBAAkB,CAAC;IACzB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,iEAAiE;IACjE,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,mEAAmE;IACnE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAMF;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,wEAAwE;IACxE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC;IACvC,iDAAiD;IACjD,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,wEAAwE;IACxE,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B,CAAC"}
|
package/dist/social-types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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\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 boughtUsd: number;\n soldUsd: number;\n realizedPnl: number;\n costBasis: number;\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/traders/:addressOrId/followers`.\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`.\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\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// 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\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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/social-controllers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "A collection of social related controllers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ethereum",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@metamask/base-controller": "^10.0.0",
|
|
54
54
|
"@metamask/base-data-service": "^2.1.0",
|
|
55
55
|
"@metamask/controller-utils": "^13.0.0",
|
|
56
|
-
"@metamask/core-backend": "^12.0.
|
|
56
|
+
"@metamask/core-backend": "^12.0.1",
|
|
57
57
|
"@metamask/messenger": "^3.0.0",
|
|
58
|
-
"@metamask/profile-sync-controller": "^
|
|
58
|
+
"@metamask/profile-sync-controller": "^34.0.3",
|
|
59
59
|
"@metamask/superstruct": "^3.4.1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"jest": "^30.5.2",
|
|
67
67
|
"rimraf": "^6.1.3",
|
|
68
68
|
"ts-jest": "^29.4.14",
|
|
69
|
-
"typedoc": "^0.
|
|
70
|
-
"typedoc-plugin-missing-exports": "^
|
|
69
|
+
"typedoc": "^0.28.20",
|
|
70
|
+
"typedoc-plugin-missing-exports": "^4.1.4",
|
|
71
71
|
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
|
72
72
|
},
|
|
73
73
|
"engines": {
|