@nadohq/mobile-client 0.36.0 → 0.38.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.
Files changed (189) hide show
  1. package/README.md +19 -6
  2. package/dist/{MobileClient-D5TNTnLx.cjs → MobileClient-wjTrqP9z.cjs} +75 -12
  3. package/dist/MobileClient-wjTrqP9z.cjs.map +1 -0
  4. package/dist/MobileClient.cjs +1 -1
  5. package/dist/MobileClient.d.cts +62 -16
  6. package/dist/MobileClient.d.cts.map +1 -1
  7. package/dist/MobileClient.d.ts +62 -16
  8. package/dist/MobileClient.d.ts.map +1 -1
  9. package/dist/MobileClient.js +75 -12
  10. package/dist/MobileClient.js.map +1 -1
  11. package/dist/{MobileServerFailureError-CPFjwUBx.d.cts → MobileServerFailureError-BvQYrxjx.d.cts} +3 -3
  12. package/dist/{MobileServerFailureError-CPFjwUBx.d.cts.map → MobileServerFailureError-BvQYrxjx.d.cts.map} +1 -1
  13. package/dist/{MobileServerFailureError-Terv2Wzy.d.ts → MobileServerFailureError-CrNpL_L4.d.ts} +3 -3
  14. package/dist/{MobileServerFailureError-Terv2Wzy.d.ts.map → MobileServerFailureError-CrNpL_L4.d.ts.map} +1 -1
  15. package/dist/{buildSignedMobileRequest-BScnCGPF.d.ts → buildSignedMobileRequest-BqLRFLKV.d.ts} +2 -2
  16. package/dist/{buildSignedMobileRequest-BScnCGPF.d.ts.map → buildSignedMobileRequest-BqLRFLKV.d.ts.map} +1 -1
  17. package/dist/{buildSignedMobileRequest-CXfnhc-4.d.cts → buildSignedMobileRequest-DkkwEqIu.d.cts} +2 -2
  18. package/dist/{buildSignedMobileRequest-CXfnhc-4.d.cts.map → buildSignedMobileRequest-DkkwEqIu.d.cts.map} +1 -1
  19. package/dist/{canonicalize-CQ-pMYIt.d.ts → canonicalize-BRhCpYm1.d.ts} +2 -2
  20. package/dist/canonicalize-BRhCpYm1.d.ts.map +1 -0
  21. package/dist/{canonicalize-hzhboB-C.d.cts → canonicalize-DtpaaA2B.d.cts} +2 -2
  22. package/dist/canonicalize-DtpaaA2B.d.cts.map +1 -0
  23. package/dist/{clientTypes-BwakovWk.d.cts → clientTypes-CB_itU4Z.d.ts} +147 -14
  24. package/dist/clientTypes-CB_itU4Z.d.ts.map +1 -0
  25. package/dist/{clientTypes-D-o1_2Yc.d.ts → clientTypes-CceWsQzi.d.cts} +147 -14
  26. package/dist/clientTypes-CceWsQzi.d.cts.map +1 -0
  27. package/dist/dataMappers.cjs +79 -6
  28. package/dist/dataMappers.cjs.map +1 -1
  29. package/dist/dataMappers.d.cts +27 -5
  30. package/dist/dataMappers.d.cts.map +1 -1
  31. package/dist/dataMappers.d.ts +27 -5
  32. package/dist/dataMappers.d.ts.map +1 -1
  33. package/dist/dataMappers.js +75 -7
  34. package/dist/dataMappers.js.map +1 -1
  35. package/dist/{eip712MethodByType-3aiJkrHj.d.cts → eip712MethodByType-1xUkvTIp.d.cts} +2 -2
  36. package/dist/eip712MethodByType-1xUkvTIp.d.cts.map +1 -0
  37. package/dist/{eip712MethodByType-zNvZukU7.d.ts → eip712MethodByType-CrqBJIrp.d.ts} +2 -2
  38. package/dist/eip712MethodByType-CrqBJIrp.d.ts.map +1 -0
  39. package/dist/follow-Bh3UmXMc.d.cts +23 -0
  40. package/dist/follow-Bh3UmXMc.d.cts.map +1 -0
  41. package/dist/follow-DjkQm1vR.d.ts +23 -0
  42. package/dist/follow-DjkQm1vR.d.ts.map +1 -0
  43. package/dist/index.cjs +6 -1
  44. package/dist/index.d.cts +17 -16
  45. package/dist/index.d.ts +17 -16
  46. package/dist/index.js +2 -1
  47. package/dist/{mobileErrorCodes-CuQ5lyBV.d.ts → mobileErrorCodes-B3eR6t4b.d.ts} +8 -2
  48. package/dist/mobileErrorCodes-B3eR6t4b.d.ts.map +1 -0
  49. package/dist/{mobileErrorCodes-D_SyBm0k.d.cts → mobileErrorCodes-DkzBW4v3.d.cts} +8 -2
  50. package/dist/mobileErrorCodes-DkzBW4v3.d.cts.map +1 -0
  51. package/dist/{patterns-B5gi7OfV.d.ts → patterns-C-aUAnKl.d.ts} +1 -1
  52. package/dist/patterns-C-aUAnKl.d.ts.map +1 -0
  53. package/dist/{patterns-Db6fgz8i.d.cts → patterns-DS8P5LH0.d.cts} +1 -1
  54. package/dist/patterns-DS8P5LH0.d.cts.map +1 -0
  55. package/dist/{payloadHash-DVkEt-Rg.d.cts → payloadHash-CIo8Hkh6.d.cts} +2 -2
  56. package/dist/payloadHash-CIo8Hkh6.d.cts.map +1 -0
  57. package/dist/{payloadHash-BxL26uwq.d.ts → payloadHash-Cv4WwZCZ.d.ts} +2 -2
  58. package/dist/payloadHash-Cv4WwZCZ.d.ts.map +1 -0
  59. package/dist/{serverBaseTypes-B_KHFDab.d.ts → serverBaseTypes-C2JGib--.d.ts} +2 -2
  60. package/dist/{serverBaseTypes-B_KHFDab.d.ts.map → serverBaseTypes-C2JGib--.d.ts.map} +1 -1
  61. package/dist/{serverBaseTypes-C8KjE9Fm.d.cts → serverBaseTypes-YkCmgmt1.d.cts} +2 -2
  62. package/dist/{serverBaseTypes-C8KjE9Fm.d.cts.map → serverBaseTypes-YkCmgmt1.d.cts.map} +1 -1
  63. package/dist/serverExecuteTypes-C2NoNEwu.d.ts +50 -0
  64. package/dist/serverExecuteTypes-C2NoNEwu.d.ts.map +1 -0
  65. package/dist/serverExecuteTypes-DPZbs9ym.d.cts +50 -0
  66. package/dist/serverExecuteTypes-DPZbs9ym.d.cts.map +1 -0
  67. package/dist/{serverModelTypes-_cX99seo.d.ts → serverModelTypes-CDcRlRtw.d.ts} +57 -10
  68. package/dist/serverModelTypes-CDcRlRtw.d.ts.map +1 -0
  69. package/dist/{serverModelTypes-CwgibK-l.d.cts → serverModelTypes-CUzqFA6x.d.cts} +57 -10
  70. package/dist/serverModelTypes-CUzqFA6x.d.cts.map +1 -0
  71. package/dist/{serverQueryTypes-DwE1iJ9f.d.cts → serverQueryTypes-B0xI1G39.d.ts} +21 -9
  72. package/dist/serverQueryTypes-B0xI1G39.d.ts.map +1 -0
  73. package/dist/{serverQueryTypes-NIrPm2Sl.d.ts → serverQueryTypes-RdcIqRnM.d.cts} +21 -9
  74. package/dist/serverQueryTypes-RdcIqRnM.d.cts.map +1 -0
  75. package/dist/serverRequestTypes-Ddws3yXc.d.cts +116 -0
  76. package/dist/serverRequestTypes-Ddws3yXc.d.cts.map +1 -0
  77. package/dist/serverRequestTypes-Dv9NR-hQ.d.ts +116 -0
  78. package/dist/serverRequestTypes-Dv9NR-hQ.d.ts.map +1 -0
  79. package/dist/{serverResponseGuards-Cep5s7j5.d.ts → serverResponseGuards-BjIzucYt.d.ts} +2 -2
  80. package/dist/{serverResponseGuards-Cep5s7j5.d.ts.map → serverResponseGuards-BjIzucYt.d.ts.map} +1 -1
  81. package/dist/{serverResponseGuards-Dxt9_aGh.d.cts → serverResponseGuards-Dg9WbqBA.d.cts} +2 -2
  82. package/dist/{serverResponseGuards-Dxt9_aGh.d.cts.map → serverResponseGuards-Dg9WbqBA.d.cts.map} +1 -1
  83. package/dist/signing/buildSignedMobileRequest.cjs +1 -1
  84. package/dist/signing/buildSignedMobileRequest.d.cts +1 -1
  85. package/dist/signing/buildSignedMobileRequest.d.ts +1 -1
  86. package/dist/signing/canonicalize.cjs +5 -0
  87. package/dist/signing/canonicalize.cjs.map +1 -1
  88. package/dist/signing/canonicalize.d.cts +1 -1
  89. package/dist/signing/canonicalize.d.ts +1 -1
  90. package/dist/signing/canonicalize.js +5 -0
  91. package/dist/signing/canonicalize.js.map +1 -1
  92. package/dist/signing/eip712MethodByType.cjs +2 -1
  93. package/dist/signing/eip712MethodByType.cjs.map +1 -1
  94. package/dist/signing/eip712MethodByType.d.cts +1 -1
  95. package/dist/signing/eip712MethodByType.d.ts +1 -1
  96. package/dist/signing/eip712MethodByType.js +2 -1
  97. package/dist/signing/eip712MethodByType.js.map +1 -1
  98. package/dist/signing/index.d.cts +6 -6
  99. package/dist/signing/index.d.ts +6 -6
  100. package/dist/signing/payloadHash.cjs +1 -1
  101. package/dist/signing/payloadHash.d.cts +1 -1
  102. package/dist/signing/payloadHash.d.ts +1 -1
  103. package/dist/signing/types.d.cts +2 -2
  104. package/dist/signing/types.d.ts +2 -2
  105. package/dist/types/MobileServerFailureError.cjs +1 -1
  106. package/dist/types/MobileServerFailureError.d.cts +1 -1
  107. package/dist/types/MobileServerFailureError.d.ts +1 -1
  108. package/dist/types/clientTypes.d.cts +2 -2
  109. package/dist/types/clientTypes.d.ts +2 -2
  110. package/dist/types/index.d.cts +9 -9
  111. package/dist/types/index.d.ts +9 -9
  112. package/dist/types/mobileErrorCodes.cjs +13 -1
  113. package/dist/types/mobileErrorCodes.cjs.map +1 -1
  114. package/dist/types/mobileErrorCodes.d.cts +1 -1
  115. package/dist/types/mobileErrorCodes.d.ts +1 -1
  116. package/dist/types/mobileErrorCodes.js +12 -0
  117. package/dist/types/mobileErrorCodes.js.map +1 -1
  118. package/dist/types/serverBaseTypes.d.cts +1 -1
  119. package/dist/types/serverBaseTypes.d.ts +1 -1
  120. package/dist/types/serverExecuteTypes.d.cts +2 -2
  121. package/dist/types/serverExecuteTypes.d.ts +2 -2
  122. package/dist/types/serverModelTypes.cjs.map +1 -1
  123. package/dist/types/serverModelTypes.d.cts +2 -2
  124. package/dist/types/serverModelTypes.d.ts +2 -2
  125. package/dist/types/serverModelTypes.js.map +1 -1
  126. package/dist/types/serverQueryTypes.d.cts +2 -2
  127. package/dist/types/serverQueryTypes.d.ts +2 -2
  128. package/dist/types/serverRequestTypes.d.cts +2 -2
  129. package/dist/types/serverRequestTypes.d.ts +2 -2
  130. package/dist/{types-47IPsDyA.d.cts → types-BIIvIzG2.d.ts} +20 -7
  131. package/dist/types-BIIvIzG2.d.ts.map +1 -0
  132. package/dist/{types-D5kFJzEX.d.ts → types-UmYaeq1C.d.cts} +20 -7
  133. package/dist/types-UmYaeq1C.d.cts.map +1 -0
  134. package/dist/utils/follow.cjs +28 -0
  135. package/dist/utils/follow.cjs.map +1 -0
  136. package/dist/utils/follow.d.cts +2 -0
  137. package/dist/utils/follow.d.ts +2 -0
  138. package/dist/utils/follow.js +24 -0
  139. package/dist/utils/follow.js.map +1 -0
  140. package/dist/utils/index.cjs +5 -0
  141. package/dist/utils/index.d.cts +4 -3
  142. package/dist/utils/index.d.ts +4 -3
  143. package/dist/utils/index.js +2 -1
  144. package/dist/utils/patterns.d.cts +1 -1
  145. package/dist/utils/patterns.d.ts +1 -1
  146. package/dist/utils/serverResponseGuards.d.cts +1 -1
  147. package/dist/utils/serverResponseGuards.d.ts +1 -1
  148. package/package.json +3 -3
  149. package/src/MobileClient.ts +117 -21
  150. package/src/dataMappers.ts +109 -5
  151. package/src/signing/canonicalize.ts +6 -0
  152. package/src/signing/eip712MethodByType.ts +1 -0
  153. package/src/signing/signing.test.ts +32 -4
  154. package/src/signing/types.ts +18 -1
  155. package/src/types/clientTypes.ts +152 -11
  156. package/src/types/mobileErrorCodes.ts +12 -0
  157. package/src/types/serverExecuteTypes.ts +40 -2
  158. package/src/types/serverModelTypes.ts +58 -8
  159. package/src/types/serverQueryTypes.ts +18 -4
  160. package/src/types/serverRequestTypes.ts +50 -4
  161. package/src/utils/follow.ts +22 -0
  162. package/src/utils/index.ts +1 -0
  163. package/dist/MobileClient-D5TNTnLx.cjs.map +0 -1
  164. package/dist/canonicalize-CQ-pMYIt.d.ts.map +0 -1
  165. package/dist/canonicalize-hzhboB-C.d.cts.map +0 -1
  166. package/dist/clientTypes-BwakovWk.d.cts.map +0 -1
  167. package/dist/clientTypes-D-o1_2Yc.d.ts.map +0 -1
  168. package/dist/eip712MethodByType-3aiJkrHj.d.cts.map +0 -1
  169. package/dist/eip712MethodByType-zNvZukU7.d.ts.map +0 -1
  170. package/dist/mobileErrorCodes-CuQ5lyBV.d.ts.map +0 -1
  171. package/dist/mobileErrorCodes-D_SyBm0k.d.cts.map +0 -1
  172. package/dist/patterns-B5gi7OfV.d.ts.map +0 -1
  173. package/dist/patterns-Db6fgz8i.d.cts.map +0 -1
  174. package/dist/payloadHash-BxL26uwq.d.ts.map +0 -1
  175. package/dist/payloadHash-DVkEt-Rg.d.cts.map +0 -1
  176. package/dist/serverExecuteTypes-Cb5v7y0A.d.cts +0 -19
  177. package/dist/serverExecuteTypes-Cb5v7y0A.d.cts.map +0 -1
  178. package/dist/serverExecuteTypes-GFjZj_DC.d.ts +0 -19
  179. package/dist/serverExecuteTypes-GFjZj_DC.d.ts.map +0 -1
  180. package/dist/serverModelTypes-CwgibK-l.d.cts.map +0 -1
  181. package/dist/serverModelTypes-_cX99seo.d.ts.map +0 -1
  182. package/dist/serverQueryTypes-DwE1iJ9f.d.cts.map +0 -1
  183. package/dist/serverQueryTypes-NIrPm2Sl.d.ts.map +0 -1
  184. package/dist/serverRequestTypes-516zXnQ6.d.ts +0 -72
  185. package/dist/serverRequestTypes-516zXnQ6.d.ts.map +0 -1
  186. package/dist/serverRequestTypes-GAtVYIda.d.cts +0 -72
  187. package/dist/serverRequestTypes-GAtVYIda.d.cts.map +0 -1
  188. package/dist/types-47IPsDyA.d.cts.map +0 -1
  189. package/dist/types-D5kFJzEX.d.ts.map +0 -1
