@nadohq/mobile-client 0.65.0 → 0.67.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 (211) hide show
  1. package/README.md +202 -10
  2. package/dist/{MobileClient-CfVZXTcz.cjs → MobileClient-vuI5wlB_.cjs} +303 -21
  3. package/dist/MobileClient-vuI5wlB_.cjs.map +1 -0
  4. package/dist/MobileClient.cjs +1 -1
  5. package/dist/MobileClient.d.cts +175 -20
  6. package/dist/MobileClient.d.cts.map +1 -1
  7. package/dist/MobileClient.d.ts +175 -20
  8. package/dist/MobileClient.d.ts.map +1 -1
  9. package/dist/MobileClient.js +303 -21
  10. package/dist/MobileClient.js.map +1 -1
  11. package/dist/{MobileServerFailureError-BZVwlsMg.d.ts → MobileServerFailureError-BeCCNShj.d.cts} +2 -3
  12. package/dist/MobileServerFailureError-BeCCNShj.d.cts.map +1 -0
  13. package/dist/{MobileServerFailureError-CbtK8kD4.d.cts → MobileServerFailureError-hHv28weI.d.ts} +2 -3
  14. package/dist/MobileServerFailureError-hHv28weI.d.ts.map +1 -0
  15. package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.cts +15 -0
  16. package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.cts.map +1 -0
  17. package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.ts +15 -0
  18. package/dist/MobileUnsupportedNotificationRouteError-DpiNBvvY.d.ts.map +1 -0
  19. package/dist/{buildSignedMobileRequest-C1v0flCR.d.cts → buildSignedMobileRequest-DcEMKU_4.d.cts} +2 -2
  20. package/dist/{buildSignedMobileRequest-C1v0flCR.d.cts.map → buildSignedMobileRequest-DcEMKU_4.d.cts.map} +1 -1
  21. package/dist/{buildSignedMobileRequest-UeeWdYGU.d.ts → buildSignedMobileRequest-DlTMvoXR.d.ts} +2 -2
  22. package/dist/{buildSignedMobileRequest-UeeWdYGU.d.ts.map → buildSignedMobileRequest-DlTMvoXR.d.ts.map} +1 -1
  23. package/dist/{canonicalize-5eeZrkzQ.d.ts → canonicalize-BOZlflI3.d.ts} +2 -2
  24. package/dist/canonicalize-BOZlflI3.d.ts.map +1 -0
  25. package/dist/{canonicalize-CBaZprTo.d.cts → canonicalize-BvCozzvJ.d.cts} +2 -2
  26. package/dist/canonicalize-BvCozzvJ.d.cts.map +1 -0
  27. package/dist/{clientTypes-_mEgzmNs.d.cts → clientTypes-KpHlCDGZ.d.cts} +341 -38
  28. package/dist/clientTypes-KpHlCDGZ.d.cts.map +1 -0
  29. package/dist/{clientTypes-C9dJufxk.d.ts → clientTypes-XRI41VdC.d.ts} +341 -38
  30. package/dist/clientTypes-XRI41VdC.d.ts.map +1 -0
  31. package/dist/dataMappers.cjs +257 -20
  32. package/dist/dataMappers.cjs.map +1 -1
  33. package/dist/dataMappers.d.cts +98 -15
  34. package/dist/dataMappers.d.cts.map +1 -1
  35. package/dist/dataMappers.d.ts +98 -15
  36. package/dist/dataMappers.d.ts.map +1 -1
  37. package/dist/dataMappers.js +242 -20
  38. package/dist/dataMappers.js.map +1 -1
  39. package/dist/{eip712MethodByType-D8jLoxDu.d.cts → eip712MethodByType-DyAmzH7b.d.cts} +2 -2
  40. package/dist/eip712MethodByType-DyAmzH7b.d.cts.map +1 -0
  41. package/dist/{eip712MethodByType-DcUh8h-l.d.ts → eip712MethodByType-qSSAF6i2.d.ts} +2 -2
  42. package/dist/eip712MethodByType-qSSAF6i2.d.ts.map +1 -0
  43. package/dist/feed-BrgkFqP3.d.cts +23 -0
  44. package/dist/feed-BrgkFqP3.d.cts.map +1 -0
  45. package/dist/feed-DcbhLoo1.d.ts +23 -0
  46. package/dist/feed-DcbhLoo1.d.ts.map +1 -0
  47. package/dist/index-BVVgDSdq.d.cts +1 -0
  48. package/dist/index-BVVgDSdq.d.ts +1 -0
  49. package/dist/index.cjs +8 -2
  50. package/dist/index.d.cts +14 -16
  51. package/dist/index.d.ts +14 -16
  52. package/dist/index.js +4 -3
  53. package/dist/{mobileErrorCodes-CmjYEIYm.d.ts → mobileErrorCodes-CdwX6QTO.d.cts} +8 -3
  54. package/dist/mobileErrorCodes-CdwX6QTO.d.cts.map +1 -0
  55. package/dist/{mobileErrorCodes-CmjYEIYm.d.cts → mobileErrorCodes-CdwX6QTO.d.ts} +8 -3
  56. package/dist/mobileErrorCodes-CdwX6QTO.d.ts.map +1 -0
  57. package/dist/{payloadHash-DhHmgRqL.d.cts → payloadHash-BgGSZock.d.cts} +2 -2
  58. package/dist/payloadHash-BgGSZock.d.cts.map +1 -0
  59. package/dist/{payloadHash-E1_8fpLW.d.ts → payloadHash-Bi6upCLQ.d.ts} +2 -2
  60. package/dist/payloadHash-Bi6upCLQ.d.ts.map +1 -0
  61. package/dist/{serverExecuteTypes-BwWGspOg.d.ts → serverExecuteTypes-DuCWe_H_.d.cts} +23 -14
  62. package/dist/serverExecuteTypes-DuCWe_H_.d.cts.map +1 -0
  63. package/dist/{serverExecuteTypes-B-OJok19.d.cts → serverExecuteTypes-usJ6HMJv.d.ts} +23 -14
  64. package/dist/serverExecuteTypes-usJ6HMJv.d.ts.map +1 -0
  65. package/dist/{serverModelTypes-CiA-dy1R.d.ts → serverModelTypes-CTHMNIQS.d.cts} +170 -13
  66. package/dist/serverModelTypes-CTHMNIQS.d.cts.map +1 -0
  67. package/dist/{serverModelTypes-CiA-dy1R.d.cts → serverModelTypes-CTHMNIQS.d.ts} +170 -13
  68. package/dist/serverModelTypes-CTHMNIQS.d.ts.map +1 -0
  69. package/dist/{serverResponseGuards-CShiXpHT.d.ts → serverResponseGuards-CzmldAad.d.cts} +2 -2
  70. package/dist/{serverResponseGuards-BW69PS7O.d.cts.map → serverResponseGuards-CzmldAad.d.cts.map} +1 -1
  71. package/dist/{serverResponseGuards-BW69PS7O.d.cts → serverResponseGuards-Dvkbjp2_.d.ts} +2 -2
  72. package/dist/{serverResponseGuards-CShiXpHT.d.ts.map → serverResponseGuards-Dvkbjp2_.d.ts.map} +1 -1
  73. package/dist/signing/buildSignedMobileRequest.d.cts +1 -1
  74. package/dist/signing/buildSignedMobileRequest.d.ts +1 -1
  75. package/dist/signing/canonicalize.cjs +53 -2
  76. package/dist/signing/canonicalize.cjs.map +1 -1
  77. package/dist/signing/canonicalize.d.cts +1 -1
  78. package/dist/signing/canonicalize.d.ts +1 -1
  79. package/dist/signing/canonicalize.js +53 -2
  80. package/dist/signing/canonicalize.js.map +1 -1
  81. package/dist/signing/eip712MethodByType.cjs +7 -0
  82. package/dist/signing/eip712MethodByType.cjs.map +1 -1
  83. package/dist/signing/eip712MethodByType.d.cts +1 -1
  84. package/dist/signing/eip712MethodByType.d.ts +1 -1
  85. package/dist/signing/eip712MethodByType.js +7 -0
  86. package/dist/signing/eip712MethodByType.js.map +1 -1
  87. package/dist/signing/index.d.cts +5 -5
  88. package/dist/signing/index.d.ts +5 -5
  89. package/dist/signing/payloadHash.cjs +1 -1
  90. package/dist/signing/payloadHash.d.cts +1 -1
  91. package/dist/signing/payloadHash.d.ts +1 -1
  92. package/dist/signing/payloadHash.js +1 -1
  93. package/dist/signing/types.d.cts +1 -1
  94. package/dist/signing/types.d.ts +1 -1
  95. package/dist/types/MobileServerFailureError.d.cts +1 -1
  96. package/dist/types/MobileServerFailureError.d.ts +1 -1
  97. package/dist/types/MobileUnsupportedNotificationRouteError.cjs +19 -0
  98. package/dist/types/MobileUnsupportedNotificationRouteError.cjs.map +1 -0
  99. package/dist/types/MobileUnsupportedNotificationRouteError.d.cts +2 -0
  100. package/dist/types/MobileUnsupportedNotificationRouteError.d.ts +2 -0
  101. package/dist/types/MobileUnsupportedNotificationRouteError.js +18 -0
  102. package/dist/types/MobileUnsupportedNotificationRouteError.js.map +1 -0
  103. package/dist/types/clientTypes.d.cts +2 -2
  104. package/dist/types/clientTypes.d.ts +2 -2
  105. package/dist/types/index.cjs +4 -0
  106. package/dist/types/index.d.cts +8 -9
  107. package/dist/types/index.d.ts +8 -9
  108. package/dist/types/index.js +3 -2
  109. package/dist/types/mobileErrorCodes.cjs +11 -1
  110. package/dist/types/mobileErrorCodes.cjs.map +1 -1
  111. package/dist/types/mobileErrorCodes.d.cts +1 -1
  112. package/dist/types/mobileErrorCodes.d.ts +1 -1
  113. package/dist/types/mobileErrorCodes.js +11 -1
  114. package/dist/types/mobileErrorCodes.js.map +1 -1
  115. package/dist/types/serverBaseTypes.d.cts +1 -1
  116. package/dist/types/serverBaseTypes.d.ts +1 -1
  117. package/dist/types/serverExecuteTypes.d.cts +2 -2
  118. package/dist/types/serverExecuteTypes.d.ts +2 -2
  119. package/dist/types/serverModelTypes.cjs +15 -0
  120. package/dist/types/serverModelTypes.cjs.map +1 -1
  121. package/dist/types/serverModelTypes.d.cts +2 -2
  122. package/dist/types/serverModelTypes.d.ts +2 -2
  123. package/dist/types/serverModelTypes.js +14 -1
  124. package/dist/types/serverModelTypes.js.map +1 -1
  125. package/dist/types/serverQueryTypes.d.cts +2 -2
  126. package/dist/types/serverQueryTypes.d.ts +2 -2
  127. package/dist/types/serverRequestTypes.d.cts +2 -2
  128. package/dist/types/serverRequestTypes.d.ts +2 -2
  129. package/dist/types-CByl_NyJ.d.ts +825 -0
  130. package/dist/types-CByl_NyJ.d.ts.map +1 -0
  131. package/dist/types-CR5iaKR4.d.cts +825 -0
  132. package/dist/types-CR5iaKR4.d.cts.map +1 -0
  133. package/dist/utils/buildMobileFeedImageMultipart.cjs +31 -0
  134. package/dist/utils/buildMobileFeedImageMultipart.cjs.map +1 -0
  135. package/dist/utils/buildMobileFeedImageMultipart.d.cts +15 -0
  136. package/dist/utils/buildMobileFeedImageMultipart.d.cts.map +1 -0
  137. package/dist/utils/buildMobileFeedImageMultipart.d.ts +15 -0
  138. package/dist/utils/buildMobileFeedImageMultipart.d.ts.map +1 -0
  139. package/dist/utils/buildMobileFeedImageMultipart.js +30 -0
  140. package/dist/utils/buildMobileFeedImageMultipart.js.map +1 -0
  141. package/dist/utils/feed.cjs +12 -0
  142. package/dist/utils/feed.cjs.map +1 -1
  143. package/dist/utils/feed.d.cts +2 -2
  144. package/dist/utils/feed.d.ts +2 -2
  145. package/dist/utils/feed.js +11 -1
  146. package/dist/utils/feed.js.map +1 -1
  147. package/dist/utils/index.cjs +3 -1
  148. package/dist/utils/index.d.cts +3 -3
  149. package/dist/utils/index.d.ts +3 -3
  150. package/dist/utils/index.js +2 -2
  151. package/dist/utils/serverResponseGuards.d.cts +1 -1
  152. package/dist/utils/serverResponseGuards.d.ts +1 -1
  153. package/package.json +3 -3
  154. package/src/MobileClient.ts +444 -19
  155. package/src/dataMappers.test.ts +511 -6
  156. package/src/dataMappers.ts +325 -24
  157. package/src/feedImages.test.ts +309 -0
  158. package/src/notifications.test.ts +950 -0
  159. package/src/signing/canonicalize.ts +72 -0
  160. package/src/signing/eip712MethodByType.ts +10 -0
  161. package/src/signing/signing.test.ts +67 -1
  162. package/src/signing/types.ts +55 -9
  163. package/src/socialFeed.test.ts +63 -2
  164. package/src/types/MobileUnsupportedNotificationRouteError.ts +16 -0
  165. package/src/types/clientTypes.ts +427 -36
  166. package/src/types/index.ts +1 -0
  167. package/src/types/mobileErrorCodes.ts +10 -0
  168. package/src/types/serverExecuteTypes.ts +22 -10
  169. package/src/types/serverModelTypes.ts +216 -11
  170. package/src/types/serverQueryTypes.ts +106 -9
  171. package/src/types/serverRequestTypes.ts +114 -17
  172. package/src/utils/buildMobileFeedImageMultipart.test.ts +45 -0
  173. package/src/utils/buildMobileFeedImageMultipart.ts +36 -0
  174. package/src/utils/feed.ts +16 -0
  175. package/dist/MobileClient-CfVZXTcz.cjs.map +0 -1
  176. package/dist/MobileServerFailureError-BZVwlsMg.d.ts.map +0 -1
  177. package/dist/MobileServerFailureError-CbtK8kD4.d.cts.map +0 -1
  178. package/dist/canonicalize-5eeZrkzQ.d.ts.map +0 -1
  179. package/dist/canonicalize-CBaZprTo.d.cts.map +0 -1
  180. package/dist/clientTypes-C9dJufxk.d.ts.map +0 -1
  181. package/dist/clientTypes-_mEgzmNs.d.cts.map +0 -1
  182. package/dist/eip712MethodByType-D8jLoxDu.d.cts.map +0 -1
  183. package/dist/eip712MethodByType-DcUh8h-l.d.ts.map +0 -1
  184. package/dist/feed-DTJlsg8W.d.cts +0 -14
  185. package/dist/feed-DTJlsg8W.d.cts.map +0 -1
  186. package/dist/feed-DTJlsg8W.d.ts +0 -14
  187. package/dist/feed-DTJlsg8W.d.ts.map +0 -1
  188. package/dist/mobileErrorCodes-CmjYEIYm.d.cts.map +0 -1
  189. package/dist/mobileErrorCodes-CmjYEIYm.d.ts.map +0 -1
  190. package/dist/payloadHash-DhHmgRqL.d.cts.map +0 -1
  191. package/dist/payloadHash-E1_8fpLW.d.ts.map +0 -1
  192. package/dist/serverBaseTypes-B5J1_TyC.d.cts +0 -25
  193. package/dist/serverBaseTypes-B5J1_TyC.d.cts.map +0 -1
  194. package/dist/serverBaseTypes-DnLzsdm-.d.ts +0 -25
  195. package/dist/serverBaseTypes-DnLzsdm-.d.ts.map +0 -1
  196. package/dist/serverExecuteTypes-B-OJok19.d.cts.map +0 -1
  197. package/dist/serverExecuteTypes-BwWGspOg.d.ts.map +0 -1
  198. package/dist/serverModelTypes-CiA-dy1R.d.cts.map +0 -1
  199. package/dist/serverModelTypes-CiA-dy1R.d.ts.map +0 -1
  200. package/dist/serverQueryTypes-CJcjLB7n.d.ts +0 -283
  201. package/dist/serverQueryTypes-CJcjLB7n.d.ts.map +0 -1
  202. package/dist/serverQueryTypes-V1f9yE7L.d.cts +0 -283
  203. package/dist/serverQueryTypes-V1f9yE7L.d.cts.map +0 -1
  204. package/dist/serverRequestTypes-CRlkNSu5.d.cts +0 -270
  205. package/dist/serverRequestTypes-CRlkNSu5.d.cts.map +0 -1
  206. package/dist/serverRequestTypes-DZoOhV2o.d.ts +0 -270
  207. package/dist/serverRequestTypes-DZoOhV2o.d.ts.map +0 -1
  208. package/dist/types-BiRmH5Iv.d.cts +0 -108
  209. package/dist/types-BiRmH5Iv.d.cts.map +0 -1
  210. package/dist/types-DoJuq0Ij.d.ts +0 -108
  211. package/dist/types-DoJuq0Ij.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"MobileClient.js","names":[],"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 mapMobileAvatarPreset,\n mapMobileAvatarSelectionToServer,\n mapMobileAvatarUpload,\n mapMobileFeedPage,\n mapMobileFollowBatchResult,\n mapMobileFollowListPage,\n mapMobileFollowListParamsToServer,\n mapMobileFollowMutationResult,\n mapMobileNotificationPreferences,\n mapMobileNotificationPreferencesToServer,\n mapMobileProfileSearchPage,\n mapMobileProfileSearchParamsToServer,\n mapMobileProfilesIncludeToServer,\n mapMobilePublicProfile,\n mapMobileRegisteredWallet,\n mapMobileSocialFeedActionResolutionResult,\n mapMobileSocialFeedCommentResult,\n mapMobileSocialFeedCommentsPage,\n mapMobileSocialFeedDrawingMutationResult,\n mapMobileSocialFeedDrawingResult,\n mapMobileSocialFeedItem,\n mapMobileSocialFeedItemResponse,\n mapMobileSocialFeedLikeResult,\n mapMobileSocialFeedListParamsToServer,\n mapMobileSocialFeedMentionToServer,\n mapMobileSocialFeedPage,\n mapMobileSocialFeedPositionChart,\n mapMobileSocialFeedPositionHistory,\n mapMobileSocialFeedPositionResolutionResult,\n mapMobileSocialFeedPositionsPage,\n mapMobileSocialFeedPresence,\n mapMobileSocialFeedRankedPage,\n mapMobileSocialFeedReadParamsToServer,\n mapMobileSocialFeedTopTradersPage,\n mapMobileSocialFeedUpdates,\n mapMobileSocialFeedViewsResult,\n mapMobileSocialFeedWatchers,\n} from './dataMappers';\nimport {\n buildSignedMobileRequest,\n MobileSignedInner,\n MobileSignedInnerByType,\n MobileSignedInnerParams,\n MobileSignedRequest,\n} from './signing';\nimport {\n GetMobileFeedChartDrawingParams,\n GetMobileFeedCommentsParams,\n GetMobileFeedItemParams,\n GetMobileFeedParams,\n GetMobileFeedUpdatesParams,\n GetMobileFollowersParams,\n GetMobileFollowingParams,\n GetMobileForYouFeedParams,\n GetMobileFriendsFeedParams,\n GetMobileMarketFeedParams,\n GetMobileNotificationPreferencesParams,\n GetMobilePositionChartParams,\n GetMobilePositionFeedParams,\n GetMobilePositionHistoryParams,\n GetMobilePositionWatchersParams,\n GetMobileProfileFeedParams,\n GetMobileProfilesParams,\n GetMobileRegisteredWalletParams,\n GetMobileSelfFeedPositionsParams,\n GetMobileTopTradersFeedParams,\n GetMobileUsernameAvailabilityParams,\n MobileAvatarPreset,\n MobileAvatarUpload,\n MobileCreateAvatarUploadParams,\n MobileCreateFeedCommentParams,\n MobileCreateFeedPostParams,\n MobileFeedChartDrawingParams,\n MobileFeedPage,\n MobileFollowBatchResultItem,\n MobileFollowListPage,\n MobileFollowMutationResult,\n MobileNotificationPreferences,\n MobilePositionPresenceParams,\n MobileProfileSearchPage,\n MobilePublicProfile,\n MobileRecordFeedViewsParams,\n MobileRegisteredWallet,\n MobileRegisterExpoTokenParams,\n MobileSetAvatarParams,\n MobileSetBioParams,\n MobileSetFeedLikeParams,\n MobileSetFollowBatchParams,\n MobileSetFollowParams,\n MobileSetPrivateModeParams,\n MobileSetUsernameParams,\n MobileSignedRequestParams,\n MobileSocialFeedActionResolutionResult,\n MobileSocialFeedCommentResult,\n MobileSocialFeedCommentsPage,\n MobileSocialFeedDrawingMutationResult,\n MobileSocialFeedDrawingResult,\n MobileSocialFeedItem,\n MobileSocialFeedItemResponse,\n MobileSocialFeedLikeResult,\n MobileSocialFeedPage,\n MobileSocialFeedPositionChart,\n MobileSocialFeedPositionHistory,\n MobileSocialFeedPositionResolutionResult,\n MobileSocialFeedPositionsPage,\n MobileSocialFeedPresence,\n MobileSocialFeedRankedPage,\n MobileSocialFeedTopTradersPage,\n MobileSocialFeedUpdates,\n MobileSocialFeedViewsResult,\n MobileSocialFeedWatchers,\n MobileUnregisterExpoTokenParams,\n MobileUpdateNotificationPreferencesParams,\n MobileUsernameAvailability,\n ResolveMobileFeedActionParams,\n ResolveMobileFeedPositionParams,\n SearchMobileProfilesParams,\n} from './types/clientTypes';\nimport { MobileServerFailureError } from './types/MobileServerFailureError';\nimport { MobileServerSuccessResponse } from './types/serverBaseTypes';\nimport {\n MobileServerExecuteResult,\n MobileServerExecuteSuccessResponse,\n MobileServerPublicExecuteRequest,\n MobileServerPublicExecuteSuccessResponse,\n} from './types/serverExecuteTypes';\nimport {\n MobileServerPublicQueryRequest,\n MobileServerPublicQuerySuccessResponse,\n} from './types/serverQueryTypes';\nimport {\n MobileServerExecuteRequestType,\n MobileServerPublicExecuteRequestByType,\n MobileServerPublicExecuteRequestType,\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, bios, avatars, public profile lookups, the global\n * trade feed, session-based social feeds, the follower/following graph, privacy settings, and push\n * 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 * Returns the current server-owned avatar catalogue in display order.\n *\n * @throws {MobileServerFailureError} With `SERVICE_UNAVAILABLE` when avatar storage is not configured.\n */\n async getAvatarPresets(): Promise<MobileAvatarPreset[]> {\n const body: MobileServerPublicQueryRequest<'avatar_presets'> = {\n type: 'avatar_presets',\n };\n const data = await this.publicQuery(body);\n return data.presets.map(mapMobileAvatarPreset);\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 public profiles, optionally with follower totals and a follow summary. Returns one profile per\n * requested subaccount, in the requested order, so callers can correlate positionally. Every non-isolated\n * subaccount resolves, with `username` and `displayName` `null` until a username is claimed. Private Mode\n * does not hide the profile itself, only the account's activity.\n *\n * This is the only profile route, so use it for a single subaccount too. It is unsigned, which means\n * `include.followSummary.viewAs` is an unauthenticated claim.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_PROFILES_REQUEST` if `subaccounts` is empty,\n * holds duplicates, or exceeds `MOBILE_PROFILES_MAX_BATCH_SIZE` (25), or `PROFILE_NOT_FOUND` if any\n * requested subaccount — or the follow summary's `viewAs` — is in the engine-created isolated namespace.\n * One isolated member fails the whole batch rather than being omitted.\n */\n async getProfiles(\n params: GetMobileProfilesParams,\n ): Promise<MobilePublicProfile[]> {\n const body: MobileServerPublicQueryRequest<'profiles'> = {\n type: 'profiles',\n subaccounts: params.subaccounts.map(subaccountToHex),\n include: params.include\n ? mapMobileProfilesIncludeToServer(params.include)\n : undefined,\n };\n const data = await this.publicQuery(body);\n return data.profiles.map(mapMobilePublicProfile);\n }\n\n /**\n * Searches claimed profiles by the start of their username, in ascending username order with an exact\n * match first. Only current claimed identities match: an unnamed profile never does, and Private Mode does\n * not hide one. Takes the same `include` as {@link MobileClient.getProfiles}, so a page can carry follower\n * totals and a follow summary without a second request; as there, `include.followSummary.viewAs` is an\n * unauthenticated claim on an unsigned route.\n *\n * Pagination is live rather than snapshot, so deduplicate matches by subaccount across pages. A cursor is\n * bound to the query alone, so `include` and `limit` may change between pages.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_PROFILE_SEARCH_REQUEST` if `query` is outside\n * the username alphabet or length or `limit` is out of range (1-50, or 1-25 with an include),\n * `INVALID_PROFILE_SEARCH_CURSOR` if the cursor is malformed or was issued for a different query (discard\n * it and restart from the first page), or `PROFILE_NOT_FOUND` if `include.followSummary.viewAs` is in the\n * engine-created isolated namespace.\n */\n async searchProfiles(\n params: SearchMobileProfilesParams,\n ): Promise<MobileProfileSearchPage> {\n const body: MobileServerPublicQueryRequest<'search_profiles'> = {\n type: 'search_profiles',\n ...mapMobileProfileSearchParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileProfileSearchPage(data);\n }\n\n /**\n * Fetches a page of the accounts that follow the given Profile.\n *\n * Ordering depends on `viewAs`. With it, accounts the Viewer already follows come first, unfamiliar\n * accounts second, and every row carries an `isFollowing`. Without it, the page is ordered by the listed\n * relationship alone and no row carries an `isFollowing`. In both cases the newest listed relationship\n * comes first within a group, with a bytes32 tie-break. The grouping is evaluated per request against the\n * live graph, so following an account from inside the list moves it between groups on the next page —\n * deduplicate by subaccount and do not re-sort locally.\n *\n * @throws {MobileServerFailureError} With error code `PROFILE_NOT_FOUND` if the viewed Profile or `viewAs`\n * is isolated, `INVALID_FOLLOW_CURSOR` if the cursor is malformed or was issued for a different `viewAs`,\n * Profile, or list direction (discard it and restart from the first page), or `INVALID_FOLLOW_LIMIT` if\n * `limit` is outside 1–50.\n */\n async getFollowers(\n params: GetMobileFollowersParams,\n ): Promise<MobileFollowListPage> {\n const body: MobileServerPublicQueryRequest<'followers'> = {\n type: 'followers',\n ...mapMobileFollowListParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileFollowListPage(data);\n }\n\n /**\n * Fetches a page of the accounts the given Profile follows. Ordering, cursor rules, and errors match\n * {@link MobileClient.getFollowers}. When `viewAs` reads its own Following list every row is familiar, so\n * every `isFollowing` is `true`.\n */\n async getFollowing(\n params: GetMobileFollowingParams,\n ): Promise<MobileFollowListPage> {\n const body: MobileServerPublicQueryRequest<'following'> = {\n type: 'following',\n ...mapMobileFollowListParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileFollowListPage(data);\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 chronological For You recommendations with server-side author/thread constraints.\n * Always public, with optional viewAs for relationship state. Preserve the session, viewAs, filters, and limit\n * when paging, including through empty pages with a nextCursor. A 6312 error requires a refresh.\n * @param params - Filters, pagination, optional viewing account, and browser credential; no signing identity.\n * @returns A fixed-session page with its ranking version and new-content watermark.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch/expiry, or unavailable data.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getForYouFeed(\n params: GetMobileForYouFeedParams = {},\n ): Promise<MobileSocialFeedRankedPage> {\n const body: MobileServerPublicQueryRequest<'for_you_feed'> = {\n type: 'for_you_feed',\n market_category: params.marketCategory,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedRankedPage(data);\n }\n\n /**\n * Fetches chronological content by qualified Top Traders, with official account PnL badges.\n * Always public; neither a wallet nor one-click trading setup is required.\n * @param params - Filters, pagination, optional viewing account, and browser credential.\n * @returns A page with its qualification cohort; an unavailable cohort fails instead of returning an empty ranking.\n * @throws {MobileServerFailureError} On request/session errors or unavailable cohort data.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getTopTradersFeed(\n params: GetMobileTopTradersFeedParams = {},\n ): Promise<MobileSocialFeedTopTradersPage> {\n const body: MobileServerPublicQueryRequest<'top_traders_feed'> = {\n type: 'top_traders_feed',\n market_category: params.marketCategory,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedTopTradersPage(data);\n }\n\n /**\n * Fetches public content by authors followed by viewAs, without a signature. One-way following is sufficient.\n * @param params - Required viewing account on every request, filters, pagination, and browser credential.\n * @returns A chronological Friends page and reading session.\n * @throws {MobileServerFailureError} On invalid viewing account, session errors, or feed query failure.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getFriendsFeed(\n params: GetMobileFriendsFeedParams,\n ): Promise<MobileSocialFeedRankedPage> {\n const body: MobileServerPublicQueryRequest<'friends_feed'> = {\n type: 'friends_feed',\n market_category: params.marketCategory,\n ...mapMobileSocialFeedListParamsToServer(params),\n view_as: subaccountToHex(params.viewAs),\n viewer_token: params.viewerToken,\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedRankedPage(data);\n }\n\n /**\n * Fetches an author's content visible to viewAs, including that account's own hidden content.\n * @param params - Target identity, filters, pagination, and optional public viewing account.\n * @returns An author page without main-feed ranking or cohort fields.\n * @throws {MobileServerFailureError} On invalid parameters, session errors, or inaccessible content.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getProfileFeed(\n params: GetMobileProfileFeedParams,\n ): Promise<MobileSocialFeedPage> {\n const body: MobileServerPublicQueryRequest<'profile_feed'> = {\n type: 'profile_feed',\n subaccount: subaccountToHex(params.subaccount),\n market_category: params.marketCategory,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedPage(data);\n }\n\n /**\n * Fetches published content for one market.\n * @param params - Product ID, content/size filters, pagination, and public viewing account.\n * @returns A market page without main-feed ranking fields.\n * @throws {MobileServerFailureError} On an unknown market, session errors, or unavailable data.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getMarketFeed(\n params: GetMobileMarketFeedParams,\n ): Promise<MobileSocialFeedPage> {\n const body: MobileServerPublicQueryRequest<'market_feed'> = {\n type: 'market_feed',\n product_id: params.productId,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedPage(data);\n }\n\n /**\n * Fetches already published content for a position lifecycle. This is not full position history\n * and includes hidden content owned by viewAs under account_view. It does not recreate suppressed activity.\n * @param params - Position UUID, filters, pagination, and public viewing account.\n * @returns A fixed-session position feed page.\n * @throws {MobileServerFailureError} On inaccessible content, session errors, or unavailable data.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getPositionFeed(\n params: GetMobilePositionFeedParams,\n ): Promise<MobileSocialFeedPage> {\n const body: MobileServerPublicQueryRequest<'position_feed'> = {\n type: 'position_feed',\n position_id: params.positionId,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedPage(data);\n }\n\n /**\n * Reads one item visible to viewAs, including that account's own hidden content.\n * Creates an item session directly when sessionId is omitted.\n * @param params - Item UUID, preview limit, and optional existing session/read identity.\n * @returns The complete item and authorized reading session.\n * @throws {MobileServerFailureError} On inaccessible content or session mismatch/expiry.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getFeedItem(\n params: GetMobileFeedItemParams,\n ): Promise<MobileSocialFeedItemResponse> {\n const body: MobileServerPublicQueryRequest<'feed_item'> = {\n type: 'feed_item',\n item_id: params.itemId,\n comment_preview_limit: params.commentPreviewLimit,\n session_id: params.sessionId,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedItemResponse(data);\n }\n\n /**\n * Polls authorized visible items and positions without inserting or reordering list members.\n * Increment requestSeq across the entire session, including viewport changes; never reset it for a new viewport.\n * Accept only the current session and viewportRevision's latest requestSeq; discard stale patches and cursors together.\n * Updates currently always return reset=true. Apply current author details, follow state, and badges even if the item version is unchanged.\n * Null patches clear values;\n * omitted fields leave them unchanged. Stop polling off-screen and refresh on error 6312.\n * @param params - Session, visible IDs, update baseline, sequence, and matching read identity.\n * @returns Item/position patches, revoked targets, and a new-content hint.\n * @throws {MobileServerFailureError} On invalid or unauthorized targets, session expiry, or unavailable data.\n */\n async getFeedUpdates(\n params: GetMobileFeedUpdatesParams,\n ): Promise<MobileSocialFeedUpdates> {\n const body: MobileServerPublicQueryRequest<'feed_updates'> = {\n type: 'feed_updates',\n session_id: params.sessionId,\n visible_item_ids: params.visibleItemIds,\n visible_position_ids: params.visiblePositionIds,\n update_cursor: params.updateCursor,\n viewport_revision: params.viewportRevision,\n request_seq: params.requestSeq,\n viewer_token: params.viewerToken,\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedUpdates(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 * Lists a selected account's current positions without signing or authenticating ownership.\n * Publication and attachment eligibility are hints that the service rechecks on writes.\n * @param params - Viewing subaccount, optional market filter, page size, and opaque cursor.\n * @returns Current position candidates, their eligibility hints, the next cursor, and observation time.\n * @throws {MobileServerFailureError} On invalid parameters, an unsupported viewing account, or unavailable\n * position data. An account with no open positions returns an empty page instead of an error.\n */\n async getSelfFeedPositions(\n params: GetMobileSelfFeedPositionsParams,\n ): Promise<MobileSocialFeedPositionsPage> {\n const body: MobileServerPublicQueryRequest<'self_feed_positions'> = {\n type: 'self_feed_positions',\n view_as: subaccountToHex(params.viewAs),\n product_id: params.productId,\n cursor: params.cursor,\n limit: params.limit,\n };\n return mapMobileSocialFeedPositionsPage(await this.publicQuery(body));\n }\n\n /**\n * Resolves a slash command against a selected account without changing the caller's input.\n * @param params - Viewing subaccount, original command text, and optional market disambiguation.\n * @returns The resolution, nullable market, candidate positions, and reason for an empty result.\n * @throws {MobileServerFailureError} On invalid parameters, an unsupported viewing account, or unavailable\n * source data. Unknown markets and accounts without open positions are normal resolution results.\n */\n async resolveFeedPosition(\n params: ResolveMobileFeedPositionParams,\n ): Promise<MobileSocialFeedPositionResolutionResult> {\n const body: MobileServerPublicQueryRequest<'resolve_feed_position'> = {\n type: 'resolve_feed_position',\n view_as: subaccountToHex(params.viewAs),\n input: params.input,\n product_id: params.productId,\n };\n return mapMobileSocialFeedPositionResolutionResult(\n await this.publicQuery(body),\n );\n }\n\n /**\n * Resolves every trusted lifecycle segment of an order without requiring a signature.\n * @param params - Order-owning subaccount and order digest; selecting the account is not authentication.\n * @returns Trusted action candidates and their observation time, or a pending result with no actions.\n * @throws {MobileServerFailureError} On invalid parameters, an inaccessible order, or unavailable source\n * data. Pending projection is a successful result, not a source failure.\n */\n async resolveFeedAction(\n params: ResolveMobileFeedActionParams,\n ): Promise<MobileSocialFeedActionResolutionResult> {\n const body: MobileServerPublicQueryRequest<'resolve_feed_action'> = {\n type: 'resolve_feed_action',\n view_as: subaccountToHex(params.viewAs),\n order_digest: params.orderDigest,\n };\n return mapMobileSocialFeedActionResolutionResult(\n await this.publicQuery(body),\n );\n }\n\n /**\n * Reads a drawing publicly without issuing a reading session. Supplied sessions retain their scope.\n * @param params - Parent item, optional viewing account, and optional original session and viewer token.\n * @returns The parent ID and version, with a nullable drawing whose data may legitimately be false or zero.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, unavailable data,\n * or `SOCIAL_FEED_DRAWING_UNAVAILABLE` when the parent is inaccessible. A readable parent without a drawing\n * returns null. Acquire a new reading session when the original has expired.\n */\n async getFeedChartDrawing(\n params: GetMobileFeedChartDrawingParams,\n ): Promise<MobileSocialFeedDrawingResult> {\n const body: MobileServerPublicQueryRequest<'feed_chart_drawing'> = {\n type: 'feed_chart_drawing',\n item_id: params.itemId,\n session_id: params.sessionId,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n return mapMobileSocialFeedDrawingResult(await this.publicQuery(body));\n }\n\n /**\n * Reads a comment thread with an optional anchor and bidirectional pagination.\n * Independent reads create a public-only session; reused sessions retain their original scope.\n * @param params - Root item, optional anchor or cursor (mutually exclusive), page size, and read perspective.\n * Paging requires the original session and viewer token.\n * @returns Replies, total count, forward and backward cursors, the anchor, and the actual reading session.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, inaccessible content,\n * or unavailable data. Restart pagination with a new session after expiry; do not reuse the old cursor.\n */\n async getFeedComments(\n params: GetMobileFeedCommentsParams,\n ): Promise<MobileSocialFeedCommentsPage> {\n const body: MobileServerPublicQueryRequest<'feed_comments'> = {\n type: 'feed_comments',\n root_item_id: params.rootItemId,\n cursor: params.cursor,\n limit: params.limit,\n anchor_reply_id: params.anchorReplyId,\n session_id: params.sessionId,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n return mapMobileSocialFeedCommentsPage(await this.publicQuery(body));\n }\n\n /**\n * Reads the full position lifecycle and creates or reuses a position session.\n * Unlike getPositionFeed, this includes lifecycle actions as well as published takes.\n * @param params - Position, optional takes-only filter, pagination, and read perspective. Paging requires\n * the original position session and viewer token, not a feed session.\n * @returns Position metrics, ordered action/take history, summary, trading hints, cursor, and reading session.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, inaccessible content,\n * or unavailable source data. Restart with a new position session after expiry.\n * @throws {MobileUnsupportedFeedItemError} If a timeline entry or take has an unsupported kind.\n */\n async getPositionHistory(\n params: GetMobilePositionHistoryParams,\n ): Promise<MobileSocialFeedPositionHistory> {\n const body: MobileServerPublicQueryRequest<'position_history'> = {\n type: 'position_history',\n position_id: params.positionId,\n takes_only: params.takesOnly,\n cursor: params.cursor,\n limit: params.limit,\n session_id: params.sessionId,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n return mapMobileSocialFeedPositionHistory(await this.publicQuery(body));\n }\n\n /**\n * Reads candles and action markers without creating a reading session.\n * Preserve the original range, interval, and read perspective when paging with nextBeforeMs.\n * @param params - Position, candle interval, half-open time range, pagination, and optional original session\n * and viewer token. An independent read omits both session credentials.\n * @returns Candles with decimal prices and x18 volume, action markers, a nullable liquidation line, and paging metadata.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, inaccessible content,\n * or wholly unavailable chart sources. Partially available data is returned with its quality indicator.\n */\n async getPositionChart(\n params: GetMobilePositionChartParams,\n ): Promise<MobileSocialFeedPositionChart> {\n const body: MobileServerPublicQueryRequest<'position_chart'> = {\n type: 'position_chart',\n position_id: params.positionId,\n session_id: params.sessionId,\n interval: params.interval,\n range: { from_ms: params.range.fromMs, to_ms: params.range.toMs },\n before_ms: params.beforeMs,\n limit: params.limit,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n return mapMobileSocialFeedPositionChart(await this.publicQuery(body));\n }\n\n /**\n * Reads active visitor counts and self-reported account previews without registering presence.\n * @param params - Position and optional viewing account, used only for preview relationship information.\n * @returns The visitor count, public account previews, and observation time; previews need not match the count.\n * @throws {MobileServerFailureError} On invalid parameters, an unavailable position, or unavailable source data.\n */\n async getPositionWatchers(\n params: GetMobilePositionWatchersParams,\n ): Promise<MobileSocialFeedWatchers> {\n const body: MobileServerPublicQueryRequest<'position_watchers'> = {\n type: 'position_watchers',\n position_id: params.positionId,\n view_as:\n params.viewAs === undefined\n ? undefined\n : subaccountToHex(params.viewAs),\n };\n return mapMobileSocialFeedWatchers(await this.publicQuery(body));\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 * Reports qualified exposures without signing. Ordinary reads and root previews do not count as exposures.\n * The caller must satisfy the session's viewTracking requirements before reporting an item.\n * @param params - Original reading session and viewer token, plus one to fifty fully delivered, readable,\n * interactive item IDs. The service deduplicates repeated exposures.\n * @returns Separate lists of newly accepted and already-counted item IDs.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, or any ineligible item.\n * A rejected batch is not partially counted. Acquire a new session after expiry and re-evaluate exposure eligibility.\n */\n async recordFeedViews(\n params: MobileRecordFeedViewsParams,\n ): Promise<MobileSocialFeedViewsResult> {\n const body: MobileServerPublicExecuteRequest<'record_feed_views'> = {\n type: 'record_feed_views',\n session_id: params.sessionId,\n item_ids: params.itemIds,\n viewer_token: params.viewerToken,\n };\n return mapMobileSocialFeedViewsResult(await this.publicExecute(body));\n }\n\n /**\n * Registers, renews, or leaves a page lease without signing or authenticating the displayed account.\n * Omitting watcherSubaccount preserves its value; null clears it. This operation does not record item views.\n * @param params - Authorized position, original session and viewer token, page-scoped viewSessionId,\n * lease state, and optional self-reported display account. Retain viewSessionId for the lifetime of the page.\n * @returns Visitor count, public previews, recommended heartbeat interval, and remaining lease lifetime.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, or an inaccessible\n * position. Rejected requests leave leases unchanged; acquire a new reading session after expiry.\n */\n async setPositionPresence(\n params: MobilePositionPresenceParams,\n ): Promise<MobileSocialFeedPresence> {\n const body: MobileServerPublicExecuteRequest<'position_presence'> = {\n type: 'position_presence',\n position_id: params.positionId,\n session_id: params.sessionId,\n view_session_id: params.viewSessionId,\n state: params.state,\n viewer_token: params.viewerToken,\n ...(params.watcherSubaccount === undefined\n ? {}\n : {\n watcher_subaccount:\n params.watcherSubaccount === null\n ? null\n : subaccountToHex(params.watcherSubaccount),\n }),\n };\n return mapMobileSocialFeedPresence(await this.publicExecute(body));\n }\n\n /*\n Signed executes\n */\n\n /**\n * Updates the biography, or clears it when the text is whitespace-only.\n *\n * Serialize this with {@link MobileClient.setAvatar}, {@link MobileClient.setUsername} and\n * {@link MobileClient.setPrivateMode} for the same subaccount: all share the identity update nonce.\n *\n * @throws {MobileServerFailureError} With `INVALID_BIO` for exceeding `MOBILE_BIO_MAX_LENGTH` or null\n * characters, `INVALID_IDENTITY_TARGET` for an isolated subaccount, or `STALE_IDENTITY_UPDATE` when a\n * later write has committed (re-read the profile before retrying).\n */\n async setBio(\n params: MobileSetBioParams,\n ): Promise<MobileServerSuccessResponse> {\n const signedRequest = await this.getSignedRequest('set_bio', params, {\n bio: params.bio,\n });\n return this.execute(signedRequest);\n }\n\n /**\n * Creates a short-lived upload grant. The caller uploads an image meeting {@link MobileAvatarUpload}'s requirements;\n * file access and transport remain platform-specific. This does not change the saved avatar.\n *\n * @throws {MobileServerFailureError} With `INVALID_AVATAR` for a zero or oversized upload,\n * `INVALID_IDENTITY_TARGET` for an isolated subaccount, or `SERVICE_UNAVAILABLE` when storage is unavailable.\n */\n async createAvatarUpload(\n params: MobileCreateAvatarUploadParams,\n ): Promise<MobileAvatarUpload> {\n const signedRequest = await this.getSignedRequest(\n 'create_avatar_upload',\n params,\n { content_length: params.contentLength },\n );\n const data = await this.execute(signedRequest);\n return mapMobileAvatarUpload(data);\n }\n\n /**\n * Publishes a preset/staged upload, or clears the saved avatar when avatar is null.\n * Uploaded JPEG/PNG images must be square, at most 4096 × 4096 pixels, and within\n * `MOBILE_AVATAR_MAX_UPLOAD_BYTES`. A successful PUT can still fail this publication check.\n *\n * Serialize identity writes for the same subaccount; see {@link MobileClient.setBio}.\n *\n * @throws {MobileServerFailureError} With `INVALID_AVATAR` for an invalid preset, staging key, or image,\n * `INVALID_IDENTITY_TARGET` for an isolated subaccount, `SERVICE_UNAVAILABLE` when storage is unavailable,\n * or `STALE_IDENTITY_UPDATE` when a later write has committed (re-read the profile before retrying).\n */\n async setAvatar(\n params: MobileSetAvatarParams,\n ): Promise<MobileServerSuccessResponse> {\n const signedRequest = await this.getSignedRequest('set_avatar', params, {\n avatar: mapMobileAvatarSelectionToServer(params.avatar),\n });\n return this.execute(signedRequest);\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 * Serialize identity writes for the same subaccount; see {@link MobileClient.setBio}.\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 * Serialize identity writes for the same subaccount; see {@link MobileClient.setBio}.\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 * Sets whether the signing subaccount follows a Profile. Both directions are idempotent: following again\n * keeps the original relationship creation time, so it does not move the account in recency order, and\n * unfollowing a relationship that does not exist succeeds with `isFollowing: false`. Unfollowing deletes\n * the relationship rather than deactivating it, so a later follow gets a new creation time and moves the\n * account to the front of recency order.\n *\n * Only `isFollowing: true` is checked against the canonical Query DB subaccount index, so unfollowing still\n * works while that index lags.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_FOLLOW_TARGET` if the target is the sender or\n * either party is isolated, `FOLLOWER_NOT_ELIGIBLE` if the sender is not yet in the canonical Query DB\n * subaccount index, or `FOLLOWING_NOT_FOUND` if the target is not. Both index errors are transient for an\n * account that is being recorded, so they are retryable after catch-up — unlike `INVALID_FOLLOW_TARGET`.\n */\n async setFollow(\n params: MobileSetFollowParams,\n ): Promise<MobileFollowMutationResult> {\n const signedRequest = await this.getSignedRequest('set_follow', params, {\n subaccount: subaccountToHex(params.target),\n is_following: params.isFollowing,\n });\n const data = await this.execute(signedRequest);\n return mapMobileFollowMutationResult(data);\n }\n\n /**\n * Sets whether the signing subaccount follows each of up to `MOBILE_FOLLOW_BATCH_MAX_SIZE` (25) Profiles in\n * one signed request, which costs far less of the shared IP rate limit than one {@link MobileClient.setFollow}\n * per target. The server validates the whole list before writing and commits every target in one database\n * transaction, so the batch either fully applies or changes nothing. Each target has the same idempotent\n * semantics as `setFollow`, so resending a batch is safe.\n *\n * Targets are lowercased before signing but not deduplicated, and two spellings of one subaccount are a\n * duplicate. Longer lists must be split by the caller; each request commits on its own, so earlier chunks\n * stay applied when a later one fails.\n *\n * @returns One result per target, in request order, carrying each target's post-commit follower count.\n * @throws {MobileServerFailureError} With error code `INVALID_FOLLOW_BATCH` if `targets` is empty, holds\n * duplicates, or exceeds the maximum, or `INVALID_FOLLOW_TARGET` if any target is the sender or either party\n * is isolated. Either rejects the whole batch before any write, so do not retry it unchanged.\n */\n async setFollowBatch(\n params: MobileSetFollowBatchParams,\n ): Promise<MobileFollowBatchResultItem[]> {\n const signedRequest = await this.getSignedRequest(\n 'set_follow_batch',\n params,\n {\n subaccounts: params.targets.map(subaccountToHex),\n is_following: params.isFollowing,\n },\n );\n const data = await this.execute(signedRequest);\n return mapMobileFollowBatchResult(data);\n }\n\n /**\n * Publishes text, a drawing, or both atomically using the signed author identity.\n * For an idempotent retry, reuse clientRequestId and the exact original content with a valid signature.\n * The SDK does not trim text or reformat the signed drawing JSON.\n * @param params - Author subaccount and signing options, request UUID, owned position, original text and\n * mentions, plus an optional trusted action and original drawing JSON.\n * @returns The published item, including authoritative interaction state and any drawing or comment preview.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} On authentication, ownership, eligibility, content, mention, or drawing\n * errors, or `SOCIAL_FEED_REQUEST_CONFLICT` when a request UUID is reused with different content. Do not\n * change an earlier request to retry it; use a new UUID for a genuinely new publication.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async createFeedPost(\n params: MobileCreateFeedPostParams,\n ): Promise<MobileSocialFeedItem> {\n const request = await this.getSignedRequest('create_feed_post', params, {\n client_request_id: params.clientRequestId,\n position_id: params.positionId,\n action_id: params.actionId,\n text: params.text,\n mentions: params.mentions.map(mapMobileSocialFeedMentionToServer),\n drawing_data_json: params.drawingDataJson,\n });\n return mapMobileSocialFeedItem((await this.execute(request)).item);\n }\n\n /**\n * First attaches a drawing to an owned post or trade card while the author still holds its position.\n * The original JSON is signed unchanged; false and zero are valid drawing documents.\n * For an exact retry after a timeout, generate a nonce up front with {@link getMobileNonce} and reuse\n * that nonce and the original JSON before its receive deadline. A fresh nonce is not an exact replay.\n * If a retry returns `SOCIAL_FEED_DRAWING_EXISTS`, use {@link getFeedChartDrawing} to confirm that the\n * stored data matches the intended drawing before treating the original create as successful.\n * @param params - Author subaccount and signing options, parent item, and complete original drawing JSON.\n * @returns The parent ID and updated version together with the stored drawing.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} On authentication, ownership, eligibility, or invalid/oversized drawing\n * errors, an unavailable parent, or `SOCIAL_FEED_DRAWING_EXISTS` for a conflicting existing drawing.\n * Read the existing drawing and use updateFeedChartDrawing when replacement is intended.\n */\n async createFeedChartDrawing(\n params: MobileFeedChartDrawingParams,\n ): Promise<MobileSocialFeedDrawingMutationResult> {\n const request = await this.getSignedRequest(\n 'create_feed_chart_drawing',\n params,\n { item_id: params.itemId, data_json: params.dataJson },\n );\n return mapMobileSocialFeedDrawingMutationResult(\n await this.execute(request),\n );\n }\n\n /**\n * Replaces an existing drawing, including after the associated position has closed.\n * Serialize writes per item and preserve the original JSON text when retrying.\n * @param params - Author subaccount and signing options, parent item, and complete replacement JSON.\n * @returns The parent ID and updated version together with the stored replacement drawing.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} On authentication, ownership, or invalid/oversized drawing errors, an\n * unavailable parent or drawing, or `STALE_SOCIAL_FEED_DRAWING_UPDATE`. Re-read the drawing before retrying\n * a stale or conflicting update instead of blindly replacing newer content.\n */\n async updateFeedChartDrawing(\n params: MobileFeedChartDrawingParams,\n ): Promise<MobileSocialFeedDrawingMutationResult> {\n const request = await this.getSignedRequest(\n 'update_feed_chart_drawing',\n params,\n { item_id: params.itemId, data_json: params.dataJson },\n );\n return mapMobileSocialFeedDrawingMutationResult(\n await this.execute(request),\n );\n }\n\n /**\n * Publishes a comment or reply atomically; an invalid position attachment rejects the entire request.\n * For an idempotent retry, reuse clientRequestId and the unmodified text, mentions, and attachment.\n * @param params - Author subaccount and signing options, request UUID, root item, original nonblank text\n * and mentions, plus an optional reply target in the same thread and currently owned position attachment.\n * @returns The created reply and authoritative root comment count; this write does not create a reading session.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} On authentication, inaccessible content, invalid text/mentions/reply\n * relationships, an ineligible attachment, or `SOCIAL_FEED_REQUEST_CONFLICT`. Correct invalid input before\n * a new submission, and never reuse an existing request UUID with different content.\n */\n async createFeedComment(\n params: MobileCreateFeedCommentParams,\n ): Promise<MobileSocialFeedCommentResult> {\n const request = await this.getSignedRequest('create_feed_comment', params, {\n client_request_id: params.clientRequestId,\n root_item_id: params.rootItemId,\n reply_to_item_id: params.replyToItemId,\n text: params.text,\n mentions: params.mentions.map(mapMobileSocialFeedMentionToServer),\n attached_position_id: params.attachedPositionId,\n });\n return mapMobileSocialFeedCommentResult(await this.execute(request));\n }\n\n /**\n * Sets or clears a signed user's like without requiring an open position.\n * Serialize mutations per item and author. Retrying the same isLiked state with a fresh nonce is safe\n * when no newer change intervenes; an unchanged state does not increment the count or version again.\n * Pass the original nonce on a retry before its deadline to avoid overwriting a newer change from\n * another device. Re-read the current state if that retry conflicts.\n * @param params - Acting subaccount and signing options, interactive item, and desired like state.\n * @returns The applied like state, authoritative count, and item version after the mutation.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} On authentication errors, inaccessible or non-interactive content,\n * or `STALE_SOCIAL_FEED_LIKE_UPDATE`. Re-read the current state before submitting a new mutation after a conflict.\n */\n async setFeedLike(\n params: MobileSetFeedLikeParams,\n ): Promise<MobileSocialFeedLikeResult> {\n const request = await this.getSignedRequest('set_feed_like', params, {\n item_id: params.itemId,\n is_liked: params.isLiked,\n });\n return mapMobileSocialFeedLikeResult(await this.execute(request));\n }\n\n /*\n Base Fns\n */\n\n // Returns the request narrowed to `type` so `execute` can infer its response from the request it is given,\n // instead of being told the type a second time at the call site.\n protected async getSignedRequest<T extends MobileSignedInner['type']>(\n type: T,\n params: MobileSignedRequestParams,\n innerParams: MobileSignedInnerParams<T>,\n ): Promise<MobileSignedRequest<MobileSignedInnerByType<T>>> {\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 = {\n type,\n ...innerParams,\n } as unknown as MobileSignedInnerByType<T>;\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}/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<T extends MobileServerPublicExecuteRequestType>(\n body: { type: T } & MobileServerPublicExecuteRequestByType[T],\n ): Promise<MobileServerPublicExecuteSuccessResponse<T>> {\n const response = await this.axiosInstance.post<MobileServerExecuteResult>(\n `${this.opts.url}/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 MobileServerPublicExecuteSuccessResponse<T>;\n }\n\n // `T` is inferred from the body's `type` rather than declared by the caller, for the same reason\n // `publicQuery` spells its body out as an intersection: an indexed access is not an inference site.\n protected async execute<T extends MobileServerExecuteRequestType>(\n body: MobileSignedRequest & { type: T },\n ): Promise<MobileServerExecuteSuccessResponse<T>> {\n const response = await this.axiosInstance.post<MobileServerExecuteResult>(\n `${this.opts.url}/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 MobileServerExecuteSuccessResponse<T>;\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.stringify(data)}`,\n );\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAiLA,IA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S;EAEjB,IAAI,8BAA8B,IAAI,GACpC,MAAM,IAAI,yBAAyB,MAAM,SAAS,MAAM;EAE1D,IAAI,CAAC,8BAA8B,IAAI,GACrC,MAAM,IAAI,MACR,4EAA4E,KAAK,UAAU,IAAI,GACjG;CAEJ;AACF"}
