@nadohq/mobile-client 0.30.0 → 0.32.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 (164) hide show
  1. package/README.md +15 -8
  2. package/dist/{MobileClient-CfDtaEeL.cjs → MobileClient-_i0ZV6Dq.cjs} +88 -48
  3. package/dist/MobileClient-_i0ZV6Dq.cjs.map +1 -0
  4. package/dist/MobileClient.cjs +1 -1
  5. package/dist/MobileClient.d.cts +66 -37
  6. package/dist/MobileClient.d.cts.map +1 -1
  7. package/dist/MobileClient.d.ts +66 -37
  8. package/dist/MobileClient.d.ts.map +1 -1
  9. package/dist/MobileClient.js +88 -48
  10. package/dist/MobileClient.js.map +1 -1
  11. package/dist/{MobileServerFailureError-B11rr9O5.d.cts → MobileServerFailureError-BoyAfEZA.d.cts} +3 -3
  12. package/dist/{MobileServerFailureError-B11rr9O5.d.cts.map → MobileServerFailureError-BoyAfEZA.d.cts.map} +1 -1
  13. package/dist/{MobileServerFailureError-DoIvXqYV.d.ts → MobileServerFailureError-MgYVBh5p.d.ts} +3 -3
  14. package/dist/{MobileServerFailureError-DoIvXqYV.d.ts.map → MobileServerFailureError-MgYVBh5p.d.ts.map} +1 -1
  15. package/dist/{buildSignedMobileRequest-EEnDgZF8.d.cts → buildSignedMobileRequest-CBMt97aY.d.cts} +2 -2
  16. package/dist/{buildSignedMobileRequest-EEnDgZF8.d.cts.map → buildSignedMobileRequest-CBMt97aY.d.cts.map} +1 -1
  17. package/dist/{buildSignedMobileRequest-B4KJ6T1y.d.ts → buildSignedMobileRequest-qEC4gWaI.d.ts} +2 -2
  18. package/dist/{buildSignedMobileRequest-B4KJ6T1y.d.ts.map → buildSignedMobileRequest-qEC4gWaI.d.ts.map} +1 -1
  19. package/dist/{canonicalize-Cc7hdZLJ.d.ts → canonicalize-QNARV_Xc.d.cts} +4 -4
  20. package/dist/canonicalize-QNARV_Xc.d.cts.map +1 -0
  21. package/dist/{canonicalize-CDdYnhL3.d.cts → canonicalize-wVdGejB1.d.ts} +4 -4
  22. package/dist/canonicalize-wVdGejB1.d.ts.map +1 -0
  23. package/dist/{clientTypes-BsOps_pY.d.ts → clientTypes-6utzUU-b.d.ts} +40 -32
  24. package/dist/clientTypes-6utzUU-b.d.ts.map +1 -0
  25. package/dist/{clientTypes-UFInIAQd.d.cts → clientTypes-D9qgtNlE.d.cts} +40 -32
  26. package/dist/clientTypes-D9qgtNlE.d.cts.map +1 -0
  27. package/dist/dataMappers.cjs +2 -1
  28. package/dist/dataMappers.cjs.map +1 -1
  29. package/dist/dataMappers.d.cts +3 -3
  30. package/dist/dataMappers.d.cts.map +1 -1
  31. package/dist/dataMappers.d.ts +3 -3
  32. package/dist/dataMappers.d.ts.map +1 -1
  33. package/dist/dataMappers.js +2 -1
  34. package/dist/dataMappers.js.map +1 -1
  35. package/dist/{eip712MethodByType-DCU415zf.d.cts → eip712MethodByType-CroIPqsJ.d.cts} +2 -2
  36. package/dist/eip712MethodByType-CroIPqsJ.d.cts.map +1 -0
  37. package/dist/{eip712MethodByType-B67XiwTu.d.ts → eip712MethodByType-DBUy4AdI.d.ts} +2 -2
  38. package/dist/eip712MethodByType-DBUy4AdI.d.ts.map +1 -0
  39. package/dist/index.cjs +1 -1
  40. package/dist/index.d.cts +15 -15
  41. package/dist/index.d.ts +15 -15
  42. package/dist/{mobileErrorCodes-Cj84nBnT.d.cts → mobileErrorCodes-CuQ5lyBV.d.ts} +2 -4
  43. package/dist/mobileErrorCodes-CuQ5lyBV.d.ts.map +1 -0
  44. package/dist/{mobileErrorCodes-Czmigq9x.d.ts → mobileErrorCodes-D_SyBm0k.d.cts} +2 -4
  45. package/dist/mobileErrorCodes-D_SyBm0k.d.cts.map +1 -0
  46. package/dist/{payloadHash-BSoGv3Lz.d.cts → payloadHash-B0tlFOK8.d.cts} +2 -2
  47. package/dist/payloadHash-B0tlFOK8.d.cts.map +1 -0
  48. package/dist/{payloadHash-BVP2v3p9.d.ts → payloadHash-D1yTQSF4.d.ts} +2 -2
  49. package/dist/payloadHash-D1yTQSF4.d.ts.map +1 -0
  50. package/dist/{serverBaseTypes-m3zEi0X9.d.ts → serverBaseTypes-CzRgwUvA.d.ts} +2 -2
  51. package/dist/{serverBaseTypes-m3zEi0X9.d.ts.map → serverBaseTypes-CzRgwUvA.d.ts.map} +1 -1
  52. package/dist/{serverBaseTypes-A16onlPN.d.cts → serverBaseTypes-DSRgU2Fb.d.cts} +2 -2
  53. package/dist/{serverBaseTypes-A16onlPN.d.cts.map → serverBaseTypes-DSRgU2Fb.d.cts.map} +1 -1
  54. package/dist/serverExecuteTypes-BCb6bUMP.d.cts +19 -0
  55. package/dist/serverExecuteTypes-BCb6bUMP.d.cts.map +1 -0
  56. package/dist/serverExecuteTypes-CI3NBW2Z.d.ts +19 -0
  57. package/dist/serverExecuteTypes-CI3NBW2Z.d.ts.map +1 -0
  58. package/dist/{serverModelTypes-CPZUvVil.d.cts → serverModelTypes-BYQcsRrx.d.cts} +14 -11
  59. package/dist/serverModelTypes-BYQcsRrx.d.cts.map +1 -0
  60. package/dist/{serverModelTypes-CqnqHY5F.d.ts → serverModelTypes-DvPs5qs3.d.ts} +14 -11
  61. package/dist/serverModelTypes-DvPs5qs3.d.ts.map +1 -0
  62. package/dist/{serverQueryTypes-CJLWWZBs.d.ts → serverQueryTypes-9H6P1vJ5.d.cts} +9 -8
  63. package/dist/serverQueryTypes-9H6P1vJ5.d.cts.map +1 -0
  64. package/dist/{serverQueryTypes-C_cCx0Ac.d.cts → serverQueryTypes-Cbjx0bIj.d.ts} +9 -8
  65. package/dist/serverQueryTypes-Cbjx0bIj.d.ts.map +1 -0
  66. package/dist/{serverRequestTypes-DQDy3K9O.d.ts → serverRequestTypes-CHDk6JwE.d.cts} +31 -8
  67. package/dist/serverRequestTypes-CHDk6JwE.d.cts.map +1 -0
  68. package/dist/{serverRequestTypes-DnU_FfMI.d.cts → serverRequestTypes-DYTLrCpz.d.ts} +31 -8
  69. package/dist/serverRequestTypes-DYTLrCpz.d.ts.map +1 -0
  70. package/dist/{serverResponseGuards-BlvfJjsa.d.cts → serverResponseGuards-DRMHmfXh.d.cts} +2 -2
  71. package/dist/{serverResponseGuards-BlvfJjsa.d.cts.map → serverResponseGuards-DRMHmfXh.d.cts.map} +1 -1
  72. package/dist/{serverResponseGuards-gpHH8SHk.d.ts → serverResponseGuards-DpbZvJfL.d.ts} +2 -2
  73. package/dist/{serverResponseGuards-gpHH8SHk.d.ts.map → serverResponseGuards-DpbZvJfL.d.ts.map} +1 -1
  74. package/dist/signing/buildSignedMobileRequest.cjs +1 -1
  75. package/dist/signing/buildSignedMobileRequest.d.cts +1 -1
  76. package/dist/signing/buildSignedMobileRequest.d.ts +1 -1
  77. package/dist/signing/canonicalize.cjs +4 -37
  78. package/dist/signing/canonicalize.cjs.map +1 -1
  79. package/dist/signing/canonicalize.d.cts +1 -1
  80. package/dist/signing/canonicalize.d.ts +1 -1
  81. package/dist/signing/canonicalize.js +4 -37
  82. package/dist/signing/canonicalize.js.map +1 -1
  83. package/dist/signing/eip712MethodByType.cjs +1 -5
  84. package/dist/signing/eip712MethodByType.cjs.map +1 -1
  85. package/dist/signing/eip712MethodByType.d.cts +1 -1
  86. package/dist/signing/eip712MethodByType.d.ts +1 -1
  87. package/dist/signing/eip712MethodByType.js +1 -5
  88. package/dist/signing/eip712MethodByType.js.map +1 -1
  89. package/dist/signing/index.d.cts +5 -5
  90. package/dist/signing/index.d.ts +5 -5
  91. package/dist/signing/payloadHash.cjs +1 -1
  92. package/dist/signing/payloadHash.d.cts +1 -1
  93. package/dist/signing/payloadHash.d.ts +1 -1
  94. package/dist/signing/types.d.cts +1 -1
  95. package/dist/signing/types.d.ts +1 -1
  96. package/dist/types/MobileServerFailureError.cjs +1 -1
  97. package/dist/types/MobileServerFailureError.d.cts +1 -1
  98. package/dist/types/MobileServerFailureError.d.ts +1 -1
  99. package/dist/types/clientTypes.d.cts +2 -2
  100. package/dist/types/clientTypes.d.ts +2 -2
  101. package/dist/types/index.d.cts +9 -9
  102. package/dist/types/index.d.ts +9 -9
  103. package/dist/types/mobileErrorCodes.cjs +2 -3
  104. package/dist/types/mobileErrorCodes.cjs.map +1 -1
  105. package/dist/types/mobileErrorCodes.d.cts +1 -1
  106. package/dist/types/mobileErrorCodes.d.ts +1 -1
  107. package/dist/types/mobileErrorCodes.js +1 -2
  108. package/dist/types/mobileErrorCodes.js.map +1 -1
  109. package/dist/types/serverBaseTypes.d.cts +1 -1
  110. package/dist/types/serverBaseTypes.d.ts +1 -1
  111. package/dist/types/serverExecuteTypes.d.cts +2 -2
  112. package/dist/types/serverExecuteTypes.d.ts +2 -2
  113. package/dist/types/serverModelTypes.cjs.map +1 -1
  114. package/dist/types/serverModelTypes.d.cts +1 -1
  115. package/dist/types/serverModelTypes.d.ts +1 -1
  116. package/dist/types/serverModelTypes.js.map +1 -1
  117. package/dist/types/serverQueryTypes.d.cts +1 -1
  118. package/dist/types/serverQueryTypes.d.ts +1 -1
  119. package/dist/types/serverRequestTypes.d.cts +2 -2
  120. package/dist/types/serverRequestTypes.d.ts +2 -2
  121. package/dist/{types-UHjZR-js.d.ts → types-CQE3HD2V.d.ts} +4 -15
  122. package/dist/types-CQE3HD2V.d.ts.map +1 -0
  123. package/dist/{types-CzOeSYnW.d.cts → types-bNB98pYk.d.cts} +4 -15
  124. package/dist/types-bNB98pYk.d.cts.map +1 -0
  125. package/dist/utils/index.d.cts +1 -1
  126. package/dist/utils/index.d.ts +1 -1
  127. package/dist/utils/serverResponseGuards.d.cts +1 -1
  128. package/dist/utils/serverResponseGuards.d.ts +1 -1
  129. package/package.json +3 -3
  130. package/src/MobileClient.ts +119 -90
  131. package/src/dataMappers.ts +1 -0
  132. package/src/signing/canonicalize.ts +4 -37
  133. package/src/signing/eip712MethodByType.ts +1 -5
  134. package/src/signing/signing.test.ts +17 -60
  135. package/src/signing/types.ts +2 -12
  136. package/src/types/clientTypes.ts +38 -30
  137. package/src/types/mobileErrorCodes.ts +1 -2
  138. package/src/types/serverExecuteTypes.ts +17 -0
  139. package/src/types/serverModelTypes.ts +13 -10
  140. package/src/types/serverQueryTypes.ts +5 -4
  141. package/src/types/serverRequestTypes.ts +27 -4
  142. package/dist/MobileClient-CfDtaEeL.cjs.map +0 -1
  143. package/dist/canonicalize-CDdYnhL3.d.cts.map +0 -1
  144. package/dist/canonicalize-Cc7hdZLJ.d.ts.map +0 -1
  145. package/dist/clientTypes-BsOps_pY.d.ts.map +0 -1
  146. package/dist/clientTypes-UFInIAQd.d.cts.map +0 -1
  147. package/dist/eip712MethodByType-B67XiwTu.d.ts.map +0 -1
  148. package/dist/eip712MethodByType-DCU415zf.d.cts.map +0 -1
  149. package/dist/mobileErrorCodes-Cj84nBnT.d.cts.map +0 -1
  150. package/dist/mobileErrorCodes-Czmigq9x.d.ts.map +0 -1
  151. package/dist/payloadHash-BSoGv3Lz.d.cts.map +0 -1
  152. package/dist/payloadHash-BVP2v3p9.d.ts.map +0 -1
  153. package/dist/serverExecuteTypes-C-bioiuQ.d.cts +0 -11
  154. package/dist/serverExecuteTypes-C-bioiuQ.d.cts.map +0 -1
  155. package/dist/serverExecuteTypes-DfzWOeIx.d.ts +0 -11
  156. package/dist/serverExecuteTypes-DfzWOeIx.d.ts.map +0 -1
  157. package/dist/serverModelTypes-CPZUvVil.d.cts.map +0 -1
  158. package/dist/serverModelTypes-CqnqHY5F.d.ts.map +0 -1
  159. package/dist/serverQueryTypes-CJLWWZBs.d.ts.map +0 -1
  160. package/dist/serverQueryTypes-C_cCx0Ac.d.cts.map +0 -1
  161. package/dist/serverRequestTypes-DQDy3K9O.d.ts.map +0 -1
  162. package/dist/serverRequestTypes-DnU_FfMI.d.cts.map +0 -1
  163. package/dist/types-CzOeSYnW.d.cts.map +0 -1
  164. package/dist/types-UHjZR-js.d.ts.map +0 -1