@@ -9,7 +9,11 @@ import {
9
9
 
10
10
  /**
11
11
  * A subaccount's public profile, as returned by an unsigned profile lookup. Private Mode hides the account's
12
- * activity, not its profile, so `privateMode` is exposed here too.
12
+ * activity, not its profile, so `privateMode` is exposed here too. A subaccount with no identity row still
13
+ * yields a profile, with `null` names and `privateMode: false`.
14
+ *
15
+ * The last three fields are `undefined` unless the matching {@link MobileProfilesInclude} asked for them —
16
+ * absent means "not requested" rather than "none".
13
17
  */
14
18
  export interface MobilePublicProfile {
15
19
  subaccount: Hex;
@@ -18,6 +22,82 @@ export interface MobilePublicProfile {
18
22
  /** User-facing name as claimed, or `null` if no username has been claimed. */
19
23
  displayName: string | null;
20
24
  privateMode: boolean;
25
+ /**
26
+ * Exact count at query time rather than a cached counter, including unnamed and private accounts — Private
27
+ * Mode hides activity, not relationships. Requires the `followCounts` include.
28
+ */
29
+ followerCount?: number;
30
+ followingCount?: number;
31
+ /** Requires the `followSummary` include, and is relative to that include's `viewAs`. */
32
+ followSummary?: MobileFollowSummary;
33
+ }
34
+
35
+ /**
36
+ * The identity fields the backend attaches to a subaccount wherever it surfaces one alongside other data.
37
+ * Resolved at read time, so a rename shows up on the next read without any change to the surrounding record.
38
+ */
39
+ export interface MobileIdentitySummary {
40
+ subaccount: Hex;
41
+ /** `null` when the account has not claimed a username; render a local fallback label from `subaccount`. */
42
+ username: string | null;
43
+ /** `null` when the account has not claimed a username; render a local fallback label from `subaccount`. */
44
+ displayName: string | null;
45
+ /** Reserved for a future avatar source; `null` until one is implemented. */
46
+ avatarUrl: string | null;
47
+ }
48
+
49
+ /**
50
+ * A viewer's relationship with one Profile, plus the Followed By preview: accounts the viewer follows that
51
+ * also follow that Profile. Every preview entry is therefore already familiar to the viewer, which is why it
52
+ * carries no `isFollowing` of its own.
53
+ */
54
+ export interface MobileFollowSummary {
55
+ /** The direct `viewer -> viewed Profile` relationship. */
56
+ isFollowing: boolean;
57
+ /** Exact size of the two-edge intersection, independent of how many previews came back. */
58
+ followedByCount: number;
59
+ /**
60
+ * Newest `preview -> viewed Profile` relationship first, with a bytes32 tie-break. Capped at
61
+ * `MOBILE_FOLLOWED_BY_PREVIEW_LIMIT` (2) by the backend and not client-configurable.
62
+ */
63
+ followedBy: MobileIdentitySummary[];
64
+ }
65
+
66
+ /**
67
+ * One row of a Followers or Following page.
68
+ */
69
+ export interface MobileFollowListAccount {
70
+ identity: MobileIdentitySummary;
71
+ /**
72
+ * Whether the `viewAs` Viewer follows this account — not the listed relationship that put it in the page.
73
+ * The Viewer can appear in another Profile's list, and does not follow themself, so their own row is
74
+ * `false`. `undefined` when the request named no `viewAs`, which is a missing perspective rather than a
75
+ * known "not following".
76
+ */
77
+ isFollowing?: boolean;
78
+ /** This account's own follower count. */
79
+ followerCount: number;
80
+ }
81
+
82
+ /**
83
+ * A page of Followers or Following. Pagination is live rather than snapshot: a Follow or Unfollow between
84
+ * pages can move an account, so an account can appear twice or not at all across one session. Deduplicate by
85
+ * {@link MobileIdentitySummary.subaccount} and restart from `cursor: undefined` on refresh.
86
+ */
87
+ export interface MobileFollowListPage {
88
+ accounts: MobileFollowListAccount[];
89
+ /** `null` means the list is complete. */
90
+ nextCursor: string | null;
91
+ }
92
+
93
+ /**
94
+ * Post-commit state of a follow or unfollow. The mutation and its count share one database transaction, so
95
+ * these values are authoritative — apply them rather than re-reading.
96
+ */
97
+ export interface MobileFollowMutationResult {
98
+ isFollowing: boolean;
99
+ /** The *target's* follower count after the mutation, not the sender's. */
100
+ followerCount: number;
21
101
  }
22
102
 
23
103
  /**
@@ -43,16 +123,9 @@ export interface MobileFeedMargin {
43
123
  * (a rename can change an already-fetched trade on the next read). Amounts are display-oriented human-unit
44
124
  * numbers — do not use them for accounting, order construction, or exact threshold decisions.
45
125
  */
46
- export interface MobileFeedTrade {
126
+ export interface MobileFeedTrade extends MobileIdentitySummary {
47
127
  /** Order digest this trade is keyed by; the stable id for reconciling live pagination. */
48
128
  orderDigest: Hex;
49
- subaccount: Hex;
50
- /** `null` when the trader has not claimed a username; render a local fallback label from `subaccount`. */
51
- username: string | null;
52
- /** `null` when the trader has not claimed a username; render a local fallback label from `subaccount`. */
53
- displayName: string | null;
54
- /** Reserved for a future avatar source; `null` until one is implemented. */
55
- avatarUrl: string | null;
56
129
  productId: number;
57
130
  /** Executed quantity in human units. */
58
131
  quantity: number;
@@ -155,9 +228,30 @@ export interface GetMobileUsernameAvailabilityParams {
155
228
  }
156
229
 
157
230
  /**
158
- * Params for {@link MobileClient.getPublicProfile}.
231
+ * Opt-in extras for a profiles lookup. Each one adds fields that are otherwise absent from every returned
232
+ * profile, and costs extra rate-limit weight per profile, so ask only for what the UI shows.
159
233
  */
160
- export type GetMobilePublicProfileParams = Subaccount;
234
+ export interface MobileProfilesInclude {
235
+ /** Populates `followerCount` and `followingCount`. */
236
+ followCounts?: boolean;
237
+ /**
238
+ * Populates `followSummary`, relative to `viewAs`. This viewer identity is an unauthenticated claim — the
239
+ * route takes no signature — so do not treat the result as proof of who is asking.
240
+ */
241
+ followSummary?: { viewAs: Subaccount };
242
+ }
243
+
244
+ /**
245
+ * Params for {@link MobileClient.getProfiles}.
246
+ */
247
+ export interface GetMobileProfilesParams {
248
+ /**
249
+ * 1–`MOBILE_PROFILES_MAX_BATCH_SIZE` (25) distinct subaccounts. Duplicates and an empty list are rejected
250
+ * rather than deduplicated, and results come back in this exact order.
251
+ */
252
+ subaccounts: Subaccount[];
253
+ include?: MobileProfilesInclude;
254
+ }
161
255
 
162
256
  /**
163
257
  * Params for {@link MobileClient.getFeed}.
@@ -192,6 +286,53 @@ export interface MobileSetPrivateModeParams extends MobileSignedRequestParams {
192
286
  privateMode: boolean;
193
287
  }
194
288
 
289
+ /**
290
+ * Params for {@link MobileClient.setFollow}. The subaccount carried by {@link MobileSignedRequestParams} is
291
+ * the signing Follower; `target` is the Profile on the other end of the relationship.
292
+ */
293
+ export interface MobileSetFollowParams extends MobileSignedRequestParams {
294
+ /** The Profile being followed or unfollowed. Must not be the signing subaccount. */
295
+ target: Subaccount;
296
+ /** `true` follows the target, `false` unfollows it. Both directions are idempotent. */
297
+ isFollowing: boolean;
298
+ }
299
+
300
+ /**
301
+ * Common params for a Followers or Following page.
302
+ */
303
+ export interface GetMobileFollowListParams {
304
+ /** The Profile whose Followers or Following are being listed. */
305
+ target: Subaccount;
306
+ /**
307
+ * Viewer to resolve the page against, which turns on familiar-first ordering and populates every row's
308
+ * {@link MobileFollowListAccount.isFollowing}. Omit it for a plain recency-ordered list with no
309
+ * `isFollowing` at all. The route is unsigned, so this is an unauthenticated claim rather than proof of
310
+ * who is asking.
311
+ */
312
+ viewAs?: Subaccount;
313
+ /**
314
+ * Opaque cursor from the previous page's {@link MobileFollowListPage.nextCursor}. Omit for the first page.
315
+ * A cursor is bound to its `viewAs` (including its absence), Profile, and list direction — reusing it
316
+ * elsewhere fails with `INVALID_FOLLOW_CURSOR`.
317
+ */
318
+ cursor?: string;
319
+ /**
320
+ * Page size, 1–`MOBILE_FOLLOW_LIST_MAX_PAGE_SIZE` (50); the backend defaults to
321
+ * `MOBILE_FOLLOW_LIST_DEFAULT_PAGE_SIZE` (25) when omitted.
322
+ */
323
+ limit?: number;
324
+ }
325
+
326
+ /**
327
+ * Params for {@link MobileClient.getFollowers}.
328
+ */
329
+ export type GetMobileFollowersParams = GetMobileFollowListParams;
330
+
331
+ /**
332
+ * Params for {@link MobileClient.getFollowing}.
333
+ */
334
+ export type GetMobileFollowingParams = GetMobileFollowListParams;
335
+
195
336
  /**
196
337
  * Params for {@link MobileClient.registerExpoToken}.
197
338
  */
@@ -13,6 +13,18 @@ export const MOBILE_ERROR_CODES = {
13
13
  /** Another identity write for the subaccount committed with a later nonce. Re-read before retrying. */
14
14
  STALE_IDENTITY_UPDATE: 6105,
15
15
  PROFILE_NOT_FOUND: 6106,
16
+ /** Profiles lookup is empty, holds duplicates, or exceeds the batch maximum. Do not retry unchanged. */
17
+ INVALID_PROFILES_REQUEST: 6107,
18
+ /** Follow mutation names the same source and target, or an isolated participant. Do not retry unchanged. */
19
+ INVALID_FOLLOW_TARGET: 6110,
20
+ /** Signed follower is not yet in the canonical Query DB subaccount index. Retry after index catch-up. */
21
+ FOLLOWER_NOT_ELIGIBLE: 6111,
22
+ /** Follow target is not yet in the canonical Query DB subaccount index. Refresh after a new record. */
23
+ FOLLOWING_NOT_FOUND: 6112,
24
+ /** Follow list cursor is malformed or bound to a different list request. Restart from `cursor: null`. */
25
+ INVALID_FOLLOW_CURSOR: 6113,
26
+ /** A follow list or followed-by limit is outside its accepted range. Fix it; do not retry unchanged. */
27
+ INVALID_FOLLOW_LIMIT: 6114,
16
28
  INVALID_EXPO_TOKEN: 6200,
17
29
  INVALID_DEVICE_METADATA: 6201,
18
30
  INVALID_PREFERENCES: 6202,
@@ -3,6 +3,7 @@ import {
3
3
  MobileServerSuccessResponse,
4
4
  } from './serverBaseTypes';
5
5
  import {
6
+ MobileServerExecuteRequestType,
6
7
  MobileServerPublicExecuteRequestByType,
7
8
  MobileServerPublicExecuteRequestType,
8
9
  } from './serverRequestTypes';
@@ -21,8 +22,45 @@ export type MobileServerPublicExecuteRequest<
21
22
  }[T];
22
23
 
23
24
  /**
24
- * Discriminated `execute` result union. Mobile execute routes return no payload beyond the success
25
- * discriminant, so the success arm is the base success envelope; failures use the uniform failure envelope.
25
+ * Payload the `set_follow` execute returns alongside the success envelope. The mutation and the count commit
26
+ * in one database transaction, so these are the authoritative post-mutation values — prefer them over
27
+ * re-reading, and note that overlapping toggles for the same pair can respond out of arrival order.
28
+ */
29
+ export interface MobileServerFollowMutationResponse {
30
+ is_following: boolean;
31
+ /** The *target's* follower count after the mutation, not the sender's. */
32
+ follower_count: number;
33
+ }
34
+
35
+ /**
36
+ * Payload of an execute route that returns nothing beyond the success discriminant. Spelled `Record<never,
37
+ * never>` rather than `Record<string, never>` because the latter's index signature would collapse `status` to
38
+ * `never` when intersected with the success envelope.
39
+ */
40
+ export type MobileServerEmptyExecuteResponse = Record<never, never>;
41
+
42
+ /**
43
+ * Success payloads for each signed `execute`, keyed by request `type`. Most execute routes carry no payload
44
+ * beyond the success discriminant and so map to an empty object; `set_follow` returns its post-commit
45
+ * relationship state.
46
+ */
47
+ export interface MobileServerExecuteResponseByType {
48
+ set_username: MobileServerEmptyExecuteResponse;
49
+ set_private_mode: MobileServerEmptyExecuteResponse;
50
+ register_expo_token: MobileServerEmptyExecuteResponse;
51
+ set_follow: MobileServerFollowMutationResponse;
52
+ }
53
+
54
+ /**
55
+ * Full success response for a signed `execute`: the {@link MobileServerSuccessResponse} envelope with the
56
+ * route's payload inlined alongside `status`, matching how the query routes inline theirs.
57
+ */
58
+ export type MobileServerExecuteSuccessResponse<
59
+ T extends MobileServerExecuteRequestType = MobileServerExecuteRequestType,
60
+ > = MobileServerSuccessResponse & MobileServerExecuteResponseByType[T];
61
+
62
+ /**
63
+ * Discriminated `execute` result union used at the transport boundary, before the envelope is narrowed.
26
64
  */
27
65
  export type MobileServerExecuteResult =
28
66
  | MobileServerSuccessResponse
@@ -18,14 +18,69 @@ export type MobileNotificationCategory =
18
18
  | 'announcement';
19
19
 
20
20
  /**
21
- * Server-side public profile shape (snake_case). Name fields are `null` until the subaccount claims a
22
- * username.
21
+ * Server-side identity summary (snake_case): the read-time identity fields the backend attaches to a
22
+ * subaccount wherever it surfaces one alongside other data. Name fields are `null` until the subaccount
23
+ * claims a username, and a rename shows up on the next read without any change to the surrounding record.
24
+ */
25
+ export interface MobileServerIdentitySummary {
26
+ subaccount: Hex;
27
+ username: string | null;
28
+ display_name: string | null;
29
+ /** Reserved for a future avatar source; `null` until one is implemented. */
30
+ avatar_url: string | null;
31
+ }
32
+
33
+ /**
34
+ * Server-side follow summary (snake_case), nested in a `profiles` entry when the `follow_summary` include is
35
+ * requested. `is_following` is the direct `view_as -> this profile` relationship; every `followed_by` entry
36
+ * satisfies both `view_as -> entry` and `entry -> this profile`, so each one is already familiar to the
37
+ * viewer and carries no `is_following` of its own.
38
+ */
39
+ export interface MobileServerFollowSummary {
40
+ is_following: boolean;
41
+ /** Exact size of the two-edge intersection, independent of how many previews came back. */
42
+ followed_by_count: number;
43
+ /** Capped at `MOBILE_FOLLOWED_BY_PREVIEW_LIMIT` (2) by the backend; not client-configurable. */
44
+ followed_by: MobileServerIdentitySummary[];
45
+ }
46
+
47
+ /**
48
+ * Server-side public profile shape (snake_case), shared by the singular `profile` and batched `profiles`
49
+ * queries. Name fields are `null` until the subaccount claims a username; a subaccount with no identity row
50
+ * still yields an entry, with `null` names and `private_mode: false`.
51
+ *
52
+ * The three optional fields are omitted from the wire entirely unless the matching `profiles` include asked
53
+ * for them, which is why they are optional rather than nullable — absent means "not requested", not "none".
54
+ * The singular `profile` query never returns any of them.
23
55
  */
24
56
  export interface MobileServerProfile {
25
57
  subaccount: Hex;
26
58
  username: string | null;
27
59
  display_name: string | null;
28
60
  private_mode: boolean;
61
+ /**
62
+ * Exact count at query time — the backend counts rather than reading a cached counter. Unnamed and private
63
+ * accounts are included: Private Mode hides activity, not relationships. Requires `follow_counts`.
64
+ */
65
+ follower_count?: number;
66
+ following_count?: number;
67
+ /** Requires the `follow_summary` include, and is relative to that include's `view_as`. */
68
+ follow_summary?: MobileServerFollowSummary;
69
+ }
70
+
71
+ /**
72
+ * Server-side row of a Followers or Following page (snake_case).
73
+ */
74
+ export interface MobileServerFollowListAccount {
75
+ identity: MobileServerIdentitySummary;
76
+ /**
77
+ * The `view_as` Viewer's relationship to this account, not the listed relationship that put it in the
78
+ * page, so it is `false` on the Viewer's own row. Omitted entirely when the request named no `view_as`,
79
+ * rather than being sent as a misleading `false`.
80
+ */
81
+ is_following?: boolean;
82
+ /** The listed account's own follower count, exact at query time. */
83
+ follower_count: number;
29
84
  }
30
85
 
31
86
  /**
@@ -97,14 +152,9 @@ export interface MobileServerFeedMargin {
97
152
  * trader's current identity. Amounts are display-oriented human-unit JSON numbers — do not use them for
98
153
  * accounting, order construction, or exact threshold decisions.
99
154
  */
100
- export interface MobileServerFeedTrade {
155
+ export interface MobileServerFeedTrade extends MobileServerIdentitySummary {
101
156
  /** Order digest this row is keyed by; the stable id clients use to reconcile live pagination. */
102
157
  order_digest: Hex;
103
- subaccount: Hex;
104
- username: string | null;
105
- display_name: string | null;
106
- /** Reserved for a future avatar source; `null` until one is implemented. */
107
- avatar_url: string | null;
108
158
  product_id: number;
109
159
  /** Executed quantity in human units. */
110
160
  quantity: number;
@@ -3,6 +3,7 @@ import { MobileServerSuccessResponse } from './serverBaseTypes';
3
3
  import {
4
4
  MobileNotificationPlatform,
5
5
  MobileServerFeedTrade,
6
+ MobileServerFollowListAccount,
6
7
  MobileServerNotificationPreferences,
7
8
  MobileServerProfile,
8
9
  } from './serverModelTypes';
@@ -32,10 +33,21 @@ export interface MobileServerUsernameAvailabilityResponse {
32
33
  }
33
34
 
34
35
  /**
35
- * Payload of the `profile` public query success response.
36
+ * Payload of the `profiles` public query success response. One entry per requested subaccount, in the exact
37
+ * order they were requested, so callers can correlate positionally as well as by `subaccount`.
36
38
  */
37
- export interface MobileServerProfileResponse {
38
- profile: MobileServerProfile;
39
+ export interface MobileServerProfilesResponse {
40
+ profiles: MobileServerProfile[];
41
+ }
42
+
43
+ /**
44
+ * Payload of the `followers` and `following` public query success responses. Both list directions share one
45
+ * shape; only the relationship that selected the rows differs.
46
+ */
47
+ export interface MobileServerFollowListResponse {
48
+ accounts: MobileServerFollowListAccount[];
49
+ /** `null` means the list is complete. */
50
+ next_cursor: string | null;
39
51
  }
40
52
 
41
53
  /**
@@ -79,7 +91,9 @@ export interface MobileServerRegisteredWalletResponse {
79
91
  */
80
92
  export interface MobileServerPublicQueryResponseByType {
81
93
  username_availability: MobileServerUsernameAvailabilityResponse;
82
- profile: MobileServerProfileResponse;
94
+ profiles: MobileServerProfilesResponse;
95
+ followers: MobileServerFollowListResponse;
96
+ following: MobileServerFollowListResponse;
83
97
  feed: MobileServerFeedResponse;
84
98
  notification_preferences: MobileServerNotificationPreferencesResponse;
85
99
  registered_wallet: MobileServerRegisteredWalletResponse;
@@ -2,12 +2,55 @@ import { Hex } from 'viem';
2
2
  import { MobileSignedInner } from '../signing/types';
3
3
  import { MobileServerNotificationPreferences } from './serverModelTypes';
4
4
 
5
+ /**
6
+ * Opt-in extras for a `profiles` query. Each one costs extra rate-limit weight per profile and adds fields
7
+ * that are otherwise absent from the response, so the backend gates them behind an explicit request rather
8
+ * than always resolving the follow graph on a public route.
9
+ */
10
+ export interface MobileServerProfilesInclude {
11
+ /** Adds `follower_count` and `following_count` to every entry. Omitted or `false` leaves both absent. */
12
+ follow_counts?: boolean;
13
+ /**
14
+ * Adds `follow_summary` to every entry, relative to the `view_as` subaccount. As on every public route,
15
+ * `view_as` is an unauthenticated claim.
16
+ */
17
+ follow_summary?: { view_as: Hex };
18
+ }
19
+
20
+ /**
21
+ * Params shared by the `followers` and `following` public queries: only the relationship that selects the
22
+ * rows differs between the two.
23
+ */
24
+ export interface MobileServerFollowListRequest {
25
+ /** The viewed Profile, i.e. the account whose Followers or Following are being listed. */
26
+ subaccount: Hex;
27
+ /**
28
+ * Viewer perspective the rows are resolved against. Omitted asks for no perspective, which drops
29
+ * `is_following` from every row and falls back to plain recency order. Like the `profiles` query's
30
+ * `view_as`, this is an unauthenticated claim on an unsigned route.
31
+ */
32
+ view_as?: Hex;
33
+ /** Opaque keyset cursor from a prior page's `next_cursor`. Omitted requests the first page. */
34
+ cursor?: string;
35
+ /** Page size, 1–50; the backend defaults to 25 when omitted. */
36
+ limit?: number;
37
+ }
38
+
5
39
  /**
6
40
  * Params for each unsigned `public_query`, keyed by request `type`.
7
41
  */
8
42
  export interface MobileServerPublicQueryRequestByType {
9
43
  username_availability: { display_name: string };
10
- profile: { subaccount: Hex };
44
+ profiles: {
45
+ /**
46
+ * 1–`MOBILE_PROFILES_MAX_BATCH_SIZE` (25) distinct subaccounts. Results come back in this exact order,
47
+ * one entry per request slot.
48
+ */
49
+ subaccounts: Hex[];
50
+ include?: MobileServerProfilesInclude;
51
+ };
52
+ followers: MobileServerFollowListRequest;
53
+ following: MobileServerFollowListRequest;
11
54
  feed: {
12
55
  /**
13
56
  * Minimum notional as a whole-dollar JSON integer (NOT an x18 string), at least $1,000. Omitted or
@@ -53,15 +96,18 @@ export type MobileServerPublicExecuteRequestType =
53
96
  keyof MobileServerPublicExecuteRequestByType;
54
97
 
55
98
  /**
56
- * Discriminant `type` values for signed `execute` requests: the write subset of {@link MobileSignedInner}
57
- * tags. With no signed queries remaining, every signed inner type is an execute.
99
+ * Discriminant `type` values for signed `execute` requests. Every signed route the SDK calls is a write, so
100
+ * this is the full set of {@link MobileSignedInner} tags. Unlike the public queries these carry no separate
101
+ * params map — a signed request body *is* its inner payload flattened with the envelope, so
102
+ * {@link MobileSignedInner} is the single source of truth for both the fields and their significant order.
58
103
  */
59
104
  export type MobileServerExecuteRequestType = MobileSignedInner['type'];
60
105
 
61
106
  /**
62
107
  * Wire `request_type` the backend echoes on failure envelopes, prefixed by the route that produced it:
63
108
  * `public_query_*` for unsigned queries, `public_execute_*` for unsigned writes, and `execute_*` for signed
64
- * writes (e.g. `execute_set_username`).
109
+ * writes (e.g. `execute_set_username`). The prefix names the route, so it never carries the `mobile:` prefix
110
+ * that the EIP-712 method does.
65
111
  */
66
112
  export type MobileServerRequestType =
67
113
  | `public_query_${MobileServerPublicQueryRequestType}`
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Maximum Followers/Following page size the backend accepts. Requests outside 1–50 fail with
3
+ * `INVALID_FOLLOW_LIMIT`.
4
+ */
5
+ export const MOBILE_FOLLOW_LIST_MAX_PAGE_SIZE = 50;
6
+
7
+ /**
8
+ * Page size the backend uses when `limit` is omitted from a Followers or Following request.
9
+ */
10
+ export const MOBILE_FOLLOW_LIST_DEFAULT_PAGE_SIZE = 25;
11
+
12
+ /**
13
+ * Number of Followed By preview identities a follow summary carries. Fixed by the backend rather than
14
+ * requested, so use it to size the preview UI; `followedByCount` still reports the full intersection.
15
+ */
16
+ export const MOBILE_FOLLOWED_BY_PREVIEW_LIMIT = 2;
17
+
18
+ /**
19
+ * Maximum number of subaccounts a single profiles lookup accepts. An empty list, a duplicate, or more than
20
+ * this many fail with `INVALID_PROFILES_REQUEST`.
21
+ */
22
+ export const MOBILE_PROFILES_MAX_BATCH_SIZE = 25;
@@ -1,3 +1,4 @@
1
1
  export * from './feed';
2
+ export * from './follow';
2
3
  export * from './patterns';
3
4
  export * from './serverResponseGuards';
@@ -1 +0,0 @@
1
- {"version":3,"file":"MobileClient-D5TNTnLx.cjs","names":["mapMobilePublicProfile","mapMobileFeedPage","mapMobileNotificationPreferences","mapMobileRegisteredWallet","mapMobileNotificationPreferencesToServer","WalletNotProvidedError","buildSignedMobileRequest","isMobileServerFailureResponse","MobileServerFailureError","isMobileServerSuccessResponse"],"sources":["../src/MobileClient.ts"],"sourcesContent":["import {\n getNadoClientTypeHeaders,\n subaccountToHex,\n WalletClientWithAccount,\n WalletNotProvidedError,\n} from '@nadohq/shared';\nimport axios, { AxiosInstance, AxiosResponse } from 'axios';\nimport {\n mapMobileFeedPage,\n mapMobileNotificationPreferences,\n mapMobileNotificationPreferencesToServer,\n mapMobilePublicProfile,\n mapMobileRegisteredWallet,\n} from './dataMappers';\nimport {\n buildSignedMobileRequest,\n MobileSignedInner,\n MobileSignedInnerParams,\n MobileSignedRequest,\n} from './signing';\nimport {\n GetMobileFeedParams,\n GetMobileNotificationPreferencesParams,\n GetMobilePublicProfileParams,\n GetMobileRegisteredWalletParams,\n GetMobileUsernameAvailabilityParams,\n MobileFeedPage,\n MobileNotificationPreferences,\n MobilePublicProfile,\n MobileRegisteredWallet,\n MobileRegisterExpoTokenParams,\n MobileSetPrivateModeParams,\n MobileSetUsernameParams,\n MobileSignedRequestParams,\n MobileUnregisterExpoTokenParams,\n MobileUpdateNotificationPreferencesParams,\n MobileUsernameAvailability,\n} from './types/clientTypes';\nimport { MobileServerFailureError } from './types/MobileServerFailureError';\nimport { MobileServerSuccessResponse } from './types/serverBaseTypes';\nimport {\n MobileServerExecuteResult,\n MobileServerPublicExecuteRequest,\n} from './types/serverExecuteTypes';\nimport {\n MobileServerPublicQueryRequest,\n MobileServerPublicQuerySuccessResponse,\n} from './types/serverQueryTypes';\nimport {\n MobileServerPublicQueryRequestByType,\n MobileServerPublicQueryRequestType,\n} from './types/serverRequestTypes';\nimport {\n isMobileServerFailureResponse,\n isMobileServerSuccessResponse,\n} from './utils/serverResponseGuards';\n\n/**\n * Options for constructing a {@link MobileClient}.\n */\nexport interface MobileClientOpts {\n /**\n * Base URL of the mobile service API, e.g. {@link MOBILE_CLIENT_ENDPOINTS}.\n */\n url: string;\n /**\n * Wallet client used to sign requests.\n */\n walletClient?: WalletClientWithAccount;\n /**\n * If provided, this signer is used instead of `walletClient` for all signed requests.\n */\n linkedSignerWalletClient?: WalletClientWithAccount;\n /**\n * If provided, identifies the calling client, sent as a header with every request.\n */\n clientType?: string;\n}\n\n/**\n * Client for the Nado mobile service API: usernames, public profile lookups, the global trade feed, privacy\n * settings, and push notification device/preference management.\n */\nexport class MobileClient {\n readonly opts: MobileClientOpts;\n readonly axiosInstance: AxiosInstance;\n\n constructor(opts: MobileClientOpts) {\n this.opts = opts;\n this.axiosInstance = axios.create({\n withCredentials: true,\n // We have custom logic to validate response status and create an appropriate error\n validateStatus: () => true,\n headers: getNadoClientTypeHeaders(opts.clientType),\n });\n }\n\n /**\n * Sets the linked signer for requests\n *\n * @param linkedSignerWalletClient The linkedSigner to use for all signatures. Set to null to revert to the chain signer\n */\n public setLinkedSigner(\n linkedSignerWalletClient: WalletClientWithAccount | null,\n ) {\n this.opts.linkedSignerWalletClient = linkedSignerWalletClient ?? undefined;\n }\n\n /*\n Public queries\n */\n\n /**\n * Checks whether a username derived from the given display name is available to claim.\n */\n async getUsernameAvailability(\n params: GetMobileUsernameAvailabilityParams,\n ): Promise<MobileUsernameAvailability> {\n const body: MobileServerPublicQueryRequest<'username_availability'> = {\n type: 'username_availability',\n display_name: params.displayName,\n };\n const data = await this.publicQuery(body);\n return { username: data.username, available: data.available };\n }\n\n /**\n * Looks up a subaccount's public profile. Every non-isolated subaccount resolves, with `username` and\n * `displayName` `null` until a username is claimed. Private Mode does not hide the profile itself, only the\n * account's activity.\n *\n * @throws {MobileServerFailureError} With error code `PROFILE_NOT_FOUND` if the subaccount is in the\n * engine-created isolated namespace, which cannot own a profile.\n */\n async getPublicProfile(\n params: GetMobilePublicProfileParams,\n ): Promise<MobilePublicProfile> {\n const body: MobileServerPublicQueryRequest<'profile'> = {\n type: 'profile',\n subaccount: subaccountToHex(params),\n };\n const data = await this.publicQuery(body);\n return mapMobilePublicProfile(data.profile);\n }\n\n /**\n * Fetches a page of the global trade feed: public perpetual trades, newest first, optionally filtered by a\n * whole-dollar minimum notional (omitted means unfiltered). Trades by subaccounts that have not claimed a\n * username are included with `null` name fields; only private accounts are filtered out. The feed is\n * best-effort rather than authoritative history, and pagination is live (not snapshot), so deduplicate pages\n * by {@link MobileFeedTrade.orderDigest}.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_FEED_FILTER` if `minimumNotional` or\n * `limit` is outside its allowed domain (fix the request; do not retry unchanged), or\n * `INVALID_FEED_CURSOR` if the cursor is malformed or was issued for a different `minimumNotional`\n * (discard the cursor and restart from the first page).\n */\n async getFeed(params: GetMobileFeedParams = {}): Promise<MobileFeedPage> {\n const body: MobileServerPublicQueryRequest<'feed'> = {\n type: 'feed',\n minimum_notional: params.minimumNotional,\n limit: params.limit,\n cursor: params.cursor,\n };\n const data = await this.publicQuery(body);\n return mapMobileFeedPage(data);\n }\n\n /**\n * Fetches the push notification preferences of the wallet that owns the given Expo push token. Unsigned —\n * the token identifies the wallet on its own. Falls back to the backend's defaults if the wallet has never\n * updated its preferences.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_EXPO_TOKEN` if the token is malformed, or is\n * not currently registered to a wallet.\n */\n async getNotificationPreferences(\n params: GetMobileNotificationPreferencesParams,\n ): Promise<MobileNotificationPreferences> {\n const body: MobileServerPublicQueryRequest<'notification_preferences'> = {\n type: 'notification_preferences',\n expo_token: params.expoToken,\n };\n const data = await this.publicQuery(body);\n return mapMobileNotificationPreferences(data.preferences);\n }\n\n /**\n * Resolves the wallet that an Expo push token is currently registered to, along with the redacted metadata\n * of the device that registered it. Unsigned — the token identifies the wallet on its own. Use it to check\n * whether a locally held token is still active and which wallet currently owns it, since registering the\n * same token under another wallet transfers ownership.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_EXPO_TOKEN` if the token is malformed, or is\n * not currently registered to a wallet — including a token that was unregistered. The backend does not\n * distinguish those cases.\n */\n async getRegisteredWallet(\n params: GetMobileRegisteredWalletParams,\n ): Promise<MobileRegisteredWallet> {\n const body: MobileServerPublicQueryRequest<'registered_wallet'> = {\n type: 'registered_wallet',\n expo_token: params.expoToken,\n };\n const data = await this.publicQuery(body);\n return mapMobileRegisteredWallet(data);\n }\n\n /*\n Public executes\n */\n\n /**\n * Unregisters an Expo push token, stopping delivery to that device. Unsigned, so it still works at logout\n * when a wallet signature may no longer be obtainable. Idempotent: unregistering an inactive or unknown\n * well-formed token succeeds.\n *\n * A registration that commits after this call re-activates the token, so stop or await any in-flight\n * {@link MobileClient.registerExpoToken} before unregistering.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_EXPO_TOKEN` if the token is malformed.\n */\n async unregisterExpoToken(\n params: MobileUnregisterExpoTokenParams,\n ): Promise<MobileServerSuccessResponse> {\n const body: MobileServerPublicExecuteRequest<'unregister_expo_token'> = {\n type: 'unregister_expo_token',\n expo_token: params.expoToken,\n };\n return this.publicExecute(body);\n }\n\n /**\n * Replaces the push notification preferences of the wallet that owns the given Expo push token. Possession\n * of an active token is the credential rather than a signature, so anyone holding the token can overwrite\n * that wallet's preferences. The backend requires `schemaVersion` of 1, exactly one entry per known\n * category, and empty `scopes` on every entry.\n *\n * Writes are last-write-wins on commit order rather than ordered by a client nonce, so callers must\n * serialize their own preference writes.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_PREFERENCES` if those rules are violated, or\n * `INVALID_EXPO_TOKEN` if the token is malformed or is not currently registered to a wallet.\n */\n async updateNotificationPreferences(\n params: MobileUpdateNotificationPreferencesParams,\n ): Promise<MobileServerSuccessResponse> {\n const body: MobileServerPublicExecuteRequest<'update_preferences'> = {\n type: 'update_preferences',\n expo_token: params.expoToken,\n preferences: mapMobileNotificationPreferencesToServer(params.preferences),\n };\n return this.publicExecute(body);\n }\n\n /*\n Signed executes\n */\n\n /**\n * Sets a subaccount's username, derived from the given display name. Upserts: the same call claims a first\n * username and renames an existing one, so callers never need to read the current identity first.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_DISPLAY_NAME` if the display name violates\n * `MOBILE_DISPLAY_NAME_PATTERN`, `USERNAME_UNAVAILABLE` if the derived username is reserved or already\n * taken by another subaccount, `INVALID_IDENTITY_TARGET` if the sender is in the engine-created isolated\n * namespace, or `STALE_IDENTITY_UPDATE` if another identity write for this subaccount committed with a\n * later nonce (re-read the identity before retrying).\n */\n async setUsername(\n params: MobileSetUsernameParams,\n ): Promise<MobileServerSuccessResponse> {\n const signedRequest = await this.getSignedRequest('set_username', params, {\n display_name: params.displayName,\n });\n return this.execute(signedRequest);\n }\n\n /**\n * Sets whether a subaccount's profile is private.\n */\n async setPrivateMode(\n params: MobileSetPrivateModeParams,\n ): Promise<MobileServerSuccessResponse> {\n const signedRequest = await this.getSignedRequest(\n 'set_private_mode',\n params,\n { private_mode: params.privateMode },\n );\n return this.execute(signedRequest);\n }\n\n /**\n * Registers an Expo push token for the wallet, transferring active ownership of the token if another\n * wallet had registered it. Idempotent per `(wallet, token)`.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_EXPO_TOKEN` if the token is not a valid Expo\n * push token, or `INVALID_DEVICE_METADATA` if `locale` (max 35 chars) or `appVersion` (max 64 chars) is\n * too long.\n */\n async registerExpoToken(\n params: MobileRegisterExpoTokenParams,\n ): Promise<MobileServerSuccessResponse> {\n const signedRequest = await this.getSignedRequest(\n 'register_expo_token',\n params,\n {\n expo_token: params.expoToken,\n platform: params.platform,\n locale: params.locale ?? null,\n app_version: params.appVersion ?? null,\n },\n );\n return this.execute(signedRequest);\n }\n\n /*\n Base Fns\n */\n\n protected async getSignedRequest<T extends MobileSignedInner['type']>(\n type: T,\n params: MobileSignedRequestParams,\n innerParams: MobileSignedInnerParams<T>,\n ): Promise<MobileSignedRequest> {\n // Use the linked signer if provided, otherwise use the default signer provided to the client\n const walletClient =\n this.opts.linkedSignerWalletClient ?? this.opts.walletClient;\n\n if (walletClient == null) {\n throw new WalletNotProvidedError();\n }\n\n const inner = { type, ...innerParams } as unknown as MobileSignedInner;\n return buildSignedMobileRequest({ ...params, walletClient, inner });\n }\n\n // Spelled out as an intersection rather than `MobileServerPublicQueryRequest<T>`: the latter is an indexed\n // access on a mapped type, which is not an inference site, so `T` would always widen to the full union.\n protected async publicQuery<T extends MobileServerPublicQueryRequestType>(\n body: { type: T } & MobileServerPublicQueryRequestByType[T],\n ): Promise<MobileServerPublicQuerySuccessResponse<T>> {\n const response = await this.axiosInstance.post<unknown>(\n `${this.opts.url}/mobile/public_query`,\n body,\n );\n\n this.checkResponseStatus(response);\n this.checkServerStatus(response);\n\n // checkServerStatus throws on failure responses so the cast to the success response is acceptable here\n return response.data as MobileServerPublicQuerySuccessResponse<T>;\n }\n\n protected async publicExecute(\n body: MobileServerPublicExecuteRequest,\n ): Promise<MobileServerSuccessResponse> {\n const response = await this.axiosInstance.post<MobileServerExecuteResult>(\n `${this.opts.url}/mobile/public_execute`,\n body,\n );\n\n this.checkResponseStatus(response);\n this.checkServerStatus(response);\n\n // checkServerStatus catches the failure result and throws the error, so the cast to the success response is acceptable here\n return response.data as MobileServerSuccessResponse;\n }\n\n protected async execute(\n body: MobileSignedRequest,\n ): Promise<MobileServerSuccessResponse> {\n const response = await this.axiosInstance.post<MobileServerExecuteResult>(\n `${this.opts.url}/mobile/execute`,\n body,\n );\n\n this.checkResponseStatus(response);\n this.checkServerStatus(response);\n\n // checkServerStatus catches the failure result and throws the error, so the cast to the success response is acceptable here\n return response.data as MobileServerSuccessResponse;\n }\n\n /**\n * Validates the HTTP status before interpreting the body. Unlike the engine, the mobile backend returns\n * failure envelopes with non-2xx statuses (e.g. 404 for `PROFILE_NOT_FOUND`), so a non-2xx response with a\n * failure envelope still throws the typed error; anything else is a transport-level error.\n */\n private checkResponseStatus(response: AxiosResponse<unknown>) {\n if (response.status >= 200 && response.status < 300) {\n return;\n }\n if (isMobileServerFailureResponse(response.data)) {\n throw new MobileServerFailureError(response.data, response.status);\n }\n throw new Error(\n `Unexpected response from mobile service: ${response.status} ${response.statusText}. Data: ${JSON.stringify(response.data)}`,\n );\n }\n\n private checkServerStatus(response: AxiosResponse<unknown>) {\n const { data } = response;\n\n if (isMobileServerFailureResponse(data)) {\n throw new MobileServerFailureError(data, response.status);\n }\n if (!isMobileServerSuccessResponse(data)) {\n throw new Error(\n `Unexpected response from mobile service: missing success envelope. Data: ${JSON.string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AkB,QAAQ;EAG/B,OAAO,SAAS;CAClB;CAEA,MAAgB,cACd,MACsC;EACtC,MAAM,WAAW,MAAM,KAAK,cAAc,KACxC,GAAG,KAAK,KAAK,IAAI,yBACjB,IACF;EAEA,KAAK,oBAAoB,QAAQ;EACjC,KAAK,kBAAkB,QAAQ;EAG/B,OAAO,SAAS;CAClB;CAEA,MAAgB,QACd,MACsC;EACtC,MAAM,WAAW,MAAM,KAAK,cAAc,KACxC,GAAG,KAAK,KAAK,IAAI,kBACjB,IACF;EAEA,KAAK,oBAAoB,QAAQ;EACjC,KAAK,kBAAkB,QAAQ;EAG/B,OAAO,SAAS;CAClB;;;;;;CAOA,oBAA4B,UAAkC;EAC5D,IAAI,SAAS,UAAU,OAAO,SAAS,SAAS,KAC9C;EAEF,IAAIC,mCAAAA,8BAA8B,SAAS,IAAI,GAC7C,MAAM,IAAIC,uCAAAA,yBAAyB,SAAS,MAAM,SAAS,MAAM;EAEnE,MAAM,IAAI,MACR,4CAA4C,SAAS,OAAO,GAAG,SAAS,WAAW,UAAU,KAAK,UAAU,SAAS,IAAI,GAC3H;CACF;CAEA,kBAA0B,UAAkC;EAC1D,MAAM,EAAE,SAAS;EAEjB,IAAID,mCAAAA,8BAA8B,IAAI,GACpC,MAAM,IAAIC,uCAAAA,yBAAyB,MAAM,SAAS,MAAM;EAE1D,IAAI,CAACC,mCAAAA,8BAA8B,IAAI,GACrC,MAAM,IAAI,MACR,4EAA4E,KAAK,UAAU,IAAI,GACjG;CAEJ;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"canonicalize-CQ-pMYIt.d.ts","names":[],"sources":["../src/signing/src/signing/canonicalize.ts"],"mappings":";;;;;AASA;;;;;iBAAgB,uBAAA,CACd,KAAA,EAAO,iBAAA,GACN,iBAAiB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"canonicalize-hzhboB-C.d.cts","names":[],"sources":["../src/signing/src/signing/canonicalize.ts"],"mappings":";;;;;AASA;;;;;iBAAgB,u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H,sCAAA,GAAyC,yBAAyB;;;;KAKlE,+BAAA,GAAkC,yBAAyB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"eip712MethodByType-3aiJkrHj.d.cts","names":[],"sources":["../src/signing/src/signing/eip712MethodByType.ts"],"mappings":";;;;;AAKA;cAAa,4BAAA,EAA8B,MAAM,CAC/C,iBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"eip712MethodByType-zNvZukU7.d.ts","names":[],"sources":["../src/signing/src/signing/eip712MethodByType.ts"],"mappings":";;;;;AAKA;cAAa,4BAAA,EAA8B,MAAM,CAC/C,iBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mobileErrorCodes-CuQ5lyBV.d.ts","names":[],"sources":["../src/types/src/types/mobileErrorCodes.ts"],"mappings":";;AAOA;;;;cAAa,kBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBgD;;KADjD,eAAA,WACF,kBAAA,eAAiC,kBAAkB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mobileErrorCodes-D_SyBm0k.d.cts","names":[],"sources":["../src/types/src/types/mobileErrorCodes.ts"],"mappings":";;AAOA;;;;cAAa,kBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBgD;;KADjD,eAAA,WACF,kBAAA,eAAiC,kBAAkB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"patterns-B5gi7OfV.d.ts","names":[],"sources":["../src/utils/src/utils/patterns.ts"],"mappings":";;AAGA;;cAAa,2BAAA,EAA2B,MAA0B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"patterns-Db6fgz8i.d.cts","names":[],"sources":["../src/utils/src/utils/patterns.ts"],"mappings":";;AAGA;;cAAa,2BAAA,EAA2B,MAA0B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"payloadHash-BxL26uwq.d.ts","names":[],"sources":["../src/signing/src/signing/payloadHash.ts"],"mappings":";;;;;;AASA;;;iBAAgB,oBAAA,CAAqB,KAAA,EAAO,iBAAA,GAAoB,GAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"payloadHash-DVkEt-Rg.d.cts","names":[],"sources":["../src/signing/src/signing/payloadHash.ts"],"mappings":";;;;;;AASA;;;iBAAgB,oBAAA,CAAqB,KAAA,EAAO,iBAAA,GAAoB,GAAG"}
@@ -1,19 +0,0 @@
1
- import { n as MobileServerPublicExecuteRequestByType, r as MobileServerPublicExecuteRequestType } from "./serverRequestTypes-GAtVYIda.cjs";
2
- import { n as MobileServerSuccessResponse, t as MobileServerFailureResponse } from "./serverBaseTypes-C8KjE9Fm.cjs";
3
-
4
- //#region src/types/serverExecuteTypes.d.ts
5
- /**
6
- * Unsigned `public_execute` request body: a `type` discriminant flattened with its params, mirroring
7
- * {@link MobileServerPublicQueryRequest}.
8
- */
9
- type MobileServerPublicExecuteRequest<T extends MobileServerPublicExecuteRequestType = MobileServerPublicExecuteRequestType> = { [K in MobileServerPublicExecuteRequestType]: {
10
- type: K;
11
- } & MobileServerPublicExecuteRequestByType[K] }[T];
12
- /**
13
- * Discriminated `execute` result union. Mobile execute routes return no payload beyond the success
14
- * discriminant, so the success arm is the base success envelope; failures use the uniform failure envelope.
15
- */
16
- type MobileServerExecuteResult = MobileServerSuccessResponse | MobileServerFailureResponse;
17
- //#endregion
18
- export { MobileServerPublicExecuteRequest as n, MobileServerExecuteResult as t };
19
- //# sourceMappingURL=serverExecuteTypes-Cb5v7y0A.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serverExecuteTypes-Cb5v7y0A.d.cts","names":[],"sources":["../src/types/src/types/serverExecuteTypes.ts"],"mappings":";;;;;;AAaA;;KAAY,gCAAA,WACA,oCAAA,GACR,oCAAA,YAEI,oCAAA;EACJ,IAAA,EAAM,CAAA;AAAA,IACJ,sCAAA,CAAuC,CAAA,IAC3C,CAAA;;;;;KAMU,yBAAA,GACR,2BAAA,GACA,2BAA2B"}