1
+ {"version":3,"file":"MobileClient.js","names":[],"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 { bytesToString, keccak256, zeroHash } from 'viem';\nimport {\n mapMobileAvatarPreset,\n mapMobileAvatarSelectionToServer,\n mapMobileAvatarUpload,\n mapMobileFeedPage,\n mapMobileFollowBatchResult,\n mapMobileFollowListPage,\n mapMobileFollowListParamsToServer,\n mapMobileFollowMutationResult,\n mapMobileNotificationCapabilitiesToServer,\n mapMobileNotificationInboxV2,\n mapMobileNotificationPreferences,\n mapMobileNotificationPreferencesToServer,\n mapMobileNotificationRegistrationV2,\n mapMobileNotificationSettingsToServer,\n mapMobileNotificationSettingsV2,\n mapMobileNotificationSubscriptions,\n mapMobileNotificationSubscriptionsUpdateToServer,\n mapMobileProductEventToServer,\n mapMobileProfileSearchPage,\n mapMobileProfileSearchParamsToServer,\n mapMobileProfilesIncludeToServer,\n mapMobilePublicProfile,\n mapMobileRegisteredWallet,\n mapMobileSocialFeedActionResolutionResult,\n mapMobileSocialFeedCommentResult,\n mapMobileSocialFeedCommentsPage,\n mapMobileSocialFeedDrawingMutationResult,\n mapMobileSocialFeedDrawingResult,\n mapMobileSocialFeedItem,\n mapMobileSocialFeedItemResponse,\n mapMobileSocialFeedLikeResult,\n mapMobileSocialFeedListParamsToServer,\n mapMobileSocialFeedMentionToServer,\n mapMobileSocialFeedPage,\n mapMobileSocialFeedPositionChart,\n mapMobileSocialFeedPositionHistory,\n mapMobileSocialFeedPositionResolutionResult,\n mapMobileSocialFeedPositionsPage,\n mapMobileSocialFeedPositionThoughts,\n mapMobileSocialFeedPresence,\n mapMobileSocialFeedRankedPage,\n mapMobileSocialFeedReadParamsToServer,\n mapMobileSocialFeedTopTradersPage,\n mapMobileSocialFeedUpdates,\n mapMobileSocialFeedUploadedImage,\n mapMobileSocialFeedWatchers,\n} from './dataMappers';\nimport {\n buildSignedMobileRequest,\n getMobileNonce,\n MobileSignedInner,\n MobileSignedInnerByType,\n MobileSignedInnerParams,\n MobileSignedRequest,\n} from './signing';\nimport {\n GetMobileFeedChartDrawingParams,\n GetMobileFeedCommentsParams,\n GetMobileFeedImageBytesParams,\n GetMobileFeedImageRequestParams,\n GetMobileFeedItemParams,\n GetMobileFeedParams,\n GetMobileFeedUpdatesParams,\n GetMobileFollowersParams,\n GetMobileFollowingParams,\n GetMobileForYouFeedParams,\n GetMobileFriendsFeedParams,\n GetMobileMarketFeedParams,\n GetMobileNotificationInboxV2Params,\n GetMobileNotificationPreferencesParams,\n GetMobileNotificationRegistrationV2Params,\n GetMobileNotificationSettingsV2Params,\n GetMobileNotificationSubscriptionsParams,\n GetMobilePositionChartParams,\n GetMobilePositionFeedParams,\n GetMobilePositionHistoryAllParams,\n GetMobilePositionHistoryParams,\n GetMobilePositionThoughtsParams,\n GetMobilePositionWatchersParams,\n GetMobileProfileFeedParams,\n GetMobileProfilesParams,\n GetMobileRegisteredWalletParams,\n GetMobileSelfFeedPositionsParams,\n GetMobileTopTradersFeedParams,\n GetMobileUsernameAvailabilityParams,\n MobileAvatarPreset,\n MobileAvatarUpload,\n MobileCreateAvatarUploadParams,\n MobileCreateFeedCommentParams,\n MobileCreateFeedImageUploadParams,\n MobileCreateFeedPostParams,\n MobileFeedChartDrawingParams,\n MobileFeedImageRequest,\n MobileFeedPage,\n MobileFollowBatchResultItem,\n MobileFollowListPage,\n MobileFollowMutationResult,\n MobileNotificationInboxV2,\n MobileNotificationPreferences,\n MobileNotificationRegistrationV2,\n MobileNotificationSettingsV2,\n MobileNotificationSubscriptions,\n MobilePositionPresenceParams,\n MobileProfileSearchPage,\n MobilePublicProfile,\n MobileRecordFeedViewsParams,\n MobileRecordProductEventsParams,\n MobileRegisteredWallet,\n MobileRegisterExpoTokenParams,\n MobileRegisterExpoTokenV2Params,\n MobileSetAvatarParams,\n MobileSetBioParams,\n MobileSetFeedLikeParams,\n MobileSetFollowBatchParams,\n MobileSetFollowParams,\n MobileSetPrivateModeParams,\n MobileSetUsernameParams,\n MobileSignedRequestParams,\n MobileSocialFeedActionResolutionResult,\n MobileSocialFeedCommentResult,\n MobileSocialFeedCommentsPage,\n MobileSocialFeedDrawingMutationResult,\n MobileSocialFeedDrawingResult,\n MobileSocialFeedItem,\n MobileSocialFeedItemResponse,\n MobileSocialFeedLikeResult,\n MobileSocialFeedPage,\n MobileSocialFeedPositionChart,\n MobileSocialFeedPositionHistory,\n MobileSocialFeedPositionResolutionResult,\n MobileSocialFeedPositionsPage,\n MobileSocialFeedPositionThoughtsPage,\n MobileSocialFeedPresence,\n MobileSocialFeedRankedPage,\n MobileSocialFeedTopTradersPage,\n MobileSocialFeedUpdates,\n MobileSocialFeedUploadedImage,\n MobileSocialFeedWatchers,\n MobileUnregisterExpoTokenParams,\n MobileUpdateNotificationPreferencesParams,\n MobileUpdateNotificationSettingsV2Params,\n MobileUpdateNotificationSubscriptionsParams,\n MobileUsernameAvailability,\n ResolveMobileFeedActionParams,\n ResolveMobileFeedPositionParams,\n SearchMobileProfilesParams,\n} from './types/clientTypes';\nimport { MobileServerFailureError } from './types/MobileServerFailureError';\nimport { MobileServerSuccessResponse } from './types/serverBaseTypes';\nimport {\n MobileServerExecuteResult,\n MobileServerExecuteSuccessResponse,\n MobileServerPublicExecuteRequest,\n MobileServerPublicExecuteSuccessResponse,\n} from './types/serverExecuteTypes';\nimport {\n MobileServerPublicQueryRequest,\n MobileServerPublicQuerySuccessResponse,\n MobileServerSignedQuerySuccessResponse,\n} from './types/serverQueryTypes';\nimport {\n MobileServerExecuteRequestType,\n MobileServerPublicExecuteRequestByType,\n MobileServerPublicExecuteRequestType,\n MobileServerPublicQueryRequestByType,\n MobileServerPublicQueryRequestType,\n MobileServerSignedQueryRequestType,\n} from './types/serverRequestTypes';\nimport { buildMobileFeedImageMultipart } from './utils/buildMobileFeedImageMultipart';\nimport { MOBILE_FEED_IMAGE_MAX_REQUEST_BYTES } from './utils/feed';\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, bios, avatars, public profile lookups, the global\n * trade feed, session-based social feeds, the follower/following graph, privacy settings, and push\n * 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 * Returns the current server-owned avatar catalogue in display order.\n *\n * @throws {MobileServerFailureError} With `SERVICE_UNAVAILABLE` when avatar storage is not configured.\n */\n async getAvatarPresets(): Promise<MobileAvatarPreset[]> {\n const body: MobileServerPublicQueryRequest<'avatar_presets'> = {\n type: 'avatar_presets',\n };\n const data = await this.publicQuery(body);\n return data.presets.map(mapMobileAvatarPreset);\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 public profiles, optionally with follower totals and a follow summary. Returns one profile per\n * requested subaccount, in the requested order, so callers can correlate positionally. Every non-isolated\n * subaccount resolves, with `username` and `displayName` `null` until a username is claimed. Private Mode\n * does not hide the profile itself, only the account's activity.\n *\n * This is the only profile route, so use it for a single subaccount too. It is unsigned, which means\n * `include.followSummary.viewAs` is an unauthenticated claim.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_PROFILES_REQUEST` if `subaccounts` is empty,\n * holds duplicates, or exceeds `MOBILE_PROFILES_MAX_BATCH_SIZE` (25), or `PROFILE_NOT_FOUND` if any\n * requested subaccount — or the follow summary's `viewAs` — is in the engine-created isolated namespace.\n * One isolated member fails the whole batch rather than being omitted.\n */\n async getProfiles(\n params: GetMobileProfilesParams,\n ): Promise<MobilePublicProfile[]> {\n const body: MobileServerPublicQueryRequest<'profiles'> = {\n type: 'profiles',\n subaccounts: params.subaccounts.map(subaccountToHex),\n include: params.include\n ? mapMobileProfilesIncludeToServer(params.include)\n : undefined,\n };\n const data = await this.publicQuery(body);\n return data.profiles.map(mapMobilePublicProfile);\n }\n\n /**\n * Searches claimed profiles by the start of their username, in ascending username order with an exact\n * match first. Only current claimed identities match: an unnamed profile never does, and Private Mode does\n * not hide one. Takes the same `include` as {@link MobileClient.getProfiles}, so a page can carry follower\n * totals and a follow summary without a second request; as there, `include.followSummary.viewAs` is an\n * unauthenticated claim on an unsigned route.\n *\n * Pagination is live rather than snapshot, so deduplicate matches by subaccount across pages. A cursor is\n * bound to the query alone, so `include` and `limit` may change between pages.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_PROFILE_SEARCH_REQUEST` if `query` is outside\n * the username alphabet or length or `limit` is out of range (1-50, or 1-25 with an include),\n * `INVALID_PROFILE_SEARCH_CURSOR` if the cursor is malformed or was issued for a different query (discard\n * it and restart from the first page), or `PROFILE_NOT_FOUND` if `include.followSummary.viewAs` is in the\n * engine-created isolated namespace.\n */\n async searchProfiles(\n params: SearchMobileProfilesParams,\n ): Promise<MobileProfileSearchPage> {\n const body: MobileServerPublicQueryRequest<'search_profiles'> = {\n type: 'search_profiles',\n ...mapMobileProfileSearchParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileProfileSearchPage(data);\n }\n\n /**\n * Fetches a page of the accounts that follow the given Profile.\n *\n * Ordering depends on `viewAs`. With it, accounts the Viewer already follows come first, unfamiliar\n * accounts second, and every row carries an `isFollowing`. Without it, the page is ordered by the listed\n * relationship alone and no row carries an `isFollowing`. In both cases the newest listed relationship\n * comes first within a group, with a bytes32 tie-break. The grouping is evaluated per request against the\n * live graph, so following an account from inside the list moves it between groups on the next page —\n * deduplicate by subaccount and do not re-sort locally.\n *\n * @throws {MobileServerFailureError} With error code `PROFILE_NOT_FOUND` if the viewed Profile or `viewAs`\n * is isolated, `INVALID_FOLLOW_CURSOR` if the cursor is malformed or was issued for a different `viewAs`,\n * Profile, or list direction (discard it and restart from the first page), or `INVALID_FOLLOW_LIMIT` if\n * `limit` is outside 1–50.\n */\n async getFollowers(\n params: GetMobileFollowersParams,\n ): Promise<MobileFollowListPage> {\n const body: MobileServerPublicQueryRequest<'followers'> = {\n type: 'followers',\n ...mapMobileFollowListParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileFollowListPage(data);\n }\n\n /**\n * Fetches a page of the accounts the given Profile follows. Ordering, cursor rules, and errors match\n * {@link MobileClient.getFollowers}. When `viewAs` reads its own Following list every row is familiar, so\n * every `isFollowing` is `true`.\n */\n async getFollowing(\n params: GetMobileFollowingParams,\n ): Promise<MobileFollowListPage> {\n const body: MobileServerPublicQueryRequest<'following'> = {\n type: 'following',\n ...mapMobileFollowListParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileFollowListPage(data);\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 chronological For You recommendations with server-side author/thread constraints.\n * Always public, with optional viewAs for relationship state. Preserve the session, viewAs, filters, and limit\n * when paging, including through empty pages with a nextCursor. A 6312 error requires a refresh.\n * @param params - Filters, pagination, optional viewing account, and browser credential; no signing identity.\n * @returns A fixed-session page with its ranking version and new-content watermark.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch/expiry, or unavailable data.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getForYouFeed(\n params: GetMobileForYouFeedParams = {},\n ): Promise<MobileSocialFeedRankedPage> {\n const body: MobileServerPublicQueryRequest<'for_you_feed'> = {\n type: 'for_you_feed',\n market_category: params.marketCategory,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedRankedPage(data);\n }\n\n /**\n * Fetches chronological content by qualified Top Traders, with official account PnL badges.\n * Always public; neither a wallet nor one-click trading setup is required.\n * @param params - Filters, pagination, optional viewing account, and browser credential.\n * @returns A page with its qualification cohort; an unavailable cohort fails instead of returning an empty ranking.\n * @throws {MobileServerFailureError} On request/session errors or unavailable cohort data.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getTopTradersFeed(\n params: GetMobileTopTradersFeedParams = {},\n ): Promise<MobileSocialFeedTopTradersPage> {\n const body: MobileServerPublicQueryRequest<'top_traders_feed'> = {\n type: 'top_traders_feed',\n market_category: params.marketCategory,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedTopTradersPage(data);\n }\n\n /**\n * Fetches public content by authors followed by viewAs, without a signature. One-way following is sufficient.\n * @param params - Required viewing account on every request, filters, pagination, and browser credential.\n * @returns A chronological Friends page and reading session.\n * @throws {MobileServerFailureError} On invalid viewing account, session errors, or feed query failure.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getFriendsFeed(\n params: GetMobileFriendsFeedParams,\n ): Promise<MobileSocialFeedRankedPage> {\n const body: MobileServerPublicQueryRequest<'friends_feed'> = {\n type: 'friends_feed',\n market_category: params.marketCategory,\n ...mapMobileSocialFeedListParamsToServer(params),\n view_as: subaccountToHex(params.viewAs),\n viewer_token: params.viewerToken,\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedRankedPage(data);\n }\n\n /**\n * Fetches an author's content visible to viewAs, including that account's own hidden content.\n * @param params - Target identity, filters, pagination, and optional public viewing account.\n * @returns An author page without main-feed ranking or cohort fields.\n * @throws {MobileServerFailureError} On invalid parameters, session errors, or inaccessible content.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getProfileFeed(\n params: GetMobileProfileFeedParams,\n ): Promise<MobileSocialFeedPage> {\n const body: MobileServerPublicQueryRequest<'profile_feed'> = {\n type: 'profile_feed',\n subaccount: subaccountToHex(params.subaccount),\n market_category: params.marketCategory,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedPage(data);\n }\n\n /**\n * Fetches published content for one market.\n * @param params - Product ID, content/size filters, pagination, and public viewing account.\n * @returns A market page without main-feed ranking fields.\n * @throws {MobileServerFailureError} On an unknown market, session errors, or unavailable data.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getMarketFeed(\n params: GetMobileMarketFeedParams,\n ): Promise<MobileSocialFeedPage> {\n const body: MobileServerPublicQueryRequest<'market_feed'> = {\n type: 'market_feed',\n product_id: params.productId,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedPage(data);\n }\n\n /**\n * Fetches already published content for a position lifecycle. This is not full position history\n * and includes hidden content owned by viewAs under account_view. It does not recreate suppressed activity.\n * @param params - Position UUID, filters, pagination, and public viewing account.\n * @returns A fixed-session position feed page.\n * @throws {MobileServerFailureError} On inaccessible content, session errors, or unavailable data.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getPositionFeed(\n params: GetMobilePositionFeedParams,\n ): Promise<MobileSocialFeedPage> {\n const body: MobileServerPublicQueryRequest<'position_feed'> = {\n type: 'position_feed',\n position_id: params.positionId,\n ...mapMobileSocialFeedListParamsToServer(params),\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedPage(data);\n }\n\n /**\n * Reads one item visible to viewAs, including that account's own hidden content.\n * Creates an item session directly when sessionId is omitted.\n * Reading does not increment views; use {@link recordFeedViews} independently when reporting views.\n * @param params - Item UUID, preview limit, and optional existing session/read identity.\n * @returns The complete item and authorized reading session.\n * @throws {MobileServerFailureError} On inaccessible content or session mismatch/expiry.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async getFeedItem(\n params: GetMobileFeedItemParams,\n ): Promise<MobileSocialFeedItemResponse> {\n const body: MobileServerPublicQueryRequest<'feed_item'> = {\n type: 'feed_item',\n item_id: params.itemId,\n comment_preview_limit: params.commentPreviewLimit,\n session_id: params.sessionId,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedItemResponse(data);\n }\n\n /**\n * Polls authorized visible items and positions without inserting or reordering list members.\n * Increment requestSeq across the entire session, including viewport changes; never reset it for a new viewport.\n * Accept only the current session and viewportRevision's latest requestSeq; discard stale patches and cursors together.\n * Updates currently always return reset=true. Apply current author details, follow state, and badges even if the item version is unchanged.\n * Null patches clear values;\n * omitted fields leave them unchanged. Stop polling off-screen and refresh on error 6312.\n * @param params - Session, visible IDs, update baseline, sequence, and matching read identity.\n * @returns Item/position patches, revoked targets, and a new-content hint.\n * @throws {MobileServerFailureError} On invalid or unauthorized targets, session expiry, or unavailable data.\n */\n async getFeedUpdates(\n params: GetMobileFeedUpdatesParams,\n ): Promise<MobileSocialFeedUpdates> {\n const body: MobileServerPublicQueryRequest<'feed_updates'> = {\n type: 'feed_updates',\n session_id: params.sessionId,\n visible_item_ids: params.visibleItemIds,\n visible_position_ids: params.visiblePositionIds,\n update_cursor: params.updateCursor,\n viewport_revision: params.viewportRevision,\n request_seq: params.requestSeq,\n viewer_token: params.viewerToken,\n };\n const data = await this.publicQuery(body);\n return mapMobileSocialFeedUpdates(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 * @deprecated Use {@link getNotificationSettingsV2} instead.\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 * Lists a selected account's current positions without signing or authenticating ownership.\n * Publication and attachment eligibility are hints that the service rechecks on writes.\n * @param params - Viewing subaccount, optional market filter, page size, and opaque cursor.\n * @returns Current position candidates, their eligibility hints, the next cursor, and observation time.\n * @throws {MobileServerFailureError} On invalid parameters, an unsupported viewing account, or unavailable\n * position data. An account with no open positions returns an empty page instead of an error.\n */\n async getSelfFeedPositions(\n params: GetMobileSelfFeedPositionsParams,\n ): Promise<MobileSocialFeedPositionsPage> {\n const body: MobileServerPublicQueryRequest<'self_feed_positions'> = {\n type: 'self_feed_positions',\n view_as: subaccountToHex(params.viewAs),\n product_id: params.productId,\n cursor: params.cursor,\n limit: params.limit,\n };\n return mapMobileSocialFeedPositionsPage(await this.publicQuery(body));\n }\n\n /**\n * Resolves a slash command against a selected account without changing the caller's input.\n * @param params - Viewing subaccount, original command text, and optional market disambiguation.\n * @returns The resolution, nullable market, candidate positions, and reason for an empty result.\n * @throws {MobileServerFailureError} On invalid parameters, an unsupported viewing account, or unavailable\n * source data. Unknown markets and accounts without open positions are normal resolution results.\n */\n async resolveFeedPosition(\n params: ResolveMobileFeedPositionParams,\n ): Promise<MobileSocialFeedPositionResolutionResult> {\n const body: MobileServerPublicQueryRequest<'resolve_feed_position'> = {\n type: 'resolve_feed_position',\n view_as: subaccountToHex(params.viewAs),\n input: params.input,\n product_id: params.productId,\n };\n return mapMobileSocialFeedPositionResolutionResult(\n await this.publicQuery(body),\n );\n }\n\n /**\n * Resolves every trusted lifecycle segment of an order without requiring a signature.\n * @param params - Order-owning subaccount and order digest; selecting the account is not authentication.\n * @returns Trusted action candidates and their observation time, or a pending result with no actions.\n * @throws {MobileServerFailureError} On invalid parameters, an inaccessible order, or unavailable source\n * data. Pending projection is a successful result, not a source failure.\n */\n async resolveFeedAction(\n params: ResolveMobileFeedActionParams,\n ): Promise<MobileSocialFeedActionResolutionResult> {\n const body: MobileServerPublicQueryRequest<'resolve_feed_action'> = {\n type: 'resolve_feed_action',\n view_as: subaccountToHex(params.viewAs),\n order_digest: params.orderDigest,\n };\n return mapMobileSocialFeedActionResolutionResult(\n await this.publicQuery(body),\n );\n }\n\n /**\n * Reads a drawing publicly without issuing a reading session. Supplied sessions retain their scope.\n * @param params - Parent item, optional viewing account, and optional original session and viewer token.\n * @returns The parent ID and version, with a nullable drawing whose data may legitimately be false or zero.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, unavailable data,\n * or `SOCIAL_FEED_DRAWING_UNAVAILABLE` when the parent is inaccessible. A readable parent without a drawing\n * returns null. Acquire a new reading session when the original has expired.\n */\n async getFeedChartDrawing(\n params: GetMobileFeedChartDrawingParams,\n ): Promise<MobileSocialFeedDrawingResult> {\n const body: MobileServerPublicQueryRequest<'feed_chart_drawing'> = {\n type: 'feed_chart_drawing',\n item_id: params.itemId,\n session_id: params.sessionId,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n return mapMobileSocialFeedDrawingResult(await this.publicQuery(body));\n }\n\n /**\n * Resolves a backend feed image path against this client's mobile gateway URL.\n * @param path - Backend path from image metadata, rooted at /v1/mobile or the mobile service root.\n * @returns An absolute URL suitable for authenticated fetches.\n */\n resolveFeedImageUrl(path: string): string {\n return `${this.opts.url}${path.replace(/^\\/v1\\/mobile(?=\\/)/, '')}`;\n }\n\n /**\n * Prepares a protected image request for native image components without downloading or encoding bytes.\n * Does not increment view counts.\n * @param params - Image path from metadata plus the original session credentials.\n * @returns Absolute URL and headers; pass them as the image source's URI and headers.\n */\n getFeedImageRequest(\n params: GetMobileFeedImageRequestParams,\n ): MobileFeedImageRequest {\n return {\n url: this.resolveFeedImageUrl(params.path),\n headers: {\n 'x-feed-session-id': params.sessionId,\n 'x-feed-viewer-token': params.viewerToken,\n },\n };\n }\n\n /**\n * Fetches protected feed image bytes using the reading session that fully delivered the parent item.\n * Does not increment view counts.\n * @param params - Image path from metadata plus the original session credentials.\n * @returns Raw image bytes.\n * @throws {MobileServerFailureError} On session, permission, or availability errors.\n */\n async getFeedImageBytes(\n params: GetMobileFeedImageBytesParams,\n ): Promise<Uint8Array> {\n const { url, headers } = this.getFeedImageRequest(params);\n return this.publicGetBytes(url, headers);\n }\n\n /**\n * Reads top-level comment groups with all readable descendants and bidirectional pagination.\n * The limit counts groups, not descendants. Groups are newest first; their flat replies are oldest first,\n * with depth then UUID breaking timestamp ties. An anchor at any depth selects its top-level group.\n * Preview cursors open the first complete group page in the same snapshot; do not prepend preview items.\n * Independent reads create a public-only session; reused sessions retain their original scope.\n * @param params - Root item, optional anchor or cursor (mutually exclusive), group limit, and read perspective.\n * Paging requires the original session and viewer token.\n * @returns Complete comment groups, whole-thread reply and top-level counts, cursors, anchor, and session.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, inaccessible content,\n * or unavailable data. Restart pagination with a new session after expiry; do not reuse the old cursor.\n */\n async getFeedComments(\n params: GetMobileFeedCommentsParams,\n ): Promise<MobileSocialFeedCommentsPage> {\n const body: MobileServerPublicQueryRequest<'feed_comments'> = {\n type: 'feed_comments',\n root_item_id: params.rootItemId,\n cursor: params.cursor,\n limit: params.limit,\n anchor_reply_id: params.anchorReplyId,\n session_id: params.sessionId,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n return mapMobileSocialFeedCommentsPage(await this.publicQuery(body));\n }\n\n /**\n * Reads the full position lifecycle and creates or reuses a position session.\n * Unlike getPositionFeed, this includes lifecycle actions as well as published takes.\n * @param params - Position, optional takes-only filter, pagination, and read perspective. Paging requires\n * the original position session and viewer token, not a feed session.\n * @returns Position metrics, ordered action/take history, summary, trading hints, cursor, and reading session.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, inaccessible content,\n * unavailable source data, or SOCIAL_FEED_HISTORY_TOO_LARGE when the initial directory exceeds capacity.\n * Restart with a new position session after expiry.\n * @throws {MobileUnsupportedFeedItemError} If a timeline entry or take has an unsupported kind.\n */\n async getPositionHistory(\n params: GetMobilePositionHistoryParams,\n ): Promise<MobileSocialFeedPositionHistory> {\n const body: MobileServerPublicQueryRequest<'position_history'> = {\n type: 'position_history',\n position_id: params.positionId,\n takes_only: params.takesOnly,\n cursor: params.cursor,\n limit: params.limit,\n session_id: params.sessionId,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n return mapMobileSocialFeedPositionHistory(await this.publicQuery(body));\n }\n\n /**\n * Reads the most recent 500 lifecycle actions, without authored text, drawings, or images.\n * Creates a new position session on every call. A null nextCursor means no pagination, not complete\n * history; use getPositionHistory with a fresh session for the full lifecycle. takeCount is always zero.\n * @param params - Position and read perspective; an existing viewer token may be reused.\n * @returns Position metrics, owner, recent actions, response-scope counts, trading hints, and a new session.\n * @throws {MobileServerFailureError} On invalid parameters, inaccessible content, unavailable data,\n * or SOCIAL_FEED_HISTORY_TOO_LARGE when the initial directory exceeds capacity.\n * @throws {MobileUnsupportedFeedItemError} If a timeline entry or take has an unsupported kind.\n */\n async getPositionHistoryAll(\n params: GetMobilePositionHistoryAllParams,\n ): Promise<MobileSocialFeedPositionHistory> {\n const body: MobileServerPublicQueryRequest<'position_history_all'> = {\n type: 'position_history_all',\n position_id: params.positionId,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n return mapMobileSocialFeedPositionHistory(await this.publicQuery(body));\n }\n\n /**\n * Reads published position thoughts with both nonblank text and a saved drawing, without signing.\n * Keeps descending drawing creation time / item UUID order; editing a drawing does not move the item.\n * Continue until nextCursor is null, even after an empty page. There is no 500-item total cap.\n * Keep positionId, limit, sessionId, and viewerToken unchanged when paging; omitted viewAs inherits\n * the session. History/feed sessions cannot be substituted. Refresh to include newly eligible content.\n * @param params - Position, page size, read perspective, and original thoughts-session credentials for paging.\n * @returns Complete thoughts and drawings in server order, a continuation cursor, and the reading session.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch/expiry, inaccessible content,\n * unavailable source data, or SOCIAL_FEED_HISTORY_TOO_LARGE when the initial directory exceeds capacity.\n * @throws {MobileUnsupportedFeedItemError} If an item is not a post or trade card.\n */\n async getPositionThoughts(\n params: GetMobilePositionThoughtsParams,\n ): Promise<MobileSocialFeedPositionThoughtsPage> {\n const body: MobileServerPublicQueryRequest<'position_thoughts'> = {\n type: 'position_thoughts',\n position_id: params.positionId,\n limit: params.limit,\n session_id: params.sessionId,\n cursor: params.cursor,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n return mapMobileSocialFeedPositionThoughts(await this.publicQuery(body));\n }\n\n /**\n * Reads candles and action markers without creating a reading session.\n * Preserve the original range, interval, and read perspective when paging with nextBeforeMs.\n * @param params - Position, candle interval, half-open time range, pagination, and optional original session\n * and viewer token. An independent read omits both session credentials.\n * @returns Candles with decimal prices and x18 volume, action markers, a nullable liquidation line, and paging metadata.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, inaccessible content,\n * or wholly unavailable chart sources. Partially available data is returned with its quality indicator.\n */\n async getPositionChart(\n params: GetMobilePositionChartParams,\n ): Promise<MobileSocialFeedPositionChart> {\n const body: MobileServerPublicQueryRequest<'position_chart'> = {\n type: 'position_chart',\n position_id: params.positionId,\n session_id: params.sessionId,\n interval: params.interval,\n range: { from_ms: params.range.fromMs, to_ms: params.range.toMs },\n before_ms: params.beforeMs,\n limit: params.limit,\n ...mapMobileSocialFeedReadParamsToServer(params),\n };\n return mapMobileSocialFeedPositionChart(await this.publicQuery(body));\n }\n\n /**\n * Reads active visitor counts and self-reported account previews without registering presence.\n * @param params - Position and optional viewing account, used only for preview relationship information.\n * @returns The visitor count, public account previews, and observation time; previews need not match the count.\n * @throws {MobileServerFailureError} On invalid parameters, an unavailable position, or unavailable source data.\n */\n async getPositionWatchers(\n params: GetMobilePositionWatchersParams,\n ): Promise<MobileSocialFeedWatchers> {\n const body: MobileServerPublicQueryRequest<'position_watchers'> = {\n type: 'position_watchers',\n position_id: params.positionId,\n view_as:\n params.viewAs === undefined\n ? undefined\n : subaccountToHex(params.viewAs),\n };\n return mapMobileSocialFeedWatchers(await this.publicQuery(body));\n }\n\n /**\n * Reads the token's latest registration generation and saved capabilities, including legacy v1 registrations.\n * @param params - Active Expo token credential; no wallet signature is needed.\n * @returns Saved generation as an opaque string and the complete capability declaration.\n * @throws {MobileServerFailureError} If the token is invalid or inactive (`INVALID_EXPO_TOKEN`).\n */\n async getNotificationRegistrationV2(\n params: GetMobileNotificationRegistrationV2Params,\n ): Promise<MobileNotificationRegistrationV2> {\n return mapMobileNotificationRegistrationV2(\n await this.publicQuery({\n type: 'notification_registration_v2',\n expo_token: params.expoToken,\n }),\n );\n }\n\n /**\n * Reads the wallet's full v2 settings document, including legacy preference mappings.\n * @param params - Active Expo token credential. Before displaying settings, compare the wallet returned by\n * {@link MobileClient.getRegisteredWallet} with the connected wallet (case-insensitively).\n * @returns CamelCase settings with the current settings revision.\n * @throws {MobileServerFailureError} If the token is invalid or inactive (`INVALID_EXPO_TOKEN`).\n */\n async getNotificationSettingsV2(\n params: GetMobileNotificationSettingsV2Params,\n ): Promise<MobileNotificationSettingsV2> {\n return mapMobileNotificationSettingsV2(\n await this.publicQuery({\n type: 'notification_settings_v2',\n expo_token: params.expoToken,\n }),\n );\n }\n\n /*\n Signed queries\n */\n\n /**\n * Reads wallet market subscriptions and the signing Identity's enabled trader bells.\n * @param params - Wallet authentication context; no Expo token is needed.\n * @returns Subscriptions, import state, and the independent subscription revision.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} If authentication or the query fails.\n */\n async getNotificationSubscriptions(\n params: GetMobileNotificationSubscriptionsParams,\n ): Promise<MobileNotificationSubscriptions> {\n const request = await this.getSignedRequest(\n 'notification_subscriptions',\n params,\n {},\n );\n return mapMobileNotificationSubscriptions(await this.query(request));\n }\n\n /**\n * Reads private accepted notification intents, not delivery receipts or read states.\n * @param params - Wallet authentication and optional cursor/page size (1-50, default 20).\n * @returns A camelCase page; discard cached pages and cursors when switching wallets.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} If authentication or pagination validation fails.\n * @throws {MobileUnsupportedNotificationRouteError} If a notification has an unsupported route name.\n */\n async getNotificationInboxV2(\n params: GetMobileNotificationInboxV2Params,\n ): Promise<MobileNotificationInboxV2> {\n const request = await this.getSignedRequest(\n 'notification_inbox_v2',\n params,\n {\n cursor: params.cursor ?? null,\n limit: params.limit ?? null,\n },\n );\n return mapMobileNotificationInboxV2(await this.query(request));\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 * @deprecated Use {@link updateNotificationSettingsV2} instead.\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 * Replaces all v2 settings fields using optimistic concurrency; legacy overlapping preferences are synced.\n * @param params - Active Expo token, latest settings revision, and complete replacement settings.\n * @returns The saved settings document with its incremented revision.\n * @throws {MobileServerFailureError} On invalid token/settings or revision conflict (`NOTIFICATION_REVISION_CONFLICT`). Re-read and\n * merge only the user's current change before retrying; never blindly replay a stale document.\n */\n async updateNotificationSettingsV2(\n params: MobileUpdateNotificationSettingsV2Params,\n ): Promise<MobileNotificationSettingsV2> {\n return mapMobileNotificationSettingsV2(\n await this.publicExecute({\n type: 'update_notification_settings_v2',\n expo_token: params.expoToken,\n expected_revision: params.expectedRevision,\n settings: mapMobileNotificationSettingsToServer(params.settings),\n }),\n );\n }\n\n /**\n * Reports views for posts, trade cards, comments, and replies without signing or a reading session.\n * Duplicate IDs count once within a request; another request increments them again. Only supplied IDs\n * count, not their parents. Missing, deleted, unpublished, excluded, or unsupported targets are skipped.\n * A successful response does not identify skipped items. Read interaction.viewCount for current counts.\n * This operation is not idempotent: retrying an uncertain result may count twice. No automatic retry is made.\n * @param params - itemIds: 1–50 canonical lowercase item UUIDs, including any same-request duplicates.\n * @returns Only the success status, even when every target was skipped.\n * @throws {MobileServerFailureError} On invalid parameters, disabled writes, rate limiting, or unavailable data.\n */\n async recordFeedViews(\n params: MobileRecordFeedViewsParams,\n ): Promise<MobileServerSuccessResponse> {\n const body: MobileServerPublicExecuteRequest<'record_feed_views'> = {\n type: 'record_feed_views',\n item_ids: params.itemIds,\n };\n return this.publicExecute(body);\n }\n\n /**\n * Registers, renews, or leaves a page lease without signing or authenticating the displayed account.\n * Omitting watcherSubaccount preserves its value; null clears it. This operation does not record item views.\n * @param params - Authorized position, original session and viewer token, page-scoped viewSessionId,\n * lease state, and optional self-reported display account. Retain viewSessionId for the lifetime of the page.\n * @returns Visitor count, public previews, recommended heartbeat interval, and remaining lease lifetime.\n * @throws {MobileServerFailureError} On invalid parameters, session mismatch or expiry, or an inaccessible\n * position. Rejected requests leave leases unchanged; acquire a new reading session after expiry.\n */\n async setPositionPresence(\n params: MobilePositionPresenceParams,\n ): Promise<MobileSocialFeedPresence> {\n const body: MobileServerPublicExecuteRequest<'position_presence'> = {\n type: 'position_presence',\n position_id: params.positionId,\n session_id: params.sessionId,\n view_session_id: params.viewSessionId,\n state: params.state,\n viewer_token: params.viewerToken,\n ...(params.watcherSubaccount === undefined\n ? {}\n : {\n watcher_subaccount:\n params.watcherSubaccount === null\n ? null\n : subaccountToHex(params.watcherSubaccount),\n }),\n };\n return mapMobileSocialFeedPresence(await this.publicExecute(body));\n }\n\n /*\n Signed executes\n */\n\n /**\n * Updates the biography, or clears it when the text is whitespace-only.\n *\n * Serialize this with {@link MobileClient.setAvatar}, {@link MobileClient.setUsername} and\n * {@link MobileClient.setPrivateMode} for the same subaccount: all share the identity update nonce.\n *\n * @throws {MobileServerFailureError} With `INVALID_BIO` for exceeding `MOBILE_BIO_MAX_LENGTH` or null\n * characters, `INVALID_IDENTITY_TARGET` for an isolated subaccount, or `STALE_IDENTITY_UPDATE` when a\n * later write has committed (re-read the profile before retrying).\n */\n async setBio(\n params: MobileSetBioParams,\n ): Promise<MobileServerSuccessResponse> {\n const signedRequest = await this.getSignedRequest('set_bio', params, {\n bio: params.bio,\n });\n return this.execute(signedRequest);\n }\n\n /**\n * Creates a short-lived upload grant. The caller uploads an image meeting {@link MobileAvatarUpload}'s requirements;\n * file access and transport remain platform-specific. This does not change the saved avatar.\n *\n * @throws {MobileServerFailureError} With `INVALID_AVATAR` for a zero or oversized upload,\n * `INVALID_IDENTITY_TARGET` for an isolated subaccount, or `SERVICE_UNAVAILABLE` when storage is unavailable.\n */\n async createAvatarUpload(\n params: MobileCreateAvatarUploadParams,\n ): Promise<MobileAvatarUpload> {\n const signedRequest = await this.getSignedRequest(\n 'create_avatar_upload',\n params,\n { content_length: params.contentLength },\n );\n const data = await this.execute(signedRequest);\n return mapMobileAvatarUpload(data);\n }\n\n /**\n * Publishes a preset/staged upload, or clears the saved avatar when avatar is null.\n * Uploaded JPEG/PNG images must be square, at most 4096 × 4096 pixels, and within\n * `MOBILE_AVATAR_MAX_UPLOAD_BYTES`. A successful PUT can still fail this publication check.\n *\n * Serialize identity writes for the same subaccount; see {@link MobileClient.setBio}.\n *\n * @throws {MobileServerFailureError} With `INVALID_AVATAR` for an invalid preset, staging key, or image,\n * `INVALID_IDENTITY_TARGET` for an isolated subaccount, `SERVICE_UNAVAILABLE` when storage is unavailable,\n * or `STALE_IDENTITY_UPDATE` when a later write has committed (re-read the profile before retrying).\n */\n async setAvatar(\n params: MobileSetAvatarParams,\n ): Promise<MobileServerSuccessResponse> {\n const signedRequest = await this.getSignedRequest('set_avatar', params, {\n avatar: mapMobileAvatarSelectionToServer(params.avatar),\n });\n return this.execute(signedRequest);\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 * Serialize identity writes for the same subaccount; see {@link MobileClient.setBio}.\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 * Serialize identity writes for the same subaccount; see {@link MobileClient.setBio}.\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. Each registration advances its generation and cancels old pending deliveries.\n * This legacy method replaces capabilities with v1; use registerExpoTokenV2 consistently after upgrading.\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 * @deprecated Use {@link registerExpoTokenV2} instead.\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 * Registers a device with its actual v2 capabilities; do not use repeated registration as a heartbeat.\n * @param params - Wallet authentication, Expo token, metadata, and supported notification types/routes.\n * @returns Success only; query registration separately for its new generation.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} On `INVALID_EXPO_TOKEN`, `INVALID_DEVICE_METADATA`,\n * `NOTIFICATION_DEVICE_LIMIT` when the wallet already has 32 active devices, or authentication errors.\n */\n async registerExpoTokenV2(\n params: MobileRegisterExpoTokenV2Params,\n ): Promise<MobileServerSuccessResponse> {\n const request = await this.getSignedRequest(\n 'register_expo_token_v2',\n params,\n {\n expo_token: params.expoToken,\n platform: params.platform,\n locale: params.locale ?? null,\n app_version: params.appVersion ?? null,\n capabilities: mapMobileNotificationCapabilitiesToServer(\n params.capabilities,\n ),\n },\n );\n return this.execute(request);\n }\n\n /**\n * Applies exactly one bell, market, or one-time favorites-import operation.\n * @param params - Wallet authentication and subscription update with the latest subscription revision.\n * @returns Success only; re-query subscriptions for the new revision even after a repeated ON/OFF.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} On `NOTIFICATION_REVISION_CONFLICT`, `INVALID_NOTIFICATION_REQUEST`, or\n * `INVALID_IDENTITY_TARGET`.\n */\n async updateNotificationSubscriptions(\n params: MobileUpdateNotificationSubscriptionsParams,\n ): Promise<MobileServerSuccessResponse> {\n const request = await this.getSignedRequest(\n 'update_notification_subscriptions',\n params,\n mapMobileNotificationSubscriptionsUpdateToServer(params.update),\n );\n return this.execute(request);\n }\n\n /**\n * Atomically records 1-50 analytics events after the user has consented to analytics.\n * @param params - Wallet authentication and events with stable UUIDs and actual millisecond timestamps.\n * @returns Success only; reuse event IDs on retries. Notification clicks do not mark an inbox item as read.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} If any event, timestamp, batch size, or notification ownership is invalid.\n */\n async recordProductEvents(\n params: MobileRecordProductEventsParams,\n ): Promise<MobileServerSuccessResponse> {\n const request = await this.getSignedRequest(\n 'record_product_events',\n params,\n { events: params.events.map(mapMobileProductEventToServer) },\n );\n return this.execute(request);\n }\n\n /**\n * Sets whether the signing subaccount follows a Profile. Both directions are idempotent: following again\n * keeps the original relationship creation time, so it does not move the account in recency order, and\n * unfollowing a relationship that does not exist succeeds with `isFollowing: false`. Unfollowing deletes\n * the relationship rather than deactivating it, so a later follow gets a new creation time and moves the\n * account to the front of recency order.\n *\n * Only `isFollowing: true` is checked against the canonical Query DB subaccount index, so unfollowing still\n * works while that index lags.\n *\n * @throws {MobileServerFailureError} With error code `INVALID_FOLLOW_TARGET` if the target is the sender or\n * either party is isolated, `FOLLOWER_NOT_ELIGIBLE` if the sender is not yet in the canonical Query DB\n * subaccount index, or `FOLLOWING_NOT_FOUND` if the target is not. Both index errors are transient for an\n * account that is being recorded, so they are retryable after catch-up — unlike `INVALID_FOLLOW_TARGET`.\n */\n async setFollow(\n params: MobileSetFollowParams,\n ): Promise<MobileFollowMutationResult> {\n const signedRequest = await this.getSignedRequest('set_follow', params, {\n subaccount: subaccountToHex(params.target),\n is_following: params.isFollowing,\n });\n const data = await this.execute(signedRequest);\n return mapMobileFollowMutationResult(data);\n }\n\n /**\n * Sets whether the signing subaccount follows each of up to `MOBILE_FOLLOW_BATCH_MAX_SIZE` (25) Profiles in\n * one signed request, which costs far less of the shared IP rate limit than one {@link MobileClient.setFollow}\n * per target. The server validates the whole list before writing and commits every target in one database\n * transaction, so the batch either fully applies or changes nothing. Each target has the same idempotent\n * semantics as `setFollow`, so resending a batch is safe.\n *\n * Targets are lowercased before signing but not deduplicated, and two spellings of one subaccount are a\n * duplicate. Longer lists must be split by the caller; each request commits on its own, so earlier chunks\n * stay applied when a later one fails.\n *\n * @returns One result per target, in request order, carrying each target's post-commit follower count.\n * @throws {MobileServerFailureError} With error code `INVALID_FOLLOW_BATCH` if `targets` is empty, holds\n * duplicates, or exceeds the maximum, or `INVALID_FOLLOW_TARGET` if any target is the sender or either party\n * is isolated. Either rejects the whole batch before any write, so do not retry it unchanged.\n */\n async setFollowBatch(\n params: MobileSetFollowBatchParams,\n ): Promise<MobileFollowBatchResultItem[]> {\n const signedRequest = await this.getSignedRequest(\n 'set_follow_batch',\n params,\n {\n subaccounts: params.targets.map(subaccountToHex),\n is_following: params.isFollowing,\n },\n );\n const data = await this.execute(signedRequest);\n return mapMobileFollowBatchResult(data);\n }\n\n /**\n * Publishes text, a drawing, or both atomically using the signed author identity.\n * For an idempotent retry, reuse clientRequestId and the exact original content with a valid signature.\n * The SDK does not trim text or reformat the signed drawing JSON.\n * @param params - Author subaccount and signing options, request UUID, owned position, original text and\n * mentions, plus an optional trusted action and original drawing JSON.\n * @returns The published item, including authoritative interaction state and any drawing or comment preview.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} On authentication, ownership, eligibility, content, mention, or drawing\n * errors, or `SOCIAL_FEED_REQUEST_CONFLICT` when a request UUID is reused with different content. Do not\n * change an earlier request to retry it; use a new UUID for a genuinely new publication.\n * @throws {MobileUnsupportedFeedItemError} If the service returns an unsupported item kind.\n */\n async createFeedPost(\n params: MobileCreateFeedPostParams,\n ): Promise<MobileSocialFeedItem> {\n const request = await this.getSignedRequest('create_feed_post', params, {\n client_request_id: params.clientRequestId,\n position_id: params.positionId,\n action_id: params.actionId,\n text: params.text,\n mentions: params.mentions.map(mapMobileSocialFeedMentionToServer),\n drawing_data_json: params.drawingDataJson,\n image_ids: params.imageIds,\n image_urls: params.imageUrls,\n });\n return mapMobileSocialFeedItem((await this.execute(request)).item);\n }\n\n /**\n * Uploads one static JPEG/PNG for a later {@link createFeedPost} via multipart execute.\n * The whole HTTP request must stay within 2 MiB including signature overhead; upload one file per call\n * and bind up to nine ready IDs at publication. There is no complete/PUT step — success means ready.\n * @param params - Author subaccount and signing options, plus the original file bytes.\n * @returns Ready image metadata, including original and thumbnail paths.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {RangeError} If the complete multipart request exceeds {@link MOBILE_FEED_IMAGE_MAX_REQUEST_BYTES}.\n * @throws {MobileServerFailureError} On authentication, format/size/hash errors (`INVALID_SOCIAL_FEED_IMAGE`),\n * or when publishing is disabled (`SERVICE_UNAVAILABLE`), or image storage is unavailable\n * (`SOCIAL_FEED_DATA_UNAVAILABLE`, 6320, HTTP 503).\n */\n async createFeedPostImageUpload(\n params: MobileCreateFeedImageUploadParams,\n ): Promise<MobileSocialFeedUploadedImage> {\n return this.createFeedImageUpload('create_feed_post_image_uploads', params);\n }\n\n /**\n * Uploads one static JPEG/PNG for a later {@link createFeedComment} via multipart execute.\n * Same size and readiness rules as {@link createFeedPostImageUpload}; comment text remains required.\n * @param params - Author subaccount and signing options, plus the original file bytes.\n * @returns Ready image metadata, including original and thumbnail paths.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {RangeError} If the complete multipart request exceeds {@link MOBILE_FEED_IMAGE_MAX_REQUEST_BYTES}.\n * @throws {MobileServerFailureError} On authentication, format/size/hash errors (`INVALID_SOCIAL_FEED_IMAGE`),\n * or when comments are disabled (`SERVICE_UNAVAILABLE`), or image storage is unavailable\n * (`SOCIAL_FEED_DATA_UNAVAILABLE`, 6320, HTTP 503).\n */\n async createFeedCommentImageUpload(\n params: MobileCreateFeedImageUploadParams,\n ): Promise<MobileSocialFeedUploadedImage> {\n return this.createFeedImageUpload(\n 'create_feed_comment_image_uploads',\n params,\n );\n }\n\n /**\n * First attaches a drawing to an owned post or trade card while the author still holds its position.\n * The original JSON is signed unchanged; false and zero are valid drawing documents.\n * For an exact retry after a timeout, generate a nonce up front with {@link getMobileNonce} and reuse\n * that nonce and the original JSON before its receive deadline. A fresh nonce is not an exact replay.\n * If a retry returns `SOCIAL_FEED_DRAWING_EXISTS`, use {@link getFeedChartDrawing} to confirm that the\n * stored data matches the intended drawing before treating the original create as successful.\n * @param params - Author subaccount and signing options, parent item, and complete original drawing JSON.\n * @returns The parent ID and updated version together with the stored drawing.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} On authentication, ownership, eligibility, or invalid/oversized drawing\n * errors, an unavailable parent, or `SOCIAL_FEED_DRAWING_EXISTS` for a conflicting existing drawing.\n * Read the existing drawing and use updateFeedChartDrawing when replacement is intended.\n */\n async createFeedChartDrawing(\n params: MobileFeedChartDrawingParams,\n ): Promise<MobileSocialFeedDrawingMutationResult> {\n const request = await this.getSignedRequest(\n 'create_feed_chart_drawing',\n params,\n { item_id: params.itemId, data_json: params.dataJson },\n );\n return mapMobileSocialFeedDrawingMutationResult(\n await this.execute(request),\n );\n }\n\n /**\n * Replaces an existing drawing, including after the associated position has closed.\n * Serialize writes per item and preserve the original JSON text when retrying.\n * @param params - Author subaccount and signing options, parent item, and complete replacement JSON.\n * @returns The parent ID and updated version together with the stored replacement drawing.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} On authentication, ownership, or invalid/oversized drawing errors, an\n * unavailable parent or drawing, or `STALE_SOCIAL_FEED_DRAWING_UPDATE`. Re-read the drawing before retrying\n * a stale or conflicting update instead of blindly replacing newer content.\n */\n async updateFeedChartDrawing(\n params: MobileFeedChartDrawingParams,\n ): Promise<MobileSocialFeedDrawingMutationResult> {\n const request = await this.getSignedRequest(\n 'update_feed_chart_drawing',\n params,\n { item_id: params.itemId, data_json: params.dataJson },\n );\n return mapMobileSocialFeedDrawingMutationResult(\n await this.execute(request),\n );\n }\n\n /**\n * Publishes a comment or reply atomically; an invalid position attachment rejects the entire request.\n * For an idempotent retry, reuse clientRequestId and the unmodified text, mentions, and attachment.\n * @param params - Author subaccount and signing options, request UUID, root item, original nonblank text\n * and mentions, plus an optional reply target in the same thread and currently owned position attachment.\n * @returns The created reply and authoritative root comment count; this write does not create a reading session.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} On authentication, inaccessible content, invalid text/mentions/reply\n * relationships, an ineligible attachment, or `SOCIAL_FEED_REQUEST_CONFLICT`. Correct invalid input before\n * a new submission, and never reuse an existing request UUID with different content.\n */\n async createFeedComment(\n params: MobileCreateFeedCommentParams,\n ): Promise<MobileSocialFeedCommentResult> {\n const request = await this.getSignedRequest('create_feed_comment', params, {\n client_request_id: params.clientRequestId,\n root_item_id: params.rootItemId,\n reply_to_item_id: params.replyToItemId,\n text: params.text,\n mentions: params.mentions.map(mapMobileSocialFeedMentionToServer),\n attached_position_id: params.attachedPositionId,\n image_ids: params.imageIds,\n image_urls: params.imageUrls,\n });\n return mapMobileSocialFeedCommentResult(await this.execute(request));\n }\n\n /**\n * Sets or clears a signed user's like without requiring an open position.\n * Serialize mutations per item and author. Retrying the same isLiked state with a fresh nonce is safe\n * when no newer change intervenes; an unchanged state does not increment the count or version again.\n * Pass the original nonce on a retry before its deadline to avoid overwriting a newer change from\n * another device. Re-read the current state if that retry conflicts.\n * @param params - Acting subaccount and signing options, interactive item, and desired like state.\n * @returns The applied like state, authoritative count, and item version after the mutation.\n * @throws {WalletNotProvidedError} If neither a linked signer nor a default wallet is configured.\n * @throws {MobileServerFailureError} On authentication errors, inaccessible or non-interactive content,\n * or `STALE_SOCIAL_FEED_LIKE_UPDATE`. Re-read the current state before submitting a new mutation after a conflict.\n */\n async setFeedLike(\n params: MobileSetFeedLikeParams,\n ): Promise<MobileSocialFeedLikeResult> {\n const request = await this.getSignedRequest('set_feed_like', params, {\n item_id: params.itemId,\n is_liked: params.isLiked,\n });\n return mapMobileSocialFeedLikeResult(await this.execute(request));\n }\n\n /*\n Base Fns\n */\n\n // Returns the request narrowed to `type` so `execute` can infer its response from the request it is given,\n // instead of being told the type a second time at the call site.\n protected async getSignedRequest<T extends MobileSignedInner['type']>(\n type: T,\n params: MobileSignedRequestParams,\n innerParams: MobileSignedInnerParams<T>,\n ): Promise<MobileSignedRequest<MobileSignedInnerByType<T>>> {\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 = {\n type,\n ...innerParams,\n } as unknown as MobileSignedInnerByType<T>;\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}/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 publicGetBytes(\n url: string,\n headers: Record<string, string>,\n ): Promise<Uint8Array> {\n const response = await this.axiosInstance.get<ArrayBuffer>(url, {\n responseType: 'arraybuffer',\n headers,\n });\n if (response.status < 200 || response.status >= 300) {\n const responseText = bytesToString(new Uint8Array(response.data));\n let errorData: unknown;\n try {\n errorData = JSON.parse(responseText);\n } catch {\n errorData = responseText;\n }\n this.checkResponseStatus({ ...response, data: errorData });\n }\n return new Uint8Array(response.data);\n }\n\n protected async publicExecute<T extends MobileServerPublicExecuteRequestType>(\n body: { type: T } & MobileServerPublicExecuteRequestByType[T],\n ): Promise<MobileServerPublicExecuteSuccessResponse<T>> {\n const response = await this.axiosInstance.post<MobileServerExecuteResult>(\n `${this.opts.url}/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 MobileServerPublicExecuteSuccessResponse<T>;\n }\n\n /**\n * Sends an authenticated read through the signed query route.\n * @param body - Canonical inner payload with its signature, sender, and nonce.\n * @returns The successful query envelope and its type-specific payload.\n * @throws {MobileServerFailureError} For a structured service failure, including non-2xx responses.\n */\n protected async query<T extends MobileServerSignedQueryRequestType>(\n body: MobileSignedRequest & { type: T },\n ): Promise<MobileServerSignedQuerySuccessResponse<T>> {\n const response = await this.axiosInstance.post<unknown>(\n `${this.opts.url}/query`,\n body,\n );\n this.checkResponseStatus(response);\n this.checkServerStatus(response);\n return response.data as MobileServerSignedQuerySuccessResponse<T>;\n }\n\n // `T` is inferred from the body's `type` rather than declared by the caller, for the same reason\n // `publicQuery` spells its body out as an intersection: an indexed access is not an inference site.\n protected async execute<T extends MobileServerExecuteRequestType>(\n body: MobileSignedRequest & { type: T },\n fileBytes?: Uint8Array,\n ): Promise<MobileServerExecuteSuccessResponse<T>> {\n const multipart =\n fileBytes == null\n ? undefined\n : buildMobileFeedImageMultipart(JSON.stringify(body), fileBytes);\n if (multipart) {\n this.checkFeedImageRequestSize(multipart.body.byteLength);\n }\n const response = await this.axiosInstance.post<MobileServerExecuteResult>(\n `${this.opts.url}/execute`,\n multipart?.body ?? body,\n multipart\n ? { headers: { 'Content-Type': multipart.contentType } }\n : undefined,\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 MobileServerExecuteSuccessResponse<T>;\n }\n\n private async createFeedImageUpload(\n type:\n | 'create_feed_post_image_uploads'\n | 'create_feed_comment_image_uploads',\n params: MobileCreateFeedImageUploadParams,\n ): Promise<MobileSocialFeedUploadedImage> {\n const nonce = params.nonce ?? getMobileNonce();\n // Match the signed body's field lengths so oversized requests fail before prompting the wallet.\n const sizePayload = {\n type,\n content_hash: zeroHash,\n signature: `0x${'00'.repeat(65)}`,\n sender: subaccountToHex(params),\n nonce: nonce.toString(),\n };\n const overhead = buildMobileFeedImageMultipart(\n JSON.stringify(sizePayload),\n new Uint8Array(),\n ).body.byteLength;\n this.checkFeedImageRequestSize(overhead + params.fileBytes.byteLength);\n const contentHash = keccak256(params.fileBytes);\n const request = await this.getSignedRequest(\n type,\n { ...params, nonce },\n {\n content_hash: contentHash,\n },\n );\n const data = await this.execute(request, params.fileBytes);\n return mapMobileSocialFeedUploadedImage(data.image);\n }\n\n private checkFeedImageRequestSize(byteLength: number): void {\n if (byteLength > MOBILE_FEED_IMAGE_MAX_REQUEST_BYTES) {\n throw new RangeError(\n `Feed image upload request exceeds ${MOBILE_FEED_IMAGE_MAX_REQUEST_BYTES} bytes (2 MiB).`,\n );\n }\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.stringify(data)}`,\n );\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmNA,IAAa,eAAb,MAA0B;CAIxB,YAAY,MAAwB;EAClC,KAAK,OAAO;EACZ,KAAK,gBAAgB,MAAM,OAAO;GAChC,iBAAiB;GAEjB,sBAAsB;GACtB,SAAS,yBAAyB,KAAK,UAAU;EACnD,CAAC;CACH;;;;;;CAOA,gBACE,0BACA;EACA,KAAK,KAAK,2BAA2B,4BAA4B,KAAA;CACnE;;;;;;CAWA,MAAM,mBAAkD;EAKtD,QAAO,MADY,KAAK,YAAY,EAFlC,MAAM,iBAE+B,CAAC,GAC5B,QAAQ,IAAI,qBAAqB;CAC/C;;;;CAKA,MAAM,wBACJ,QACqC;EACrC,MAAM,OAAgE;GACpE,MAAM;GAC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,WAAW,KAAK,KAAK,OAAO,EAAE;GAC9B,QAAQ,gBAAgB,MAAM;GAC9B,OAAO,MAAM,SAAS;EACxB;EACA,MAAM,WAAW,8BACf,KAAK,UAAU,WAAW,GAC1B,IAAI,WAAW,CACjB,EAAE,KAAK;EACP,KAAK,0BAA0B,WAAW,OAAO,UAAU,UAAU;EACrE,MAAM,cAAc,UAAU,OAAO,SAAS;EAC9C,MAAM,UAAU,MAAM,KAAK,iBACzB,MACA;GAAE,GAAG;GAAQ;EAAM,GACnB,EACE,cAAc,YAChB,CACF;EAEA,OAAO,kCAAiC,MADrB,KAAK,QAAQ,SAAS,OAAO,SAAS,GACZ,KAAK;CACpD;CAEA,0BAAkC,YAA0B;EAC1D,IAAI,aAAA,SACF,MAAM,IAAI,WACR,qCAAqC,oCAAoC,gBAC3E;CAEJ;;;;;;CAOA,oBAA4B,UAAkC;EAC5D,IAAI,SAAS,UAAU,OAAO,SAAS,SAAS,KAC9C;EAEF,IAAI,8BAA8B,SAAS,IAAI,GAC7C,MAAM,IAAI,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,IAAI,8BAA8B,IAAI,GACpC,MAAM,IAAI,yBAAyB,MAAM,SAAS,MAAM;EAE1D,IAAI,CAAC,8BAA8B,IAAI,GACrC,MAAM,IAAI,MACR,4EAA4E,KAAK,UAAU,IAAI,GACjG;CAEJ;AACF"}
@@ -1,5 +1,4 @@
1
- import { c as MobileServerRequestType } from "./serverRequestTypes-DZoOhV2o.js";
2
- import { t as MobileServerFailureResponse } from "./serverBaseTypes-DnLzsdm-.js";
1
+ import { g as MobileServerRequestType, tt as MobileServerFailureResponse } from "./types-CR5iaKR4.cjs";
3
2
  import { BaseServerFailureError } from "@nadohq/shared";