@@ -1,36 +1,42 @@
1
- import { a as MobileFeedTradePosition, c as MobileNotificationCategory, i as MobileFeedMarginMode, l as MobileNotificationPlatform } from "./serverModelTypes-CqnqHY5F.js";
1
+ import { a as MobileFeedTradePosition, c as MobileNotificationCategory, i as MobileFeedMarginMode, l as MobileNotificationPlatform } from "./serverModelTypes-DvPs5qs3.js";
2
2
  import { SignatureParams, Subaccount } from "@nadohq/shared";
3
3
  import { Hex } from "viem";
4
4
 
5
5
  //#region src/types/clientTypes.d.ts
6
6
  /**
7
- * A subaccount's claimed identity on the mobile service API.
7
+ * A subaccount's identity on the mobile service API. Every non-isolated subaccount has one implicitly, so
8
+ * both name fields are `null` until a username is claimed — render a local fallback label in that case and
9
+ * key lookups, links, and caches off `subaccount`.
8
10
  *
9
11
  * `username` and `displayName` are two representations of the same claimed name: `displayName` is what the
10
12
  * user entered (preserving casing, e.g. `Alice.One`), while `username` is the canonical, lowercased handle
11
- * derived from it (e.g. `alice.one`). `username` is the unique key used for profile lookups
12
- * ({@link MobilePublicProfile}); `displayName` is only for presentation.
13
+ * derived from it (e.g. `alice.one`), unique across identities.
13
14
  */
14
15
  interface MobileIdentity {
15
16
  subaccount: Hex;
16
17
  /**
17
- * Canonical, lowercased handle derived from {@link MobileIdentity.displayName}, unique per identity and
18
- * used for profile lookups.
18
+ * Canonical, lowercased handle derived from {@link MobileIdentity.displayName}, unique across identities,
19
+ * or `null` if no username has been claimed.
19
20
  */
20
- username: string;
21
+ username: string | null;
21
22
  /**
22
- * User-facing name as claimed, preserving original casing. Validated against `MOBILE_DISPLAY_NAME_PATTERN`.
23
+ * User-facing name as claimed, preserving original casing, or `null` if no username has been claimed.
24
+ * Validated against `MOBILE_DISPLAY_NAME_PATTERN`.
23
25
  */
24
- displayName: string;
26
+ displayName: string | null;
25
27
  privateMode: boolean;
26
28
  }
27
29
  /**
28
- * A subaccount's public profile, as returned by an unsigned profile lookup.
30
+ * A subaccount's public profile, as returned by an unsigned profile lookup. Private Mode hides the account's
31
+ * activity, not its profile, so `privateMode` is exposed here too.
29
32
  */
30
33
  interface MobilePublicProfile {
31
34
  subaccount: Hex;
32
- username: string;
33
- displayName: string;
35
+ /** Canonical, lowercased handle, or `null` if no username has been claimed. */
36
+ username: string | null;
37
+ /** User-facing name as claimed, or `null` if no username has been claimed. */
38
+ displayName: string | null;
39
+ privateMode: boolean;
34
40
  }
35
41
  /**
36
42
  * Result of a username availability check.
@@ -57,8 +63,10 @@ interface MobileFeedTrade {
57
63
  /** Order digest this trade is keyed by; the stable id for reconciling live pagination. */
58
64
  orderDigest: Hex;
59
65
  subaccount: Hex;
60
- username: string;
61
- displayName: string;
66
+ /** `null` when the trader has not claimed a username; render a local fallback label from `subaccount`. */
67
+ username: string | null;
68
+ /** `null` when the trader has not claimed a username; render a local fallback label from `subaccount`. */
69
+ displayName: string | null;
62
70
  /** Reserved for a future avatar source; `null` until one is implemented. */
63
71
  avatarUrl: string | null;
64
72
  productId: number;
