@nadohq/mobile-client 0.64.0 → 0.66.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/README.md +124 -7
- package/dist/MobileClient-M4oC4lrX.cjs +1101 -0
- package/dist/MobileClient-M4oC4lrX.cjs.map +1 -0
- package/dist/MobileClient.cjs +1 -1
- package/dist/MobileClient.d.cts +306 -10
- package/dist/MobileClient.d.cts.map +1 -1
- package/dist/MobileClient.d.ts +306 -10
- package/dist/MobileClient.d.ts.map +1 -1
- package/dist/MobileClient.js +544 -5
- package/dist/MobileClient.js.map +1 -1
- package/dist/{MobileServerFailureError-Dd3c6P_Z.d.ts → MobileServerFailureError-C9iqNsxI.d.ts} +2 -3
- package/dist/MobileServerFailureError-C9iqNsxI.d.ts.map +1 -0
- package/dist/{MobileServerFailureError-Bpa_WA9f.d.cts → MobileServerFailureError-MtS2reel.d.cts} +2 -3
- package/dist/MobileServerFailureError-MtS2reel.d.cts.map +1 -0
- package/dist/MobileUnsupportedFeedItemError-BsZvW8i2.d.cts +15 -0
- package/dist/MobileUnsupportedFeedItemError-BsZvW8i2.d.cts.map +1 -0
- package/dist/MobileUnsupportedFeedItemError-BsZvW8i2.d.ts +15 -0
- package/dist/MobileUnsupportedFeedItemError-BsZvW8i2.d.ts.map +1 -0
- package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.cts +15 -0
- package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.cts.map +1 -0
- package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.ts +15 -0
- package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.ts.map +1 -0
- package/dist/{buildSignedMobileRequest-Cb1T74xV.d.ts → buildSignedMobileRequest-BR-KJhIF.d.ts} +2 -2
- package/dist/{buildSignedMobileRequest-Cb1T74xV.d.ts.map → buildSignedMobileRequest-BR-KJhIF.d.ts.map} +1 -1
- package/dist/{buildSignedMobileRequest-NHbMAPzd.d.cts → buildSignedMobileRequest-DyKCK34Y.d.cts} +2 -2
- package/dist/{buildSignedMobileRequest-NHbMAPzd.d.cts.map → buildSignedMobileRequest-DyKCK34Y.d.cts.map} +1 -1
- package/dist/{canonicalize-BBYGh17w.d.ts → canonicalize-Bv6UIAbR.d.ts} +2 -2
- package/dist/canonicalize-Bv6UIAbR.d.ts.map +1 -0
- package/dist/{canonicalize-BF_SiNvO.d.cts → canonicalize-CWh3XZzj.d.cts} +2 -2
- package/dist/canonicalize-CWh3XZzj.d.cts.map +1 -0
- package/dist/clientTypes-BUn5_OzK.d.ts +1665 -0
- package/dist/clientTypes-BUn5_OzK.d.ts.map +1 -0
- package/dist/clientTypes-DOpUcu80.d.cts +1665 -0
- package/dist/clientTypes-DOpUcu80.d.cts.map +1 -0
- package/dist/dataMappers.cjs +691 -14
- package/dist/dataMappers.cjs.map +1 -1
- package/dist/dataMappers.d.cts +254 -8
- package/dist/dataMappers.d.cts.map +1 -1
- package/dist/dataMappers.d.ts +254 -8
- package/dist/dataMappers.d.ts.map +1 -1
- package/dist/dataMappers.js +651 -15
- package/dist/dataMappers.js.map +1 -1
- package/dist/{eip712MethodByType-BSx11xG-.d.cts → eip712MethodByType-CJ6BoayT.d.cts} +2 -2
- package/dist/eip712MethodByType-CJ6BoayT.d.cts.map +1 -0
- package/dist/{eip712MethodByType-DkiAjCLs.d.ts → eip712MethodByType-Dx4mvgni.d.ts} +2 -2
- package/dist/eip712MethodByType-Dx4mvgni.d.ts.map +1 -0
- package/dist/{feed-DTJlsg8W.d.ts → feed-DErOLaoY.d.cts} +4 -2
- package/dist/feed-DErOLaoY.d.cts.map +1 -0
- package/dist/{feed-DTJlsg8W.d.cts → feed-DErOLaoY.d.ts} +4 -2
- package/dist/feed-DErOLaoY.d.ts.map +1 -0
- package/dist/index.cjs +9 -2
- package/dist/index.d.cts +15 -16
- package/dist/index.d.ts +15 -16
- package/dist/index.js +5 -3
- package/dist/{mobileErrorCodes-3LtreeZM.d.ts → mobileErrorCodes-vD6rbFuF.d.cts} +25 -6
- package/dist/mobileErrorCodes-vD6rbFuF.d.cts.map +1 -0
- package/dist/{mobileErrorCodes-3LtreeZM.d.cts → mobileErrorCodes-vD6rbFuF.d.ts} +25 -6
- package/dist/mobileErrorCodes-vD6rbFuF.d.ts.map +1 -0
- package/dist/{payloadHash-BOWGjqdb.d.cts → payloadHash-CdkF2Ocr.d.cts} +2 -2
- package/dist/payloadHash-CdkF2Ocr.d.cts.map +1 -0
- package/dist/{payloadHash-Bzf4CtjV.d.ts → payloadHash-HD29K77M.d.ts} +2 -2
- package/dist/payloadHash-HD29K77M.d.ts.map +1 -0
- package/dist/serverExecuteTypes-5JyyIXRK.d.ts +178 -0
- package/dist/serverExecuteTypes-5JyyIXRK.d.ts.map +1 -0
- package/dist/serverExecuteTypes-CHrQ9Rtq.d.cts +178 -0
- package/dist/serverExecuteTypes-CHrQ9Rtq.d.cts.map +1 -0
- package/dist/serverModelTypes-CGUZCi0y.d.cts +938 -0
- package/dist/serverModelTypes-CGUZCi0y.d.cts.map +1 -0
- package/dist/serverModelTypes-CGUZCi0y.d.ts +938 -0
- package/dist/serverModelTypes-CGUZCi0y.d.ts.map +1 -0
- package/dist/{serverResponseGuards-BU1Xv_tG.d.ts → serverResponseGuards-Bvw8ltYJ.d.ts} +2 -2
- package/dist/{serverResponseGuards-BU1Xv_tG.d.ts.map → serverResponseGuards-Bvw8ltYJ.d.ts.map} +1 -1
- package/dist/{serverResponseGuards-Dkdok0Sm.d.cts → serverResponseGuards-i1njcYKN.d.cts} +2 -2
- package/dist/{serverResponseGuards-Dkdok0Sm.d.cts.map → serverResponseGuards-i1njcYKN.d.cts.map} +1 -1
- package/dist/signing/buildSignedMobileRequest.d.cts +1 -1
- package/dist/signing/buildSignedMobileRequest.d.ts +1 -1
- package/dist/signing/canonicalize.cjs +86 -0
- package/dist/signing/canonicalize.cjs.map +1 -1
- package/dist/signing/canonicalize.d.cts +1 -1
- package/dist/signing/canonicalize.d.ts +1 -1
- package/dist/signing/canonicalize.js +86 -0
- package/dist/signing/canonicalize.js.map +1 -1
- package/dist/signing/eip712MethodByType.cjs +12 -0
- package/dist/signing/eip712MethodByType.cjs.map +1 -1
- package/dist/signing/eip712MethodByType.d.cts +1 -1
- package/dist/signing/eip712MethodByType.d.ts +1 -1
- package/dist/signing/eip712MethodByType.js +12 -0
- package/dist/signing/eip712MethodByType.js.map +1 -1
- package/dist/signing/index.d.cts +5 -5
- package/dist/signing/index.d.ts +5 -5
- package/dist/signing/payloadHash.cjs +1 -1
- package/dist/signing/payloadHash.d.cts +1 -1
- package/dist/signing/payloadHash.d.ts +1 -1
- package/dist/signing/payloadHash.js +1 -1
- package/dist/signing/types.d.cts +1 -1
- package/dist/signing/types.d.ts +1 -1
- package/dist/types/MobileServerFailureError.d.cts +1 -1
- package/dist/types/MobileServerFailureError.d.ts +1 -1
- package/dist/types/MobileUnsupportedFeedItemError.cjs +19 -0
- package/dist/types/MobileUnsupportedFeedItemError.cjs.map +1 -0
- package/dist/types/MobileUnsupportedFeedItemError.d.cts +2 -0
- package/dist/types/MobileUnsupportedFeedItemError.d.ts +2 -0
- package/dist/types/MobileUnsupportedFeedItemError.js +18 -0
- package/dist/types/MobileUnsupportedFeedItemError.js.map +1 -0
- package/dist/types/MobileUnsupportedNotificationRouteError.cjs +19 -0
- package/dist/types/MobileUnsupportedNotificationRouteError.cjs.map +1 -0
- package/dist/types/MobileUnsupportedNotificationRouteError.d.cts +2 -0
- package/dist/types/MobileUnsupportedNotificationRouteError.d.ts +2 -0
- package/dist/types/MobileUnsupportedNotificationRouteError.js +18 -0
- package/dist/types/MobileUnsupportedNotificationRouteError.js.map +1 -0
- package/dist/types/clientTypes.d.cts +2 -2
- package/dist/types/clientTypes.d.ts +2 -2
- package/dist/types/index.cjs +6 -0
- package/dist/types/index.d.cts +9 -9
- package/dist/types/index.d.ts +9 -9
- package/dist/types/index.js +4 -2
- package/dist/types/mobileErrorCodes.cjs +39 -1
- package/dist/types/mobileErrorCodes.cjs.map +1 -1
- package/dist/types/mobileErrorCodes.d.cts +1 -1
- package/dist/types/mobileErrorCodes.d.ts +1 -1
- package/dist/types/mobileErrorCodes.js +39 -1
- package/dist/types/mobileErrorCodes.js.map +1 -1
- package/dist/types/serverBaseTypes.d.cts +1 -1
- package/dist/types/serverBaseTypes.d.ts +1 -1
- package/dist/types/serverExecuteTypes.d.cts +2 -2
- package/dist/types/serverExecuteTypes.d.ts +2 -2
- package/dist/types/serverModelTypes.cjs +15 -0
- package/dist/types/serverModelTypes.cjs.map +1 -1
- package/dist/types/serverModelTypes.d.cts +2 -2
- package/dist/types/serverModelTypes.d.ts +2 -2
- package/dist/types/serverModelTypes.js +14 -1
- package/dist/types/serverModelTypes.js.map +1 -1
- package/dist/types/serverQueryTypes.d.cts +2 -2
- package/dist/types/serverQueryTypes.d.ts +2 -2
- package/dist/types/serverRequestTypes.d.cts +2 -2
- package/dist/types/serverRequestTypes.d.ts +2 -2
- package/dist/types-C9YE4EIt.d.cts +794 -0
- package/dist/types-C9YE4EIt.d.cts.map +1 -0
- package/dist/types-Cwy1y_9x.d.ts +794 -0
- package/dist/types-Cwy1y_9x.d.ts.map +1 -0
- package/dist/utils/buildMobileFeedImageMultipart.cjs +31 -0
- package/dist/utils/buildMobileFeedImageMultipart.cjs.map +1 -0
- package/dist/utils/buildMobileFeedImageMultipart.d.cts +15 -0
- package/dist/utils/buildMobileFeedImageMultipart.d.cts.map +1 -0
- package/dist/utils/buildMobileFeedImageMultipart.d.ts +15 -0
- package/dist/utils/buildMobileFeedImageMultipart.d.ts.map +1 -0
- package/dist/utils/buildMobileFeedImageMultipart.js +30 -0
- package/dist/utils/buildMobileFeedImageMultipart.js.map +1 -0
- package/dist/utils/feed.cjs +3 -0
- package/dist/utils/feed.cjs.map +1 -1
- package/dist/utils/feed.d.cts +2 -2
- package/dist/utils/feed.d.ts +2 -2
- package/dist/utils/feed.js +3 -1
- package/dist/utils/feed.js.map +1 -1
- package/dist/utils/index.cjs +2 -1
- package/dist/utils/index.d.cts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +2 -2
- package/dist/utils/serverResponseGuards.d.cts +1 -1
- package/dist/utils/serverResponseGuards.d.ts +1 -1
- package/package.json +3 -3
- package/src/MobileClient.ts +789 -7
- package/src/dataMappers.test.ts +848 -0
- package/src/dataMappers.ts +924 -17
- package/src/feedImages.test.ts +309 -0
- package/src/notifications.test.ts +950 -0
- package/src/signing/canonicalize.ts +119 -0
- package/src/signing/eip712MethodByType.ts +15 -0
- package/src/signing/signing.test.ts +362 -0
- package/src/signing/types.ts +108 -13
- package/src/socialFeed.test.ts +38 -2
- package/src/types/MobileUnsupportedFeedItemError.ts +18 -0
- package/src/types/MobileUnsupportedNotificationRouteError.ts +16 -0
- package/src/types/clientTypes.ts +1012 -34
- package/src/types/index.ts +2 -0
- package/src/types/mobileErrorCodes.ts +38 -0
- package/src/types/serverExecuteTypes.ts +112 -3
- package/src/types/serverModelTypes.ts +581 -28
- package/src/types/serverQueryTypes.ts +212 -5
- package/src/types/serverRequestTypes.ts +213 -13
- package/src/utils/buildMobileFeedImageMultipart.test.ts +45 -0
- package/src/utils/buildMobileFeedImageMultipart.ts +36 -0
- package/src/utils/feed.ts +3 -0
- package/dist/MobileClient-aDxiM_Kf.cjs +0 -562
- package/dist/MobileClient-aDxiM_Kf.cjs.map +0 -1
- package/dist/MobileServerFailureError-Bpa_WA9f.d.cts.map +0 -1
- package/dist/MobileServerFailureError-Dd3c6P_Z.d.ts.map +0 -1
- package/dist/canonicalize-BBYGh17w.d.ts.map +0 -1
- package/dist/canonicalize-BF_SiNvO.d.cts.map +0 -1
- package/dist/clientTypes-BWFKo9oE.d.cts +0 -844
- package/dist/clientTypes-BWFKo9oE.d.cts.map +0 -1
- package/dist/clientTypes-DCTiUV0H.d.ts +0 -844
- package/dist/clientTypes-DCTiUV0H.d.ts.map +0 -1
- package/dist/eip712MethodByType-BSx11xG-.d.cts.map +0 -1
- package/dist/eip712MethodByType-DkiAjCLs.d.ts.map +0 -1
- package/dist/feed-DTJlsg8W.d.cts.map +0 -1
- package/dist/feed-DTJlsg8W.d.ts.map +0 -1
- package/dist/mobileErrorCodes-3LtreeZM.d.cts.map +0 -1
- package/dist/mobileErrorCodes-3LtreeZM.d.ts.map +0 -1
- package/dist/payloadHash-BOWGjqdb.d.cts.map +0 -1
- package/dist/payloadHash-Bzf4CtjV.d.ts.map +0 -1
- package/dist/serverBaseTypes-DWf3iGWy.d.ts +0 -25
- package/dist/serverBaseTypes-DWf3iGWy.d.ts.map +0 -1
- package/dist/serverBaseTypes-KREDe2M9.d.cts +0 -25
- package/dist/serverBaseTypes-KREDe2M9.d.cts.map +0 -1
- package/dist/serverExecuteTypes-DVRa6ifu.d.cts +0 -89
- package/dist/serverExecuteTypes-DVRa6ifu.d.cts.map +0 -1
- package/dist/serverExecuteTypes-DlYZCp1f.d.ts +0 -89
- package/dist/serverExecuteTypes-DlYZCp1f.d.ts.map +0 -1
- package/dist/serverModelTypes-DAqEyYtB.d.cts +0 -508
- package/dist/serverModelTypes-DAqEyYtB.d.cts.map +0 -1
- package/dist/serverModelTypes-DAqEyYtB.d.ts +0 -508
- package/dist/serverModelTypes-DAqEyYtB.d.ts.map +0 -1
- package/dist/serverQueryTypes-BFdwq0Z2.d.ts +0 -171
- package/dist/serverQueryTypes-BFdwq0Z2.d.ts.map +0 -1
- package/dist/serverQueryTypes-DNdMpmDr.d.cts +0 -171
- package/dist/serverQueryTypes-DNdMpmDr.d.cts.map +0 -1
- package/dist/serverRequestTypes-BNA7FCY6.d.ts +0 -200
- package/dist/serverRequestTypes-BNA7FCY6.d.ts.map +0 -1
- package/dist/serverRequestTypes-CxDRFKfv.d.cts +0 -200
- package/dist/serverRequestTypes-CxDRFKfv.d.cts.map +0 -1
- package/dist/types-BCr2G5gS.d.cts +0 -84
- package/dist/types-BCr2G5gS.d.cts.map +0 -1
- package/dist/types-C18k-9Vy.d.ts +0 -84
- package/dist/types-C18k-9Vy.d.ts.map +0 -1
|
@@ -0,0 +1,1665 @@
|
|
|
1
|
+
import { At as MobileSocialFeedLeverage, Bt as MobileSocialFeedPositionState, Ct as MobileSocialFeedActionResolution, Dt as MobileSocialFeedChartInterval, Et as MobileSocialFeedChartDataQuality, Ft as MobileSocialFeedPnlMode, Gt as MobileSocialFeedTradeCardAction, Ht as MobileSocialFeedReadSessionMode, It as MobileSocialFeedPnlQuality, Jt as MobileSocialFeedTraderDataStatus, Kt as MobileSocialFeedTradeSizeChangeAction, Lt as MobileSocialFeedPositionDisplayBasis, Mt as MobileSocialFeedMarketCategory, Nt as MobileSocialFeedMention, Ot as MobileSocialFeedCohortStatus, Pt as MobileSocialFeedPnlBasis, Rt as MobileSocialFeedPositionResolution, St as MobileSocialFeedActionPriceBasis, Tt as MobileSocialFeedAttachmentStatus, Ut as MobileSocialFeedSourceCategory, Vt as MobileSocialFeedPresenceState, Xt as MobileSocialFeedType, Yt as MobileSocialFeedTradingResolution, Zt as MobileSocialFeedUnavailableTarget, c as MobileFeedTradePositionDirection, d as MobileNotificationMinTradeSizeUsd, f as MobileNotificationPlatform, h as MobileNotificationTypeId, jt as MobileSocialFeedLiquidationPriceQuality, kt as MobileSocialFeedHistoryQuality, m as MobileNotificationRouteName, o as MobileFeedMarginMode, p as MobileNotificationPositionThreshold, qt as MobileSocialFeedTraderBadgeCode, s as MobileFeedTradePosition, u as MobileNotificationCategory, wt as MobileSocialFeedActionUnavailableReason, xt as MobileSocialFeedAction, zt as MobileSocialFeedPositionResolutionReason } from "./serverModelTypes-CGUZCi0y.js";
|
|
2
|
+
import { SignatureParams, Subaccount } from "@nadohq/shared";
|
|
3
|
+
import { Hex } from "viem";
|
|
4
|
+
import BigNumber from "bignumber.js";
|
|
5
|
+
|
|
6
|
+
//#region src/types/clientTypes.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Server-owned preset presented in catalogue order.
|
|
9
|
+
*/
|
|
10
|
+
interface MobileAvatarPreset {
|
|
11
|
+
/** Stable preset ID used by setAvatar. */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Public image URL. Fall back to a generated icon if the image fails to load, e.g. after retirement. */
|
|
14
|
+
avatarUrl: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A preset or staged upload to publish. Pass null to clear an avatar.
|
|
18
|
+
*/
|
|
19
|
+
type MobileAvatarSelection = {
|
|
20
|
+
/** Shared catalogue selection. */type: 'preset'; /** Stable catalogue ID. */
|
|
21
|
+
id: string;
|
|
22
|
+
} | {
|
|
23
|
+
/** An uploaded image awaiting publication. */type: 'upload'; /** Key returned by createAvatarUpload. */
|
|
24
|
+
uploadKey: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Upload a square JPEG or PNG (up to 4096 × 4096 pixels and `MOBILE_AVATAR_MAX_UPLOAD_BYTES` bytes)
|
|
28
|
+
* using PUT, then publish uploadKey through setAvatar. Publication validates the image; a successful PUT
|
|
29
|
+
* alone does not mean it is accepted.
|
|
30
|
+
*/
|
|
31
|
+
interface MobileAvatarUpload {
|
|
32
|
+
/** Staging key, bound to the requesting subaccount. */
|
|
33
|
+
uploadKey: string;
|
|
34
|
+
/** Short-lived signed PUT URL. */
|
|
35
|
+
uploadUrl: string;
|
|
36
|
+
/** Send unchanged, even for PNG: the signed Content-Type is image/jpeg. */
|
|
37
|
+
headers: Record<string, string>;
|
|
38
|
+
/** Upload URL lifetime in seconds from issuance, not from when the response is received. */
|
|
39
|
+
expiresInSeconds: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A subaccount's public profile, as returned by an unsigned profile lookup. Private Mode hides the account's
|
|
43
|
+
* activity, not its profile, so `privateMode` is exposed here too. A subaccount with no identity row still
|
|
44
|
+
* yields a profile, with `null` names and `privateMode: false`.
|
|
45
|
+
*
|
|
46
|
+
* The last three fields are `undefined` unless the matching {@link MobileProfilesInclude} asked for them —
|
|
47
|
+
* absent means "not requested" rather than "none".
|
|
48
|
+
*/
|
|
49
|
+
interface MobilePublicProfile extends MobileIdentitySummary {
|
|
50
|
+
/** Public biography, or null when unset. */
|
|
51
|
+
bio: string | null;
|
|
52
|
+
privateMode: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Exact count at query time rather than a cached counter, including unnamed and private accounts — Private
|
|
55
|
+
* Mode hides activity, not relationships. Requires the `followCounts` include.
|
|
56
|
+
*/
|
|
57
|
+
followerCount?: number;
|
|
58
|
+
followingCount?: number;
|
|
59
|
+
/** Requires the `followSummary` include, and is relative to that include's `viewAs`. */
|
|
60
|
+
followSummary?: MobileFollowSummary;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The identity fields the backend attaches to a subaccount wherever it surfaces one alongside other data.
|
|
64
|
+
* Resolved at read time, so a rename shows up on the next read without any change to the surrounding record.
|
|
65
|
+
*/
|
|
66
|
+
interface MobileIdentitySummary {
|
|
67
|
+
subaccount: Hex;
|
|
68
|
+
/** Canonical, lowercased handle; when null, render a local fallback label from `subaccount`. */
|
|
69
|
+
username: string | null;
|
|
70
|
+
/** User-facing name as claimed; when null, render a local fallback label from `subaccount`. */
|
|
71
|
+
displayName: string | null;
|
|
72
|
+
/** Published avatar URL. Use a generated icon when null or when the image fails to load. */
|
|
73
|
+
avatarUrl: string | null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A viewer's relationship with one Profile, plus the Followed By preview: accounts the viewer follows that
|
|
77
|
+
* also follow that Profile. Every preview entry is therefore already familiar to the viewer, which is why it
|
|
78
|
+
* carries no `isFollowing` of its own.
|
|
79
|
+
*/
|
|
80
|
+
interface MobileFollowSummary {
|
|
81
|
+
/** The direct `viewer -> viewed Profile` relationship. */
|
|
82
|
+
isFollowing: boolean;
|
|
83
|
+
/** Exact size of the two-edge intersection, independent of how many previews came back. */
|
|
84
|
+
followedByCount: number;
|
|
85
|
+
/**
|
|
86
|
+
* Newest `preview -> viewed Profile` relationship first, with a bytes32 tie-break. Capped at
|
|
87
|
+
* `MOBILE_FOLLOWED_BY_PREVIEW_LIMIT` (2) by the backend and not client-configurable.
|
|
88
|
+
*/
|
|
89
|
+
followedBy: MobileIdentitySummary[];
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* One row of a Followers or Following page.
|
|
93
|
+
*/
|
|
94
|
+
interface MobileFollowListAccount {
|
|
95
|
+
identity: MobileIdentitySummary;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the `viewAs` Viewer follows this account — not the listed relationship that put it in the page.
|
|
98
|
+
* The Viewer can appear in another Profile's list, and does not follow themself, so their own row is
|
|
99
|
+
* `false`. `undefined` when the request named no `viewAs`, which is a missing perspective rather than a
|
|
100
|
+
* known "not following".
|
|
101
|
+
*/
|
|
102
|
+
isFollowing?: boolean;
|
|
103
|
+
/** This account's own follower count. */
|
|
104
|
+
followerCount: number;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* A page of Followers or Following. Pagination is live rather than snapshot: a Follow or Unfollow between
|
|
108
|
+
* pages can move an account, so an account can appear twice or not at all across one session. Deduplicate by
|
|
109
|
+
* {@link MobileIdentitySummary.subaccount} and restart from `cursor: undefined` on refresh.
|
|
110
|
+
*/
|
|
111
|
+
interface MobileFollowListPage {
|
|
112
|
+
accounts: MobileFollowListAccount[];
|
|
113
|
+
/** `null` means the list is complete. */
|
|
114
|
+
nextCursor: string | null;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* A page of profiles whose username starts with the searched prefix. Pagination is live rather than snapshot:
|
|
118
|
+
* a claim or rename between pages can surface a profile twice or skip it, so deduplicate by
|
|
119
|
+
* {@link MobilePublicProfile.subaccount} and restart from `cursor: undefined` on refresh.
|
|
120
|
+
*/
|
|
121
|
+
interface MobileProfileSearchPage {
|
|
122
|
+
/** Matches in ascending bytewise username order, with an exact match ahead of longer ones. */
|
|
123
|
+
profiles: MobilePublicProfile[];
|
|
124
|
+
/** `null` means there are no further matches. */
|
|
125
|
+
nextCursor: string | null;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Post-commit state of a follow or unfollow. The mutation and its count share one database transaction, so
|
|
129
|
+
* these values are authoritative — apply them rather than re-reading.
|
|
130
|
+
*/
|
|
131
|
+
interface MobileFollowMutationResult {
|
|
132
|
+
isFollowing: boolean;
|
|
133
|
+
/** The *target's* follower count after the mutation, not the sender's. */
|
|
134
|
+
followerCount: number;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Post-commit state of one target in a batch follow or unfollow. The whole batch commits in one database
|
|
138
|
+
* transaction, so these values are authoritative — apply them rather than re-reading.
|
|
139
|
+
*/
|
|
140
|
+
interface MobileFollowBatchResultItem {
|
|
141
|
+
/** The requested target, as lowercase hex. */
|
|
142
|
+
subaccount: Hex;
|
|
143
|
+
isFollowing: boolean;
|
|
144
|
+
/** The *target's* follower count after the batch, not the sender's. */
|
|
145
|
+
followerCount: number;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Result of a username availability check.
|
|
149
|
+
*/
|
|
150
|
+
interface MobileUsernameAvailability {
|
|
151
|
+
username: string;
|
|
152
|
+
available: boolean;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Margin of a feed trade. Branch on `mode` — do not infer isolated state from leverage presence:
|
|
156
|
+
* `estimatedLeverage` (a rounded whole-number estimate, not exact submitted leverage) is `undefined` on
|
|
157
|
+
* `cross`, and also `undefined` inside `isolated` when no estimate is available.
|
|
158
|
+
*/
|
|
159
|
+
interface MobileFeedMargin {
|
|
160
|
+
mode: MobileFeedMarginMode;
|
|
161
|
+
estimatedLeverage?: number;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* A single feed trade: one row per order digest, enriched with the trader's current identity at read time
|
|
165
|
+
* (a rename can change an already-fetched trade on the next read). Amounts are display-oriented human-unit
|
|
166
|
+
* numbers — do not use them for accounting, order construction, or exact threshold decisions.
|
|
167
|
+
*/
|
|
168
|
+
interface MobileFeedTrade extends MobileIdentitySummary {
|
|
169
|
+
/** Order digest this trade is keyed by; the stable id for reconciling live pagination. */
|
|
170
|
+
orderDigest: Hex;
|
|
171
|
+
productId: number;
|
|
172
|
+
/** Executed quantity in human units. */
|
|
173
|
+
quantity: number;
|
|
174
|
+
/** Trade notional in whole-dollar human units. */
|
|
175
|
+
notional: number;
|
|
176
|
+
/** Average execution price in human units. */
|
|
177
|
+
averagePrice: number;
|
|
178
|
+
margin: MobileFeedMargin;
|
|
179
|
+
/** Resulting position change. `position.direction` is NOT the execution buy/sell side. */
|
|
180
|
+
position: MobileFeedTradePosition;
|
|
181
|
+
/** Realized PnL of the trade in human units; can be negative. */
|
|
182
|
+
realizedPnl: number;
|
|
183
|
+
/** Fill time as a Unix timestamp (milliseconds). */
|
|
184
|
+
filledAt: number;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* A page of feed trades. `nextCursor` is `null` when there was no additional candidate at query time.
|
|
188
|
+
* Pagination is live, not snapshot, so a later fill can move a trade between pages — deduplicate by
|
|
189
|
+
* {@link MobileFeedTrade.orderDigest} and treat the merged list as a short-lived view, not an authoritative
|
|
190
|
+
* cache (removals from Private Mode or blacklists are not signaled).
|
|
191
|
+
*/
|
|
192
|
+
interface MobileFeedPage {
|
|
193
|
+
trades: MobileFeedTrade[];
|
|
194
|
+
nextCursor: string | null;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Scope limiting a notification category preference. Scopes are part of the wire format but rejected by the
|
|
198
|
+
* backend for the MVP — `scopes` must be empty.
|
|
199
|
+
*/
|
|
200
|
+
type MobileNotificationPreferenceScope = {
|
|
201
|
+
type: 'subaccount';
|
|
202
|
+
subaccount: Hex;
|
|
203
|
+
} | {
|
|
204
|
+
type: 'product';
|
|
205
|
+
productId: number;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* A per-category push notification preference.
|
|
209
|
+
*/
|
|
210
|
+
interface MobileNotificationCategoryPreference {
|
|
211
|
+
category: MobileNotificationCategory;
|
|
212
|
+
enabled: boolean;
|
|
213
|
+
scopes: MobileNotificationPreferenceScope[];
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* A wallet's push notification preferences. The backend requires exactly one entry per known category and
|
|
217
|
+
* `schemaVersion` of 1.
|
|
218
|
+
*/
|
|
219
|
+
interface MobileNotificationPreferences {
|
|
220
|
+
/** Only `1` is accepted by the backend for the MVP. */
|
|
221
|
+
schemaVersion: 1;
|
|
222
|
+
categories: MobileNotificationCategoryPreference[];
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* The wallet an Expo push token is currently registered to, alongside the redacted metadata of the device
|
|
226
|
+
* that registered it.
|
|
227
|
+
*/
|
|
228
|
+
interface MobileRegisteredWallet {
|
|
229
|
+
/** Address of the wallet that owns the token's active registration. */
|
|
230
|
+
wallet: Hex;
|
|
231
|
+
/** Push platform the device registered under. */
|
|
232
|
+
platform: MobileNotificationPlatform;
|
|
233
|
+
/** BCP-47 locale tag reported at registration, or `null` if none was provided. */
|
|
234
|
+
locale: string | null;
|
|
235
|
+
/** App version string reported at registration, or `null` if none was provided. */
|
|
236
|
+
appVersion: string | null;
|
|
237
|
+
/**
|
|
238
|
+
* First 8 hex chars of `keccak256` over the bracket-stripped Expo token — a stable, non-reversible
|
|
239
|
+
* identifier for the device's push token. The raw token is never returned by the backend.
|
|
240
|
+
*/
|
|
241
|
+
tokenFingerprintPrefix: string;
|
|
242
|
+
/**
|
|
243
|
+
* Unix timestamp (milliseconds) of the device's last registration refresh.
|
|
244
|
+
*/
|
|
245
|
+
lastSeenAt: number;
|
|
246
|
+
}
|
|
247
|
+
/** Device capabilities declared when registering a v2 device. */
|
|
248
|
+
interface MobileNotificationCapabilities {
|
|
249
|
+
/** Registration accepts only the v2 protocol. */
|
|
250
|
+
payloadVersions: [2];
|
|
251
|
+
/** Notification types the device can handle. */
|
|
252
|
+
typeIds: MobileNotificationTypeId[];
|
|
253
|
+
/** Supported named navigation destinations. */
|
|
254
|
+
routes: MobileNotificationRouteName[];
|
|
255
|
+
}
|
|
256
|
+
/** Latest device generation and saved capabilities, including legacy registrations. */
|
|
257
|
+
interface MobileNotificationRegistrationV2 {
|
|
258
|
+
/** Opaque generation string; do not convert to a JavaScript number. */
|
|
259
|
+
registrationGeneration: string;
|
|
260
|
+
/** Legacy registrations have empty type and route lists. */
|
|
261
|
+
capabilities: {
|
|
262
|
+
/** The single saved protocol version. */payloadVersions: [1] | [2]; /** Supported notification types. */
|
|
263
|
+
typeIds: MobileNotificationTypeId[]; /** Supported navigation destinations. */
|
|
264
|
+
routes: MobileNotificationRouteName[];
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
/** Complete wallet-level notification settings; every field is required on replacement. */
|
|
268
|
+
interface MobileNotificationSettings {
|
|
269
|
+
/** Own position milestones and the initial weekly digest. */
|
|
270
|
+
myPositions: boolean;
|
|
271
|
+
/** Unique milestone thresholds; the minimum selects the starting tier. */
|
|
272
|
+
positionThresholds: MobileNotificationPositionThreshold[];
|
|
273
|
+
/** Combined order fill/update switch; does not control liquidation notifications. */
|
|
274
|
+
myOrders: boolean;
|
|
275
|
+
/** Ordinary followed-trader notifications; enabled bells override this switch. */
|
|
276
|
+
followingTrades: boolean;
|
|
277
|
+
/** Notifications about posts by followed traders. */
|
|
278
|
+
followingPosts: boolean;
|
|
279
|
+
/** Minimum trade size for trade notifications, in whole USD. */
|
|
280
|
+
minTradeSizeUsd: MobileNotificationMinTradeSizeUsd;
|
|
281
|
+
/** New followers and follow-backs. */
|
|
282
|
+
newFollowers: boolean;
|
|
283
|
+
/** Maps to the legacy announcement preference. */
|
|
284
|
+
announcements: boolean;
|
|
285
|
+
/** Opt-in trader streak and account drama discovery notifications. */
|
|
286
|
+
discovery: boolean;
|
|
287
|
+
}
|
|
288
|
+
/** Versioned settings document returned by v2 reads and writes. */
|
|
289
|
+
interface MobileNotificationSettingsV2 {
|
|
290
|
+
/** Settings schema version. */
|
|
291
|
+
schemaVersion: 2;
|
|
292
|
+
/** Settings revision, independent of subscription revisions. */
|
|
293
|
+
revision: number;
|
|
294
|
+
/** Full saved settings. */
|
|
295
|
+
settings: MobileNotificationSettings;
|
|
296
|
+
}
|
|
297
|
+
/** Wallet market subscriptions and the signing Identity's enabled trader bells. */
|
|
298
|
+
interface MobileNotificationSubscriptions {
|
|
299
|
+
/** Wallet-level subscription revision; refresh after every mutation. */
|
|
300
|
+
revision: number;
|
|
301
|
+
/** Whether the one-time local favorites import has completed. */
|
|
302
|
+
favoritesImported: boolean;
|
|
303
|
+
/** Subscribed market IDs in ascending order. */
|
|
304
|
+
marketIds: number[];
|
|
305
|
+
/** Followed subaccounts with enabled bells, encoded as bytes32. */
|
|
306
|
+
traderBells: Hex[];
|
|
307
|
+
}
|
|
308
|
+
/** Exactly one revision-guarded subscription operation; the SDK fills unused wire fields with null. */
|
|
309
|
+
type MobileNotificationSubscriptionsUpdate = {
|
|
310
|
+
/** Latest subscription revision, not the settings revision. */expectedRevision: number;
|
|
311
|
+
} & ({
|
|
312
|
+
/** Set a bell; enabling requires an existing follow relationship. */traderBell: {
|
|
313
|
+
/** Target non-isolated subaccount belonging to another wallet. */subaccount: Subaccount; /** Desired bell state. */
|
|
314
|
+
enabled: boolean;
|
|
315
|
+
}; /** Cannot be combined with a trader bell operation. */
|
|
316
|
+
market?: never; /** Cannot be combined with a trader bell operation. */
|
|
317
|
+
importMarkets?: never;
|
|
318
|
+
} | {
|
|
319
|
+
/** Subscribe or unsubscribe one known market. */market: {
|
|
320
|
+
/** Positive product ID. */productId: number; /** Desired subscription state. */
|
|
321
|
+
subscribed: boolean;
|
|
322
|
+
}; /** Cannot be combined with a market operation. */
|
|
323
|
+
traderBell?: never; /** Cannot be combined with a market operation. */
|
|
324
|
+
importMarkets?: never;
|
|
325
|
+
} | {
|
|
326
|
+
/** One-time merge of up to 500 local market IDs. */importMarkets: number[]; /** Cannot be combined with an import operation. */
|
|
327
|
+
traderBell?: never; /** Cannot be combined with an import operation. */
|
|
328
|
+
market?: never;
|
|
329
|
+
});
|
|
330
|
+
/** Allowlisted notification destination; never interpret it as an arbitrary URL. */
|
|
331
|
+
type MobileNotificationRoute = {
|
|
332
|
+
/** Public profile destination. */name: 'profile'; /** Profile subaccount as bytes32. */
|
|
333
|
+
subaccount: Hex;
|
|
334
|
+
} | {
|
|
335
|
+
/** Market destination. */name: 'market'; /** Positive product ID. */
|
|
336
|
+
productId: number;
|
|
337
|
+
} | {
|
|
338
|
+
/** Own portfolio destination. */name: 'portfolio';
|
|
339
|
+
};
|
|
340
|
+
/** V2 push/inbox navigation data, not a complete historical trade or notification body. */
|
|
341
|
+
interface MobileNotificationPayloadV2 {
|
|
342
|
+
/** Payload protocol version. */
|
|
343
|
+
payloadVersion: 2;
|
|
344
|
+
/** Logical notification UUID for click deduplication. */
|
|
345
|
+
notificationId: string;
|
|
346
|
+
/** Intended wallet; private navigation must wait for this wallet to connect. */
|
|
347
|
+
recipientWallet: Hex;
|
|
348
|
+
/** Registered notification type. */
|
|
349
|
+
typeId: MobileNotificationTypeId;
|
|
350
|
+
/** Supported template version. */
|
|
351
|
+
templateVersion: 1;
|
|
352
|
+
/** Named destination and its parameters. */
|
|
353
|
+
route: MobileNotificationRoute;
|
|
354
|
+
}
|
|
355
|
+
/** Accepted logical notification; does not prove device delivery or read status. */
|
|
356
|
+
interface MobileNotificationInboxItem {
|
|
357
|
+
/** Logical notification UUID. */
|
|
358
|
+
notificationId: string;
|
|
359
|
+
/** Registered notification type. */
|
|
360
|
+
typeId: MobileNotificationTypeId;
|
|
361
|
+
/** Navigation data, without title, body, or read state. */
|
|
362
|
+
data: MobileNotificationPayloadV2;
|
|
363
|
+
/** Intent acceptance time in milliseconds. */
|
|
364
|
+
createdAt: number;
|
|
365
|
+
/** Backend-computed trade attribution. */
|
|
366
|
+
tradeWithin24h: boolean;
|
|
367
|
+
}
|
|
368
|
+
/** Private notification page, ordered newest first. */
|
|
369
|
+
interface MobileNotificationInboxV2 {
|
|
370
|
+
/** Accepted intents owned by the signing wallet. */
|
|
371
|
+
notifications: MobileNotificationInboxItem[];
|
|
372
|
+
/** Pass unchanged to the next request, or null when pagination is complete. */
|
|
373
|
+
nextCursor: string | null;
|
|
374
|
+
}
|
|
375
|
+
/** Analytics event with the fields required by its interaction; unused wire fields are filled with null. */
|
|
376
|
+
type MobileProductEvent = {
|
|
377
|
+
/** Stable event UUID; reuse across retries. */clientEventId: string; /** Actual event time in milliseconds, within the past 7 days or next 5 minutes. */
|
|
378
|
+
occurredAt: number;
|
|
379
|
+
} & ({
|
|
380
|
+
/** Notification open; not a read-state mutation. */eventName: 'notif_opened'; /** Notification owned by the signing wallet. */
|
|
381
|
+
notificationId: string; /** Not used for notification opens. */
|
|
382
|
+
productId?: never; /** Not used for notification opens. */
|
|
383
|
+
query?: never;
|
|
384
|
+
} | {
|
|
385
|
+
/** Market or chart interaction. */eventName: 'market_viewed' | 'chart_opened'; /** Positive product ID. */
|
|
386
|
+
productId: number; /** Not used for market/chart interactions. */
|
|
387
|
+
notificationId?: never; /** Not used for market/chart interactions. */
|
|
388
|
+
query?: never;
|
|
389
|
+
} | {
|
|
390
|
+
/** Search interaction. */eventName: 'search'; /** Nonblank search query, at most 80 Unicode characters. */
|
|
391
|
+
query: string; /** Not used for searches. */
|
|
392
|
+
notificationId?: never; /** Not used for searches. */
|
|
393
|
+
productId?: never;
|
|
394
|
+
});
|
|
395
|
+
/**
|
|
396
|
+
* Common params for signed requests that authenticate as a given subaccount.
|
|
397
|
+
*/
|
|
398
|
+
interface MobileSignedRequestParams extends Subaccount, SignatureParams {
|
|
399
|
+
/**
|
|
400
|
+
* Optional nonce from {@link getMobileNonce}. For clock synchronization, use EngineWebClient.getTime()
|
|
401
|
+
* from @nadohq/engine-client as a reference; the mobile service has no time endpoint. The receive deadline
|
|
402
|
+
* must be later than mobile server time and no more than 100 seconds ahead, expressed in milliseconds.
|
|
403
|
+
* The SDK does not fetch server time automatically.
|
|
404
|
+
*/
|
|
405
|
+
nonce?: bigint;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Common params for the unsigned notification requests, which name their target with an Expo push token
|
|
409
|
+
* instead of a subaccount and signature — the counterpart to {@link MobileSignedRequestParams}. The backend
|
|
410
|
+
* resolves the token's owning wallet and reads or mutates that wallet's state.
|
|
411
|
+
*/
|
|
412
|
+
interface MobileWithExpoTokenParams {
|
|
413
|
+
/** Expo push token, e.g. `ExponentPushToken[...]`. */
|
|
414
|
+
expoToken: string;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Params for {@link MobileClient.getUsernameAvailability}.
|
|
418
|
+
*/
|
|
419
|
+
interface GetMobileUsernameAvailabilityParams {
|
|
420
|
+
displayName: string;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Opt-in extras for a profiles lookup. Each one adds fields that are otherwise absent from every returned
|
|
424
|
+
* profile, and costs extra rate-limit weight per profile, so ask only for what the UI shows.
|
|
425
|
+
*/
|
|
426
|
+
interface MobileProfilesInclude {
|
|
427
|
+
/** Populates `followerCount` and `followingCount`. */
|
|
428
|
+
followCounts?: boolean;
|
|
429
|
+
/**
|
|
430
|
+
* Populates `followSummary`, relative to `viewAs`. This viewer identity is an unauthenticated claim — the
|
|
431
|
+
* route takes no signature — so do not treat the result as proof of who is asking.
|
|
432
|
+
*/
|
|
433
|
+
followSummary?: {
|
|
434
|
+
viewAs: Subaccount;
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Params for {@link MobileClient.getProfiles}.
|
|
439
|
+
*/
|
|
440
|
+
interface GetMobileProfilesParams {
|
|
441
|
+
/**
|
|
442
|
+
* 1–`MOBILE_PROFILES_MAX_BATCH_SIZE` (25) distinct subaccounts. Duplicates and an empty list are rejected
|
|
443
|
+
* rather than deduplicated, and results come back in this exact order.
|
|
444
|
+
*/
|
|
445
|
+
subaccounts: Subaccount[];
|
|
446
|
+
include?: MobileProfilesInclude;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Params for {@link MobileClient.searchProfiles}.
|
|
450
|
+
*/
|
|
451
|
+
interface SearchMobileProfilesParams {
|
|
452
|
+
/**
|
|
453
|
+
* Username prefix to match, 1-20 ASCII characters matching `MOBILE_PROFILE_SEARCH_QUERY_PATTERN`: a letter
|
|
454
|
+
* or digit first, then letters, digits, `_` or `.`. Letters match case-insensitively; whitespace is not
|
|
455
|
+
* trimmed, so normalize the input before sending it.
|
|
456
|
+
*/
|
|
457
|
+
query: string;
|
|
458
|
+
/** Same opt-in extras as {@link GetMobileProfilesParams.include}, applied to every match on the page. */
|
|
459
|
+
include?: MobileProfilesInclude;
|
|
460
|
+
/**
|
|
461
|
+
* Opaque cursor from the previous page's {@link MobileProfileSearchPage.nextCursor}. Omit for the first
|
|
462
|
+
* page. A cursor is bound to its normalized query but not to `include` or `limit`, so an enriched page
|
|
463
|
+
* can continue an unenriched search; one issued for another query fails with
|
|
464
|
+
* `INVALID_PROFILE_SEARCH_CURSOR`.
|
|
465
|
+
*/
|
|
466
|
+
cursor?: string;
|
|
467
|
+
/**
|
|
468
|
+
* Page size, 1-`MOBILE_PROFILE_SEARCH_MAX_PAGE_SIZE` (50), or
|
|
469
|
+
* 1-`MOBILE_PROFILE_SEARCH_MAX_ENRICHED_PAGE_SIZE` (25) when `include` asks for follow data; the backend
|
|
470
|
+
* defaults to 25 when omitted.
|
|
471
|
+
*/
|
|
472
|
+
limit?: number;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Params for {@link MobileClient.getFeed}.
|
|
476
|
+
*/
|
|
477
|
+
interface GetMobileFeedParams {
|
|
478
|
+
/**
|
|
479
|
+
* Minimum notional filter as a whole-dollar safe integer, at least `MOBILE_FEED_MIN_NOTIONAL_FLOOR`
|
|
480
|
+
* ($1,000). Omit for the unfiltered feed.
|
|
481
|
+
*/
|
|
482
|
+
minimumNotional?: number;
|
|
483
|
+
/** Page size, 1–`MOBILE_FEED_MAX_PAGE_SIZE` (50); the backend defaults to 50 when omitted. */
|
|
484
|
+
limit?: number;
|
|
485
|
+
/**
|
|
486
|
+
* Opaque keyset cursor from a prior page's {@link MobileFeedPage.nextCursor}. Send it back unchanged with
|
|
487
|
+
* the exact same `minimumNotional` it was issued for.
|
|
488
|
+
*/
|
|
489
|
+
cursor?: string;
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* Params for {@link MobileClient.setBio}.
|
|
493
|
+
*/
|
|
494
|
+
interface MobileSetBioParams extends MobileSignedRequestParams {
|
|
495
|
+
/** Up to `MOBILE_BIO_MAX_LENGTH` (150) Unicode code points without null characters. Whitespace-only text clears the bio. */
|
|
496
|
+
bio: string;
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Params for {@link MobileClient.setAvatar}.
|
|
500
|
+
*/
|
|
501
|
+
interface MobileSetAvatarParams extends MobileSignedRequestParams {
|
|
502
|
+
/** Null clears the saved image. */
|
|
503
|
+
avatar: MobileAvatarSelection | null;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Params for {@link MobileClient.createAvatarUpload}.
|
|
507
|
+
*/
|
|
508
|
+
interface MobileCreateAvatarUploadParams extends MobileSignedRequestParams {
|
|
509
|
+
/** Image size as an integer number of bytes, from 1 to `MOBILE_AVATAR_MAX_UPLOAD_BYTES` (5 MiB). */
|
|
510
|
+
contentLength: number;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Params for {@link MobileClient.setUsername}.
|
|
514
|
+
*/
|
|
515
|
+
interface MobileSetUsernameParams extends MobileSignedRequestParams {
|
|
516
|
+
/** User-facing name to claim, preserving casing. Must match `MOBILE_DISPLAY_NAME_PATTERN`. */
|
|
517
|
+
displayName: string;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Params for {@link MobileClient.setPrivateMode}.
|
|
521
|
+
*/
|
|
522
|
+
interface MobileSetPrivateModeParams extends MobileSignedRequestParams {
|
|
523
|
+
privateMode: boolean;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Params for {@link MobileClient.setFollow}. The subaccount carried by {@link MobileSignedRequestParams} is
|
|
527
|
+
* the signing Follower; `target` is the Profile on the other end of the relationship.
|
|
528
|
+
*/
|
|
529
|
+
interface MobileSetFollowParams extends MobileSignedRequestParams {
|
|
530
|
+
/** The Profile being followed or unfollowed. Must not be the signing subaccount. */
|
|
531
|
+
target: Subaccount;
|
|
532
|
+
/** `true` follows the target, `false` unfollows it. Both directions are idempotent. */
|
|
533
|
+
isFollowing: boolean;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Params for {@link MobileClient.setFollowBatch}. The subaccount carried by {@link MobileSignedRequestParams}
|
|
537
|
+
* is the signing Follower; `targets` are the Profiles on the other end of each relationship.
|
|
538
|
+
*/
|
|
539
|
+
interface MobileSetFollowBatchParams extends MobileSignedRequestParams {
|
|
540
|
+
/**
|
|
541
|
+
* 1 to `MOBILE_FOLLOW_BATCH_MAX_SIZE` (25) distinct Profiles, none of them the signing subaccount or an
|
|
542
|
+
* isolated subaccount. The results keep this order.
|
|
543
|
+
*/
|
|
544
|
+
targets: Subaccount[];
|
|
545
|
+
/** `true` follows every target, `false` unfollows every target. Both directions are idempotent. */
|
|
546
|
+
isFollowing: boolean;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Common params for a Followers or Following page.
|
|
550
|
+
*/
|
|
551
|
+
interface GetMobileFollowListParams {
|
|
552
|
+
/** The Profile whose Followers or Following are being listed. */
|
|
553
|
+
target: Subaccount;
|
|
554
|
+
/**
|
|
555
|
+
* Viewer to resolve the page against, which turns on familiar-first ordering and populates every row's
|
|
556
|
+
* {@link MobileFollowListAccount.isFollowing}. Omit it for a plain recency-ordered list with no
|
|
557
|
+
* `isFollowing` at all. The route is unsigned, so this is an unauthenticated claim rather than proof of
|
|
558
|
+
* who is asking.
|
|
559
|
+
*/
|
|
560
|
+
viewAs?: Subaccount;
|
|
561
|
+
/**
|
|
562
|
+
* Opaque cursor from the previous page's {@link MobileFollowListPage.nextCursor}. Omit for the first page.
|
|
563
|
+
* A cursor is bound to its `viewAs` (including its absence), Profile, and list direction — reusing it
|
|
564
|
+
* elsewhere fails with `INVALID_FOLLOW_CURSOR`.
|
|
565
|
+
*/
|
|
566
|
+
cursor?: string;
|
|
567
|
+
/**
|
|
568
|
+
* Page size, 1–`MOBILE_FOLLOW_LIST_MAX_PAGE_SIZE` (50); the backend defaults to
|
|
569
|
+
* `MOBILE_FOLLOW_LIST_DEFAULT_PAGE_SIZE` (25) when omitted.
|
|
570
|
+
*/
|
|
571
|
+
limit?: number;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Params for {@link MobileClient.getFollowers}.
|
|
575
|
+
*/
|
|
576
|
+
type GetMobileFollowersParams = GetMobileFollowListParams;
|
|
577
|
+
/**
|
|
578
|
+
* Params for {@link MobileClient.getFollowing}.
|
|
579
|
+
*/
|
|
580
|
+
type GetMobileFollowingParams = GetMobileFollowListParams;
|
|
581
|
+
/**
|
|
582
|
+
* Params for {@link MobileClient.registerExpoToken}.
|
|
583
|
+
*/
|
|
584
|
+
interface MobileRegisterExpoTokenParams extends MobileSignedRequestParams, MobileWithExpoTokenParams {
|
|
585
|
+
platform: MobileNotificationPlatform;
|
|
586
|
+
/**
|
|
587
|
+
* BCP-47 locale tag, max 35 chars.
|
|
588
|
+
*/
|
|
589
|
+
locale?: string;
|
|
590
|
+
/**
|
|
591
|
+
* App version string, max 64 chars.
|
|
592
|
+
*/
|
|
593
|
+
appVersion?: string;
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Params for {@link MobileClient.unregisterExpoToken}.
|
|
597
|
+
*/
|
|
598
|
+
type MobileUnregisterExpoTokenParams = MobileWithExpoTokenParams;
|
|
599
|
+
/**
|
|
600
|
+
* Params for {@link MobileClient.updateNotificationPreferences}.
|
|
601
|
+
*/
|
|
602
|
+
interface MobileUpdateNotificationPreferencesParams extends MobileWithExpoTokenParams {
|
|
603
|
+
preferences: MobileNotificationPreferences;
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Params for {@link MobileClient.getNotificationPreferences}.
|
|
607
|
+
*/
|
|
608
|
+
type GetMobileNotificationPreferencesParams = MobileWithExpoTokenParams;
|
|
609
|
+
/**
|
|
610
|
+
* Params for {@link MobileClient.getRegisteredWallet}.
|
|
611
|
+
*/
|
|
612
|
+
type GetMobileRegisteredWalletParams = MobileWithExpoTokenParams;
|
|
613
|
+
/**
|
|
614
|
+
* Params for {@link MobileClient.registerExpoTokenV2}.
|
|
615
|
+
*/
|
|
616
|
+
interface MobileRegisterExpoTokenV2Params extends MobileRegisterExpoTokenParams {
|
|
617
|
+
/** Actual notification types and routes supported by this device. */
|
|
618
|
+
capabilities: MobileNotificationCapabilities;
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* Params for {@link MobileClient.getNotificationRegistrationV2}.
|
|
622
|
+
*/
|
|
623
|
+
type GetMobileNotificationRegistrationV2Params = MobileWithExpoTokenParams;
|
|
624
|
+
/**
|
|
625
|
+
* Params for {@link MobileClient.getNotificationSettingsV2}.
|
|
626
|
+
*/
|
|
627
|
+
type GetMobileNotificationSettingsV2Params = MobileWithExpoTokenParams;
|
|
628
|
+
/**
|
|
629
|
+
* Params for {@link MobileClient.updateNotificationSettingsV2}.
|
|
630
|
+
*/
|
|
631
|
+
interface MobileUpdateNotificationSettingsV2Params extends MobileWithExpoTokenParams {
|
|
632
|
+
/** Latest settings revision; stale values fail with 6203. */
|
|
633
|
+
expectedRevision: number;
|
|
634
|
+
/** Full replacement, not a partial patch. */
|
|
635
|
+
settings: MobileNotificationSettings;
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Params for {@link MobileClient.getNotificationSubscriptions}; no Expo token is needed.
|
|
639
|
+
*/
|
|
640
|
+
type GetMobileNotificationSubscriptionsParams = MobileSignedRequestParams;
|
|
641
|
+
/**
|
|
642
|
+
* Params for {@link MobileClient.updateNotificationSubscriptions}.
|
|
643
|
+
*/
|
|
644
|
+
interface MobileUpdateNotificationSubscriptionsParams extends MobileSignedRequestParams {
|
|
645
|
+
/** Exactly one operation, with the latest subscription revision. */
|
|
646
|
+
update: MobileNotificationSubscriptionsUpdate;
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* Params for {@link MobileClient.getNotificationInboxV2}; no Expo token is needed.
|
|
650
|
+
*/
|
|
651
|
+
interface GetMobileNotificationInboxV2Params extends MobileSignedRequestParams {
|
|
652
|
+
/** Previous nextCursor; omit or pass null for the first page. */
|
|
653
|
+
cursor?: string | null;
|
|
654
|
+
/** Page size from 1 to 50; omission/null uses the server default of 20. */
|
|
655
|
+
limit?: number | null;
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Params for {@link MobileClient.recordProductEvents}.
|
|
659
|
+
*/
|
|
660
|
+
interface MobileRecordProductEventsParams extends MobileSignedRequestParams {
|
|
661
|
+
/** One to fifty events, validated and committed atomically. */
|
|
662
|
+
events: MobileProductEvent[];
|
|
663
|
+
}
|
|
664
|
+
/** Official account-level 30-day PnL badge, independent of position PnL. */
|
|
665
|
+
interface MobileSocialFeedTraderBadge {
|
|
666
|
+
/** Qualification tier. */
|
|
667
|
+
code: MobileSocialFeedTraderBadgeCode;
|
|
668
|
+
/** Signed integer in x18 units. */
|
|
669
|
+
pnl: BigNumber;
|
|
670
|
+
/** Stable compatibility identifier for the official Portfolio month result. */
|
|
671
|
+
metricKey: 'account_pnl_30d_equity';
|
|
672
|
+
/** PnL window label. */
|
|
673
|
+
window: '30d';
|
|
674
|
+
/** Official source timestamp in Unix milliseconds. */
|
|
675
|
+
sourceAsOfMs: number;
|
|
676
|
+
/** Fetch completion timestamp in Unix milliseconds. */
|
|
677
|
+
fetchedAtMs: number;
|
|
678
|
+
/** Qualification snapshot UUID. */
|
|
679
|
+
snapshotId: string;
|
|
680
|
+
}
|
|
681
|
+
/** Public author identity and the selected viewing account's follow state. */
|
|
682
|
+
interface MobileSocialFeedAuthor extends MobileIdentitySummary {
|
|
683
|
+
/** Selected viewAs account's follow state; null without a viewing account. */
|
|
684
|
+
isFollowing: boolean | null;
|
|
685
|
+
/** Null when no qualifying badge is available. */
|
|
686
|
+
traderBadge: MobileSocialFeedTraderBadge | null;
|
|
687
|
+
/** Stale means the last successful cohort is used after a refresh failure. */
|
|
688
|
+
traderDataStatus: MobileSocialFeedTraderDataStatus;
|
|
689
|
+
}
|
|
690
|
+
/** Market metadata from the service's authoritative market source. */
|
|
691
|
+
interface MobileSocialFeedMarket {
|
|
692
|
+
/** Market product ID. */
|
|
693
|
+
productId: number;
|
|
694
|
+
/** Market symbol. */
|
|
695
|
+
symbol: string;
|
|
696
|
+
/** Logo URL when available. */
|
|
697
|
+
logoUrl: string | null;
|
|
698
|
+
/** Social feed category when known. */
|
|
699
|
+
category: MobileSocialFeedMarketCategory | null;
|
|
700
|
+
/** Original market categories. */
|
|
701
|
+
sourceCategories: MobileSocialFeedSourceCategory[];
|
|
702
|
+
}
|
|
703
|
+
/** Position PnL with explicit accounting basis and data quality. */
|
|
704
|
+
interface MobileSocialFeedPnl {
|
|
705
|
+
/** Signed x18 integer; null means unknown, not zero. */
|
|
706
|
+
amount: BigNumber | null;
|
|
707
|
+
/** Open positions exclude fees/funding; closed results include them. */
|
|
708
|
+
basis: MobileSocialFeedPnlBasis;
|
|
709
|
+
/** Closed positions use frozen results. */
|
|
710
|
+
mode: MobileSocialFeedPnlMode;
|
|
711
|
+
/** Source timestamp in Unix milliseconds. */
|
|
712
|
+
asOfMs: number;
|
|
713
|
+
/** Whether accounting is complete, pending, or unavailable. */
|
|
714
|
+
quality: MobileSocialFeedPnlQuality;
|
|
715
|
+
}
|
|
716
|
+
/** Complete mutable position fields delivered together at one version. */
|
|
717
|
+
interface MobileSocialFeedPositionPatch {
|
|
718
|
+
/** Additional metrics for a position history session, when supplied. */
|
|
719
|
+
currentPosition?: MobileSocialFeedHistoryMetrics;
|
|
720
|
+
/** Position lifecycle UUID. */
|
|
721
|
+
positionId: string;
|
|
722
|
+
/** Positive integer string; compare as integers without Number conversion. */
|
|
723
|
+
positionVersion: string;
|
|
724
|
+
/** Position state timestamp in Unix milliseconds. */
|
|
725
|
+
stateAsOfMs: number;
|
|
726
|
+
/** Remaining average entry price in decimal units, frozen on close; null if unknown. */
|
|
727
|
+
entryPrice: BigNumber | null;
|
|
728
|
+
/** Basis of the displayed size and entry price. */
|
|
729
|
+
displayBasis: MobileSocialFeedPositionDisplayBasis;
|
|
730
|
+
/** Closing snapshot reference time, or null. */
|
|
731
|
+
snapshotAtMs: number | null;
|
|
732
|
+
/** Absolute quantity in x18 units. */
|
|
733
|
+
quantity: BigNumber;
|
|
734
|
+
/** Notional value in x18 units. */
|
|
735
|
+
notional: BigNumber;
|
|
736
|
+
/** Current lifecycle state. */
|
|
737
|
+
state: MobileSocialFeedPositionState;
|
|
738
|
+
/** Completeness of the available historical facts. */
|
|
739
|
+
historyQuality: MobileSocialFeedHistoryQuality;
|
|
740
|
+
/** Margin mode. */
|
|
741
|
+
marginMode: MobileFeedMarginMode;
|
|
742
|
+
/** Current or closing leverage. */
|
|
743
|
+
leverage: MobileSocialFeedLeverage;
|
|
744
|
+
/** Leverage reference time; null when unknown or inapplicable. */
|
|
745
|
+
leverageAtMs: number | null;
|
|
746
|
+
/** Current remaining PnL or the closed lifecycle's net result. */
|
|
747
|
+
pnl: MobileSocialFeedPnl;
|
|
748
|
+
}
|
|
749
|
+
/** Position displayed inside an automatic trade card. */
|
|
750
|
+
interface MobileSocialFeedPositionCard extends MobileSocialFeedPositionPatch {
|
|
751
|
+
/** Market product ID. */
|
|
752
|
+
productId: number;
|
|
753
|
+
/** Market display metadata. */
|
|
754
|
+
market: MobileSocialFeedMarket;
|
|
755
|
+
/** Position direction. */
|
|
756
|
+
direction: MobileFeedTradePositionDirection;
|
|
757
|
+
}
|
|
758
|
+
/** Interaction counters and the viewing account's relationship state. */
|
|
759
|
+
interface MobileSocialFeedInteraction {
|
|
760
|
+
/** Number of likes. */
|
|
761
|
+
likeCount: number;
|
|
762
|
+
/** Number of comments. */
|
|
763
|
+
commentCount: number;
|
|
764
|
+
/** Number of recorded views. */
|
|
765
|
+
viewCount: number;
|
|
766
|
+
/** Null when no viewing account is selected. */
|
|
767
|
+
likedByMe: boolean | null;
|
|
768
|
+
}
|
|
769
|
+
/** Capability flags for a social feed item. */
|
|
770
|
+
interface MobileSocialFeedCapabilities {
|
|
771
|
+
/** Whether liking is available. */
|
|
772
|
+
canLike: boolean;
|
|
773
|
+
/** Whether commenting is available. */
|
|
774
|
+
canComment: boolean;
|
|
775
|
+
/** Whether exposure recording is available. */
|
|
776
|
+
canRecordView: boolean;
|
|
777
|
+
}
|
|
778
|
+
/** Comment preview metadata for a social trade card. */
|
|
779
|
+
interface MobileSocialFeedCommentPreview {
|
|
780
|
+
/** Most recent readable replies. */
|
|
781
|
+
items: MobileSocialFeedReply[];
|
|
782
|
+
/** Comment count. */
|
|
783
|
+
totalCount: number;
|
|
784
|
+
/** Comment cursor, if available. */
|
|
785
|
+
nextCursor: string | null;
|
|
786
|
+
}
|
|
787
|
+
/** Exposure requirements associated with a reading session. */
|
|
788
|
+
interface MobileSocialFeedViewTracking {
|
|
789
|
+
/**
|
|
790
|
+
* Detail-visit exposure: report the primary detail target after it is shown in the foreground.
|
|
791
|
+
* List visible-ratio / dwell thresholds are no longer used.
|
|
792
|
+
*/
|
|
793
|
+
mode: 'detail_visit';
|
|
794
|
+
}
|
|
795
|
+
/** Uploaded feed image metadata; bytes are fetched separately with the reading session. */
|
|
796
|
+
interface MobileSocialFeedImage {
|
|
797
|
+
/** Image UUID. */
|
|
798
|
+
imageId: string;
|
|
799
|
+
/** Backend path for the original image bytes. */
|
|
800
|
+
url: string;
|
|
801
|
+
/** Display-orientation width in pixels. */
|
|
802
|
+
width: number;
|
|
803
|
+
/** Display-orientation height in pixels. */
|
|
804
|
+
height: number;
|
|
805
|
+
/** Detected content type. */
|
|
806
|
+
contentType: 'image/jpeg' | 'image/png';
|
|
807
|
+
/** Original file size in bytes. */
|
|
808
|
+
byteSize: number;
|
|
809
|
+
/** Always-present thumbnail (longest edge ≤ 512, never upscaled). */
|
|
810
|
+
thumbnail: MobileSocialFeedImageThumbnail;
|
|
811
|
+
}
|
|
812
|
+
/** Thumbnail metadata for an uploaded feed image. */
|
|
813
|
+
interface MobileSocialFeedImageThumbnail {
|
|
814
|
+
/** Backend path for the thumbnail bytes. */
|
|
815
|
+
url: string;
|
|
816
|
+
/** Thumbnail width in pixels. */
|
|
817
|
+
width: number;
|
|
818
|
+
/** Thumbnail height in pixels. */
|
|
819
|
+
height: number;
|
|
820
|
+
}
|
|
821
|
+
/** Coverage of the candidate authors in a qualification snapshot. */
|
|
822
|
+
interface MobileSocialFeedCohortCoverage {
|
|
823
|
+
/** Coverage domain. */
|
|
824
|
+
scope: 'eligible_content_candidates';
|
|
825
|
+
/** Candidate author count. */
|
|
826
|
+
totalAuthors: number;
|
|
827
|
+
/** Authors queried for this snapshot. */
|
|
828
|
+
queriedAuthors: number;
|
|
829
|
+
/** A successful response requires complete coverage. */
|
|
830
|
+
complete: true;
|
|
831
|
+
}
|
|
832
|
+
/** Shared qualification snapshot used for Top Traders eligibility and badges. */
|
|
833
|
+
interface MobileSocialFeedCohort {
|
|
834
|
+
/** Cohort UUID. */
|
|
835
|
+
snapshotId: string;
|
|
836
|
+
/** Ready or the previous successful snapshot after a refresh failure. */
|
|
837
|
+
status: MobileSocialFeedCohortStatus;
|
|
838
|
+
/** Coverage of all eligible candidate authors. */
|
|
839
|
+
coverage: MobileSocialFeedCohortCoverage;
|
|
840
|
+
}
|
|
841
|
+
/** Metadata shared by social feed content. */
|
|
842
|
+
interface MobileSocialFeedItemBase {
|
|
843
|
+
/** Item UUID. */
|
|
844
|
+
id: string;
|
|
845
|
+
/** Whether authored analysis exists. */
|
|
846
|
+
hasAnalysis: boolean;
|
|
847
|
+
/** Parsed drawing document, or null when no drawing is readable. */
|
|
848
|
+
drawing: MobileSocialFeedDrawing | null;
|
|
849
|
+
/** Author identity, badge, and follow perspective. */
|
|
850
|
+
author: MobileSocialFeedAuthor;
|
|
851
|
+
/** Creation time in Unix milliseconds. */
|
|
852
|
+
createdAtMs: number;
|
|
853
|
+
/** Sorting time in Unix milliseconds. */
|
|
854
|
+
displayAtMs: number;
|
|
855
|
+
/** Positive integer version string. */
|
|
856
|
+
version: string;
|
|
857
|
+
/** Market metadata. */
|
|
858
|
+
market: MobileSocialFeedMarket;
|
|
859
|
+
/** Server capability flags, subject to the corresponding write switches. */
|
|
860
|
+
capabilities: MobileSocialFeedCapabilities;
|
|
861
|
+
}
|
|
862
|
+
/** Content shared by authored posts and trade cards. */
|
|
863
|
+
interface MobileSocialFeedContentBase extends MobileSocialFeedItemBase {
|
|
864
|
+
/** Bound images in display order; empty when none. */
|
|
865
|
+
images: MobileSocialFeedImage[];
|
|
866
|
+
/** Card text, empty for automatic cards. */
|
|
867
|
+
text: string;
|
|
868
|
+
/** Mentions in the original, unmodified text. */
|
|
869
|
+
mentions: MobileSocialFeedMention[];
|
|
870
|
+
/** Current or frozen position display. */
|
|
871
|
+
position: MobileSocialFeedPositionCard;
|
|
872
|
+
/** Interaction counters. */
|
|
873
|
+
interaction: MobileSocialFeedInteraction;
|
|
874
|
+
/** Readable comment preview. */
|
|
875
|
+
commentPreview: MobileSocialFeedCommentPreview;
|
|
876
|
+
}
|
|
877
|
+
/** Trade card with optional authored text and analysis. */
|
|
878
|
+
interface MobileSocialFeedTradeCard extends MobileSocialFeedContentBase {
|
|
879
|
+
/** Card discriminant. */
|
|
880
|
+
kind: 'trade_card';
|
|
881
|
+
/** Trading action. */
|
|
882
|
+
action: MobileSocialFeedTradeCardAction;
|
|
883
|
+
}
|
|
884
|
+
/** Fields shared by size-change and liquidation trade rows. */
|
|
885
|
+
interface MobileSocialFeedTradeRowBase extends MobileSocialFeedItemBase {
|
|
886
|
+
/** Row discriminant. */
|
|
887
|
+
kind: 'trade_row';
|
|
888
|
+
/** Associated lifecycle UUID. */
|
|
889
|
+
positionId: string;
|
|
890
|
+
/** Position direction. */
|
|
891
|
+
direction: MobileFeedTradePositionDirection;
|
|
892
|
+
/** Historical margin mode. */
|
|
893
|
+
marginMode: MobileFeedMarginMode;
|
|
894
|
+
/** Historical action leverage, not the position's current leverage. */
|
|
895
|
+
leverage: MobileSocialFeedLeverage;
|
|
896
|
+
/** Historical leverage reference time. */
|
|
897
|
+
leverageAtMs: number | null;
|
|
898
|
+
/** Number of aggregated trades. */
|
|
899
|
+
tradeCount: number;
|
|
900
|
+
/** Absolute traded quantity in x18 units. */
|
|
901
|
+
quantity: BigNumber;
|
|
902
|
+
/** Actual execution price in decimal units, never an Oracle substitution. */
|
|
903
|
+
averagePrice: BigNumber | null;
|
|
904
|
+
}
|
|
905
|
+
/** A size-change row or liquidation row with independently nullable financial facts. */
|
|
906
|
+
type MobileSocialFeedTradeRow = MobileSocialFeedTradeRowBase & ({
|
|
907
|
+
/** Ordinary size-change action. */action: MobileSocialFeedTradeSizeChangeAction; /** Executed notional in x18 units. */
|
|
908
|
+
notional: BigNumber;
|
|
909
|
+
} | {
|
|
910
|
+
/** Liquidation discriminant. */action: 'liquidated'; /** Quantity times event Oracle; null if that Oracle is unknown. */
|
|
911
|
+
notional: BigNumber | null; /** Entry price immediately before the event, in decimal units. */
|
|
912
|
+
entryPrice: BigNumber | null; /** Event Oracle price in decimal units, used for display and size filtering. */
|
|
913
|
+
liquidationOraclePrice: BigNumber | null; /** Actual execution price in decimal units, independent of Oracle. */
|
|
914
|
+
liquidationExecutionPrice: BigNumber | null; /** Signed action PnL excluding ordinary fees/funding, or null. */
|
|
915
|
+
realizedPnlDelta: BigNumber | null;
|
|
916
|
+
});
|
|
917
|
+
/** Discriminated social feed content. */
|
|
918
|
+
type MobileSocialFeedItem = MobileSocialFeedTradeCard | MobileSocialFeedTradeRow | MobileSocialFeedPost | MobileSocialFeedReply;
|
|
919
|
+
/** Idle-renewed social feed reading session. Credentials and cursors must be returned unchanged. */
|
|
920
|
+
interface MobileSocialFeedReadSession {
|
|
921
|
+
/** Session identifier. */
|
|
922
|
+
sessionId: string;
|
|
923
|
+
/** Feed, item, or full position history session. */
|
|
924
|
+
mode: MobileSocialFeedReadSessionMode;
|
|
925
|
+
/** Current idle expiration in Unix milliseconds; legitimate session requests renew it. */
|
|
926
|
+
expiresAtMs: number;
|
|
927
|
+
/** Visibility requirements for explicit exposure reporting. */
|
|
928
|
+
viewTracking: MobileSocialFeedViewTracking;
|
|
929
|
+
/** Initial update baseline, distinct from the page cursor. */
|
|
930
|
+
updateCursor: string | null;
|
|
931
|
+
/** Credential for this reading session. Do not log or cache publicly. */
|
|
932
|
+
viewerToken: string;
|
|
933
|
+
}
|
|
934
|
+
/** Fixed-window list response; an empty page can still have a next cursor. */
|
|
935
|
+
interface MobileSocialFeedPage {
|
|
936
|
+
/** Reading session and its browser credential. */
|
|
937
|
+
readSession: MobileSocialFeedReadSession;
|
|
938
|
+
/** Visible items in server order; deduplicate by ID without local reordering. */
|
|
939
|
+
items: MobileSocialFeedItem[];
|
|
940
|
+
/** Opaque cursor; null only when pagination is complete. */
|
|
941
|
+
nextCursor: string | null;
|
|
942
|
+
/** New-content baseline, not a pagination or update cursor. */
|
|
943
|
+
watermark: string;
|
|
944
|
+
}
|
|
945
|
+
/** Main-feed page with its ordering version. */
|
|
946
|
+
interface MobileSocialFeedRankedPage extends MobileSocialFeedPage {
|
|
947
|
+
/** Current ordering contract: chronological-v1. */
|
|
948
|
+
rankingVersion: string;
|
|
949
|
+
}
|
|
950
|
+
/** Top Traders page, with one shared qualification snapshot for eligibility and badges. */
|
|
951
|
+
interface MobileSocialFeedTopTradersPage extends MobileSocialFeedRankedPage {
|
|
952
|
+
/** Author eligibility snapshot. */
|
|
953
|
+
cohort: MobileSocialFeedCohort;
|
|
954
|
+
}
|
|
955
|
+
/** Item details with either a new item session or the reused authorized session. */
|
|
956
|
+
interface MobileSocialFeedItemResponse {
|
|
957
|
+
/** Full visible item. */
|
|
958
|
+
item: MobileSocialFeedItem;
|
|
959
|
+
/** Session authorized for subsequent updates. */
|
|
960
|
+
readSession: MobileSocialFeedReadSession;
|
|
961
|
+
}
|
|
962
|
+
/** Item delta: omitted means unchanged; explicit null clears a prior value. */
|
|
963
|
+
interface MobileSocialFeedItemPatch {
|
|
964
|
+
/** Updated reply attachment; null clears it, omission leaves it unchanged. */
|
|
965
|
+
attachedPosition?: MobileSocialFeedPositionCard | null;
|
|
966
|
+
/** Updated reply attachment visibility. */
|
|
967
|
+
attachmentStatus?: MobileSocialFeedAttachmentStatus;
|
|
968
|
+
/** Current author identity, follow state, and qualification badge. */
|
|
969
|
+
author: MobileSocialFeedAuthor;
|
|
970
|
+
/** Target item UUID. */
|
|
971
|
+
itemId: string;
|
|
972
|
+
/** Positive integer version string. */
|
|
973
|
+
version: string;
|
|
974
|
+
/** Updated interaction counters. */
|
|
975
|
+
interaction?: MobileSocialFeedInteraction;
|
|
976
|
+
/** Updated display timestamp; does not reorder the current list. */
|
|
977
|
+
displayAtMs: number;
|
|
978
|
+
/** Updated aggregate count. */
|
|
979
|
+
tradeCount?: number;
|
|
980
|
+
/** Updated quantity in x18 units. */
|
|
981
|
+
quantity?: BigNumber;
|
|
982
|
+
/** Updated notional; liquidation Oracle may be unknown. */
|
|
983
|
+
notional?: BigNumber | null;
|
|
984
|
+
/** Updated actual execution price in decimal units. */
|
|
985
|
+
averagePrice?: BigNumber | null;
|
|
986
|
+
/** Historical liquidation entry price in decimal units. */
|
|
987
|
+
entryPrice?: BigNumber | null;
|
|
988
|
+
/** Updated liquidation Oracle price in decimal units. */
|
|
989
|
+
liquidationOraclePrice?: BigNumber | null;
|
|
990
|
+
/** Updated actual liquidation execution price in decimal units. */
|
|
991
|
+
liquidationExecutionPrice?: BigNumber | null;
|
|
992
|
+
/** Updated signed action PnL. */
|
|
993
|
+
realizedPnlDelta?: BigNumber | null;
|
|
994
|
+
/** Updated historical row leverage. */
|
|
995
|
+
leverage?: MobileSocialFeedLeverage;
|
|
996
|
+
/** Updated historical leverage reference time. */
|
|
997
|
+
leverageAtMs?: number | null;
|
|
998
|
+
}
|
|
999
|
+
/** Batched viewport updates; apply only the current viewport's latest request sequence. */
|
|
1000
|
+
interface MobileSocialFeedUpdates {
|
|
1001
|
+
/** Item deltas, independent of current-position patches. */
|
|
1002
|
+
itemPatches: MobileSocialFeedItemPatch[];
|
|
1003
|
+
/** Complete mutable position facts at one version. */
|
|
1004
|
+
positionPatches: MobileSocialFeedPositionPatch[];
|
|
1005
|
+
/** Previously authorized targets that can no longer be read. */
|
|
1006
|
+
unavailableTargets: MobileSocialFeedUnavailableTarget[];
|
|
1007
|
+
/** New-content hint; always zero for directly created item sessions. */
|
|
1008
|
+
newItemsCount: number;
|
|
1009
|
+
/** Baseline to use for the next update call with the same viewport. */
|
|
1010
|
+
updateCursor: string;
|
|
1011
|
+
/** Full snapshot of applicable mutable fields; currently always true. Apply author updates even when the item version is unchanged. */
|
|
1012
|
+
reset: boolean;
|
|
1013
|
+
/** Echoed viewport revision. */
|
|
1014
|
+
viewportRevision: number;
|
|
1015
|
+
/** Echoed request sequence. */
|
|
1016
|
+
requestSeq: number;
|
|
1017
|
+
}
|
|
1018
|
+
/** Public browsing requires no wallet, identity registration, or one-click trading setup. */
|
|
1019
|
+
interface MobileSocialFeedReadParams {
|
|
1020
|
+
/**
|
|
1021
|
+
* Non-isolated viewing account used for relationship state. Profile, position, and item reads also
|
|
1022
|
+
* include that account's own hidden content under the account_view policy; this does not prove ownership.
|
|
1023
|
+
*/
|
|
1024
|
+
viewAs?: Subaccount;
|
|
1025
|
+
/** Reuse the original browser credential for pagination and existing sessions. */
|
|
1026
|
+
viewerToken?: string;
|
|
1027
|
+
}
|
|
1028
|
+
/** Filters and fixed-session pagination common to all six social feed lists. */
|
|
1029
|
+
interface MobileSocialFeedListParams {
|
|
1030
|
+
/** OR-ed content filters; empty or omitted means all. */
|
|
1031
|
+
feedTypes?: MobileSocialFeedType[];
|
|
1032
|
+
/** Strict minimum in whole dollars, including 500; omit for all sizes. */
|
|
1033
|
+
minimumNotional?: number;
|
|
1034
|
+
/** Page size, 1–50; server default is 20. */
|
|
1035
|
+
limit?: number;
|
|
1036
|
+
/** Required with cursor; reuse the original filters, target, viewAs, credential, and limit. */
|
|
1037
|
+
sessionId?: string;
|
|
1038
|
+
/** Opaque cursor returned by nextCursor. Never substitute an update cursor. */
|
|
1039
|
+
cursor?: string;
|
|
1040
|
+
}
|
|
1041
|
+
/** Common filters and viewing context for main feeds and author feeds. */
|
|
1042
|
+
interface MobileSocialFeedCategorizedParams extends MobileSocialFeedListParams, MobileSocialFeedReadParams {
|
|
1043
|
+
/** Omit to include all market categories. */
|
|
1044
|
+
marketCategory?: MobileSocialFeedMarketCategory;
|
|
1045
|
+
}
|
|
1046
|
+
/** For You request with optional market category and viewing account. */
|
|
1047
|
+
type GetMobileForYouFeedParams = MobileSocialFeedCategorizedParams;
|
|
1048
|
+
/** Top Traders request; eligibility uses account PnL and results remain chronological. */
|
|
1049
|
+
type GetMobileTopTradersFeedParams = MobileSocialFeedCategorizedParams;
|
|
1050
|
+
/** Public content from the selected account's follow graph; no signature is required. */
|
|
1051
|
+
type GetMobileFriendsFeedParams = MobileSocialFeedCategorizedParams & {
|
|
1052
|
+
/** Required on every request, including pagination; no existing identity row is needed. */viewAs: Subaccount;
|
|
1053
|
+
};
|
|
1054
|
+
/** Author list request; the target is distinct from the viewing account. */
|
|
1055
|
+
type GetMobileProfileFeedParams = MobileSocialFeedCategorizedParams & {
|
|
1056
|
+
/** Target author, independent of the viewAs account. */subaccount: Subaccount;
|
|
1057
|
+
};
|
|
1058
|
+
/** Market list request; marketCategory is not accepted. */
|
|
1059
|
+
type GetMobileMarketFeedParams = MobileSocialFeedListParams & MobileSocialFeedReadParams & {
|
|
1060
|
+
/** Non-negative target product ID. */productId: number;
|
|
1061
|
+
};
|
|
1062
|
+
/** Published content in a lifecycle, not the complete position history. */
|
|
1063
|
+
type GetMobilePositionFeedParams = MobileSocialFeedListParams & MobileSocialFeedReadParams & {
|
|
1064
|
+
/** Target position UUID. */positionId: string;
|
|
1065
|
+
};
|
|
1066
|
+
/** Item request; omit sessionId to create an item reading session directly. */
|
|
1067
|
+
type GetMobileFeedItemParams = MobileSocialFeedReadParams & {
|
|
1068
|
+
/** Target item UUID. */itemId: string;
|
|
1069
|
+
/**
|
|
1070
|
+
* Detail-visit event UUID generated once per real navigation into this item.
|
|
1071
|
+
* Reuse the same value on retries for the same visit; omit for prefetch.
|
|
1072
|
+
* Registering the event does not increment the view count by itself.
|
|
1073
|
+
*/
|
|
1074
|
+
viewEventId?: string; /** Preview size, 0–3. */
|
|
1075
|
+
commentPreviewLimit?: number; /** Existing session authorized for the item. */
|
|
1076
|
+
sessionId?: string;
|
|
1077
|
+
};
|
|
1078
|
+
/** Viewport update request; requires the original viewerToken. */
|
|
1079
|
+
type GetMobileFeedUpdatesParams = {
|
|
1080
|
+
/** Inherited from the original session; updates cannot select a different viewing account. */viewAs?: never; /** Current reading session. */
|
|
1081
|
+
sessionId: string; /** Up to 50 distinct, already delivered item UUIDs. */
|
|
1082
|
+
visibleItemIds: string[]; /** Up to 20 distinct, authorized position UUIDs. */
|
|
1083
|
+
visiblePositionIds: string[]; /** Baseline from the last accepted update; omit for a changed viewport. */
|
|
1084
|
+
updateCursor?: string | null; /** Increment whenever the visible set changes. */
|
|
1085
|
+
viewportRevision: number; /** Increment on every request within the session, including after viewport changes; never reset for a new viewport. */
|
|
1086
|
+
requestSeq: number; /** Credential belonging to the original public session. */
|
|
1087
|
+
viewerToken: string;
|
|
1088
|
+
};
|
|
1089
|
+
/** Parsed drawing; data is opaque to the SDK and may legitimately be false or zero. */
|
|
1090
|
+
interface MobileSocialFeedDrawing {
|
|
1091
|
+
/** Already parsed drawing document; do not JSON.parse again. */
|
|
1092
|
+
data: unknown;
|
|
1093
|
+
/** Original creation time in milliseconds. */
|
|
1094
|
+
createdAtMs: number;
|
|
1095
|
+
/** Last update time in milliseconds. */
|
|
1096
|
+
updatedAtMs: number;
|
|
1097
|
+
}
|
|
1098
|
+
/** Nonrecursive root-post preview carried by replies. */
|
|
1099
|
+
interface MobileSocialFeedCompactCard {
|
|
1100
|
+
/** Root item UUID. */
|
|
1101
|
+
id: string;
|
|
1102
|
+
/** Root author. */
|
|
1103
|
+
author: MobileSocialFeedAuthor;
|
|
1104
|
+
/** Original text excerpt. */
|
|
1105
|
+
textExcerpt: string;
|
|
1106
|
+
/** Visible position summary, or null. */
|
|
1107
|
+
position: Pick<MobileSocialFeedPositionCard, 'positionId' | 'market' | 'direction' | 'state' | 'notional'> | null;
|
|
1108
|
+
/** Whether the root has published analysis. */
|
|
1109
|
+
hasAnalysis: boolean;
|
|
1110
|
+
}
|
|
1111
|
+
/** Authored position post, including text-only, drawing-only, and combined content. */
|
|
1112
|
+
interface MobileSocialFeedPost extends MobileSocialFeedContentBase {
|
|
1113
|
+
/** Post discriminant. */
|
|
1114
|
+
kind: 'post';
|
|
1115
|
+
}
|
|
1116
|
+
/** Reply with independently permissioned position attachment and nonrecursive root preview. */
|
|
1117
|
+
interface MobileSocialFeedReply extends MobileSocialFeedItemBase {
|
|
1118
|
+
/** Reply discriminant. */
|
|
1119
|
+
kind: 'reply';
|
|
1120
|
+
/** Bound images in display order; empty when none. */
|
|
1121
|
+
images: MobileSocialFeedImage[];
|
|
1122
|
+
/** Original text. */
|
|
1123
|
+
text: string;
|
|
1124
|
+
/** Mentions in the text. */
|
|
1125
|
+
mentions: MobileSocialFeedMention[];
|
|
1126
|
+
/** Actual root item UUID. */
|
|
1127
|
+
rootItemId: string;
|
|
1128
|
+
/** Omitted for a direct reply to the root. */
|
|
1129
|
+
replyToItemId?: string;
|
|
1130
|
+
/** Author being replied to, or null. */
|
|
1131
|
+
replyToAuthor: MobileSocialFeedAuthor | null;
|
|
1132
|
+
/** Readable attachment; null when absent or unavailable. */
|
|
1133
|
+
attachedPosition: MobileSocialFeedPositionCard | null;
|
|
1134
|
+
/** Distinguishes an absent attachment from an unreadable one. */
|
|
1135
|
+
attachmentStatus: MobileSocialFeedAttachmentStatus;
|
|
1136
|
+
/** Root preview; does not register root exposure. */
|
|
1137
|
+
original: MobileSocialFeedCompactCard;
|
|
1138
|
+
/** Reply interaction state. */
|
|
1139
|
+
interaction: MobileSocialFeedInteraction;
|
|
1140
|
+
}
|
|
1141
|
+
/** Current eligibility hints; actual writes still recheck the signed author. */
|
|
1142
|
+
interface MobileSocialFeedPublishablePosition {
|
|
1143
|
+
/** Candidate position. */
|
|
1144
|
+
position: MobileSocialFeedPositionCard;
|
|
1145
|
+
/** Whether this account can publish. */
|
|
1146
|
+
canPublish: boolean;
|
|
1147
|
+
/** Whether this account can attach the position to a comment. */
|
|
1148
|
+
canAttachToComment: boolean;
|
|
1149
|
+
/** Whether this account can first add analysis. */
|
|
1150
|
+
canDrawAnalysis: boolean;
|
|
1151
|
+
/** Unavailability explanation, or null. */
|
|
1152
|
+
unavailableReason: string | null;
|
|
1153
|
+
}
|
|
1154
|
+
/** An authoritative lifecycle segment of an order. */
|
|
1155
|
+
interface MobileSocialFeedActionCandidate {
|
|
1156
|
+
/** Action UUID. */
|
|
1157
|
+
actionId: string;
|
|
1158
|
+
/** Lifecycle UUID. */
|
|
1159
|
+
positionId: string;
|
|
1160
|
+
/** Lifecycle action. */
|
|
1161
|
+
action: MobileSocialFeedAction;
|
|
1162
|
+
/** Current publishing eligibility, not proof of caller ownership. */
|
|
1163
|
+
canPublish: boolean;
|
|
1164
|
+
/** Publication restriction, or null when eligible. */
|
|
1165
|
+
unavailableReason: MobileSocialFeedActionUnavailableReason | null;
|
|
1166
|
+
}
|
|
1167
|
+
/** Additional history metrics; unavailable values are not zero. */
|
|
1168
|
+
interface MobileSocialFeedHistoryMetrics {
|
|
1169
|
+
/** Estimated liquidation price in decimal units, independent of event Oracle and execution prices. */
|
|
1170
|
+
estimatedLiquidationPrice: BigNumber | null;
|
|
1171
|
+
/** Availability of the estimated price. */
|
|
1172
|
+
liquidationPriceQuality: MobileSocialFeedLiquidationPriceQuality;
|
|
1173
|
+
/** Source time in milliseconds. */
|
|
1174
|
+
liquidationPriceAsOfMs: number | null;
|
|
1175
|
+
/** Signed funding amount in x18. */
|
|
1176
|
+
fundingPnl: BigNumber | null;
|
|
1177
|
+
/** Funding availability. */
|
|
1178
|
+
fundingQuality: MobileSocialFeedPnlQuality;
|
|
1179
|
+
/** Funding source time in milliseconds. */
|
|
1180
|
+
fundingAsOfMs: number | null;
|
|
1181
|
+
}
|
|
1182
|
+
/** Full position card displayed above its historical timeline. */
|
|
1183
|
+
interface MobileSocialFeedPositionHistoryCard extends MobileSocialFeedPositionCard, MobileSocialFeedHistoryMetrics {}
|
|
1184
|
+
/** Persisted action facts, independent of whether a feed item was published. */
|
|
1185
|
+
interface MobileSocialFeedPositionAction {
|
|
1186
|
+
/** Action UUID. */
|
|
1187
|
+
id: string;
|
|
1188
|
+
/** Lifecycle UUID. */
|
|
1189
|
+
positionId: string;
|
|
1190
|
+
/** Lifecycle action. */
|
|
1191
|
+
action: MobileSocialFeedAction;
|
|
1192
|
+
/** Position direction. */
|
|
1193
|
+
direction: MobileFeedTradePositionDirection;
|
|
1194
|
+
/** Historical margin mode. */
|
|
1195
|
+
marginMode: MobileFeedMarginMode;
|
|
1196
|
+
/** Quantity before the action, in x18. */
|
|
1197
|
+
quantityBefore: BigNumber;
|
|
1198
|
+
/** Quantity after the action, in x18. */
|
|
1199
|
+
quantityAfter: BigNumber;
|
|
1200
|
+
/** Executed quantity, in x18. */
|
|
1201
|
+
executedQuantity: BigNumber;
|
|
1202
|
+
/** Actual executed notional in x18; may be unknown for liquidation. */
|
|
1203
|
+
executedNotional: BigNumber | null;
|
|
1204
|
+
/** Actual execution price in decimal units. */
|
|
1205
|
+
averagePrice: BigNumber | null;
|
|
1206
|
+
/** Entry price before the action, in decimal units. */
|
|
1207
|
+
entryPriceBefore: BigNumber | null;
|
|
1208
|
+
/** Liquidation event Oracle price in decimal units. */
|
|
1209
|
+
liquidationOraclePrice: BigNumber | null;
|
|
1210
|
+
/** Liquidation Oracle-based notional in x18. */
|
|
1211
|
+
liquidationNotional: BigNumber | null;
|
|
1212
|
+
/** Signed realized trading PnL in x18, excluding ordinary fees and funding. */
|
|
1213
|
+
realizedPnlDelta: BigNumber | null;
|
|
1214
|
+
/** Historical effective leverage. */
|
|
1215
|
+
leverage: MobileSocialFeedLeverage;
|
|
1216
|
+
/** Leverage source time in milliseconds. */
|
|
1217
|
+
leverageAtMs: number | null;
|
|
1218
|
+
/** First event time in milliseconds. */
|
|
1219
|
+
firstEventAtMs: number;
|
|
1220
|
+
/** Last event time in milliseconds. */
|
|
1221
|
+
lastEventAtMs: number;
|
|
1222
|
+
/** Decimal-string version. */
|
|
1223
|
+
version: string;
|
|
1224
|
+
}
|
|
1225
|
+
/** Full published content appearing in a position timeline. */
|
|
1226
|
+
type MobileSocialFeedHistoryTake = MobileSocialFeedTradeCard | MobileSocialFeedPost;
|
|
1227
|
+
/** A historical action or authored take; preserve service ordering. */
|
|
1228
|
+
type MobileSocialFeedTimelineEntry = {
|
|
1229
|
+
/** Action entry. */kind: 'action'; /** Full action facts. */
|
|
1230
|
+
action: MobileSocialFeedPositionAction; /** Actually associated feed item, or null. */
|
|
1231
|
+
relatedItemId: string | null; /** Full published trade card, or null. */
|
|
1232
|
+
relatedTake: MobileSocialFeedTradeCard | null;
|
|
1233
|
+
} | {
|
|
1234
|
+
/** Published take entry. */kind: 'take'; /** Full published content. */
|
|
1235
|
+
item: MobileSocialFeedHistoryTake;
|
|
1236
|
+
};
|
|
1237
|
+
/** Trusted trading target; this hint does not authorize trading. */
|
|
1238
|
+
interface MobileSocialFeedTradingTarget {
|
|
1239
|
+
/** Lifecycle UUID. */
|
|
1240
|
+
positionId: string;
|
|
1241
|
+
/** Parent identity. */
|
|
1242
|
+
identitySubaccount: Hex;
|
|
1243
|
+
/** Actual trading subaccount, possibly isolated. */
|
|
1244
|
+
tradingSubaccount: Hex;
|
|
1245
|
+
/** Market product ID. */
|
|
1246
|
+
productId: number;
|
|
1247
|
+
/** Margin mode. */
|
|
1248
|
+
marginMode: MobileFeedMarginMode;
|
|
1249
|
+
/** Isolated name, or null for cross margin. */
|
|
1250
|
+
isoSubaccountName: string | null;
|
|
1251
|
+
/** Position direction. */
|
|
1252
|
+
direction: MobileFeedTradePositionDirection;
|
|
1253
|
+
/** Source time in milliseconds. */
|
|
1254
|
+
stateAsOfMs: number;
|
|
1255
|
+
}
|
|
1256
|
+
/** Viewing-account trading hints, not authenticated permissions. */
|
|
1257
|
+
interface MobileSocialFeedTradingContext {
|
|
1258
|
+
/** Market product ID. */
|
|
1259
|
+
productId: number;
|
|
1260
|
+
/** Suggested trade direction. */
|
|
1261
|
+
suggestedDirection: MobileFeedTradePositionDirection;
|
|
1262
|
+
/** Resolution of the viewing account's positions. */
|
|
1263
|
+
resolution: MobileSocialFeedTradingResolution;
|
|
1264
|
+
/** Trusted candidates. */
|
|
1265
|
+
candidates: MobileSocialFeedTradingTarget[];
|
|
1266
|
+
/** Unique candidate, or null. */
|
|
1267
|
+
viewerPositionId: string | null;
|
|
1268
|
+
/** Whether the selected account has a unique reducible position. */
|
|
1269
|
+
canReduce: boolean;
|
|
1270
|
+
}
|
|
1271
|
+
/** Historical candle; volume is a quantity, not a price. */
|
|
1272
|
+
interface MobileSocialFeedCandle {
|
|
1273
|
+
/** Candle start time in milliseconds. */
|
|
1274
|
+
timestampMs: number;
|
|
1275
|
+
/** Open price in decimal units. */
|
|
1276
|
+
open: BigNumber;
|
|
1277
|
+
/** High price in decimal units. */
|
|
1278
|
+
high: BigNumber;
|
|
1279
|
+
/** Low price in decimal units. */
|
|
1280
|
+
low: BigNumber;
|
|
1281
|
+
/** Close price in decimal units. */
|
|
1282
|
+
close: BigNumber;
|
|
1283
|
+
/** Base asset volume in x18. */
|
|
1284
|
+
volume: BigNumber;
|
|
1285
|
+
}
|
|
1286
|
+
/** Chart action marker with explicitly identified price basis. */
|
|
1287
|
+
interface MobileSocialFeedActionMarker {
|
|
1288
|
+
/** Action UUID. */
|
|
1289
|
+
actionId: string;
|
|
1290
|
+
/** Event time in milliseconds. */
|
|
1291
|
+
timestampMs: number;
|
|
1292
|
+
/** Price in decimal units; null does not remove the action. */
|
|
1293
|
+
price: BigNumber | null;
|
|
1294
|
+
/** Lifecycle action. */
|
|
1295
|
+
action: MobileSocialFeedAction;
|
|
1296
|
+
/** Direction. */
|
|
1297
|
+
direction: MobileFeedTradePositionDirection;
|
|
1298
|
+
/** Never substitute actual execution for a liquidation Oracle. */
|
|
1299
|
+
priceBasis: MobileSocialFeedActionPriceBasis;
|
|
1300
|
+
}
|
|
1301
|
+
/** Parameters for listing the selected account's open position candidates. */
|
|
1302
|
+
interface GetMobileSelfFeedPositionsParams {
|
|
1303
|
+
/** Full non-isolated identity; selecting it is not authentication. */
|
|
1304
|
+
viewAs: Subaccount;
|
|
1305
|
+
/** Optional market filter. */
|
|
1306
|
+
productId?: number;
|
|
1307
|
+
/** Opaque cursor bound to the account and filters. */
|
|
1308
|
+
cursor?: string;
|
|
1309
|
+
/** Page size, 1-50; defaults to 20. */
|
|
1310
|
+
limit?: number;
|
|
1311
|
+
}
|
|
1312
|
+
/** Parameters for resolving a slash command against the selected account. */
|
|
1313
|
+
interface ResolveMobileFeedPositionParams {
|
|
1314
|
+
/** Required non-isolated viewing account. */
|
|
1315
|
+
viewAs: Subaccount;
|
|
1316
|
+
/** Original command, such as /position or /BTC; passed unchanged. */
|
|
1317
|
+
input: string;
|
|
1318
|
+
/** Optional market disambiguation. */
|
|
1319
|
+
productId?: number;
|
|
1320
|
+
}
|
|
1321
|
+
/** Parameters for resolving all trusted lifecycle segments of an order. */
|
|
1322
|
+
interface ResolveMobileFeedActionParams {
|
|
1323
|
+
/** Required order-owning identity; the caller need not own it to read. */
|
|
1324
|
+
viewAs: Subaccount;
|
|
1325
|
+
/** Order digest returned by trading. */
|
|
1326
|
+
orderDigest: Hex;
|
|
1327
|
+
}
|
|
1328
|
+
/** Parameters for atomic text, drawing, or combined publication. */
|
|
1329
|
+
interface MobileCreateFeedPostParams extends MobileSignedRequestParams {
|
|
1330
|
+
/** Author-scoped idempotency UUID; reuse unchanged for a retry. */
|
|
1331
|
+
clientRequestId: string;
|
|
1332
|
+
/** Lifecycle still held by the signed author. */
|
|
1333
|
+
positionId: string;
|
|
1334
|
+
/** Trusted action for a trading annotation; omit for an independent post. */
|
|
1335
|
+
actionId?: string;
|
|
1336
|
+
/** Original text, at most 2,000 code points; empty is allowed with a drawing. */
|
|
1337
|
+
text: string;
|
|
1338
|
+
/** At most ten mentions, with offsets into the original text. */
|
|
1339
|
+
mentions: MobileSocialFeedMentionParams[];
|
|
1340
|
+
/** Original JSON text, at most 256 KiB UTF-8; never reformatted by the SDK. */
|
|
1341
|
+
drawingDataJson?: string;
|
|
1342
|
+
/**
|
|
1343
|
+
* Up to nine distinct ready image UUIDs owned by the signer, in display order.
|
|
1344
|
+
* Omit or pass `[]` when none; order participates in the signature and idempotency hash.
|
|
1345
|
+
* Images alone are not enough — nonblank text or a valid drawing is still required.
|
|
1346
|
+
*/
|
|
1347
|
+
imageIds?: string[];
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Direct multipart upload of one static JPEG/PNG (whole request ≤ 2 MiB including signature overhead).
|
|
1351
|
+
* The SDK hashes the bytes as Keccak256 for signing; the service verifies the received file matches.
|
|
1352
|
+
*/
|
|
1353
|
+
interface MobileCreateFeedImageUploadParams extends MobileSignedRequestParams {
|
|
1354
|
+
/** Raw original file bytes; format is validated by the service. */
|
|
1355
|
+
fileBytes: Uint8Array;
|
|
1356
|
+
}
|
|
1357
|
+
/** Parameters for preparing a protected feed image request with a reading session. */
|
|
1358
|
+
interface GetMobileFeedImageRequestParams {
|
|
1359
|
+
/** Backend path from {@link MobileSocialFeedImage.url} or thumbnail.url. */
|
|
1360
|
+
path: string;
|
|
1361
|
+
/** Reading session that fully delivered the parent item. */
|
|
1362
|
+
sessionId: string;
|
|
1363
|
+
/** Browser credential for that session. */
|
|
1364
|
+
viewerToken: string;
|
|
1365
|
+
}
|
|
1366
|
+
/** Parameters for fetching protected feed image bytes with a reading session. */
|
|
1367
|
+
type GetMobileFeedImageBytesParams = GetMobileFeedImageRequestParams;
|
|
1368
|
+
/** URL and authentication headers for native image components or direct image reads. */
|
|
1369
|
+
interface MobileFeedImageRequest {
|
|
1370
|
+
/** Absolute image URL; pass as the native image source URI. */
|
|
1371
|
+
url: string;
|
|
1372
|
+
/** Original reading-session credentials required to access the image. */
|
|
1373
|
+
headers: Record<string, string>;
|
|
1374
|
+
}
|
|
1375
|
+
/** Parameters for first adding or replacing a drawing. Writes must be serialized by the caller. */
|
|
1376
|
+
interface MobileFeedChartDrawingParams extends MobileSignedRequestParams {
|
|
1377
|
+
/** Author-owned item UUID. */
|
|
1378
|
+
itemId: string;
|
|
1379
|
+
/** Complete original JSON text; false and zero are valid documents. */
|
|
1380
|
+
dataJson: string;
|
|
1381
|
+
}
|
|
1382
|
+
/** Parameters for reading a drawing with the original session or an independent account perspective. */
|
|
1383
|
+
interface GetMobileFeedChartDrawingParams extends MobileSocialFeedReadParams {
|
|
1384
|
+
/** Parent item UUID. */
|
|
1385
|
+
itemId: string;
|
|
1386
|
+
/** If supplied, the original viewerToken is required; independent reads omit both. */
|
|
1387
|
+
sessionId?: string;
|
|
1388
|
+
}
|
|
1389
|
+
/** Parameters for a comment thread; cursor and anchorReplyId are mutually exclusive. */
|
|
1390
|
+
interface GetMobileFeedCommentsParams extends MobileSocialFeedReadParams {
|
|
1391
|
+
/** Root post UUID. */
|
|
1392
|
+
rootItemId: string;
|
|
1393
|
+
/** Forward or backward opaque cursor from the same session. */
|
|
1394
|
+
cursor?: string;
|
|
1395
|
+
/** Page size, 1-50; defaults to 20. */
|
|
1396
|
+
limit?: number;
|
|
1397
|
+
/** First-page reply anchor; cannot be combined with cursor. */
|
|
1398
|
+
anchorReplyId?: string;
|
|
1399
|
+
/** Reuse the original session and viewerToken when navigating or paging. */
|
|
1400
|
+
sessionId?: string;
|
|
1401
|
+
}
|
|
1402
|
+
/** Parameters for posting a comment or reply with an optional owned position attachment. */
|
|
1403
|
+
interface MobileCreateFeedCommentParams extends MobileSignedRequestParams {
|
|
1404
|
+
/** Author-scoped idempotency UUID. */
|
|
1405
|
+
clientRequestId: string;
|
|
1406
|
+
/** Commentable root UUID. */
|
|
1407
|
+
rootItemId: string;
|
|
1408
|
+
/** Reply within the same thread; omit to reply to the root. */
|
|
1409
|
+
replyToItemId?: string;
|
|
1410
|
+
/** Nonblank original text, at most 1,000 Unicode code points. */
|
|
1411
|
+
text: string;
|
|
1412
|
+
/** At most ten mentions into the original text. */
|
|
1413
|
+
mentions: MobileSocialFeedMentionParams[];
|
|
1414
|
+
/** Position still held by the signed author; invalid attachment rejects the whole request. */
|
|
1415
|
+
attachedPositionId?: string;
|
|
1416
|
+
/**
|
|
1417
|
+
* Up to nine distinct ready image UUIDs owned by the signer, in display order.
|
|
1418
|
+
* Omit or pass `[]` when none; images cannot replace the required nonblank text.
|
|
1419
|
+
*/
|
|
1420
|
+
imageIds?: string[];
|
|
1421
|
+
}
|
|
1422
|
+
/** Parameters for setting or cancelling a signed user's like. */
|
|
1423
|
+
interface MobileSetFeedLikeParams extends MobileSignedRequestParams {
|
|
1424
|
+
/** Readable, interactive item UUID. */
|
|
1425
|
+
itemId: string;
|
|
1426
|
+
/** Desired relationship state. */
|
|
1427
|
+
isLiked: boolean;
|
|
1428
|
+
}
|
|
1429
|
+
/**
|
|
1430
|
+
* Unsigned detail-visit report. Call after the primary detail target is shown in the foreground,
|
|
1431
|
+
* using the same {@link GetMobileFeedItemParams.viewEventId} previously sent to `getFeedItem`.
|
|
1432
|
+
*/
|
|
1433
|
+
interface MobileRecordFeedViewsParams {
|
|
1434
|
+
/** Original reading session returned by the detail read. */
|
|
1435
|
+
sessionId: string;
|
|
1436
|
+
/** Original opaque browsing credential from that read session. */
|
|
1437
|
+
viewerToken: string;
|
|
1438
|
+
/**
|
|
1439
|
+
* Detail-visit event UUID registered on the preceding feed_item call.
|
|
1440
|
+
* Reuse across retries for the same visit; generate a new UUID only after leaving and re-entering.
|
|
1441
|
+
*/
|
|
1442
|
+
viewEventId: string;
|
|
1443
|
+
/** Exactly one fully delivered, readable detail-target item UUID. */
|
|
1444
|
+
itemId: string;
|
|
1445
|
+
}
|
|
1446
|
+
/** Parameters for full position history, not just published feed items. */
|
|
1447
|
+
interface GetMobilePositionHistoryParams extends MobileSocialFeedReadParams {
|
|
1448
|
+
/** Lifecycle UUID. */
|
|
1449
|
+
positionId: string;
|
|
1450
|
+
/** Only published takes when true; defaults to false. */
|
|
1451
|
+
takesOnly?: boolean;
|
|
1452
|
+
/** Opaque history cursor; requires the original position session and viewerToken. */
|
|
1453
|
+
cursor?: string;
|
|
1454
|
+
/** Page size, 1-50; defaults to 20. */
|
|
1455
|
+
limit?: number;
|
|
1456
|
+
/** History session; do not substitute a feed session. */
|
|
1457
|
+
sessionId?: string;
|
|
1458
|
+
}
|
|
1459
|
+
/** Counts across the authorized position history. */
|
|
1460
|
+
interface MobileSocialFeedHistorySummary {
|
|
1461
|
+
/** Action count. */
|
|
1462
|
+
actionCount: number;
|
|
1463
|
+
/** Published take count. */
|
|
1464
|
+
takeCount: number;
|
|
1465
|
+
}
|
|
1466
|
+
/** Estimated liquidation price and its source time. */
|
|
1467
|
+
interface MobileSocialFeedEstimatedLiquidationLine {
|
|
1468
|
+
/** Decimal price. */
|
|
1469
|
+
price: BigNumber;
|
|
1470
|
+
/** Source time in milliseconds. */
|
|
1471
|
+
asOfMs: number;
|
|
1472
|
+
}
|
|
1473
|
+
/** Half-open chart range, preserved across pages. */
|
|
1474
|
+
interface MobileSocialFeedChartRange {
|
|
1475
|
+
/** Inclusive start in milliseconds. */
|
|
1476
|
+
fromMs: number;
|
|
1477
|
+
/** Exclusive end in milliseconds. */
|
|
1478
|
+
toMs: number;
|
|
1479
|
+
}
|
|
1480
|
+
/** Parameters for position candles and action markers. */
|
|
1481
|
+
interface GetMobilePositionChartParams extends MobileSocialFeedReadParams {
|
|
1482
|
+
/** Lifecycle UUID. */
|
|
1483
|
+
positionId: string;
|
|
1484
|
+
/** Original session, if reusing one; must be paired with viewerToken. */
|
|
1485
|
+
sessionId?: string;
|
|
1486
|
+
/** Candle interval. */
|
|
1487
|
+
interval: MobileSocialFeedChartInterval;
|
|
1488
|
+
/** Half-open time range; preserve it when paging. */
|
|
1489
|
+
range: MobileSocialFeedChartRange;
|
|
1490
|
+
/** Exclusive candle upper bound for subsequent pages. */
|
|
1491
|
+
beforeMs?: number;
|
|
1492
|
+
/** Candle count, 1-500; defaults to 200. */
|
|
1493
|
+
limit?: number;
|
|
1494
|
+
}
|
|
1495
|
+
/** Unsigned, page-scoped presence registration using the original reading credential. */
|
|
1496
|
+
interface MobilePositionPresenceParams {
|
|
1497
|
+
/** Lifecycle UUID authorized by the session. */
|
|
1498
|
+
positionId: string;
|
|
1499
|
+
/** Original reading session. */
|
|
1500
|
+
sessionId: string;
|
|
1501
|
+
/** Original browsing credential; determines visitor deduplication. */
|
|
1502
|
+
viewerToken: string;
|
|
1503
|
+
/** UUID generated per page, retained for that page's lifetime. */
|
|
1504
|
+
viewSessionId: string;
|
|
1505
|
+
/** Enter, renew, or leave the page. */
|
|
1506
|
+
state: MobileSocialFeedPresenceState;
|
|
1507
|
+
/** Self-reported display account: omission preserves it, null clears it. Not authentication. */
|
|
1508
|
+
watcherSubaccount?: Subaccount | null;
|
|
1509
|
+
}
|
|
1510
|
+
/** Parameters for read-only watcher counts; this query never registers presence. */
|
|
1511
|
+
interface GetMobilePositionWatchersParams {
|
|
1512
|
+
/** Lifecycle UUID. */
|
|
1513
|
+
positionId: string;
|
|
1514
|
+
/** Optional relationship perspective, not a watcher registration. */
|
|
1515
|
+
viewAs?: Subaccount;
|
|
1516
|
+
}
|
|
1517
|
+
/** Open position candidates for a selected identity. */
|
|
1518
|
+
interface MobileSocialFeedPositionsPage {
|
|
1519
|
+
/** Current candidates and eligibility hints. */
|
|
1520
|
+
positions: MobileSocialFeedPublishablePosition[];
|
|
1521
|
+
/** Next opaque cursor, or null. */
|
|
1522
|
+
nextCursor: string | null;
|
|
1523
|
+
/** Observation time in milliseconds. */
|
|
1524
|
+
asOfMs: number;
|
|
1525
|
+
}
|
|
1526
|
+
/** Position command result, including normal empty/unknown outcomes. */
|
|
1527
|
+
interface MobileSocialFeedPositionResolutionResult {
|
|
1528
|
+
/** Resolution outcome. */
|
|
1529
|
+
resolution: MobileSocialFeedPositionResolution;
|
|
1530
|
+
/** Resolved market, or null for an unknown or unconstrained market. */
|
|
1531
|
+
product: MobileSocialFeedMarket | null;
|
|
1532
|
+
/** Eligible open position candidates. */
|
|
1533
|
+
candidates: MobileSocialFeedPublishablePosition[];
|
|
1534
|
+
/** Explanation for no position or unknown market. */
|
|
1535
|
+
reason: MobileSocialFeedPositionResolutionReason | null;
|
|
1536
|
+
}
|
|
1537
|
+
/** Trusted order actions; pending is distinct from a source failure. */
|
|
1538
|
+
interface MobileSocialFeedActionResolutionResult {
|
|
1539
|
+
/** Requested order digest. */
|
|
1540
|
+
orderDigest: Hex;
|
|
1541
|
+
/** Ready when all currently confirmed segments have been projected. */
|
|
1542
|
+
resolution: MobileSocialFeedActionResolution;
|
|
1543
|
+
/** All trusted segments, or an empty array when pending. */
|
|
1544
|
+
actions: MobileSocialFeedActionCandidate[];
|
|
1545
|
+
/** Observation time in milliseconds. */
|
|
1546
|
+
asOfMs: number;
|
|
1547
|
+
}
|
|
1548
|
+
/** Readable drawing and parent display version; drawing data is already parsed. */
|
|
1549
|
+
interface MobileSocialFeedDrawingResult {
|
|
1550
|
+
/** Parent item UUID. */
|
|
1551
|
+
itemId: string;
|
|
1552
|
+
/** Current parent display version. */
|
|
1553
|
+
itemVersion: string;
|
|
1554
|
+
/** Null when the readable parent has no drawing. */
|
|
1555
|
+
drawing: MobileSocialFeedDrawing | null;
|
|
1556
|
+
}
|
|
1557
|
+
/** Saved drawing returned by successful creation or replacement. */
|
|
1558
|
+
interface MobileSocialFeedDrawingMutationResult {
|
|
1559
|
+
/** Parent item UUID. */
|
|
1560
|
+
itemId: string;
|
|
1561
|
+
/** Post-mutation parent display version. */
|
|
1562
|
+
itemVersion: string;
|
|
1563
|
+
/** Saved parsed drawing. */
|
|
1564
|
+
drawing: MobileSocialFeedDrawing;
|
|
1565
|
+
}
|
|
1566
|
+
/** Comment thread page, including both directions around an anchor. */
|
|
1567
|
+
interface MobileSocialFeedCommentsPage {
|
|
1568
|
+
/** Requested anchor, or null when reading without one. */
|
|
1569
|
+
anchorReplyId: string | null;
|
|
1570
|
+
/** Readable replies in service order. */
|
|
1571
|
+
comments: MobileSocialFeedReply[];
|
|
1572
|
+
/** Total readable comment count. */
|
|
1573
|
+
totalCount: number;
|
|
1574
|
+
/** Forward cursor, or null. */
|
|
1575
|
+
nextCursor: string | null;
|
|
1576
|
+
/** Backward cursor, or null. */
|
|
1577
|
+
previousCursor: string | null;
|
|
1578
|
+
/** Original or newly created reading session. */
|
|
1579
|
+
readSession: MobileSocialFeedReadSession;
|
|
1580
|
+
}
|
|
1581
|
+
/** Atomic comment publication result. */
|
|
1582
|
+
interface MobileSocialFeedCommentResult {
|
|
1583
|
+
/** Published reply. */
|
|
1584
|
+
comment: MobileSocialFeedReply;
|
|
1585
|
+
/** Post-commit root comment count. */
|
|
1586
|
+
rootCommentCount: number;
|
|
1587
|
+
}
|
|
1588
|
+
/** Authoritative post-mutation like state. */
|
|
1589
|
+
interface MobileSocialFeedLikeResult {
|
|
1590
|
+
/** Item UUID. */
|
|
1591
|
+
itemId: string;
|
|
1592
|
+
/** Desired applied state. */
|
|
1593
|
+
isLiked: boolean;
|
|
1594
|
+
/** Post-mutation count. */
|
|
1595
|
+
likeCount: number;
|
|
1596
|
+
/** Item display version. */
|
|
1597
|
+
version: string;
|
|
1598
|
+
}
|
|
1599
|
+
/** Exposure deduplication result for the current UTC day. */
|
|
1600
|
+
interface MobileSocialFeedViewsResult {
|
|
1601
|
+
/** Newly counted item UUIDs. */
|
|
1602
|
+
acceptedItemIds: string[];
|
|
1603
|
+
/** Already counted item UUIDs. */
|
|
1604
|
+
duplicateItemIds: string[];
|
|
1605
|
+
}
|
|
1606
|
+
/** Full position history and viewing-account trading hints. */
|
|
1607
|
+
interface MobileSocialFeedPositionHistory {
|
|
1608
|
+
/** Position and additional history metrics. */
|
|
1609
|
+
position: MobileSocialFeedPositionHistoryCard;
|
|
1610
|
+
/** Whole-history counts. */
|
|
1611
|
+
summary: MobileSocialFeedHistorySummary;
|
|
1612
|
+
/** Ordered actions and takes; no synthesized items. */
|
|
1613
|
+
timeline: MobileSocialFeedTimelineEntry[];
|
|
1614
|
+
/** Next cursor, or null. */
|
|
1615
|
+
nextCursor: string | null;
|
|
1616
|
+
/** Completeness, independent of whether any items were published. */
|
|
1617
|
+
historyQuality: MobileSocialFeedHistoryQuality;
|
|
1618
|
+
/** Position-mode session for navigation, updates, and statistics. */
|
|
1619
|
+
readSession: MobileSocialFeedReadSession;
|
|
1620
|
+
/** Hints only; actual trading requires authentication. */
|
|
1621
|
+
tradingContext: MobileSocialFeedTradingContext;
|
|
1622
|
+
}
|
|
1623
|
+
/** Candle page and event-price markers, independent of drawing data. */
|
|
1624
|
+
interface MobileSocialFeedPositionChart {
|
|
1625
|
+
/** Candles in descending timestamp order. */
|
|
1626
|
+
candles: MobileSocialFeedCandle[];
|
|
1627
|
+
/** Actions, retaining markers whose price is unknown. */
|
|
1628
|
+
actionMarkers: MobileSocialFeedActionMarker[];
|
|
1629
|
+
/** Estimated price, never substituted for execution or Oracle event prices. */
|
|
1630
|
+
estimatedLiquidationLine: MobileSocialFeedEstimatedLiquidationLine | null;
|
|
1631
|
+
/** Exclusive candle upper bound for the next page. */
|
|
1632
|
+
nextBeforeMs: number | null;
|
|
1633
|
+
/** Observation time in milliseconds. */
|
|
1634
|
+
asOfMs: number;
|
|
1635
|
+
/** Reliability of this response. */
|
|
1636
|
+
dataQuality: MobileSocialFeedChartDataQuality;
|
|
1637
|
+
}
|
|
1638
|
+
/** Current visitor count and self-reported public account previews. */
|
|
1639
|
+
interface MobileSocialFeedWatchers {
|
|
1640
|
+
/** Distinct active browsing credentials, not unique accounts. */
|
|
1641
|
+
watcherCount: number;
|
|
1642
|
+
/** Deduplicated self-reported accounts; may be fewer than watcherCount. */
|
|
1643
|
+
watcherPreview: MobileSocialFeedAuthor[];
|
|
1644
|
+
/** Observation time in milliseconds. */
|
|
1645
|
+
asOfMs: number;
|
|
1646
|
+
}
|
|
1647
|
+
/** Presence result; does not include an observation timestamp. */
|
|
1648
|
+
interface MobileSocialFeedPresence {
|
|
1649
|
+
/** Distinct active browsing credentials. */
|
|
1650
|
+
watcherCount: number;
|
|
1651
|
+
/** Self-reported account previews, not authenticated visitors. */
|
|
1652
|
+
watcherPreview: MobileSocialFeedAuthor[];
|
|
1653
|
+
/** Recommended heartbeat cadence in seconds. */
|
|
1654
|
+
heartbeatIntervalSeconds: number;
|
|
1655
|
+
/** Remaining lease lifetime in seconds. */
|
|
1656
|
+
expiresInSeconds: number;
|
|
1657
|
+
}
|
|
1658
|
+
/** Mention input, using the same structured subaccount convention as other signed SDK inputs. */
|
|
1659
|
+
interface MobileSocialFeedMentionParams extends Omit<MobileSocialFeedMention, 'subaccount'> {
|
|
1660
|
+
/** Mentioned identity; serialized to bytes32 for signing. */
|
|
1661
|
+
subaccount: Subaccount;
|
|
1662
|
+
}
|
|
1663
|
+
//#endregion
|
|
1664
|
+
export { MobileNotificationPreferences as $, MobileSocialFeedLikeResult as $t, MobileAvatarSelection as A, MobileSocialFeedViewsResult as An, MobileSocialFeedCategorizedParams as At, MobileFeedTrade as B, SearchMobileProfilesParams as Bn, MobileSocialFeedDrawingMutationResult as Bt, GetMobileProfileFeedParams as C, MobileSocialFeedTradeRow as Cn, MobileSignedRequestParams as Ct, GetMobileTopTradersFeedParams as D, MobileSocialFeedTradingTarget as Dn, MobileSocialFeedAuthor as Dt, GetMobileSelfFeedPositionsParams as E, MobileSocialFeedTradingContext as En, MobileSocialFeedActionResolutionResult as Et, MobileCreateFeedPostParams as F, MobileUpdateNotificationSubscriptionsParams as Fn, MobileSocialFeedCommentResult as Ft, MobileFollowSummary as G, MobileSocialFeedHistoryTake as Gt, MobileFollowListAccount as H, MobileSocialFeedEstimatedLiquidationLine as Ht, MobileFeedChartDrawingParams as I, MobileUsernameAvailability as In, MobileSocialFeedCommentsPage as It, MobileNotificationCategoryPreference as J, MobileSocialFeedInteraction as Jt, MobileIdentitySummary as K, MobileSocialFeedImage as Kt, MobileFeedImageRequest as L, MobileWithExpoTokenParams as Ln, MobileSocialFeedCompactCard as Lt, MobileCreateAvatarUploadParams as M, MobileUnregisterExpoTokenParams as Mn, MobileSocialFeedCohort as Mt, MobileCreateFeedCommentParams as N, MobileUpdateNotificationPreferencesParams as Nn, MobileSocialFeedCohortCoverage as Nt, GetMobileUsernameAvailabilityParams as O, MobileSocialFeedUpdates as On, MobileSocialFeedCandle as Ot, MobileCreateFeedImageUploadParams as P, MobileUpdateNotificationSettingsV2Params as Pn, MobileSocialFeedCommentPreview as Pt, MobileNotificationPreferenceScope as Q, MobileSocialFeedItemResponse as Qt, MobileFeedMargin as R, ResolveMobileFeedActionParams as Rn, MobileSocialFeedContentBase as Rt, GetMobilePositionWatchersParams as S, MobileSocialFeedTradeCard as Sn, MobileSetUsernameParams as St, GetMobileRegisteredWalletParams as T, MobileSocialFeedTraderBadge as Tn, MobileSocialFeedActionMarker as Tt, MobileFollowListPage as U, MobileSocialFeedHistoryMetrics as Ut, MobileFollowBatchResultItem as V, MobileSocialFeedDrawingResult as Vt, MobileFollowMutationResult as W, MobileSocialFeedHistorySummary as Wt, MobileNotificationInboxV2 as X, MobileSocialFeedItemBase as Xt, MobileNotificationInboxItem as Y, MobileSocialFeedItem as Yt, MobileNotificationPayloadV2 as Z, MobileSocialFeedItemPatch as Zt, GetMobileNotificationSettingsV2Params as _, MobileSocialFeedReadParams as _n, MobileSetBioParams as _t, GetMobileFeedItemParams as a, MobileSocialFeedPositionAction as an, MobileNotificationSubscriptionsUpdate as at, GetMobilePositionFeedParams as b, MobileSocialFeedTimelineEntry as bn, MobileSetFollowParams as bt, GetMobileFollowListParams as c, MobileSocialFeedPositionHistory as cn, MobileProfileSearchPage as ct, GetMobileForYouFeedParams as d, MobileSocialFeedPositionResolutionResult as dn, MobileRecordFeedViewsParams as dt, MobileSocialFeedListParams as en, MobileNotificationRegistrationV2 as et, GetMobileFriendsFeedParams as f, MobileSocialFeedPositionsPage as fn, MobileRecordProductEventsParams as ft, GetMobileNotificationRegistrationV2Params as g, MobileSocialFeedRankedPage as gn, MobileSetAvatarParams as gt, GetMobileNotificationPreferencesParams as h, MobileSocialFeedPublishablePosition as hn, MobileRegisteredWallet as ht, GetMobileFeedImageRequestParams as i, MobileSocialFeedPnl as in, MobileNotificationSubscriptions as it, MobileAvatarUpload as j, MobileSocialFeedWatchers as jn, MobileSocialFeedChartRange as jt, MobileAvatarPreset as k, MobileSocialFeedViewTracking as kn, MobileSocialFeedCapabilities as kt, GetMobileFollowersParams as l, MobileSocialFeedPositionHistoryCard as ln, MobileProfilesInclude as lt, GetMobileNotificationInboxV2Params as m, MobileSocialFeedPresence as mn, MobileRegisterExpoTokenV2Params as mt, GetMobileFeedCommentsParams as n, MobileSocialFeedMentionParams as nn, MobileNotificationSettings as nt, GetMobileFeedParams as o, MobileSocialFeedPositionCard as on, MobilePositionPresenceParams as ot, GetMobileMarketFeedParams as p, MobileSocialFeedPost as pn, MobileRegisterExpoTokenParams as pt, MobileNotificationCapabilities as q, MobileSocialFeedImageThumbnail as qt, GetMobileFeedImageBytesParams as r, MobileSocialFeedPage as rn, MobileNotificationSettingsV2 as rt, GetMobileFeedUpdatesParams as s, MobileSocialFeedPositionChart as sn, MobileProductEvent as st, GetMobileFeedChartDrawingParams as t, MobileSocialFeedMarket as tn, MobileNotificationRoute as tt, GetMobileFollowingParams as u, MobileSocialFeedPositionPatch as un, MobilePublicProfile as ut, GetMobileNotificationSubscriptionsParams as v, MobileSocialFeedReadSession as vn, MobileSetFeedLikeParams as vt, GetMobileProfilesParams as w, MobileSocialFeedTradeRowBase as wn, MobileSocialFeedActionCandidate as wt, GetMobilePositionHistoryParams as x, MobileSocialFeedTopTradersPage as xn, MobileSetPrivateModeParams as xt, GetMobilePositionChartParams as y, MobileSocialFeedReply as yn, MobileSetFollowBatchParams as yt, MobileFeedPage as z, ResolveMobileFeedPositionParams as zn, MobileSocialFeedDrawing as zt };
|
|
1665
|
+
//# sourceMappingURL=clientTypes-BUn5_OzK.d.ts.map
|