4
3
 
5
4
  //#region src/types/MobileServerFailureError.d.ts
@@ -20,4 +19,4 @@ declare class MobileServerFailureError extends BaseServerFailureError {
20
19
  }
21
20
  //#endregion
22
21
  export { MobileServerFailureError as t };
23
- //# sourceMappingURL=MobileServerFailureError-BZVwlsMg.d.ts.map
22
+ //# sourceMappingURL=MobileServerFailureError-BeCCNShj.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileServerFailureError-BeCCNShj.d.cts","names":[],"sources":["../src/types/src/types/MobileServerFailureError.ts"],"mappings":";;;;;AASA;;;;cAAa,wBAAA,SAAiC,sBAAA;EAAA,SAC3B,YAAA,EAAc,2BAAA;EAAA,SACd,WAAA,EAAa,uBAAA;EAFoC;;;;EAAA,SAQzD,UAAA;cAEG,YAAA,EAAc,2BAAA,EAA6B,UAAA;AAAA"}
@@ -1,5 +1,4 @@
1
- import { c as MobileServerRequestType } from "./serverRequestTypes-CRlkNSu5.cjs";
2
- import { t as MobileServerFailureResponse } from "./serverBaseTypes-B5J1_TyC.cjs";
1
+ import { g as MobileServerRequestType, tt as MobileServerFailureResponse } from "./types-CByl_NyJ.js";
3
2
  import { BaseServerFailureError } from "@nadohq/shared";