@@ -138,6 +146,15 @@ interface MobileRegisteredDevice {
138
146
  * Common params for signed requests that authenticate as a given subaccount.
139
147
  */
140
148
  interface MobileSignedRequestParams extends Subaccount, SignatureParams {}
149
+ /**
150
+ * Common params for the unsigned notification requests, which name their target with an Expo push token
151
+ * instead of a subaccount and signature — the counterpart to {@link MobileSignedRequestParams}. The backend
152
+ * resolves the token's owning wallet and reads or mutates that wallet's state.
153
+ */
154
+ interface MobileWithExpoTokenParams {
155
+ /** Expo push token, e.g. `ExponentPushToken[...]`. */
156
+ expoToken: string;
157
+ }
141
158
  /**
142
159
  * Params for {@link MobileClient.getUsernameAvailability}.
143
160
  */
@@ -147,9 +164,7 @@ interface GetMobileUsernameAvailabilityParams {
147
164
  /**
148
165
  * Params for {@link MobileClient.getPublicProfile}.
149
166
  */
150
- interface GetMobilePublicProfileParams {
151
- username: string;
152
- }
167
+ type GetMobilePublicProfileParams = Subaccount;
153
168
  /**
154
169
  * Params for {@link MobileClient.getFeed}.
155
170
  */
@@ -172,15 +187,10 @@ interface GetMobileFeedParams {
172
187
  */
173
188
  type GetMobileSelfIdentityParams = MobileSignedRequestParams;
174
189
  /**
175
- * Params for {@link MobileClient.claimUsername}.
190
+ * Params for {@link MobileClient.setUsername}.
176
191
  */
177
- interface MobileClaimUsernameParams extends MobileSignedRequestParams {
178
- displayName: string;
179
- }
180
- /**
181
- * Params for {@link MobileClient.updateUsername}.
182
- */
183
- interface MobileUpdateUsernameParams extends MobileSignedRequestParams {
192
+ interface MobileSetUsernameParams extends MobileSignedRequestParams {
193
+ /** User-facing name to claim, preserving casing. Must match `MOBILE_DISPLAY_NAME_PATTERN`. */
184
194
  displayName: string;
185
195
  }
186
196
  /**
@@ -210,23 +220,21 @@ interface MobileRegisterExpoTokenParams extends MobileSignedRequestParams {
210
220
  /**
211
221
  * Params for {@link MobileClient.unregisterExpoToken}.
212
222
  */
213
- interface MobileUnregisterExpoTokenParams extends MobileSignedRequestParams {
214
- expoToken: string;
215
- }
223
+ type MobileUnregisterExpoTokenParams = MobileWithExpoTokenParams;
216
224
  /**
217
225
  * Params for {@link MobileClient.updateNotificationPreferences}.
218
226
  */
219
- interface MobileUpdateNotificationPreferencesParams extends MobileSignedRequestParams {
227
+ interface MobileUpdateNotificationPreferencesParams extends MobileWithExpoTokenParams {
220
228
  preferences: MobileNotificationPreferences;
221
229
  }
222
230
  /**
223
231
  * Params for {@link MobileClient.getNotificationPreferences}.
224
232
  */
225
- type GetMobileNotificationPreferencesParams = MobileSignedRequestParams;
233
+ type GetMobileNotificationPreferencesParams = MobileWithExpoTokenParams;
226
234
  /**
227
235
  * Params for {@link MobileClient.getRegisteredDevices}.
228
236
  */
229
237
  type GetMobileRegisteredDevicesParams = MobileSignedRequestParams;
230
238
  //#endregion
231
- export { MobileUsernameAvailability as C, MobileUpdateUsernameParams as S, MobileRegisteredDevice as _, GetMobileSelfIdentityParams as a, MobileUnregisterExpoTokenParams as b, MobileFeedMargin as c, MobileIdentity as d, MobileNotificationCategoryPreference as f, MobileRegisterExpoTokenParams as g, MobilePublicProfile as h, GetMobileRegisteredDevicesParams as i, MobileFeedPage as l, MobileNotificationPreferences as m, GetMobileNotificationPreferencesParams as n, GetMobileUsernameAvailabilityParams as o, MobileNotificationPreferenceScope as p, GetMobilePublicProfileParams as r, MobileClaimUsernameParams as s, GetMobileFeedParams as t, MobileFeedTrade as u, MobileSetPrivateModeParams as v, MobileUpdateNotificationPreferencesParams as x, MobileSignedRequestParams as y };
232
- //# sourceMappingURL=clientTypes-BsOps_pY.d.ts.map
239
+ export { MobileWithExpoTokenParams as C, MobileUsernameAvailability as S, MobileSetPrivateModeParams as _, GetMobileSelfIdentityParams as a, MobileUnregisterExpoTokenParams as b, MobileFeedPage as c, MobileNotificationCategoryPreference as d, MobileNotificationPreferenceScope as f, MobileRegisteredDevice as g, MobileRegisterExpoTokenParams as h, GetMobileRegisteredDevicesParams as i, MobileFeedTrade as l, MobilePublicProfile as m, GetMobileNotificationPreferencesParams as n, GetMobileUsernameAvailabilityParams as o, MobileNotificationPreferences as p, GetMobilePublicProfileParams as r, MobileFeedMargin as s, GetMobileFeedParams as t, MobileIdentity as u, MobileSetUsernameParams as v, MobileUpdateNotificationPreferencesParams as x, MobileSignedRequestParams as y };
240
+ //# sourceMappingURL=clientTypes-6utzUU-b.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientTypes-6utzUU-b.d.ts","names":[],"sources":["../src/types/src/types/clientTypes.ts"],"mappings":";;;;;;;AAkBA;;;;;;;UAAiB,cAAA;EACf,UAAA,EAAY,GAAG;EAWJ;AAAA;AAOb;;EAbE,QAAA;EAce;;;;EATf,WAAA;EACA,WAAA;AAAA;AAaW;AAMb;;;AANa,UANI,mBAAA;EACf,UAAA,EAAY,GAAG;EAqBA;EAnBf,QAAA;;EAEA,WAAA;EACA,WAAA;AAAA;;;AAkBiB;UAZF,0BAAA;EACf,QAAA;EACA,SAAS;AAAA;;;;;;UAQM,gBAAA;EACf,IAAA,EAAM,oBAAoB;EAC1B,iBAAA;AAAA;;;;;;UAQe,eAAA;EAgBf;EAdA,WAAA,EAAa,GAAA;EACb,UAAA,EAAY,GAAA;EAgBZ;EAdA,QAAA;EAgBA;EAdA,WAAA;EAgBQ;EAdR,SAAA;EACA,SAAA;EAsB6B;EApB7B,QAAA;EAqBuB;EAnBvB,QAAA;EAmBQ;EAjBR,YAAA;EACA,MAAA,EAAQ,gBAAA;EAiBE;EAfV,QAAA,EAAU,uBAAA;EAsBiC;EApB3C,WAAA;EAqBuC;EAnBvC,QAAA;AAAA;;;;;AAoB8B;AAKhC;UAhBiB,cAAA;EACf,MAAA,EAAQ,eAAe;EACvB,UAAA;AAAA;;;;;KAOU,iCAAA;EACN,IAAA;EAAoB,UAAA,EAAY,GAAG;AAAA;EACnC,IAAA;EAAiB,SAAA;AAAA;;;;UAKN,oCAAA;EACf,QAAA,EAAU,0BAAA;EACV,OAAA;EACA,MAAA,EAAQ,iCAAiC;AAAA;;;;;UAO1B,6BAAA;EAwBf;EAtBA,aAAA;EACA,UAAA,EAAY,oCAAoC;AAAA;;;;UAMjC,sBAAA;EA6BA;EA3Bf,QAAA,EAAU,0BAA0B;;EAEpC,MAAA;EA2BS;EAzBT,UAAA;EA+BkD;;;AACvC;EA3BX,sBAAA;EAiCsC;;;EA7BtC,UAAA;AAAA;;;;UAMe,yBAAA,SACP,UAAA,EAAY,eAAe;;;AAuC7B;AAMR;;UAtCiB,yBAAA;EAsCkD;EApCjE,SAAS;AAAA;;;;UAMM,mCAAA;EACf,WAAW;AAAA;;;AA2CA;KArCD,4BAAA,GAA+B,UAAU;;;;UAKpC,mBAAA;EA0Cf;;;;EArCA,eAAA;EA8CU;EA5CV,KAAA;EAkDU;;;;EA7CV,MAAA;AAAA;;;;KAMU,2BAAA,GAA8B,yBAAyB;;;;UAKlD,uBAAA,SAAgC,yBAAyB;EA8C9D;EA5CV,WAAW;AAAA;;AA4CiE;AAK9E;UA3CiB,0BAAA,SAAmC,yBAAyB;EAC3E,WAAW;AAAA;AA0C2D;;;AAAA,UApCvD,6BAAA,SAAsC,yBAAyB;;;;EAI9E,SAAA;EACA,QAAA,EAAU,0BAAA;;;;EAIV,MAAA;;;;EAIA,UAAA;AAAA;;;;KAMU,+BAAA,GAAkC,yBAAyB;;;;UAKtD,yCAAA,SAAkD,yBAAyB;EAC1F,WAAA,EAAa,6BAAA;AAAA;;;;KAMH,sCAAA,GAAyC,yBAAyB;;;;KAKlE,gCAAA,GAAmC,yBAAyB"}
@@ -1,36 +1,42 @@
1
- import { a as MobileFeedTradePosition, c as MobileNotificationCategory, i as MobileFeedMarginMode, l as MobileNotificationPlatform } from "./serverModelTypes-CPZUvVil.cjs";
1
+ import { a as MobileFeedTradePosition, c as MobileNotificationCategory, i as MobileFeedMarginMode, l as MobileNotificationPlatform } from "./serverModelTypes-BYQcsRrx.cjs";
2
2
  import { SignatureParams, Subaccount } from "@nadohq/shared";
3
3
  import { Hex } from "viem";
4
4
 
5
5
  //#region src/types/clientTypes.d.ts
6
6
  /**
7
- * A subaccount's claimed identity on the mobile service API.
7
+ * A subaccount's identity on the mobile service API. Every non-isolated subaccount has one implicitly, so
8
+ * both name fields are `null` until a username is claimed — render a local fallback label in that case and
9
+ * key lookups, links, and caches off `subaccount`.
8
10
  *
9
11
  * `username` and `displayName` are two representations of the same claimed name: `displayName` is what the
10
12
  * user entered (preserving casing, e.g. `Alice.One`), while `username` is the canonical, lowercased handle
11
- * derived from it (e.g. `alice.one`). `username` is the unique key used for profile lookups
12
- * ({@link MobilePublicProfile}); `displayName` is only for presentation.
13
+ * derived from it (e.g. `alice.one`), unique across identities.
13
14
  */
14
15
  interface MobileIdentity {
15
16
  subaccount: Hex;
16
17
  /**
17
- * Canonical, lowercased handle derived from {@link MobileIdentity.displayName}, unique per identity and
18
- * used for profile lookups.
18
+ * Canonical, lowercased handle derived from {@link MobileIdentity.displayName}, unique across identities,
19
+ * or `null` if no username has been claimed.
19
20
  */
20
- username: string;
21
+ username: string | null;
21
22
  /**
22
- * User-facing name as claimed, preserving original casing. Validated against `MOBILE_DISPLAY_NAME_PATTERN`.
23
+ * User-facing name as claimed, preserving original casing, or `null` if no username has been claimed.
24
+ * Validated against `MOBILE_DISPLAY_NAME_PATTERN`.
23
25
  */
24
- displayName: string;
26
+ displayName: string | null;
25
27
  privateMode: boolean;
26
28
  }
27
29
  /**
28
- * A subaccount's public profile, as returned by an unsigned profile lookup.
30
+ * A subaccount's public profile, as returned by an unsigned profile lookup. Private Mode hides the account's
31
+ * activity, not its profile, so `privateMode` is exposed here too.
29
32
  */
30
33
  interface MobilePublicProfile {
31
34
  subaccount: Hex;
32
- username: string;
33
- displayName: string;
35
+ /** Canonical, lowercased handle, or `null` if no username has been claimed. */
36
+ username: string | null;
37
+ /** User-facing name as claimed, or `null` if no username has been claimed. */
38
+ displayName: string | null;
39
+ privateMode: boolean;
34
40
  }
35
41
  /**
36
42
  * Result of a username availability check.
@@ -57,8 +63,10 @@ interface MobileFeedTrade {
57
63
  /** Order digest this trade is keyed by; the stable id for reconciling live pagination. */
58
64
  orderDigest: Hex;
59
65
  subaccount: Hex;
60
- username: string;
61
- displayName: string;
66
+ /** `null` when the trader has not claimed a username; render a local fallback label from `subaccount`. */
67
+ username: string | null;
68
+ /** `null` when the trader has not claimed a username; render a local fallback label from `subaccount`. */
69
+ displayName: string | null;
62
70
  /** Reserved for a future avatar source; `null` until one is implemented. */
63
71
  avatarUrl: string | null;
64
72
  productId: number;
@@ -138,6 +146,15 @@ interface MobileRegisteredDevice {
138
146
  * Common params for signed requests that authenticate as a given subaccount.
139
147
  */
140
148
  interface MobileSignedRequestParams extends Subaccount, SignatureParams {}
149
+ /**
150
+ * Common params for the unsigned notification requests, which name their target with an Expo push token
151
+ * instead of a subaccount and signature — the counterpart to {@link MobileSignedRequestParams}. The backend
152
+ * resolves the token's owning wallet and reads or mutates that wallet's state.
153
+ */
154
+ interface MobileWithExpoTokenParams {
155
+ /** Expo push token, e.g. `ExponentPushToken[...]`. */
156
+ expoToken: string;
157
+ }
141
158
  /**
142
159
  * Params for {@link MobileClient.getUsernameAvailability}.
143
160
  */
@@ -147,9 +164,7 @@ interface GetMobileUsernameAvailabilityParams {
147
164
  /**
148
165
  * Params for {@link MobileClient.getPublicProfile}.
149
166
  */
150
- interface GetMobilePublicProfileParams {
151
- username: string;
152
- }
167
+ type GetMobilePublicProfileParams = Subaccount;
153
168
  /**
154
169
  * Params for {@link MobileClient.getFeed}.
155
170
  */
@@ -172,15 +187,10 @@ interface GetMobileFeedParams {
172
187
  */
173
188
  type GetMobileSelfIdentityParams = MobileSignedRequestParams;
174
189
  /**
175
- * Params for {@link MobileClient.claimUsername}.
190
+ * Params for {@link MobileClient.setUsername}.
176
191
  */
177
- interface MobileClaimUsernameParams extends MobileSignedRequestParams {
178
- displayName: string;
179
- }
180
- /**
181
- * Params for {@link MobileClient.updateUsername}.
182
- */
183
- interface MobileUpdateUsernameParams extends MobileSignedRequestParams {
192
+ interface MobileSetUsernameParams extends MobileSignedRequestParams {
193
+ /** User-facing name to claim, preserving casing. Must match `MOBILE_DISPLAY_NAME_PATTERN`. */
184
194
  displayName: string;
185
195
  }
186
196
  /**
@@ -210,23 +220,21 @@ interface MobileRegisterExpoTokenParams extends MobileSignedRequestParams {
210
220
  /**
211
221
  * Params for {@link MobileClient.unregisterExpoToken}.
212
222
  */
213
- interface MobileUnregisterExpoTokenParams extends MobileSignedRequestParams {
214
- expoToken: string;
215
- }
223
+ type MobileUnregisterExpoTokenParams = MobileWithExpoTokenParams;
216
224
  /**
217
225
  * Params for {@link MobileClient.updateNotificationPreferences}.
218
226
  */
219
- interface MobileUpdateNotificationPreferencesParams extends MobileSignedRequestParams {
227
+ interface MobileUpdateNotificationPreferencesParams extends MobileWithExpoTokenParams {
220
228
  preferences: MobileNotificationPreferences;
221
229
  }
222
230
  /**
223
231
  * Params for {@link MobileClient.getNotificationPreferences}.
224
232
  */
225
- type GetMobileNotificationPreferencesParams = MobileSignedRequestParams;
233
+ type GetMobileNotificationPreferencesParams = MobileWithExpoTokenParams;
226
234
  /**
227
235
  * Params for {@link MobileClient.getRegisteredDevices}.
228
236
  */
229
237
  type GetMobileRegisteredDevicesParams = MobileSignedRequestParams;
230
238
  //#endregion
231
- export { MobileUsernameAvailability as C, MobileUpdateUsernameParams as S, MobileRegisteredDevice as _, GetMobileSelfIdentityParams as a, MobileUnregisterExpoTokenParams as b, MobileFeedMargin as c, MobileIdentity as d, MobileNotificationCategoryPreference as f, MobileRegisterExpoTokenParams as g, MobilePublicProfile as h, GetMobileRegisteredDevicesParams as i, MobileFeedPage as l, MobileNotificationPreferences as m, GetMobileNotificationPreferencesParams as n, GetMobileUsernameAvailabilityParams as o, MobileNotificationPreferenceScope as p, GetMobilePublicProfileParams as r, MobileClaimUsernameParams as s, GetMobileFeedParams as t, MobileFeedTrade as u, MobileSetPrivateModeParams as v, MobileUpdateNotificationPreferencesParams as x, MobileSignedRequestParams as y };
232
- //# sourceMappingURL=clientTypes-UFInIAQd.d.cts.map
239
+ export { MobileWithExpoTokenParams as C, MobileUsernameAvailability as S, MobileSetPrivateModeParams as _, GetMobileSelfIdentityParams as a, MobileUnregisterExpoTokenParams as b, MobileFeedPage as c, MobileNotificationCategoryPreference as d, MobileNotificationPreferenceScope as f, MobileRegisteredDevice as g, MobileRegisterExpoTokenParams as h, GetMobileRegisteredDevicesParams as i, MobileFeedTrade as l, MobilePublicProfile as m, GetMobileNotificationPreferencesParams as n, GetMobileUsernameAvailabilityParams as o, MobileNotificationPreferences as p, GetMobilePublicProfileParams as r, MobileFeedMargin as s, GetMobileFeedParams as t, MobileIdentity as u, MobileSetUsernameParams as v, MobileUpdateNotificationPreferencesParams as x, MobileSignedRequestParams as y };
240
+ //# sourceMappingURL=clientTypes-D9qgtNlE.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientTypes-D9qgtNlE.d.cts","names":[],"sources":["../src/types/src/types/clientTypes.ts"],"mappings":";;;;;;;AAkBA;;;;;;;UAAiB,cAAA;EACf,UAAA,EAAY,GAAG;EAWJ;AAAA;AAOb;;EAbE,QAAA;EAce;;;;EATf,WAAA;EACA,WAAA;AAAA;AAaW;AAMb;;;AANa,UANI,mBAAA;EACf,UAAA,EAAY,GAAG;EAqBA;EAnBf,QAAA;;EAEA,WAAA;EACA,WAAA;AAAA;;;AAkBiB;UAZF,0BAAA;EACf,QAAA;EACA,SAAS;AAAA;;;;;;UAQM,gBAAA;EACf,IAAA,EAAM,oBAAoB;EAC1B,iBAAA;AAAA;;;;;;UAQe,eAAA;EAgBf;EAdA,WAAA,EAAa,GAAA;EACb,UAAA,EAAY,GAAA;EAgBZ;EAdA,QAAA;EAgBA;EAdA,WAAA;EAgBQ;EAdR,SAAA;EACA,SAAA;EAsB6B;EApB7B,QAAA;EAqBuB;EAnBvB,QAAA;EAmBQ;EAjBR,YAAA;EACA,MAAA,EAAQ,gBAAA;EAiBE;EAfV,QAAA,EAAU,uBAAA;EAsBiC;EApB3C,WAAA;EAqBuC;EAnBvC,QAAA;AAAA;;;;;AAoB8B;AAKhC;UAhBiB,cAAA;EACf,MAAA,EAAQ,eAAe;EACvB,UAAA;AAAA;;;;;KAOU,iCAAA;EACN,IAAA;EAAoB,UAAA,EAAY,GAAG;AAAA;EACnC,IAAA;EAAiB,SAAA;AAAA;;;;UAKN,oCAAA;EACf,QAAA,EAAU,0BAAA;EACV,OAAA;EACA,MAAA,EAAQ,iCAAiC;AAAA;;;;;UAO1B,6BAAA;EAwBf;EAtBA,aAAA;EACA,UAAA,EAAY,oCAAoC;AAAA;;;;UAMjC,sBAAA;EA6BA;EA3Bf,QAAA,EAAU,0BAA0B;;EAEpC,MAAA;EA2BS;EAzBT,UAAA;EA+BkD;;;AACvC;EA3BX,sBAAA;EAiCsC;;;EA7BtC,UAAA;AAAA;;;;UAMe,yBAAA,SACP,UAAA,EAAY,eAAe;;;AAuC7B;AAMR;;UAtCiB,yBAAA;EAsCkD;EApCjE,SAAS;AAAA;;;;UAMM,mCAAA;EACf,WAAW;AAAA;;;AA2CA;KArCD,4BAAA,GAA+B,UAAU;;;;UAKpC,mBAAA;EA0Cf;;;;EArCA,eAAA;EA8CU;EA5CV,KAAA;EAkDU;;;;EA7CV,MAAA;AAAA;;;;KAMU,2BAAA,GAA8B,yBAAyB;;;;UAKlD,uBAAA,SAAgC,yBAAyB;EA8C9D;EA5CV,WAAW;AAAA;;AA4CiE;AAK9E;UA3CiB,0BAAA,SAAmC,yBAAyB;EAC3E,WAAW;AAAA;AA0C2D;;;AAAA,UApCvD,6BAAA,SAAsC,yBAAyB;;;;EAI9E,SAAA;EACA,QAAA,EAAU,0BAAA;;;;EAIV,MAAA;;;;EAIA,UAAA;AAAA;;;;KAMU,+BAAA,GAAkC,yBAAyB;;;;UAKtD,yCAAA,SAAkD,yBAAyB;EAC1F,WAAA,EAAa,6BAAA;AAAA;;;;KAMH,sCAAA,GAAyC,yBAAyB;;;;KAKlE,gCAAA,GAAmC,yBAAyB"}
@@ -18,7 +18,8 @@ function mapMobilePublicProfile(server) {
18
18
  return {
19
19
  subaccount: server.subaccount,
20
20
  username: server.username,
21
- displayName: server.display_name
21
+ displayName: server.display_name,
22
+ privateMode: server.private_mode
22
23
  };
23
24
  }
24
25
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dataMappers.cjs","names":[],"sources":["../src/dataMappers.ts"],"sourcesContent":["import {\n MobileFeedPage,\n MobileFeedTrade,\n MobileIdentity,\n MobileNotificationPreferenceScope,\n MobileNotificationPreferences,\n MobilePublicProfile,\n MobileRegisteredDevice,\n} from './types/clientTypes';\nimport {\n MobileServerFeedTrade,\n MobileServerIdentity,\n MobileServerNotificationPreferenceScope,\n MobileServerNotificationPreferences,\n MobileServerProfile,\n MobileServerRegisteredDevice,\n} from './types/serverModelTypes';\nimport { MobileServerFeedResponse } from './types/serverQueryTypes';\n\n/**\n * Maps a server-side identity (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileIdentity(\n server: MobileServerIdentity,\n): MobileIdentity {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n privateMode: server.private_mode,\n };\n}\n\n/**\n * Maps a server-side public profile (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobilePublicProfile(\n server: MobileServerProfile,\n): MobilePublicProfile {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n };\n}\n\n/**\n * Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.\n */\nexport function mapMobileNotificationPreferences(\n server: MobileServerNotificationPreferences,\n): MobileNotificationPreferences {\n return {\n schemaVersion: server.schema_version,\n categories: server.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScope),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScope(\n server: MobileServerNotificationPreferenceScope,\n): MobileNotificationPreferenceScope {\n if (server.type === 'subaccount') {\n return { type: 'subaccount', subaccount: server.subaccount };\n }\n return { type: 'product', productId: server.product_id };\n}\n\n/**\n * Maps client-side notification preferences (camelCase) to the server-side (snake_case) wire shape.\n */\nexport function mapMobileNotificationPreferencesToServer(\n preferences: MobileNotificationPreferences,\n): MobileServerNotificationPreferences {\n return {\n schema_version: preferences.schemaVersion,\n categories: preferences.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScopeToServer),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScopeToServer(\n scope: MobileNotificationPreferenceScope,\n): MobileServerNotificationPreferenceScope {\n if (scope.type === 'subaccount') {\n return { type: 'subaccount', subaccount: scope.subaccount };\n }\n return { type: 'product', product_id: scope.productId };\n}\n\n/**\n * Maps a server-side feed trade (snake_case) to its client-side (camelCase) representation.\n */\nfunction mapMobileFeedTrade(server: MobileServerFeedTrade): MobileFeedTrade {\n return {\n orderDigest: server.order_digest,\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n avatarUrl: server.avatar_url,\n productId: server.product_id,\n quantity: server.quantity,\n notional: server.notional,\n averagePrice: server.average_price,\n margin: {\n mode: server.margin.mode,\n estimatedLeverage: server.margin.estimated_leverage,\n },\n position: server.position,\n realizedPnl: server.realized_pnl,\n filledAt: server.filled_at_ms,\n };\n}\n\n/**\n * Maps a server-side feed response to a client-side {@link MobileFeedPage}.\n */\nexport function mapMobileFeedPage(\n server: MobileServerFeedResponse,\n): MobileFeedPage {\n return {\n trades: server.trades.map(mapMobileFeedTrade),\n nextCursor: server.next_cursor,\n };\n}\n\n/**\n * Maps a server-side registered device (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileRegisteredDevice(\n server: MobileServerRegisteredDevice,\n): MobileRegisteredDevice {\n return {\n platform: server.platform,\n locale: server.locale,\n appVersion: server.app_version,\n tokenFingerprintPrefix: server.token_fingerprint_prefix,\n lastSeenAt: server.last_seen_at,\n };\n}\n"],"mappings":";;;;;AAsBA,SAAgB,kBACd,QACgB;CAChB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,aAAa,OAAO;CACtB;AACF;;;;AAKA,SAAgB,uBACd,QACqB;CACrB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;CACtB;AACF;;;;AAKA,SAAgB,iCACd,QAC+B;CAC/B,OAAO;EACL,eAAe,OAAO;EACtB,YAAY,OAAO,WAAW,KAAK,cAAc;GAC/C,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,oCAAoC;EAClE,EAAE;CACJ;AACF;AAEA,SAAS,qCACP,QACmC;CACnC,IAAI,OAAO,SAAS,cAClB,OAAO;EAAE,MAAM;EAAc,YAAY,OAAO;CAAW;CAE7D,OAAO;EAAE,MAAM;EAAW,WAAW,OAAO;CAAW;AACzD;;;;AAKA,SAAgB,yCACd,aACqC;CACrC,OAAO;EACL,gBAAgB,YAAY;EAC5B,YAAY,YAAY,WAAW,KAAK,cAAc;GACpD,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,4CAA4C;EAC1E,EAAE;CACJ;AACF;AAEA,SAAS,6CACP,OACyC;CACzC,IAAI,MAAM,SAAS,cACjB,OAAO;EAAE,MAAM;EAAc,YAAY,MAAM;CAAW;CAE5D,OAAO;EAAE,MAAM;EAAW,YAAY,MAAM;CAAU;AACxD;;;;AAKA,SAAS,mBAAmB,QAAgD;CAC1E,OAAO;EACL,aAAa,OAAO;EACpB,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,WAAW,OAAO;EAClB,WAAW,OAAO;EAClB,UAAU,OAAO;EACjB,UAAU,OAAO;EACjB,cAAc,OAAO;EACrB,QAAQ;GACN,MAAM,OAAO,OAAO;GACpB,mBAAmB,OAAO,OAAO;EACnC;EACA,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,UAAU,OAAO;CACnB;AACF;;;;AAKA,SAAgB,kBACd,QACgB;CAChB,OAAO;EACL,QAAQ,OAAO,OAAO,IAAI,kBAAkB;EAC5C,YAAY,OAAO;CACrB;AACF;;;;AAKA,SAAgB,0BACd,QACwB;CACxB,OAAO;EACL,UAAU,OAAO;EACjB,QAAQ,OAAO;EACf,YAAY,OAAO;EACnB,wBAAwB,OAAO;EAC/B,YAAY,OAAO;CACrB;AACF"}
1
+ {"version":3,"file":"dataMappers.cjs","names":[],"sources":["../src/dataMappers.ts"],"sourcesContent":["import {\n MobileFeedPage,\n MobileFeedTrade,\n MobileIdentity,\n MobileNotificationPreferenceScope,\n MobileNotificationPreferences,\n MobilePublicProfile,\n MobileRegisteredDevice,\n} from './types/clientTypes';\nimport {\n MobileServerFeedTrade,\n MobileServerIdentity,\n MobileServerNotificationPreferenceScope,\n MobileServerNotificationPreferences,\n MobileServerProfile,\n MobileServerRegisteredDevice,\n} from './types/serverModelTypes';\nimport { MobileServerFeedResponse } from './types/serverQueryTypes';\n\n/**\n * Maps a server-side identity (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileIdentity(\n server: MobileServerIdentity,\n): MobileIdentity {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n privateMode: server.private_mode,\n };\n}\n\n/**\n * Maps a server-side public profile (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobilePublicProfile(\n server: MobileServerProfile,\n): MobilePublicProfile {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n privateMode: server.private_mode,\n };\n}\n\n/**\n * Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.\n */\nexport function mapMobileNotificationPreferences(\n server: MobileServerNotificationPreferences,\n): MobileNotificationPreferences {\n return {\n schemaVersion: server.schema_version,\n categories: server.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScope),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScope(\n server: MobileServerNotificationPreferenceScope,\n): MobileNotificationPreferenceScope {\n if (server.type === 'subaccount') {\n return { type: 'subaccount', subaccount: server.subaccount };\n }\n return { type: 'product', productId: server.product_id };\n}\n\n/**\n * Maps client-side notification preferences (camelCase) to the server-side (snake_case) wire shape.\n */\nexport function mapMobileNotificationPreferencesToServer(\n preferences: MobileNotificationPreferences,\n): MobileServerNotificationPreferences {\n return {\n schema_version: preferences.schemaVersion,\n categories: preferences.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScopeToServer),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScopeToServer(\n scope: MobileNotificationPreferenceScope,\n): MobileServerNotificationPreferenceScope {\n if (scope.type === 'subaccount') {\n return { type: 'subaccount', subaccount: scope.subaccount };\n }\n return { type: 'product', product_id: scope.productId };\n}\n\n/**\n * Maps a server-side feed trade (snake_case) to its client-side (camelCase) representation.\n */\nfunction mapMobileFeedTrade(server: MobileServerFeedTrade): MobileFeedTrade {\n return {\n orderDigest: server.order_digest,\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n avatarUrl: server.avatar_url,\n productId: server.product_id,\n quantity: server.quantity,\n notional: server.notional,\n averagePrice: server.average_price,\n margin: {\n mode: server.margin.mode,\n estimatedLeverage: server.margin.estimated_leverage,\n },\n position: server.position,\n realizedPnl: server.realized_pnl,\n filledAt: server.filled_at_ms,\n };\n}\n\n/**\n * Maps a server-side feed response to a client-side {@link MobileFeedPage}.\n */\nexport function mapMobileFeedPage(\n server: MobileServerFeedResponse,\n): MobileFeedPage {\n return {\n trades: server.trades.map(mapMobileFeedTrade),\n nextCursor: server.next_cursor,\n };\n}\n\n/**\n * Maps a server-side registered device (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileRegisteredDevice(\n server: MobileServerRegisteredDevice,\n): MobileRegisteredDevice {\n return {\n platform: server.platform,\n locale: server.locale,\n appVersion: server.app_version,\n tokenFingerprintPrefix: server.token_fingerprint_prefix,\n lastSeenAt: server.last_seen_at,\n };\n}\n"],"mappings":";;;;;AAsBA,SAAgB,kBACd,QACgB;CAChB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,aAAa,OAAO;CACtB;AACF;;;;AAKA,SAAgB,uBACd,QACqB;CACrB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,aAAa,OAAO;CACtB;AACF;;;;AAKA,SAAgB,iCACd,QAC+B;CAC/B,OAAO;EACL,eAAe,OAAO;EACtB,YAAY,OAAO,WAAW,KAAK,cAAc;GAC/C,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,oCAAoC;EAClE,EAAE;CACJ;AACF;AAEA,SAAS,qCACP,QACmC;CACnC,IAAI,OAAO,SAAS,cAClB,OAAO;EAAE,MAAM;EAAc,YAAY,OAAO;CAAW;CAE7D,OAAO;EAAE,MAAM;EAAW,WAAW,OAAO;CAAW;AACzD;;;;AAKA,SAAgB,yCACd,aACqC;CACrC,OAAO;EACL,gBAAgB,YAAY;EAC5B,YAAY,YAAY,WAAW,KAAK,cAAc;GACpD,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,4CAA4C;EAC1E,EAAE;CACJ;AACF;AAEA,SAAS,6CACP,OACyC;CACzC,IAAI,MAAM,SAAS,cACjB,OAAO;EAAE,MAAM;EAAc,YAAY,MAAM;CAAW;CAE5D,OAAO;EAAE,MAAM;EAAW,YAAY,MAAM;CAAU;AACxD;;;;AAKA,SAAS,mBAAmB,QAAgD;CAC1E,OAAO;EACL,aAAa,OAAO;EACpB,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,WAAW,OAAO;EAClB,WAAW,OAAO;EAClB,UAAU,OAAO;EACjB,UAAU,OAAO;EACjB,cAAc,OAAO;EACrB,QAAQ;GACN,MAAM,OAAO,OAAO;GACpB,mBAAmB,OAAO,OAAO;EACnC;EACA,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,UAAU,OAAO;CACnB;AACF;;;;AAKA,SAAgB,kBACd,QACgB;CAChB,OAAO;EACL,QAAQ,OAAO,OAAO,IAAI,kBAAkB;EAC5C,YAAY,OAAO;CACrB;AACF;;;;AAKA,SAAgB,0BACd,QACwB;CACxB,OAAO;EACL,UAAU,OAAO;EACjB,QAAQ,OAAO;EACf,YAAY,OAAO;EACnB,wBAAwB,OAAO;EAC/B,YAAY,OAAO;CACrB;AACF"}
@@ -1,6 +1,6 @@
1
- import { _ as MobileServerRegisteredDevice, f as MobileServerIdentity, g as MobileServerProfile, h as MobileServerNotificationPreferences } from "./serverModelTypes-CPZUvVil.cjs";
2
- import { _ as MobileRegisteredDevice, d as MobileIdentity, h as MobilePublicProfile, l as MobileFeedPage, m as MobileNotificationPreferences } from "./clientTypes-UFInIAQd.cjs";
3
- import { t as MobileServerFeedResponse } from "./serverQueryTypes-C_cCx0Ac.cjs";
1
+ import { _ as MobileServerRegisteredDevice, f as MobileServerIdentity, g as MobileServerProfile, h as MobileServerNotificationPreferences } from "./serverModelTypes-BYQcsRrx.cjs";
2
+ import { c as MobileFeedPage, g as MobileRegisteredDevice, m as MobilePublicProfile, p as MobileNotificationPreferences, u as MobileIdentity } from "./clientTypes-D9qgtNlE.cjs";
3
+ import { t as MobileServerFeedResponse } from "./serverQueryTypes-9H6P1vJ5.cjs";
4
4
 
5
5
  //#region src/dataMappers.d.ts
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dataMappers.d.cts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;;AAsBA;iBAAgB,iBAAA,CACd,MAAA,EAAQ,oBAAA,GACP,cAAc;;;;iBAYD,sBAAA,CACd,MAAA,EAAQ,mBAAA,GACP,mBAAmB;;;AAdL;iBAyBD,gCAAA,CACd,MAAA,EAAQ,mCAAA,GACP,6BAA6B;;;;iBAuBhB,wCAAA,CACd,WAAA,EAAa,6BAAA,GACZ,mCAAmC;;;;iBA+CtB,iBAAA,CACd,MAAA,EAAQ,wBAAA,GACP,cAAc;AA5EjB;;;AAAA,iBAsFgB,yBAAA,CACd,MAAA,EAAQ,4BAAA,GACP,sBAAsB"}
1
+ {"version":3,"file":"dataMappers.d.cts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;;AAsBA;iBAAgB,iBAAA,CACd,MAAA,EAAQ,oBAAA,GACP,cAAc;;;;iBAYD,sBAAA,CACd,MAAA,EAAQ,mBAAA,GACP,mBAAmB;;;AAdL;iBA0BD,gCAAA,CACd,MAAA,EAAQ,mCAAA,GACP,6BAA6B;;;;iBAuBhB,wCAAA,CACd,WAAA,EAAa,6BAAA,GACZ,mCAAmC;;;;iBA+CtB,iBAAA,CACd,MAAA,EAAQ,wBAAA,GACP,cAAc;AA5EjB;;;AAAA,iBAsFgB,yBAAA,CACd,MAAA,EAAQ,4BAAA,GACP,sBAAsB"}
@@ -1,6 +1,6 @@
1
- import { _ as MobileServerRegisteredDevice, f as MobileServerIdentity, g as MobileServerProfile, h as MobileServerNotificationPreferences } from "./serverModelTypes-CqnqHY5F.js";
2
- import { _ as MobileRegisteredDevice, d as MobileIdentity, h as MobilePublicProfile, l as MobileFeedPage, m as MobileNotificationPreferences } from "./clientTypes-BsOps_pY.js";
3
- import { t as MobileServerFeedResponse } from "./serverQueryTypes-CJLWWZBs.js";
1
+ import { _ as MobileServerRegisteredDevice, f as MobileServerIdentity, g as MobileServerProfile, h as MobileServerNotificationPreferences } from "./serverModelTypes-DvPs5qs3.js";
2
+ import { c as MobileFeedPage, g as MobileRegisteredDevice, m as MobilePublicProfile, p as MobileNotificationPreferences, u as MobileIdentity } from "./clientTypes-6utzUU-b.js";
3
+ import { t as MobileServerFeedResponse } from "./serverQueryTypes-Cbjx0bIj.js";
4
4
 
5
5
  //#region src/dataMappers.d.ts
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dataMappers.d.ts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;;AAsBA;iBAAgB,iBAAA,CACd,MAAA,EAAQ,oBAAA,GACP,cAAc;;;;iBAYD,sBAAA,CACd,MAAA,EAAQ,mBAAA,GACP,mBAAmB;;;AAdL;iBAyBD,gCAAA,CACd,MAAA,EAAQ,mCAAA,GACP,6BAA6B;;;;iBAuBhB,wCAAA,CACd,WAAA,EAAa,6BAAA,GACZ,mCAAmC;;;;iBA+CtB,iBAAA,CACd,MAAA,EAAQ,wBAAA,GACP,cAAc;AA5EjB;;;AAAA,iBAsFgB,yBAAA,CACd,MAAA,EAAQ,4BAAA,GACP,sBAAsB"}
1
+ {"version":3,"file":"dataMappers.d.ts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;;AAsBA;iBAAgB,iBAAA,CACd,MAAA,EAAQ,oBAAA,GACP,cAAc;;;;iBAYD,sBAAA,CACd,MAAA,EAAQ,mBAAA,GACP,mBAAmB;;;AAdL;iBA0BD,gCAAA,CACd,MAAA,EAAQ,mCAAA,GACP,6BAA6B;;;;iBAuBhB,wCAAA,CACd,WAAA,EAAa,6BAAA,GACZ,mCAAmC;;;;iBA+CtB,iBAAA,CACd,MAAA,EAAQ,wBAAA,GACP,cAAc;AA5EjB;;;AAAA,iBAsFgB,yBAAA,CACd,MAAA,EAAQ,4BAAA,GACP,sBAAsB"}
@@ -17,7 +17,8 @@ function mapMobilePublicProfile(server) {
17
17
  return {
18
18
  subaccount: server.subaccount,
19
19
  username: server.username,
20
- displayName: server.display_name
20
+ displayName: server.display_name,
21
+ privateMode: server.private_mode
21
22
  };
22
23
  }
23
24
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dataMappers.js","names":[],"sources":["../src/dataMappers.ts"],"sourcesContent":["import {\n MobileFeedPage,\n MobileFeedTrade,\n MobileIdentity,\n MobileNotificationPreferenceScope,\n MobileNotificationPreferences,\n MobilePublicProfile,\n MobileRegisteredDevice,\n} from './types/clientTypes';\nimport {\n MobileServerFeedTrade,\n MobileServerIdentity,\n MobileServerNotificationPreferenceScope,\n MobileServerNotificationPreferences,\n MobileServerProfile,\n MobileServerRegisteredDevice,\n} from './types/serverModelTypes';\nimport { MobileServerFeedResponse } from './types/serverQueryTypes';\n\n/**\n * Maps a server-side identity (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileIdentity(\n server: MobileServerIdentity,\n): MobileIdentity {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n privateMode: server.private_mode,\n };\n}\n\n/**\n * Maps a server-side public profile (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobilePublicProfile(\n server: MobileServerProfile,\n): MobilePublicProfile {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n };\n}\n\n/**\n * Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.\n */\nexport function mapMobileNotificationPreferences(\n server: MobileServerNotificationPreferences,\n): MobileNotificationPreferences {\n return {\n schemaVersion: server.schema_version,\n categories: server.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScope),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScope(\n server: MobileServerNotificationPreferenceScope,\n): MobileNotificationPreferenceScope {\n if (server.type === 'subaccount') {\n return { type: 'subaccount', subaccount: server.subaccount };\n }\n return { type: 'product', productId: server.product_id };\n}\n\n/**\n * Maps client-side notification preferences (camelCase) to the server-side (snake_case) wire shape.\n */\nexport function mapMobileNotificationPreferencesToServer(\n preferences: MobileNotificationPreferences,\n): MobileServerNotificationPreferences {\n return {\n schema_version: preferences.schemaVersion,\n categories: preferences.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScopeToServer),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScopeToServer(\n scope: MobileNotificationPreferenceScope,\n): MobileServerNotificationPreferenceScope {\n if (scope.type === 'subaccount') {\n return { type: 'subaccount', subaccount: scope.subaccount };\n }\n return { type: 'product', product_id: scope.productId };\n}\n\n/**\n * Maps a server-side feed trade (snake_case) to its client-side (camelCase) representation.\n */\nfunction mapMobileFeedTrade(server: MobileServerFeedTrade): MobileFeedTrade {\n return {\n orderDigest: server.order_digest,\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n avatarUrl: server.avatar_url,\n productId: server.product_id,\n quantity: server.quantity,\n notional: server.notional,\n averagePrice: server.average_price,\n margin: {\n mode: server.margin.mode,\n estimatedLeverage: server.margin.estimated_leverage,\n },\n position: server.position,\n realizedPnl: server.realized_pnl,\n filledAt: server.filled_at_ms,\n };\n}\n\n/**\n * Maps a server-side feed response to a client-side {@link MobileFeedPage}.\n */\nexport function mapMobileFeedPage(\n server: MobileServerFeedResponse,\n): MobileFeedPage {\n return {\n trades: server.trades.map(mapMobileFeedTrade),\n nextCursor: server.next_cursor,\n };\n}\n\n/**\n * Maps a server-side registered device (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileRegisteredDevice(\n server: MobileServerRegisteredDevice,\n): MobileRegisteredDevice {\n return {\n platform: server.platform,\n locale: server.locale,\n appVersion: server.app_version,\n tokenFingerprintPrefix: server.token_fingerprint_prefix,\n lastSeenAt: server.last_seen_at,\n };\n}\n"],"mappings":";;;;AAsBA,SAAgB,kBACd,QACgB;CAChB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,aAAa,OAAO;CACtB;AACF;;;;AAKA,SAAgB,uBACd,QACqB;CACrB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;CACtB;AACF;;;;AAKA,SAAgB,iCACd,QAC+B;CAC/B,OAAO;EACL,eAAe,OAAO;EACtB,YAAY,OAAO,WAAW,KAAK,cAAc;GAC/C,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,oCAAoC;EAClE,EAAE;CACJ;AACF;AAEA,SAAS,qCACP,QACmC;CACnC,IAAI,OAAO,SAAS,cAClB,OAAO;EAAE,MAAM;EAAc,YAAY,OAAO;CAAW;CAE7D,OAAO;EAAE,MAAM;EAAW,WAAW,OAAO;CAAW;AACzD;;;;AAKA,SAAgB,yCACd,aACqC;CACrC,OAAO;EACL,gBAAgB,YAAY;EAC5B,YAAY,YAAY,WAAW,KAAK,cAAc;GACpD,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,4CAA4C;EAC1E,EAAE;CACJ;AACF;AAEA,SAAS,6CACP,OACyC;CACzC,IAAI,MAAM,SAAS,cACjB,OAAO;EAAE,MAAM;EAAc,YAAY,MAAM;CAAW;CAE5D,OAAO;EAAE,MAAM;EAAW,YAAY,MAAM;CAAU;AACxD;;;;AAKA,SAAS,mBAAmB,QAAgD;CAC1E,OAAO;EACL,aAAa,OAAO;EACpB,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,WAAW,OAAO;EAClB,WAAW,OAAO;EAClB,UAAU,OAAO;EACjB,UAAU,OAAO;EACjB,cAAc,OAAO;EACrB,QAAQ;GACN,MAAM,OAAO,OAAO;GACpB,mBAAmB,OAAO,OAAO;EACnC;EACA,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,UAAU,OAAO;CACnB;AACF;;;;AAKA,SAAgB,kBACd,QACgB;CAChB,OAAO;EACL,QAAQ,OAAO,OAAO,IAAI,kBAAkB;EAC5C,YAAY,OAAO;CACrB;AACF;;;;AAKA,SAAgB,0BACd,QACwB;CACxB,OAAO;EACL,UAAU,OAAO;EACjB,QAAQ,OAAO;EACf,YAAY,OAAO;EACnB,wBAAwB,OAAO;EAC/B,YAAY,OAAO;CACrB;AACF"}
1
+ {"version":3,"file":"dataMappers.js","names":[],"sources":["../src/dataMappers.ts"],"sourcesContent":["import {\n MobileFeedPage,\n MobileFeedTrade,\n MobileIdentity,\n MobileNotificationPreferenceScope,\n MobileNotificationPreferences,\n MobilePublicProfile,\n MobileRegisteredDevice,\n} from './types/clientTypes';\nimport {\n MobileServerFeedTrade,\n MobileServerIdentity,\n MobileServerNotificationPreferenceScope,\n MobileServerNotificationPreferences,\n MobileServerProfile,\n MobileServerRegisteredDevice,\n} from './types/serverModelTypes';\nimport { MobileServerFeedResponse } from './types/serverQueryTypes';\n\n/**\n * Maps a server-side identity (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileIdentity(\n server: MobileServerIdentity,\n): MobileIdentity {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n privateMode: server.private_mode,\n };\n}\n\n/**\n * Maps a server-side public profile (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobilePublicProfile(\n server: MobileServerProfile,\n): MobilePublicProfile {\n return {\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n privateMode: server.private_mode,\n };\n}\n\n/**\n * Maps server-side notification preferences (snake_case) to their client-side (camelCase) representation.\n */\nexport function mapMobileNotificationPreferences(\n server: MobileServerNotificationPreferences,\n): MobileNotificationPreferences {\n return {\n schemaVersion: server.schema_version,\n categories: server.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScope),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScope(\n server: MobileServerNotificationPreferenceScope,\n): MobileNotificationPreferenceScope {\n if (server.type === 'subaccount') {\n return { type: 'subaccount', subaccount: server.subaccount };\n }\n return { type: 'product', productId: server.product_id };\n}\n\n/**\n * Maps client-side notification preferences (camelCase) to the server-side (snake_case) wire shape.\n */\nexport function mapMobileNotificationPreferencesToServer(\n preferences: MobileNotificationPreferences,\n): MobileServerNotificationPreferences {\n return {\n schema_version: preferences.schemaVersion,\n categories: preferences.categories.map((category) => ({\n category: category.category,\n enabled: category.enabled,\n scopes: category.scopes.map(mapMobileNotificationPreferenceScopeToServer),\n })),\n };\n}\n\nfunction mapMobileNotificationPreferenceScopeToServer(\n scope: MobileNotificationPreferenceScope,\n): MobileServerNotificationPreferenceScope {\n if (scope.type === 'subaccount') {\n return { type: 'subaccount', subaccount: scope.subaccount };\n }\n return { type: 'product', product_id: scope.productId };\n}\n\n/**\n * Maps a server-side feed trade (snake_case) to its client-side (camelCase) representation.\n */\nfunction mapMobileFeedTrade(server: MobileServerFeedTrade): MobileFeedTrade {\n return {\n orderDigest: server.order_digest,\n subaccount: server.subaccount,\n username: server.username,\n displayName: server.display_name,\n avatarUrl: server.avatar_url,\n productId: server.product_id,\n quantity: server.quantity,\n notional: server.notional,\n averagePrice: server.average_price,\n margin: {\n mode: server.margin.mode,\n estimatedLeverage: server.margin.estimated_leverage,\n },\n position: server.position,\n realizedPnl: server.realized_pnl,\n filledAt: server.filled_at_ms,\n };\n}\n\n/**\n * Maps a server-side feed response to a client-side {@link MobileFeedPage}.\n */\nexport function mapMobileFeedPage(\n server: MobileServerFeedResponse,\n): MobileFeedPage {\n return {\n trades: server.trades.map(mapMobileFeedTrade),\n nextCursor: server.next_cursor,\n };\n}\n\n/**\n * Maps a server-side registered device (snake_case) to its client-side (camelCase) representation.\n */\nexport function mapMobileRegisteredDevice(\n server: MobileServerRegisteredDevice,\n): MobileRegisteredDevice {\n return {\n platform: server.platform,\n locale: server.locale,\n appVersion: server.app_version,\n tokenFingerprintPrefix: server.token_fingerprint_prefix,\n lastSeenAt: server.last_seen_at,\n };\n}\n"],"mappings":";;;;AAsBA,SAAgB,kBACd,QACgB;CAChB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,aAAa,OAAO;CACtB;AACF;;;;AAKA,SAAgB,uBACd,QACqB;CACrB,OAAO;EACL,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,aAAa,OAAO;CACtB;AACF;;;;AAKA,SAAgB,iCACd,QAC+B;CAC/B,OAAO;EACL,eAAe,OAAO;EACtB,YAAY,OAAO,WAAW,KAAK,cAAc;GAC/C,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,oCAAoC;EAClE,EAAE;CACJ;AACF;AAEA,SAAS,qCACP,QACmC;CACnC,IAAI,OAAO,SAAS,cAClB,OAAO;EAAE,MAAM;EAAc,YAAY,OAAO;CAAW;CAE7D,OAAO;EAAE,MAAM;EAAW,WAAW,OAAO;CAAW;AACzD;;;;AAKA,SAAgB,yCACd,aACqC;CACrC,OAAO;EACL,gBAAgB,YAAY;EAC5B,YAAY,YAAY,WAAW,KAAK,cAAc;GACpD,UAAU,SAAS;GACnB,SAAS,SAAS;GAClB,QAAQ,SAAS,OAAO,IAAI,4CAA4C;EAC1E,EAAE;CACJ;AACF;AAEA,SAAS,6CACP,OACyC;CACzC,IAAI,MAAM,SAAS,cACjB,OAAO;EAAE,MAAM;EAAc,YAAY,MAAM;CAAW;CAE5D,OAAO;EAAE,MAAM;EAAW,YAAY,MAAM;CAAU;AACxD;;;;AAKA,SAAS,mBAAmB,QAAgD;CAC1E,OAAO;EACL,aAAa,OAAO;EACpB,YAAY,OAAO;EACnB,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,WAAW,OAAO;EAClB,WAAW,OAAO;EAClB,UAAU,OAAO;EACjB,UAAU,OAAO;EACjB,cAAc,OAAO;EACrB,QAAQ;GACN,MAAM,OAAO,OAAO;GACpB,mBAAmB,OAAO,OAAO;EACnC;EACA,UAAU,OAAO;EACjB,aAAa,OAAO;EACpB,UAAU,OAAO;CACnB;AACF;;;;AAKA,SAAgB,kBACd,QACgB;CAChB,OAAO;EACL,QAAQ,OAAO,OAAO,IAAI,kBAAkB;EAC5C,YAAY,OAAO;CACrB;AACF;;;;AAKA,SAAgB,0BACd,QACwB;CACxB,OAAO;EACL,UAAU,OAAO;EACjB,QAAQ,OAAO;EACf,YAAY,OAAO;EACnB,wBAAwB,OAAO;EAC/B,YAAY,OAAO;CACrB;AACF"}
@@ -1,4 +1,4 @@
1
- import { n as MobileSignedInner } from "./types-CzOeSYnW.cjs";
1
+ import { n as MobileSignedInner } from "./types-bNB98pYk.cjs";
2
2
 
3
3
  //#region src/signing/eip712MethodByType.d.ts
4
4
  /**
@@ -7,4 +7,4 @@ import { n as MobileSignedInner } from "./types-CzOeSYnW.cjs";
7
7
  declare const MOBILE_EIP712_METHOD_BY_TYPE: Record<MobileSignedInner['type'], string>;
8
8
  //#endregion
9
9
  export { MOBILE_EIP712_METHOD_BY_TYPE as t };
10
- //# sourceMappingURL=eip712MethodByType-DCU415zf.d.cts.map
10
+ //# sourceMappingURL=eip712MethodByType-CroIPqsJ.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eip712MethodByType-CroIPqsJ.d.cts","names":[],"sources":["../src/signing/src/signing/eip712MethodByType.ts"],"mappings":";;;;;AAKA;cAAa,4BAAA,EAA8B,MAAM,CAC/C,iBAAA"}
@@ -1,4 +1,4 @@
1
- import { n as MobileSignedInner } from "./types-UHjZR-js.js";
1
+ import { n as MobileSignedInner } from "./types-CQE3HD2V.js";
2
2
 
3
3
  //#region src/signing/eip712MethodByType.d.ts
4
4
  /**
@@ -7,4 +7,4 @@ import { n as MobileSignedInner } from "./types-UHjZR-js.js";
7
7
  declare const MOBILE_EIP712_METHOD_BY_TYPE: Record<MobileSignedInner['type'], string>;
8
8
  //#endregion
9
9
  export { MOBILE_EIP712_METHOD_BY_TYPE as t };
10
- //# sourceMappingURL=eip712MethodByType-B67XiwTu.d.ts.map
10
+ //# sourceMappingURL=eip712MethodByType-DBUy4AdI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eip712MethodByType-DBUy4AdI.d.ts","names":[],"sources":["../src/signing/src/signing/eip712MethodByType.ts"],"mappings":";;;;;AAKA;cAAa,4BAAA,EAA8B,MAAM,CAC/C,iBAAA"}
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_MobileClient = require("./MobileClient-CfDtaEeL.cjs");
2
+ const require_MobileClient = require("./MobileClient-_i0ZV6Dq.cjs");
3
3
  const require_signing_canonicalize = require("./signing/canonicalize.cjs");
4
4
  const require_signing_eip712MethodByType = require("./signing/eip712MethodByType.cjs");
5
5
  const require_signing_nonce = require("./signing/nonce.cjs");
package/dist/index.d.cts CHANGED
@@ -1,20 +1,20 @@
1
- import { _ as MobileServerRegisteredDevice, a as MobileFeedTradePosition, c as MobileNotificationCategory, d as MobileServerFeedTrade, f as MobileServerIdentity, g as MobileServerProfile, h as MobileServerNotificationPreferences, i as MobileFeedMarginMode, l as MobileNotificationPlatform, m as MobileServerNotificationPreferenceScope, n as MOBILE_FEED_TRADE_POSITION_DIRECTIONS, o as MobileFeedTradePositionDirection, p as MobileServerNotificationCategoryPreference, r as MOBILE_FEED_TRADE_POSITION_EFFECTS, s as MobileFeedTradePositionEffect, t as MOBILE_FEED_MARGIN_MODES, u as MobileServerFeedMargin } from "./serverModelTypes-CPZUvVil.cjs";
2
- import { C as MobileUsernameAvailability, S as MobileUpdateUsernameParams, _ as MobileRegisteredDevice, a as GetMobileSelfIdentityParams, b as MobileUnregisterExpoTokenParams, c as MobileFeedMargin, d as MobileIdentity, f as MobileNotificationCategoryPreference, g as MobileRegisterExpoTokenParams, h as MobilePublicProfile, i as GetMobileRegisteredDevicesParams, l as MobileFeedPage, m as MobileNotificationPreferences, n as GetMobileNotificationPreferencesParams, o as GetMobileUsernameAvailabilityParams, p as MobileNotificationPreferenceScope, r as GetMobilePublicProfileParams, s as MobileClaimUsernameParams, t as GetMobileFeedParams, u as MobileFeedTrade, v as MobileSetPrivateModeParams, x as MobileUpdateNotificationPreferencesParams, y as MobileSignedRequestParams } from "./clientTypes-UFInIAQd.cjs";
3
- import { i as MobileSignedRequest, n as MobileSignedInner, r as MobileSignedInnerParams, t as BuildSignedMobileRequestParams } from "./types-CzOeSYnW.cjs";
4
- import { t as buildSignedMobileRequest } from "./buildSignedMobileRequest-EEnDgZF8.cjs";
5
- import { t as canonicalizeMobileInner } from "./canonicalize-CDdYnhL3.cjs";
6
- import { t as MOBILE_EIP712_METHOD_BY_TYPE } from "./eip712MethodByType-DCU415zf.cjs";
1
+ import { _ as MobileServerRegisteredDevice, a as MobileFeedTradePosition, c as MobileNotificationCategory, d as MobileServerFeedTrade, f as MobileServerIdentity, g as MobileServerProfile, h as MobileServerNotificationPreferences, i as MobileFeedMarginMode, l as MobileNotificationPlatform, m as MobileServerNotificationPreferenceScope, n as MOBILE_FEED_TRADE_POSITION_DIRECTIONS, o as MobileFeedTradePositionDirection, p as MobileServerNotificationCategoryPreference, r as MOBILE_FEED_TRADE_POSITION_EFFECTS, s as MobileFeedTradePositionEffect, t as MOBILE_FEED_MARGIN_MODES, u as MobileServerFeedMargin } from "./serverModelTypes-BYQcsRrx.cjs";
2
+ import { C as MobileWithExpoTokenParams, S as MobileUsernameAvailability, _ as MobileSetPrivateModeParams, a as GetMobileSelfIdentityParams, b as MobileUnregisterExpoTokenParams, c as MobileFeedPage, d as MobileNotificationCategoryPreference, f as MobileNotificationPreferenceScope, g as MobileRegisteredDevice, h as MobileRegisterExpoTokenParams, i as GetMobileRegisteredDevicesParams, l as MobileFeedTrade, m as MobilePublicProfile, n as GetMobileNotificationPreferencesParams, o as GetMobileUsernameAvailabilityParams, p as MobileNotificationPreferences, r as GetMobilePublicProfileParams, s as MobileFeedMargin, t as GetMobileFeedParams, u as MobileIdentity, v as MobileSetUsernameParams, x as MobileUpdateNotificationPreferencesParams, y as MobileSignedRequestParams } from "./clientTypes-D9qgtNlE.cjs";
3
+ import { i as MobileSignedRequest, n as MobileSignedInner, r as MobileSignedInnerParams, t as BuildSignedMobileRequestParams } from "./types-bNB98pYk.cjs";
4
+ import { t as buildSignedMobileRequest } from "./buildSignedMobileRequest-CBMt97aY.cjs";
5
+ import { t as canonicalizeMobileInner } from "./canonicalize-QNARV_Xc.cjs";
6
+ import { t as MOBILE_EIP712_METHOD_BY_TYPE } from "./eip712MethodByType-CroIPqsJ.cjs";
7
7
  import { t as getMobileNonce } from "./nonce-zGyisRlj.cjs";
8
- import { t as getMobilePayloadHash } from "./payloadHash-BSoGv3Lz.cjs";
9
- import { a as MobileServerSignedQueryRequestByType, i as MobileServerRequestType, n as MobileServerPublicQueryRequestByType, o as MobileServerSignedQueryRequestType, r as MobileServerPublicQueryRequestType, t as MobileServerExecuteRequestType } from "./serverRequestTypes-DnU_FfMI.cjs";
10
- import { n as MobileServerSuccessResponse, t as MobileServerFailureResponse } from "./serverBaseTypes-A16onlPN.cjs";
11
- import { a as MobileServerPublicQueryResponseByType, c as MobileServerSelfIdentityResponse, d as MobileServerUsernameAvailabilityResponse, i as MobileServerPublicQueryRequest, l as MobileServerSignedQueryResponseByType, n as MobileServerNotificationPreferencesResponse, o as MobileServerPublicQuerySuccessResponse, r as MobileServerProfileResponse, s as MobileServerRegisteredDevicesResponse, t as MobileServerFeedResponse, u as MobileServerSignedQuerySuccessResponse } from "./serverQueryTypes-C_cCx0Ac.cjs";
8
+ import { t as getMobilePayloadHash } from "./payloadHash-B0tlFOK8.cjs";
9
+ import { a as MobileServerPublicQueryRequestType, c as MobileServerSignedQueryRequestType, i as MobileServerPublicQueryRequestByType, n as MobileServerPublicExecuteRequestByType, o as MobileServerRequestType, r as MobileServerPublicExecuteRequestType, s as MobileServerSignedQueryRequestByType, t as MobileServerExecuteRequestType } from "./serverRequestTypes-CHDk6JwE.cjs";
10
+ import { n as MobileServerSuccessResponse, t as MobileServerFailureResponse } from "./serverBaseTypes-DSRgU2Fb.cjs";
11
+ import { n as MobileServerPublicExecuteRequest, t as MobileServerExecuteResult } from "./serverExecuteTypes-BCb6bUMP.cjs";
12
+ import { a as MobileServerPublicQueryResponseByType, c as MobileServerSelfIdentityResponse, d as MobileServerUsernameAvailabilityResponse, i as MobileServerPublicQueryRequest, l as MobileServerSignedQueryResponseByType, n as MobileServerNotificationPreferencesResponse, o as MobileServerPublicQuerySuccessResponse, r as MobileServerProfileResponse, s as MobileServerRegisteredDevicesResponse, t as MobileServerFeedResponse, u as MobileServerSignedQuerySuccessResponse } from "./serverQueryTypes-9H6P1vJ5.cjs";
12
13
  import { MobileClient, MobileClientOpts } from "./MobileClient.cjs";
13
14
  import { MOBILE_CLIENT_ENDPOINTS } from "./endpoints.cjs";
14
- import { n as MobileErrorCode, t as MOBILE_ERROR_CODES } from "./mobileErrorCodes-Cj84nBnT.cjs";
15
- import { t as MobileServerFailureError } from "./MobileServerFailureError-B11rr9O5.cjs";
16
- import { t as MobileServerExecuteResult } from "./serverExecuteTypes-C-bioiuQ.cjs";
15
+ import { n as MobileErrorCode, t as MOBILE_ERROR_CODES } from "./mobileErrorCodes-D_SyBm0k.cjs";
16
+ import { t as MobileServerFailureError } from "./MobileServerFailureError-BoyAfEZA.cjs";
17
17
  import { n as MOBILE_FEED_MIN_NOTIONAL_FLOOR, t as MOBILE_FEED_MAX_PAGE_SIZE } from "./feed-CBIwOhTO.cjs";
18
18
  import { t as MOBILE_DISPLAY_NAME_PATTERN } from "./patterns-Db6fgz8i.cjs";
19
- import { n as isMobileServerSuccessResponse, t as isMobileServerFailureResponse } from "./serverResponseGuards-BlvfJjsa.cjs";
20
- export { BuildSignedMobileRequestParams, GetMobileFeedParams, GetMobileNotificationPreferencesParams, GetMobilePublicProfileParams, GetMobileRegisteredDevicesParams, GetMobileSelfIdentityParams, GetMobileUsernameAvailabilityParams, MOBILE_CLIENT_ENDPOINTS, MOBILE_DISPLAY_NAME_PATTERN, MOBILE_EIP712_METHOD_BY_TYPE, MOBILE_ERROR_CODES, MOBILE_FEED_MARGIN_MODES, MOBILE_FEED_MAX_PAGE_SIZE, MOBILE_FEED_MIN_NOTIONAL_FLOOR, MOBILE_FEED_TRADE_POSITION_DIRECTIONS, MOBILE_FEED_TRADE_POSITION_EFFECTS, MobileClaimUsernameParams, MobileClient, MobileClientOpts, MobileErrorCode, MobileFeedMargin, MobileFeedMarginMode, MobileFeedPage, MobileFeedTrade, MobileFeedTradePosition, MobileFeedTradePositionDirection, MobileFeedTradePositionEffect, MobileIdentity, MobileNotificationCategory, MobileNotificationCategoryPreference, MobileNotificationPlatform, MobileNotificationPreferenceScope, MobileNotificationPreferences, MobilePublicProfile, MobileRegisterExpoTokenParams, MobileRegisteredDevice, MobileServerExecuteRequestType, MobileServerExecuteResult, MobileServerFailureError, MobileServerFailureResponse, MobileServerFeedMargin, MobileServerFeedResponse, MobileServerFeedTrade, MobileServerIdentity, MobileServerNotificationCategoryPreference, MobileServerNotificationPreferenceScope, MobileServerNotificationPreferences, MobileServerNotificationPreferencesResponse, MobileServerProfile, MobileServerProfileResponse, MobileServerPublicQueryRequest, MobileServerPublicQueryRequestByType, MobileServerPublicQueryRequestType, MobileServerPublicQueryResponseByType, MobileServerPublicQuerySuccessResponse, MobileServerRegisteredDevice, MobileServerRegisteredDevicesResponse, MobileServerRequestType, MobileServerSelfIdentityResponse, MobileServerSignedQueryRequestByType, MobileServerSignedQueryRequestType, MobileServerSignedQueryResponseByType, MobileServerSignedQuerySuccessResponse, MobileServerSuccessResponse, MobileServerUsernameAvailabilityResponse, MobileSetPrivateModeParams, MobileSignedInner, MobileSignedInnerParams, MobileSignedRequest, MobileSignedRequestParams, MobileUnregisterExpoTokenParams, MobileUpdateNotificationPreferencesParams, MobileUpdateUsernameParams, MobileUsernameAvailability, buildSignedMobileRequest, canonicalizeMobileInner, getMobileNonce, getMobilePayloadHash, isMobileServerFailureResponse, isMobileServerSuccessResponse };
19
+ import { n as isMobileServerSuccessResponse, t as isMobileServerFailureResponse } from "./serverResponseGuards-DRMHmfXh.cjs";
20
+ export { BuildSignedMobileRequestParams, GetMobileFeedParams, GetMobileNotificationPreferencesParams, GetMobilePublicProfileParams, GetMobileRegisteredDevicesParams, GetMobileSelfIdentityParams, GetMobileUsernameAvailabilityParams, MOBILE_CLIENT_ENDPOINTS, MOBILE_DISPLAY_NAME_PATTERN, MOBILE_EIP712_METHOD_BY_TYPE, MOBILE_ERROR_CODES, MOBILE_FEED_MARGIN_MODES, MOBILE_FEED_MAX_PAGE_SIZE, MOBILE_FEED_MIN_NOTIONAL_FLOOR, MOBILE_FEED_TRADE_POSITION_DIRECTIONS, MOBILE_FEED_TRADE_POSITION_EFFECTS, MobileClient, MobileClientOpts, MobileErrorCode, MobileFeedMargin, MobileFeedMarginMode, MobileFeedPage, MobileFeedTrade, MobileFeedTradePosition, MobileFeedTradePositionDirection, MobileFeedTradePositionEffect, MobileIdentity, MobileNotificationCategory, MobileNotificationCategoryPreference, MobileNotificationPlatform, MobileNotificationPreferenceScope, MobileNotificationPreferences, MobilePublicProfile, MobileRegisterExpoTokenParams, MobileRegisteredDevice, MobileServerExecuteRequestType, MobileServerExecuteResult, MobileServerFailureError, MobileServerFailureResponse, MobileServerFeedMargin, MobileServerFeedResponse, MobileServerFeedTrade, MobileServerIdentity, MobileServerNotificationCategoryPreference, MobileServerNotificationPreferenceScope, MobileServerNotificationPreferences, MobileServerNotificationPreferencesResponse, MobileServerProfile, MobileServerProfileResponse, MobileServerPublicExecuteRequest, MobileServerPublicExecuteRequestByType, MobileServerPublicExecuteRequestType, MobileServerPublicQueryRequest, MobileServerPublicQueryRequestByType, MobileServerPublicQueryRequestType, MobileServerPublicQueryResponseByType, MobileServerPublicQuerySuccessResponse, MobileServerRegisteredDevice, MobileServerRegisteredDevicesResponse, MobileServerRequestType, MobileServerSelfIdentityResponse, MobileServerSignedQueryRequestByType, MobileServerSignedQueryRequestType, MobileServerSignedQueryResponseByType, MobileServerSignedQuerySuccessResponse, MobileServerSuccessResponse, MobileServerUsernameAvailabilityResponse, MobileSetPrivateModeParams, MobileSetUsernameParams, MobileSignedInner, MobileSignedInnerParams, MobileSignedRequest, MobileSignedRequestParams, MobileUnregisterExpoTokenParams, MobileUpdateNotificationPreferencesParams, MobileUsernameAvailability, MobileWithExpoTokenParams, buildSignedMobileRequest, canonicalizeMobileInner, getMobileNonce, getMobilePayloadHash, isMobileServerFailureResponse, isMobileServerSuccessResponse };
package/dist/index.d.ts CHANGED
@@ -1,20 +1,20 @@
1
- import { _ as MobileServerRegisteredDevice, a as MobileFeedTradePosition, c as MobileNotificationCategory, d as MobileServerFeedTrade, f as MobileServerIdentity, g as MobileServerProfile, h as MobileServerNotificationPreferences, i as MobileFeedMarginMode, l as MobileNotificationPlatform, m as MobileServerNotificationPreferenceScope, n as MOBILE_FEED_TRADE_POSITION_DIRECTIONS, o as MobileFeedTradePositionDirection, p as MobileServerNotificationCategoryPreference, r as MOBILE_FEED_TRADE_POSITION_EFFECTS, s as MobileFeedTradePositionEffect, t as MOBILE_FEED_MARGIN_MODES, u as MobileServerFeedMargin } from "./serverModelTypes-CqnqHY5F.js";
2
- import { C as MobileUsernameAvailability, S as MobileUpdateUsernameParams, _ as MobileRegisteredDevice, a as GetMobileSelfIdentityParams, b as MobileUnregisterExpoTokenParams, c as MobileFeedMargin, d as MobileIdentity, f as MobileNotificationCategoryPreference, g as MobileRegisterExpoTokenParams, h as MobilePublicProfile, i as GetMobileRegisteredDevicesParams, l as MobileFeedPage, m as MobileNotificationPreferences, n as GetMobileNotificationPreferencesParams, o as GetMobileUsernameAvailabilityParams, p as MobileNotificationPreferenceScope, r as GetMobilePublicProfileParams, s as MobileClaimUsernameParams, t as GetMobileFeedParams, u as MobileFeedTrade, v as MobileSetPrivateModeParams, x as MobileUpdateNotificationPreferencesParams, y as MobileSignedRequestParams } from "./clientTypes-BsOps_pY.js";
3
- import { i as MobileSignedRequest, n as MobileSignedInner, r as MobileSignedInnerParams, t as BuildSignedMobileRequestParams } from "./types-UHjZR-js.js";
4
- import { t as buildSignedMobileRequest } from "./buildSignedMobileRequest-B4KJ6T1y.js";
5
- import { t as canonicalizeMobileInner } from "./canonicalize-Cc7hdZLJ.js";
6
- import { t as MOBILE_EIP712_METHOD_BY_TYPE } from "./eip712MethodByType-B67XiwTu.js";
1
+ import { _ as MobileServerRegisteredDevice, a as MobileFeedTradePosition, c as MobileNotificationCategory, d as MobileServerFeedTrade, f as MobileServerIdentity, g as MobileServerProfile, h as MobileServerNotificationPreferences, i as MobileFeedMarginMode, l as MobileNotificationPlatform, m as MobileServerNotificationPreferenceScope, n as MOBILE_FEED_TRADE_POSITION_DIRECTIONS, o as MobileFeedTradePositionDirection, p as MobileServerNotificationCategoryPreference, r as MOBILE_FEED_TRADE_POSITION_EFFECTS, s as MobileFeedTradePositionEffect, t as MOBILE_FEED_MARGIN_MODES, u as MobileServerFeedMargin } from "./serverModelTypes-DvPs5qs3.js";
2
+ import { C as MobileWithExpoTokenParams, S as MobileUsernameAvailability, _ as MobileSetPrivateModeParams, a as GetMobileSelfIdentityParams, b as MobileUnregisterExpoTokenParams, c as MobileFeedPage, d as MobileNotificationCategoryPreference, f as MobileNotificationPreferenceScope, g as MobileRegisteredDevice, h as MobileRegisterExpoTokenParams, i as GetMobileRegisteredDevicesParams, l as MobileFeedTrade, m as MobilePublicProfile, n as GetMobileNotificationPreferencesParams, o as GetMobileUsernameAvailabilityParams, p as MobileNotificationPreferences, r as GetMobilePublicProfileParams, s as MobileFeedMargin, t as GetMobileFeedParams, u as MobileIdentity, v as MobileSetUsernameParams, x as MobileUpdateNotificationPreferencesParams, y as MobileSignedRequestParams } from "./clientTypes-6utzUU-b.js";
3
+ import { i as MobileSignedRequest, n as MobileSignedInner, r as MobileSignedInnerParams, t as BuildSignedMobileRequestParams } from "./types-CQE3HD2V.js";
4
+ import { t as buildSignedMobileRequest } from "./buildSignedMobileRequest-qEC4gWaI.js";
5
+ import { t as canonicalizeMobileInner } from "./canonicalize-wVdGejB1.js";
6
+ import { t as MOBILE_EIP712_METHOD_BY_TYPE } from "./eip712MethodByType-DBUy4AdI.js";
7
7
  import { t as getMobileNonce } from "./nonce-DCOrXXkQ.js";
8
- import { t as getMobilePayloadHash } from "./payloadHash-BVP2v3p9.js";
9
- import { a as MobileServerSignedQueryRequestByType, i as MobileServerRequestType, n as MobileServerPublicQueryRequestByType, o as MobileServerSignedQueryRequestType, r as MobileServerPublicQueryRequestType, t as MobileServerExecuteRequestType } from "./serverRequestTypes-DQDy3K9O.js";
10
- import { n as MobileServerSuccessResponse, t as MobileServerFailureResponse } from "./serverBaseTypes-m3zEi0X9.js";
11
- import { a as MobileServerPublicQueryResponseByType, c as MobileServerSelfIdentityResponse, d as MobileServerUsernameAvailabilityResponse, i as MobileServerPublicQueryRequest, l as MobileServerSignedQueryResponseByType, n as MobileServerNotificationPreferencesResponse, o as MobileServerPublicQuerySuccessResponse, r as MobileServerProfileResponse, s as MobileServerRegisteredDevicesResponse, t as MobileServerFeedResponse, u as MobileServerSignedQuerySuccessResponse } from "./serverQueryTypes-CJLWWZBs.js";
8
+ import { t as getMobilePayloadHash } from "./payloadHash-D1yTQSF4.js";
9
+ import { a as MobileServerPublicQueryRequestType, c as MobileServerSignedQueryRequestType, i as MobileServerPublicQueryRequestByType, n as MobileServerPublicExecuteRequestByType, o as MobileServerRequestType, r as MobileServerPublicExecuteRequestType, s as MobileServerSignedQueryRequestByType, t as MobileServerExecuteRequestType } from "./serverRequestTypes-DYTLrCpz.js";
10
+ import { n as MobileServerSuccessResponse, t as MobileServerFailureResponse } from "./serverBaseTypes-CzRgwUvA.js";
11
+ import { n as MobileServerPublicExecuteRequest, t as MobileServerExecuteResult } from "./serverExecuteTypes-CI3NBW2Z.js";
12
+ import { a as MobileServerPublicQueryResponseByType, c as MobileServerSelfIdentityResponse, d as MobileServerUsernameAvailabilityResponse, i as MobileServerPublicQueryRequest, l as MobileServerSignedQueryResponseByType, n as MobileServerNotificationPreferencesResponse, o as MobileServerPublicQuerySuccessResponse, r as MobileServerProfileResponse, s as MobileServerRegisteredDevicesResponse, t as MobileServerFeedResponse, u as MobileServerSignedQuerySuccessResponse } from "./serverQueryTypes-Cbjx0bIj.js";
12
13
  import { MobileClient, MobileClientOpts } from "./MobileClient.js";
13
14
  import { MOBILE_CLIENT_ENDPOINTS } from "./endpoints.js";
14
- import { n as MobileErrorCode, t as MOBILE_ERROR_CODES } from "./mobileErrorCodes-Czmigq9x.js";
15
- import { t as MobileServerFailureError } from "./MobileServerFailureError-DoIvXqYV.js";
16
- import { t as MobileServerExecuteResult } from "./serverExecuteTypes-DfzWOeIx.js";
15
+ import { n as MobileErrorCode, t as MOBILE_ERROR_CODES } from "./mobileErrorCodes-CuQ5lyBV.js";
16
+ import { t as MobileServerFailureError } from "./MobileServerFailureError-MgYVBh5p.js";
17
17
  import { n as MOBILE_FEED_MIN_NOTIONAL_FLOOR, t as MOBILE_FEED_MAX_PAGE_SIZE } from "./feed-BF5k6Ryu.js";
18
18
  import { t as MOBILE_DISPLAY_NAME_PATTERN } from "./patterns-B5gi7OfV.js";
19
- import { n as isMobileServerSuccessResponse, t as isMobileServerFailureResponse } from "./serverResponseGuards-gpHH8SHk.js";
20
- export { BuildSignedMobileRequestParams, GetMobileFeedParams, GetMobileNotificationPreferencesParams, GetMobilePublicProfileParams, GetMobileRegisteredDevicesParams, GetMobileSelfIdentityParams, GetMobileUsernameAvailabilityParams, MOBILE_CLIENT_ENDPOINTS, MOBILE_DISPLAY_NAME_PATTERN, MOBILE_EIP712_METHOD_BY_TYPE, MOBILE_ERROR_CODES, MOBILE_FEED_MARGIN_MODES, MOBILE_FEED_MAX_PAGE_SIZE, MOBILE_FEED_MIN_NOTIONAL_FLOOR, MOBILE_FEED_TRADE_POSITION_DIRECTIONS, MOBILE_FEED_TRADE_POSITION_EFFECTS, MobileClaimUsernameParams, MobileClient, MobileClientOpts, MobileErrorCode, MobileFeedMargin, MobileFeedMarginMode, MobileFeedPage, MobileFeedTrade, MobileFeedTradePosition, MobileFeedTradePositionDirection, MobileFeedTradePositionEffect, MobileIdentity, MobileNotificationCategory, MobileNotificationCategoryPreference, MobileNotificationPlatform, MobileNotificationPreferenceScope, MobileNotificationPreferences, MobilePublicProfile, MobileRegisterExpoTokenParams, MobileRegisteredDevice, MobileServerExecuteRequestType, MobileServerExecuteResult, MobileServerFailureError, MobileServerFailureResponse, MobileServerFeedMargin, MobileServerFeedResponse, MobileServerFeedTrade, MobileServerIdentity, MobileServerNotificationCategoryPreference, MobileServerNotificationPreferenceScope, MobileServerNotificationPreferences, MobileServerNotificationPreferencesResponse, MobileServerProfile, MobileServerProfileResponse, MobileServerPublicQueryRequest, MobileServerPublicQueryRequestByType, MobileServerPublicQueryRequestType, MobileServerPublicQueryResponseByType, MobileServerPublicQuerySuccessResponse, MobileServerRegisteredDevice, MobileServerRegisteredDevicesResponse, MobileServerRequestType, MobileServerSelfIdentityResponse, MobileServerSignedQueryRequestByType, MobileServerSignedQueryRequestType, MobileServerSignedQueryResponseByType, MobileServerSignedQuerySuccessResponse, MobileServerSuccessResponse, MobileServerUsernameAvailabilityResponse, MobileSetPrivateModeParams, MobileSignedInner, MobileSignedInnerParams, MobileSignedRequest, MobileSignedRequestParams, MobileUnregisterExpoTokenParams, MobileUpdateNotificationPreferencesParams, MobileUpdateUsernameParams, MobileUsernameAvailability, buildSignedMobileRequest, canonicalizeMobileInner, getMobileNonce, getMobilePayloadHash, isMobileServerFailureResponse, isMobileServerSuccessResponse };
19
+ import { n as isMobileServerSuccessResponse, t as isMobileServerFailureResponse } from "./serverResponseGuards-DpbZvJfL.js";
20
+ export { BuildSignedMobileRequestParams, GetMobileFeedParams, GetMobileNotificationPreferencesParams, GetMobilePublicProfileParams, GetMobileRegisteredDevicesParams, GetMobileSelfIdentityParams, GetMobileUsernameAvailabilityParams, MOBILE_CLIENT_ENDPOINTS, MOBILE_DISPLAY_NAME_PATTERN, MOBILE_EIP712_METHOD_BY_TYPE, MOBILE_ERROR_CODES, MOBILE_FEED_MARGIN_MODES, MOBILE_FEED_MAX_PAGE_SIZE, MOBILE_FEED_MIN_NOTIONAL_FLOOR, MOBILE_FEED_TRADE_POSITION_DIRECTIONS, MOBILE_FEED_TRADE_POSITION_EFFECTS, MobileClient, MobileClientOpts, MobileErrorCode, MobileFeedMargin, MobileFeedMarginMode, MobileFeedPage, MobileFeedTrade, MobileFeedTradePosition, MobileFeedTradePositionDirection, MobileFeedTradePositionEffect, MobileIdentity, MobileNotificationCategory, MobileNotificationCategoryPreference, MobileNotificationPlatform, MobileNotificationPreferenceScope, MobileNotificationPreferences, MobilePublicProfile, MobileRegisterExpoTokenParams, MobileRegisteredDevice, MobileServerExecuteRequestType, MobileServerExecuteResult, MobileServerFailureError, MobileServerFailureResponse, MobileServerFeedMargin, MobileServerFeedResponse, MobileServerFeedTrade, MobileServerIdentity, MobileServerNotificationCategoryPreference, MobileServerNotificationPreferenceScope, MobileServerNotificationPreferences, MobileServerNotificationPreferencesResponse, MobileServerProfile, MobileServerProfileResponse, MobileServerPublicExecuteRequest, MobileServerPublicExecuteRequestByType, MobileServerPublicExecuteRequestType, MobileServerPublicQueryRequest, MobileServerPublicQueryRequestByType, MobileServerPublicQueryRequestType, MobileServerPublicQueryResponseByType, MobileServerPublicQuerySuccessResponse, MobileServerRegisteredDevice, MobileServerRegisteredDevicesResponse, MobileServerRequestType, MobileServerSelfIdentityResponse, MobileServerSignedQueryRequestByType, MobileServerSignedQueryRequestType, MobileServerSignedQueryResponseByType, MobileServerSignedQuerySuccessResponse, MobileServerSuccessResponse, MobileServerUsernameAvailabilityResponse, MobileSetPrivateModeParams, MobileSetUsernameParams, MobileSignedInner, MobileSignedInnerParams, MobileSignedRequest, MobileSignedRequestParams, MobileUnregisterExpoTokenParams, MobileUpdateNotificationPreferencesParams, MobileUsernameAvailability, MobileWithExpoTokenParams, buildSignedMobileRequest, canonicalizeMobileInner, getMobileNonce, getMobilePayloadHash, isMobileServerFailureResponse, isMobileServerSuccessResponse };
@@ -7,9 +7,7 @@
7
7
  declare const MOBILE_ERROR_CODES: {
8
8
  readonly INVALID_DISPLAY_NAME: 6100;
9
9
  readonly USERNAME_UNAVAILABLE: 6101;
10
- readonly IDENTITY_ALREADY_CLAIMED: 6102;
11
- readonly IDENTITY_REQUIRED: 6103;
12
- readonly INVALID_IDENTITY_TARGET: 6104;
10
+ readonly INVALID_IDENTITY_TARGET: 6104; /** Another identity write for the subaccount committed with a later nonce. Re-read before retrying. */
13
11
  readonly STALE_IDENTITY_UPDATE: 6105;
14
12
  readonly PROFILE_NOT_FOUND: 6106;
15
13
  readonly INVALID_EXPO_TOKEN: 6200;
@@ -38,4 +36,4 @@ declare const MOBILE_ERROR_CODES: {
38
36
  type MobileErrorCode = (typeof MOBILE_ERROR_CODES)[keyof typeof MOBILE_ERROR_CODES];
39
37
  //#endregion
40
38
  export { MobileErrorCode as n, MOBILE_ERROR_CODES as t };
41
- //# sourceMappingURL=mobileErrorCodes-Cj84nBnT.d.cts.map
39
+ //# sourceMappingURL=mobileErrorCodes-CuQ5lyBV.d.ts.map
@@ -0,0 +1 @@
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"}