@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,270 +0,0 @@
1
- import { E as MobileServerSocialFeedChartRange, Pt as MobileSocialFeedType, Tt as MobileSocialFeedPresenceState, dt as MobileSocialFeedChartInterval, gt as MobileSocialFeedMarketCategory, y as MobileServerNotificationPreferences } from "./serverModelTypes-CiA-dy1R.js";
2
- import { n as MobileSignedInner } from "./types-DoJuq0Ij.js";
3
- import { Hex } from "viem";
4
-
5
- //#region src/types/serverRequestTypes.d.ts
6
- /**
7
- * Opt-in extras for a `profiles` query. Each one costs extra rate-limit weight per profile and adds fields
8
- * that are otherwise absent from the response, so the backend gates them behind an explicit request rather
9
- * than always resolving the follow graph on a public route.
10
- */
11
- interface MobileServerProfilesInclude {
12
- /** Adds `follower_count` and `following_count` to every entry. Omitted or `false` leaves both absent. */
13
- follow_counts?: boolean;
14
- /**
15
- * Adds `follow_summary` to every entry, relative to the `view_as` subaccount. As on every public route,
16
- * `view_as` is an unauthenticated claim.
17
- */
18
- follow_summary?: {
19
- view_as: Hex;
20
- };
21
- }
22
- /**
23
- * Params shared by the `followers` and `following` public queries: only the relationship that selects the
24
- * rows differs between the two.
25
- */
26
- interface MobileServerFollowListRequest {
27
- /** The viewed Profile, i.e. the account whose Followers or Following are being listed. */
28
- subaccount: Hex;
29
- /**
30
- * Viewer perspective the rows are resolved against. Omitted asks for no perspective, which drops
31
- * `is_following` from every row and falls back to plain recency order. Like the `profiles` query's
32
- * `view_as`, this is an unauthenticated claim on an unsigned route.
33
- */
34
- view_as?: Hex;
35
- /** Opaque keyset cursor from a prior page's `next_cursor`. Omitted requests the first page. */
36
- cursor?: string;
37
- /** Page size, 1–50; the backend defaults to 25 when omitted. */
38
- limit?: number;
39
- }
40
- /**
41
- * Params of the `search_profiles` public query.
42
- */
43
- interface MobileServerSearchProfilesRequest {
44
- /**
45
- * Username prefix, 1-20 ASCII bytes: a letter or digit first, then letters, digits, `_` or `.`. The
46
- * backend lowercases letters and trims nothing.
47
- */
48
- query: string;
49
- /** Same opt-in extras as the `profiles` query, applied to every match on the page. */
50
- include?: MobileServerProfilesInclude;
51
- /** Opaque keyset cursor from a prior page's `next_cursor`. Omitted requests the first page. */
52
- cursor?: string;
53
- /** Page size, 1-50, or 1-25 when `include` asks for follow data; the backend defaults to 25 when omitted. */
54
- limit?: number;
55
- }
56
- /** Common filters and pagination for social feed lists. */
57
- interface MobileServerSocialFeedListParams {
58
- /** OR-ed content filters; combined with other filters using AND. */
59
- feed_types?: MobileSocialFeedType[];
60
- /** Strict lower bound in whole dollars, 1 through Number.MAX_SAFE_INTEGER. */
61
- minimum_notional?: number;
62
- /** Page size, 1–50; defaults to 20. */
63
- limit?: number;
64
- /** Fixed 15-minute reading session; required with cursor. */
65
- session_id?: string;
66
- /** Opaque pagination cursor, distinct from update_cursor and watermark. */
67
- cursor?: string;
68
- }
69
- /** List fields for main feeds and author feeds. */
70
- interface MobileServerSocialFeedCategorizedParams extends MobileServerSocialFeedListParams {
71
- /** Omit to read all market categories. */
72
- market_category?: MobileSocialFeedMarketCategory;
73
- }
74
- /** Unsigned browsing context; the viewing account is not proof of wallet ownership. */
75
- interface MobileServerSocialFeedReadParams {
76
- /**
77
- * Complete non-isolated viewing account. Profile, position, and item reads include this account's
78
- * own hidden content under account_view, in addition to resolving relationship state.
79
- */
80
- view_as?: Hex;
81
- /** Original browsing credential when reusing a session. */
82
- viewer_token?: string;
83
- }
84
- /**
85
- * Params for each unsigned `public_query`, keyed by request `type`.
86
- */
87
- interface MobileServerPublicQueryRequestByType {
88
- /** Selected account's open position candidates. */
89
- self_feed_positions: {
90
- /** Full identity. */view_as: Hex; /** Market filter. */
91
- product_id?: number; /** Bound pagination cursor. */
92
- cursor?: string; /** Page size, 1-50. */
93
- limit?: number;
94
- };
95
- /** Resolve a position command without signing. */
96
- resolve_feed_position: {
97
- /** Full identity. */view_as: Hex; /** Unmodified command text. */
98
- input: string; /** Optional market disambiguation. */
99
- product_id?: number;
100
- };
101
- /** Resolve an order's complete trusted lifecycle segments. */
102
- resolve_feed_action: {
103
- /** Order-owning identity. */view_as: Hex; /** Trading order digest. */
104
- order_digest: Hex;
105
- };
106
- /** Read a drawing within the parent item's visibility. */
107
- feed_chart_drawing: MobileServerSocialFeedReadParams & {
108
- /** Parent UUID. */item_id: string; /** Original session, paired with viewer_token. */
109
- session_id?: string;
110
- };
111
- /** Read or navigate a comment thread. */
112
- feed_comments: MobileServerSocialFeedReadParams & {
113
- /** Root UUID. */root_item_id: string; /** Thread cursor. */
114
- cursor?: string; /** Page size, 1-50. */
115
- limit?: number; /** First-page anchor, mutually exclusive with cursor. */
116
- anchor_reply_id?: string; /** Original reading session. */
117
- session_id?: string;
118
- };
119
- /** Full lifecycle history rather than published feed items alone. */
120
- position_history: MobileServerSocialFeedReadParams & {
121
- /** Lifecycle UUID. */position_id: string; /** Filter to published takes. */
122
- takes_only?: boolean; /** History cursor. */
123
- cursor?: string; /** Page size, 1-50. */
124
- limit?: number; /** Original position-mode session. */
125
- session_id?: string;
126
- };
127
- /** Market candles and independently priced action markers. */
128
- position_chart: MobileServerSocialFeedReadParams & {
129
- /** Lifecycle UUID. */position_id: string; /** Original session, paired with viewer_token. */
130
- session_id?: string; /** Candle interval. */
131
- interval: MobileSocialFeedChartInterval; /** Half-open time interval. */
132
- range: MobileServerSocialFeedChartRange; /** Exclusive next-page bound. */
133
- before_ms?: number; /** Page size, 1-500. */
134
- limit?: number;
135
- };
136
- /** Watcher query; does not register presence. */
137
- position_watchers: {
138
- /** Lifecycle UUID. */position_id: string; /** Relationship perspective only. */
139
- view_as?: Hex;
140
- };
141
- /** Ordered server-owned avatar catalogue. */
142
- avatar_presets: Record<never, never>;
143
- /** Public recommendations with optional relationship perspective. */
144
- for_you_feed: MobileServerSocialFeedCategorizedParams & MobileServerSocialFeedReadParams;
145
- /** Public content from qualified authors. */
146
- top_traders_feed: MobileServerSocialFeedCategorizedParams & MobileServerSocialFeedReadParams;
147
- /** Public content from authors followed by view_as. */
148
- friends_feed: MobileServerSocialFeedCategorizedParams & MobileServerSocialFeedReadParams & {
149
- /** Complete non-isolated identity subaccount; required on every request. */view_as: Hex;
150
- };
151
- /** Author content visible to view_as; the target is separate from the viewing account. */
152
- profile_feed: MobileServerSocialFeedCategorizedParams & MobileServerSocialFeedReadParams & {
153
- /** Target author identity, independent of view_as. */subaccount: Hex;
154
- };
155
- /** Public market content. */
156
- market_feed: MobileServerSocialFeedListParams & MobileServerSocialFeedReadParams & {
157
- /** Target product. */product_id: number;
158
- };
159
- /** Published activity in one lifecycle, including hidden content owned by view_as. */
160
- position_feed: MobileServerSocialFeedListParams & MobileServerSocialFeedReadParams & {
161
- /** Target position UUID. */position_id: string;
162
- };
163
- /** Item details visible to view_as, optionally reusing a reading session. */
164
- feed_item: MobileServerSocialFeedReadParams & {
165
- /** Target item UUID. */item_id: string; /** Preview size, 0-3. */
166
- comment_preview_limit?: number; /** Omit to create a new reading session. */
167
- session_id?: string;
168
- };
169
- /** Updates inherit the original public session's viewing account. */
170
- feed_updates: {
171
- /** Original reading session. */session_id: string; /** Previously delivered item UUIDs. */
172
- visible_item_ids: string[]; /** Authorized position UUIDs. */
173
- visible_position_ids: string[]; /** Baseline from the last accepted update. */
174
- update_cursor?: string | null; /** Current viewport version. */
175
- viewport_revision: number; /** Request sequence increasing across the entire session, including viewport changes. */
176
- request_seq: number; /** Original public browsing credential. */
177
- viewer_token: string; /** The viewing account cannot be changed by an update. */
178
- view_as?: never;
179
- };
180
- username_availability: {
181
- display_name: string;
182
- };
183
- profiles: {
184
- /**
185
- * 1–`MOBILE_PROFILES_MAX_BATCH_SIZE` (25) distinct subaccounts. Results come back in this exact order,
186
- * one entry per request slot.
187
- */
188
- subaccounts: Hex[];
189
- include?: MobileServerProfilesInclude;
190
- };
191
- search_profiles: MobileServerSearchProfilesRequest;
192
- followers: MobileServerFollowListRequest;
193
- following: MobileServerFollowListRequest;
194
- feed: {
195
- /**
196
- * Minimum notional as a whole-dollar JSON integer (NOT an x18 string), at least $1,000. Omitted or
197
- * `null` means unfiltered.
198
- */
199
- minimum_notional?: number; /** Page size, 1–50; the backend defaults to `MOBILE_FEED_MAX_PAGE_SIZE` (50) when omitted. */
200
- limit?: number;
201
- /**
202
- * Opaque keyset cursor from a prior page's `next_cursor`. Bound to the exact `minimum_notional` it was
203
- * issued for (including the unfiltered state) — reusing it with a different filter fails.
204
- */
205
- cursor?: string;
206
- };
207
- notification_preferences: {
208
- expo_token: string;
209
- };
210
- registered_wallet: {
211
- expo_token: string;
212
- };
213
- }
214
- /**
215
- * Discriminant `type` values for unsigned `public_query` requests.
216
- */
217
- type MobileServerPublicQueryRequestType = keyof MobileServerPublicQueryRequestByType;
218
- /**
219
- * Params for each unsigned `public_execute`, keyed by request `type`. No signature, sender, or nonce is sent.
220
- * `record_feed_views` and `position_presence` are authorized by the original reading session (`session_id`)
221
- * and browser credential (`viewer_token`), not an Expo push token.
222
- * For `unregister_expo_token` and `update_preferences`, possession of an active Expo push token authorizes
223
- * the notification mutation: the backend resolves the token's owning wallet and mutates its state. These
224
- * notification writes use the backend's last-write-wins commit order, so callers must serialize them.
225
- */
226
- interface MobileServerPublicExecuteRequestByType {
227
- /** Explicit exposure report using the original browsing credential. */
228
- record_feed_views: {
229
- /** Original reading session. */session_id: string; /** Fully delivered interactive items. */
230
- item_ids: string[]; /** Original credential. */
231
- viewer_token: string;
232
- };
233
- /** Per-page visitor lease; no wallet signature. */
234
- position_presence: {
235
- /** Lifecycle UUID. */position_id: string; /** Original reading session. */
236
- session_id: string; /** Page-scoped UUID. */
237
- view_session_id: string; /** Lease lifecycle state. */
238
- state: MobileSocialFeedPresenceState; /** Original browsing credential. */
239
- viewer_token: string; /** Omission preserves the display account; null clears it. */
240
- watcher_subaccount?: Hex | null;
241
- };
242
- unregister_expo_token: {
243
- expo_token: string;
244
- };
245
- update_preferences: {
246
- expo_token: string;
247
- preferences: MobileServerNotificationPreferences;
248
- };
249
- }
250
- /**
251
- * Discriminant `type` values for unsigned `public_execute` requests.
252
- */
253
- type MobileServerPublicExecuteRequestType = keyof MobileServerPublicExecuteRequestByType;
254
- /**
255
- * Discriminant `type` values for signed `execute` requests. Every signed route the SDK calls is a write, so
256
- * this is the full set of {@link MobileSignedInner} tags. Unlike the public queries these carry no separate
257
- * params map — a signed request body *is* its inner payload flattened with the envelope, so
258
- * {@link MobileSignedInner} is the single source of truth for both the fields and their significant order.
259
- */
260
- type MobileServerExecuteRequestType = MobileSignedInner['type'];
261
- /**
262
- * Wire `request_type` the backend echoes on failure envelopes, prefixed by the route that produced it:
263
- * `public_query_*` for unsigned queries, `public_execute_*` for unsigned writes, and `execute_*` for signed
264
- * writes (e.g. `execute_set_username`). The prefix names the route, so it never carries the `mobile:` prefix
265
- * that the EIP-712 method does.
266
- */
267
- type MobileServerRequestType = `public_query_${MobileServerPublicQueryRequestType}` | `public_execute_${MobileServerPublicExecuteRequestType}` | `execute_${MobileServerExecuteRequestType}`;
268
- //#endregion
269
- export { MobileServerPublicExecuteRequestType as a, MobileServerRequestType as c, MobileServerSocialFeedListParams as d, MobileServerSocialFeedReadParams as f, MobileServerPublicExecuteRequestByType as i, MobileServerSearchProfilesRequest as l, MobileServerFollowListRequest as n, MobileServerPublicQueryRequestByType as o, MobileServerProfilesInclude as r, MobileServerPublicQueryRequestType as s, MobileServerExecuteRequestType as t, MobileServerSocialFeedCategorizedParams as u };
270
- //# sourceMappingURL=serverRequestTypes-DZoOhV2o.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serverRequestTypes-DZoOhV2o.d.ts","names":[],"sources":["../src/types/src/types/serverRequestTypes.ts"],"mappings":";;;;;;;AAgBA;;;UAAiB,2BAAA;EAEf;EAAA,aAAA;EAKmB;;;AAAY;EAA/B,cAAA;IAAmB,OAAA,EAAS,GAAG;EAAA;AAAA;;;;;UAOhB,6BAAA;EAYf;EAVA,UAAA,EAAY,GAAA;EAUP;AAMP;;;;EAVE,OAAA,GAAU,GAAG;EAiBb;EAfA,MAAA;EAiBA;EAfA,KAAA;AAA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J,oCAAoC;AA8D5C;;;;;;;;AAAA,UApDiB,sCAAA;EAsDK;EApDpB,iBAAA;IAqD2C,gCAnDzC,UAAA;IAEA,QAAA;IAEA,YAAA;EAAA;;EAGF,iBAAA;0BAEE,WAAA;IAEA,UAAA;IAEA,eAAA;IAEA,KAAA,EAAO,6BAAA;IAEP,YAAA;IAEA,kBAAA,GAAqB,GAAA;EAAA;EAEvB,qBAAA;IAAyB,UAAA;EAAA;EACzB,kBAAA;IACE,UAAA;IACA,WAAA,EAAa,mCAAA;EAAA;AAAA;;;;KAOL,oCAAA,SACJ,sCAAsC;;;;;;;KAQlC,8BAAA,GAAiC,iBAAiB;;;;;;;KAQlD,uBAAA,mBACQ,kCAAA,uBACE,oCAAA,gBACP,8BAAA"}
@@ -1,108 +0,0 @@
1
- import { _t as MobileSocialFeedMention, d as MobileServerAvatarSelection, l as MobileNotificationPlatform } from "./serverModelTypes-CiA-dy1R.cjs";
2
- import { nt as MobileSignedRequestParams } from "./clientTypes-_mEgzmNs.cjs";
3
- import { WalletClientWithAccount } from "@nadohq/shared";
4
- import { Hex } from "viem";
5
-
6
- //#region src/signing/types.d.ts
7
- /**
8
- * Unsigned inner payloads that can be authenticated against the mobile service API.
9
- *
10
- * Key order is significant: the payload hash is `keccak256(msgpack(inner))`, and msgpack encodes object keys
11
- * in insertion order, so every field of every sub-type must be serialized in the exact order the backend
12
- * declares its structs — `type` first, then the remaining fields — or the hash won't match and signature
13
- * verification fails. This type only describes the shape; the authoritative runtime key order is enforced by
14
- * {@link canonicalizeMobileInner}, which is the source of truth. Keep the field order here in sync with it.
15
- *
16
- * Every bytes32 field must be lowercase hex. The backend decodes them case-insensitively but hashes its own
17
- * re-serialization, which is always lowercase, so a mixed-case value is accepted on the wire and then fails
18
- * authentication against a hash the client never reproduced. Build them with `subaccountToHex`, which
19
- * lowercases; unlike bytes32, string fields such as `display_name` are hashed as-is and keep their casing.
20
- */
21
- type MobileSignedInner = {
22
- /** Atomic post publication. */type: 'create_feed_post'; /** Author-scoped idempotency UUID. */
23
- client_request_id: string; /** Owned position UUID. */
24
- position_id: string; /** Optional trusted action UUID, omitted rather than encoded as nil. */
25
- action_id?: string; /** Unmodified original text. */
26
- text: string; /** Ordered mentions into the original text. */
27
- mentions: MobileSocialFeedMention[]; /** Original JSON text; omitted when absent. */
28
- drawing_data_json?: string;
29
- } | {
30
- /** Atomic comment publication. */type: 'create_feed_comment'; /** Author-scoped idempotency UUID. */
31
- client_request_id: string; /** Root UUID. */
32
- root_item_id: string; /** Optional same-thread reply UUID. */
33
- reply_to_item_id?: string; /** Unmodified original text. */
34
- text: string; /** Ordered mentions. */
35
- mentions: MobileSocialFeedMention[]; /** Optional owned position UUID. */
36
- attached_position_id?: string;
37
- } | {
38
- /** First attachment. */type: 'create_feed_chart_drawing'; /** Parent UUID. */
39
- item_id: string; /** Original JSON text, not parsed or reformatted before hashing. */
40
- data_json: string;
41
- } | {
42
- /** Full replacement of an existing drawing. */type: 'update_feed_chart_drawing'; /** Parent UUID. */
43
- item_id: string; /** Original JSON text. */
44
- data_json: string;
45
- } | {
46
- /** Idempotent relationship mutation. */type: 'set_feed_like'; /** Item UUID. */
47
- item_id: string; /** Desired relationship state. */
48
- is_liked: boolean;
49
- } | {
50
- type: 'set_bio';
51
- bio: string;
52
- } | {
53
- type: 'create_avatar_upload';
54
- content_length: number;
55
- } | {
56
- type: 'set_avatar';
57
- avatar: MobileServerAvatarSelection | null;
58
- } | {
59
- type: 'set_username';
60
- display_name: string;
61
- } | {
62
- type: 'set_private_mode';
63
- private_mode: boolean;
64
- } | {
65
- type: 'register_expo_token';
66
- expo_token: string;
67
- platform: MobileNotificationPlatform;
68
- locale: string | null;
69
- app_version: string | null;
70
- } | {
71
- type: 'set_follow';
72
- subaccount: Hex; /** `true` follows the target, `false` unfollows it. Both directions are idempotent. */
73
- is_following: boolean;
74
- } | {
75
- type: 'set_follow_batch'; /** Distinct targets in request order; the response keeps this order. */
76
- subaccounts: Hex[]; /** `true` follows every target, `false` unfollows every target. Both directions are idempotent. */
77
- is_following: boolean;
78
- };
79
- /**
80
- * The single {@link MobileSignedInner} member carrying the given `type` tag.
81
- */
82
- type MobileSignedInnerByType<T extends MobileSignedInner['type']> = Extract<MobileSignedInner, {
83
- type: T;
84
- }>;
85
- /**
86
- * Type-specific payload fields for a signed inner request of a given `type` (the inner payload without its
87
- * `type` tag). Derived from {@link MobileSignedInner} so the two never drift apart.
88
- */
89
- type MobileSignedInnerParams<T extends MobileSignedInner['type']> = Omit<MobileSignedInnerByType<T>, 'type'>;
90
- /**
91
- * A signed mobile service API request body: the inner payload flattened with its signature, sender, and
92
- * nonce (unlike the engine client, which wraps params under a `{ [type]: params }` key).
93
- */
94
- type MobileSignedRequest<T extends MobileSignedInner = MobileSignedInner> = T & {
95
- signature: Hex;
96
- sender: Hex;
97
- nonce: string;
98
- };
99
- /**
100
- * Params for {@link buildSignedMobileRequest}.
101
- */
102
- interface BuildSignedMobileRequestParams extends MobileSignedRequestParams {
103
- walletClient: WalletClientWithAccount;
104
- inner: MobileSignedInner;
105
- }
106
- //#endregion
107
- export { MobileSignedRequest as a, MobileSignedInnerParams as i, MobileSignedInner as n, MobileSignedInnerByType as r, BuildSignedMobileRequestParams as t };
108
- //# sourceMappingURL=types-BiRmH5Iv.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-BiRmH5Iv.d.cts","names":[],"sources":["../src/signing/src/signing/types.ts"],"mappings":";;;;;;;;AAuBA;;;;;;;;;;;;KAAY,iBAAA;EAON,+BAJA,IAAA,sBAQA;EANA,iBAAA,UAQU;EANV,WAAA,UAYA;EAVA,SAAA,WAcA;EAZA,IAAA,UAgBA;EAdA,QAAA,EAAU,uBAAA,IAgBA;EAdV,iBAAA;AAAA;EAsBA,kCAlBA,IAAA,yBAwBA;EAtBA,iBAAA,UA0BA;EAxBA,YAAA,UA8BA;EA5BA,gBAAA,WAgCA;EA9BA,IAAA,UA+BA;EA7BA,QAAA,EAAU,uBAAA,IA+BV;EA7BA,oBAAA;AAAA;EAgCA,wBA5BA,IAAA,+BA6BA;EA3BA,OAAA,UA6BA;EA3BA,SAAA;AAAA;EA6BU,+CAzBV,IAAA,+BA6BA;EA3BA,OAAA,UA+BA;EA7BA,SAAA;AAAA;EAkCA,wCA9BA,IAAA,mBAgCa;EA9Bb,OAAA,UAgCY;EA9BZ,QAAA;AAAA;EAEA,IAAA;EAAiB,GAAA;AAAA;EACjB,IAAA;EAA8B,cAAA;AAAA;EAE9B,IAAA;EACA,MAAA,EAAQ,2BAAA;AAAA;EAER,IAAA;EAAsB,YAAA;AAAA;EACtB,IAAA;EAA0B,YAAA;AAAA;EAE1B,IAAA;EACA,UAAA;EACA,QAAA,EAAU,0BAAA;EAGV,MAAA;EACA,WAAA;AAAA;EAGA,IAAA;EACA,UAAA,EAAY,GAAA,EAsB6D;EApBzE,YAAA;AAAA;EAGA,IAAA,sBAiBqE;EAfrE,WAAA,EAAa,GAAA,IAgBO;EAdpB,YAAA;AAAA;AAsBN;;;AAAA,KAhBY,uBAAA,WAAkC,iBAAA,YAC5C,OAAA,CAAQ,iBAAA;EAAqB,IAAA,EAAM,CAAA;AAAA;;;;;KAMzB,uBAAA,WAAkC,iBAAA,YAA6B,IAAA,CACzE,uBAAA,CAAwB,CAAA;;;;;KAQd,mBAAA,WACA,iBAAA,GAAoB,iBAAA,IAC5B,CAAA;EACF,SAAA,EAAW,GAAA;EACX,MAAA,EAAQ,GAAA;EACR,KAAA;AAAA;AAAK;AAMP;;AANO,UAMU,8BAAA,SAAuC,yBAAA;EACtD,YAAA,EAAc,uBAAA;EACd,KAAA,EAAO,iBAAA;AAAA"}
@@ -1,108 +0,0 @@
1
- import { _t as MobileSocialFeedMention, d as MobileServerAvatarSelection, l as MobileNotificationPlatform } from "./serverModelTypes-CiA-dy1R.js";
2
- import { nt as MobileSignedRequestParams } from "./clientTypes-C9dJufxk.js";
3
- import { WalletClientWithAccount } from "@nadohq/shared";
4
- import { Hex } from "viem";
5
-
6
- //#region src/signing/types.d.ts
7
- /**
8
- * Unsigned inner payloads that can be authenticated against the mobile service API.
9
- *
10
- * Key order is significant: the payload hash is `keccak256(msgpack(inner))`, and msgpack encodes object keys
11
- * in insertion order, so every field of every sub-type must be serialized in the exact order the backend
12
- * declares its structs — `type` first, then the remaining fields — or the hash won't match and signature
13
- * verification fails. This type only describes the shape; the authoritative runtime key order is enforced by
14
- * {@link canonicalizeMobileInner}, which is the source of truth. Keep the field order here in sync with it.
15
- *
16
- * Every bytes32 field must be lowercase hex. The backend decodes them case-insensitively but hashes its own
17
- * re-serialization, which is always lowercase, so a mixed-case value is accepted on the wire and then fails
18
- * authentication against a hash the client never reproduced. Build them with `subaccountToHex`, which
19
- * lowercases; unlike bytes32, string fields such as `display_name` are hashed as-is and keep their casing.
20
- */
21
- type MobileSignedInner = {
22
- /** Atomic post publication. */type: 'create_feed_post'; /** Author-scoped idempotency UUID. */
23
- client_request_id: string; /** Owned position UUID. */
24
- position_id: string; /** Optional trusted action UUID, omitted rather than encoded as nil. */
25
- action_id?: string; /** Unmodified original text. */
26
- text: string; /** Ordered mentions into the original text. */
27
- mentions: MobileSocialFeedMention[]; /** Original JSON text; omitted when absent. */
28
- drawing_data_json?: string;
29
- } | {
30
- /** Atomic comment publication. */type: 'create_feed_comment'; /** Author-scoped idempotency UUID. */
31
- client_request_id: string; /** Root UUID. */
32
- root_item_id: string; /** Optional same-thread reply UUID. */
33
- reply_to_item_id?: string; /** Unmodified original text. */
34
- text: string; /** Ordered mentions. */
35
- mentions: MobileSocialFeedMention[]; /** Optional owned position UUID. */
36
- attached_position_id?: string;
37
- } | {
38
- /** First attachment. */type: 'create_feed_chart_drawing'; /** Parent UUID. */
39
- item_id: string; /** Original JSON text, not parsed or reformatted before hashing. */
40
- data_json: string;
41
- } | {
42
- /** Full replacement of an existing drawing. */type: 'update_feed_chart_drawing'; /** Parent UUID. */
43
- item_id: string; /** Original JSON text. */
44
- data_json: string;
45
- } | {
46
- /** Idempotent relationship mutation. */type: 'set_feed_like'; /** Item UUID. */
47
- item_id: string; /** Desired relationship state. */
48
- is_liked: boolean;
49
- } | {
50
- type: 'set_bio';
51
- bio: string;
52
- } | {
53
- type: 'create_avatar_upload';
54
- content_length: number;
55
- } | {
56
- type: 'set_avatar';
57
- avatar: MobileServerAvatarSelection | null;
58
- } | {
59
- type: 'set_username';
60
- display_name: string;
61
- } | {
62
- type: 'set_private_mode';
63
- private_mode: boolean;
64
- } | {
65
- type: 'register_expo_token';
66
- expo_token: string;
67
- platform: MobileNotificationPlatform;
68
- locale: string | null;
69
- app_version: string | null;
70
- } | {
71
- type: 'set_follow';
72
- subaccount: Hex; /** `true` follows the target, `false` unfollows it. Both directions are idempotent. */
73
- is_following: boolean;
74
- } | {
75
- type: 'set_follow_batch'; /** Distinct targets in request order; the response keeps this order. */
76
- subaccounts: Hex[]; /** `true` follows every target, `false` unfollows every target. Both directions are idempotent. */
77
- is_following: boolean;
78
- };
79
- /**
80
- * The single {@link MobileSignedInner} member carrying the given `type` tag.
81
- */
82
- type MobileSignedInnerByType<T extends MobileSignedInner['type']> = Extract<MobileSignedInner, {
83
- type: T;
84
- }>;
85
- /**
86
- * Type-specific payload fields for a signed inner request of a given `type` (the inner payload without its
87
- * `type` tag). Derived from {@link MobileSignedInner} so the two never drift apart.
88
- */
89
- type MobileSignedInnerParams<T extends MobileSignedInner['type']> = Omit<MobileSignedInnerByType<T>, 'type'>;
90
- /**
91
- * A signed mobile service API request body: the inner payload flattened with its signature, sender, and
92
- * nonce (unlike the engine client, which wraps params under a `{ [type]: params }` key).
93
- */
94
- type MobileSignedRequest<T extends MobileSignedInner = MobileSignedInner> = T & {
95
- signature: Hex;
96
- sender: Hex;
97
- nonce: string;
98
- };
99
- /**
100
- * Params for {@link buildSignedMobileRequest}.
101
- */
102
- interface BuildSignedMobileRequestParams extends MobileSignedRequestParams {
103
- walletClient: WalletClientWithAccount;
104
- inner: MobileSignedInner;
105
- }
106
- //#endregion
107
- export { MobileSignedRequest as a, MobileSignedInnerParams as i, MobileSignedInner as n, MobileSignedInnerByType as r, BuildSignedMobileRequestParams as t };
108
- //# sourceMappingURL=types-DoJuq0Ij.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-DoJuq0Ij.d.ts","names":[],"sources":["../src/signing/src/signing/types.ts"],"mappings":";;;;;;;;AAuBA;;;;;;;;;;;;KAAY,iBAAA;EAON,+BAJA,IAAA,sBAQA;EANA,iBAAA,UAQU;EANV,WAAA,UAYA;EAVA,SAAA,WAcA;EAZA,IAAA,UAgBA;EAdA,QAAA,EAAU,uBAAA,IAgBA;EAdV,iBAAA;AAAA;EAsBA,kCAlBA,IAAA,yBAwBA;EAtBA,iBAAA,UA0BA;EAxBA,YAAA,UA8BA;EA5BA,gBAAA,WAgCA;EA9BA,IAAA,UA+BA;EA7BA,QAAA,EAAU,uBAAA,IA+BV;EA7BA,oBAAA;AAAA;EAgCA,wBA5BA,IAAA,+BA6BA;EA3BA,OAAA,UA6BA;EA3BA,SAAA;AAAA;EA6BU,+CAzBV,IAAA,+BA6BA;EA3BA,OAAA,UA+BA;EA7BA,SAAA;AAAA;EAkCA,wCA9BA,IAAA,mBAgCa;EA9Bb,OAAA,UAgCY;EA9BZ,QAAA;AAAA;EAEA,IAAA;EAAiB,GAAA;AAAA;EACjB,IAAA;EAA8B,cAAA;AAAA;EAE9B,IAAA;EACA,MAAA,EAAQ,2BAAA;AAAA;EAER,IAAA;EAAsB,YAAA;AAAA;EACtB,IAAA;EAA0B,YAAA;AAAA;EAE1B,IAAA;EACA,UAAA;EACA,QAAA,EAAU,0BAAA;EAGV,MAAA;EACA,WAAA;AAAA;EAGA,IAAA;EACA,UAAA,EAAY,GAAA,EAsB6D;EApBzE,YAAA;AAAA;EAGA,IAAA,sBAiBqE;EAfrE,WAAA,EAAa,GAAA,IAgBO;EAdpB,YAAA;AAAA;AAsBN;;;AAAA,KAhBY,uBAAA,WAAkC,iBAAA,YAC5C,OAAA,CAAQ,iBAAA;EAAqB,I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