4
3
 
5
4
  //#region src/types/MobileServerFailureError.d.ts
@@ -20,4 +19,4 @@ declare class MobileServerFailureError extends BaseServerFailureError {
20
19
  }
21
20
  //#endregion
22
21
  export { MobileServerFailureError as t };
23
- //# sourceMappingURL=MobileServerFailureError-CbtK8kD4.d.cts.map
22
+ //# sourceMappingURL=MobileServerFailureError-hHv28weI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileServerFailureError-hHv28weI.d.ts","names":[],"sources":["../src/types/src/types/MobileServerFailureError.ts"],"mappings":";;;;;AASA;;;;cAAa,wBAAA,SAAiC,sBAAA;EAAA,SAC3B,YAAA,EAAc,2BAAA;EAAA,SACd,WAAA,EAAa,uBAAA;EAFoC;;;;EAAA,SAQzD,UAAA;cAEG,YAAA,EAAc,2BAAA,EAA6B,UAAA;AAAA"}
@@ -0,0 +1,15 @@
1
+ //#region src/types/MobileUnsupportedNotificationRouteError.d.ts
2
+ /**
3
+ * Error thrown when the mobile service returns a notification route this SDK does not support.
4
+ */
5
+ declare class MobileUnsupportedNotificationRouteError extends Error {
6
+ /** Unrecognized route name returned by the service. */
7
+ readonly routeName: string;
8
+ /**
9
+ * @param routeName - The unrecognized service route name.
10
+ */
11
+ constructor(routeName: string);
12
+ }
13
+ //#endregion
14
+ export { MobileUnsupportedNotificationRouteError as t };
15
+ //# sourceMappingURL=MobileUnsupportedNotificationRouteError-DpiNBvvY.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileUnsupportedNotificationRouteError-DpiNBvvY.d.cts","names":[],"sources":["../src/types/src/types/MobileUnsupportedNotificationRouteError.ts"],"mappings":";;AAGA;;cAAa,uCAAA,SAAgD,KAAK;EAAA;EAAA,SAEvD,SAAA;EAAA;;;cAKG,SAAA;AAAA"}
@@ -0,0 +1,15 @@
1
+ //#region src/types/MobileUnsupportedNotificationRouteError.d.ts
2
+ /**
3
+ * Error thrown when the mobile service returns a notification route this SDK does not support.
4
+ */
5
+ declare class MobileUnsupportedNotificationRouteError extends Error {
6
+ /** Unrecognized route name returned by the service. */
7
+ readonly routeName: string;
8
+ /**
9
+ * @param routeName - The unrecognized service route name.
10
+ */
11
+ constructor(routeName: string);
12
+ }
13
+ //#endregion
14
+ export { MobileUnsupportedNotificationRouteError as t };
15
+ //# sourceMappingURL=MobileUnsupportedNotificationRouteError-DpiNBvvY.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileUnsupportedNotificationRouteError-DpiNBvvY.d.ts","names":[],"sources":["../src/types/src/types/MobileUnsupportedNotificationRouteError.ts"],"mappings":";;AAGA;;cAAa,uCAAA,SAAgD,KAAK;EAAA;EAAA,SAEvD,SAAA;EAAA;;;cAKG,SAAA;AAAA"}
@@ -1,4 +1,4 @@
1
- import { a as MobileSignedRequest, n as MobileSignedInner, t as BuildSignedMobileRequestParams } from "./types-BiRmH5Iv.cjs";
1
+ import { a as MobileSignedRequest, n as MobileSignedInner, t as BuildSignedMobileRequestParams } from "./types-CR5iaKR4.cjs";
2
2
 
3
3
  //#region src/signing/buildSignedMobileRequest.d.ts
4
4
  /**
@@ -11,4 +11,4 @@ declare function buildSignedMobileRequest<T extends MobileSignedInner>(params: B
11
11
  }): Promise<MobileSignedRequest<T>>;
12
12
  //#endregion
13
13
  export { buildSignedMobileRequest as t };
14
- //# sourceMappingURL=buildSignedMobileRequest-C1v0flCR.d.cts.map
14
+ //# sourceMappingURL=buildSignedMobileRequest-DcEMKU_4.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildSignedMobileRequest-C1v0flCR.d.cts","names":[],"sources":["../src/signing/src/signing/buildSignedMobileRequest.ts"],"mappings":";;;;;AAgBA;;;iBAAsB,wBAAA,WAAmC,iBAAA,CAAA,CACvD,MAAA,EAAQ,8BAAA;EAAmC,KAAA,EAAO,CAAA;AAAA,IACjD,OAAA,CAAQ,mBAAA,CAAoB,CAAA"}
1
+ {"version":3,"file":"buildSignedMobileRequest-DcEMKU_4.d.cts","names":[],"sources":["../src/signing/src/signing/buildSignedMobileRequest.ts"],"mappings":";;;;;AAgBA;;;iBAAsB,wBAAA,WAAmC,iBAAA,CAAA,CACvD,MAAA,EAAQ,8BAAA;EAAmC,KAAA,EAAO,CAAA;AAAA,IACjD,OAAA,CAAQ,mBAAA,CAAoB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { a as MobileSignedRequest, n as MobileSignedInner, t as BuildSignedMobileRequestParams } from "./types-DoJuq0Ij.js";
1
+ import { a as MobileSignedRequest, n as MobileSignedInner, t as BuildSignedMobileRequestParams } from "./types-CByl_NyJ.js";
2
2
 
3
3
  //#region src/signing/buildSignedMobileRequest.d.ts
4
4
  /**
@@ -11,4 +11,4 @@ declare function buildSignedMobileRequest<T extends MobileSignedInner>(params: B
11
11
  }): Promise<MobileSignedRequest<T>>;
12
12
  //#endregion
13
13
  export { buildSignedMobileRequest as t };
14
- //# sourceMappingURL=buildSignedMobileRequest-UeeWdYGU.d.ts.map
14
+ //# sourceMappingURL=buildSignedMobileRequest-DlTMvoXR.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildSignedMobileRequest-UeeWdYGU.d.ts","names":[],"sources":["../src/signing/src/signing/buildSignedMobileRequest.ts"],"mappings":";;;;;AAgBA;;;iBAAsB,wBAAA,WAAmC,iBAAA,CAAA,CACvD,MAAA,EAAQ,8BAAA;EAAmC,KAAA,EAAO,CAAA;AAAA,IACjD,OAAA,CAAQ,mBAAA,CAAoB,CAAA"}
1
+ {"version":3,"file":"buildSignedMobileRequest-DlTMvoXR.d.ts","names":[],"sources":["../src/signing/src/signing/buildSignedMobileRequest.ts"],"mappings":";;;;;AAgBA;;;iBAAsB,wBAAA,WAAmC,iBAAA,CAAA,CACvD,MAAA,EAAQ,8BAAA;EAAmC,KAAA,EAAO,CAAA;AAAA,IACjD,OAAA,CAAQ,mBAAA,CAAoB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { n as MobileSignedInner } from "./types-DoJuq0Ij.js";
1
+ import { n as MobileSignedInner } from "./types-CByl_NyJ.js";
2
2
 
3
3
  //#region src/signing/canonicalize.d.ts
4
4
  /**
@@ -11,4 +11,4 @@ import { n as MobileSignedInner } from "./types-DoJuq0Ij.js";
11
11
  declare function canonicalizeMobileInner(inner: MobileSignedInner): MobileSignedInner;
12
12
  //#endregion
13
13
  export { canonicalizeMobileInner as t };
14
- //# sourceMappingURL=canonicalize-5eeZrkzQ.d.ts.map
14
+ //# sourceMappingURL=canonicalize-BOZlflI3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonicalize-BOZlflI3.d.ts","names":[],"sources":["../src/signing/src/signing/canonicalize.ts"],"mappings":";;;;;AAUA;;;;;iBAAgB,uBAAA,CACd,KAAA,EAAO,iBAAA,GACN,iBAAiB"}
@@ -1,4 +1,4 @@
1
- import { n as MobileSignedInner } from "./types-BiRmH5Iv.cjs";
1
+ import { n as MobileSignedInner } from "./types-CR5iaKR4.cjs";
2
2
 
3
3
  //#region src/signing/canonicalize.d.ts
4
4
  /**
@@ -11,4 +11,4 @@ import { n as MobileSignedInner } from "./types-BiRmH5Iv.cjs";
11
11
  declare function canonicalizeMobileInner(inner: MobileSignedInner): MobileSignedInner;
12
12
  //#endregion
13
13
  export { canonicalizeMobileInner as t };
14
- //# sourceMappingURL=canonicalize-CBaZprTo.d.cts.map
14
+ //# sourceMappingURL=canonicalize-BvCozzvJ.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonicalize-BvCozzvJ.d.cts","names":[],"sources":["../src/signing/src/signing/canonicalize.ts"],"mappings":";;;;;AAUA;;;;;iBAAgB,uBAAA,CACd,KAAA,EAAO,iBAAA,GACN,iBAAiB"}