@oxyhq/services 5.16.44 → 5.17.1

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 (512) hide show
  1. package/README.md +29 -10
  2. package/lib/commonjs/core/OxyServices.js +1 -1
  3. package/lib/commonjs/core/index.js +20 -15
  4. package/lib/commonjs/core/index.js.map +1 -1
  5. package/lib/commonjs/core/mixins/OxyServices.auth.js +36 -53
  6. package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -1
  7. package/lib/commonjs/core/mixins/OxyServices.user.js +10 -17
  8. package/lib/commonjs/core/mixins/OxyServices.user.js.map +1 -1
  9. package/lib/commonjs/core/services/TokenService.js +27 -13
  10. package/lib/commonjs/core/services/TokenService.js.map +1 -1
  11. package/lib/commonjs/crypto/index.js +0 -16
  12. package/lib/commonjs/crypto/index.js.map +1 -1
  13. package/lib/commonjs/crypto/keyManager.js +21 -22
  14. package/lib/commonjs/crypto/keyManager.js.map +1 -1
  15. package/lib/commonjs/crypto/polyfill.js +1 -10
  16. package/lib/commonjs/crypto/polyfill.js.map +1 -1
  17. package/lib/commonjs/crypto/signatureService.js +18 -32
  18. package/lib/commonjs/crypto/signatureService.js.map +1 -1
  19. package/lib/commonjs/index.js +13 -134
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/models/interfaces.js +0 -7
  22. package/lib/commonjs/models/interfaces.js.map +1 -1
  23. package/lib/commonjs/node/index.js +1 -10
  24. package/lib/commonjs/node/index.js.map +1 -1
  25. package/lib/commonjs/ui/components/BottomSheetRouter.js +1 -9
  26. package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
  27. package/lib/commonjs/ui/components/OxyProvider.js +9 -20
  28. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  29. package/lib/commonjs/ui/context/OxyContext.js +779 -450
  30. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  31. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +551 -0
  32. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -0
  33. package/lib/commonjs/ui/context/hooks/useDeviceManagement.js +73 -0
  34. package/lib/commonjs/ui/context/hooks/useDeviceManagement.js.map +1 -0
  35. package/lib/commonjs/ui/context/hooks/useStorage.js +79 -0
  36. package/lib/commonjs/ui/context/hooks/useStorage.js.map +1 -0
  37. package/lib/commonjs/ui/hooks/index.js +0 -20
  38. package/lib/commonjs/ui/hooks/index.js.map +1 -1
  39. package/lib/commonjs/ui/hooks/mutations/index.js +0 -12
  40. package/lib/commonjs/ui/hooks/mutations/index.js.map +1 -1
  41. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +23 -74
  42. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  43. package/lib/commonjs/ui/hooks/queries/index.js +0 -12
  44. package/lib/commonjs/ui/hooks/queries/index.js.map +1 -1
  45. package/lib/commonjs/ui/hooks/queries/queryKeys.js +1 -3
  46. package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
  47. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +28 -64
  48. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  49. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +6 -4
  50. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  51. package/lib/commonjs/ui/hooks/useDeviceManagement.js +73 -0
  52. package/lib/commonjs/ui/hooks/useDeviceManagement.js.map +1 -0
  53. package/lib/commonjs/ui/hooks/useProfileEditing.js +5 -3
  54. package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
  55. package/lib/commonjs/ui/hooks/useSessionManagement.js +284 -0
  56. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -0
  57. package/lib/commonjs/ui/index.js +2 -10
  58. package/lib/commonjs/ui/index.js.map +1 -1
  59. package/lib/commonjs/ui/navigation/routes.js +1 -5
  60. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  61. package/lib/commonjs/ui/screens/AccountCenterScreen.js +4 -9
  62. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  63. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +19 -37
  64. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  65. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +5 -5
  66. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  67. package/lib/commonjs/ui/screens/OxyAuthScreen.js +15 -2
  68. package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +97 -76
  70. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  71. package/lib/commonjs/ui/screens/ProfileScreen.js +6 -6
  72. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  73. package/lib/commonjs/ui/stores/authStore.js +6 -54
  74. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  75. package/lib/commonjs/ui/styles/spacing.js +2 -54
  76. package/lib/commonjs/ui/styles/spacing.js.map +1 -1
  77. package/lib/commonjs/ui/utils/avatarUtils.js +12 -9
  78. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  79. package/lib/commonjs/ui/utils/sessionHelpers.js +1 -7
  80. package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
  81. package/lib/commonjs/utils/deviceManager.js +177 -0
  82. package/lib/commonjs/utils/deviceManager.js.map +1 -0
  83. package/lib/commonjs/utils/errorUtils.js +0 -13
  84. package/lib/commonjs/utils/errorUtils.js.map +1 -1
  85. package/lib/commonjs/utils/index.js +7 -0
  86. package/lib/commonjs/utils/index.js.map +1 -1
  87. package/lib/commonjs/utils/sessionUtils.js +1 -8
  88. package/lib/commonjs/utils/sessionUtils.js.map +1 -1
  89. package/lib/commonjs/utils/validationUtils.js +1 -15
  90. package/lib/commonjs/utils/validationUtils.js.map +1 -1
  91. package/lib/module/core/OxyServices.js +1 -1
  92. package/lib/module/core/index.js +4 -6
  93. package/lib/module/core/index.js.map +1 -1
  94. package/lib/module/core/mixins/OxyServices.auth.js +36 -53
  95. package/lib/module/core/mixins/OxyServices.auth.js.map +1 -1
  96. package/lib/module/core/mixins/OxyServices.user.js +10 -17
  97. package/lib/module/core/mixins/OxyServices.user.js.map +1 -1
  98. package/lib/module/core/services/TokenService.js +27 -13
  99. package/lib/module/core/services/TokenService.js.map +1 -1
  100. package/lib/module/crypto/index.js +0 -3
  101. package/lib/module/crypto/index.js.map +1 -1
  102. package/lib/module/crypto/keyManager.js +21 -22
  103. package/lib/module/crypto/keyManager.js.map +1 -1
  104. package/lib/module/crypto/polyfill.js +1 -2
  105. package/lib/module/crypto/polyfill.js.map +1 -1
  106. package/lib/module/crypto/signatureService.js +18 -32
  107. package/lib/module/crypto/signatureService.js.map +1 -1
  108. package/lib/module/index.js +7 -19
  109. package/lib/module/index.js.map +1 -1
  110. package/lib/module/models/interfaces.js +0 -7
  111. package/lib/module/models/interfaces.js.map +1 -1
  112. package/lib/module/node/index.js +0 -3
  113. package/lib/module/node/index.js.map +1 -1
  114. package/lib/module/ui/components/BottomSheetRouter.js +2 -6
  115. package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
  116. package/lib/module/ui/components/OxyProvider.js +9 -20
  117. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  118. package/lib/module/ui/context/OxyContext.js +779 -450
  119. package/lib/module/ui/context/OxyContext.js.map +1 -1
  120. package/lib/module/ui/context/hooks/useAuthOperations.js +545 -0
  121. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -0
  122. package/lib/module/ui/context/hooks/useDeviceManagement.js +68 -0
  123. package/lib/module/ui/context/hooks/useDeviceManagement.js.map +1 -0
  124. package/lib/module/ui/context/hooks/useStorage.js +74 -0
  125. package/lib/module/ui/context/hooks/useStorage.js.map +1 -0
  126. package/lib/module/ui/hooks/index.js +0 -1
  127. package/lib/module/ui/hooks/index.js.map +1 -1
  128. package/lib/module/ui/hooks/mutations/index.js +1 -1
  129. package/lib/module/ui/hooks/mutations/index.js.map +1 -1
  130. package/lib/module/ui/hooks/mutations/useAccountMutations.js +21 -71
  131. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  132. package/lib/module/ui/hooks/queries/index.js +1 -1
  133. package/lib/module/ui/hooks/queries/index.js.map +1 -1
  134. package/lib/module/ui/hooks/queries/queryKeys.js +1 -3
  135. package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
  136. package/lib/module/ui/hooks/queries/useAccountQueries.js +27 -61
  137. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  138. package/lib/module/ui/hooks/queries/useServicesQueries.js +6 -4
  139. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  140. package/lib/module/ui/hooks/useDeviceManagement.js +68 -0
  141. package/lib/module/ui/hooks/useDeviceManagement.js.map +1 -0
  142. package/lib/module/ui/hooks/useProfileEditing.js +5 -3
  143. package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
  144. package/lib/module/ui/hooks/useSessionManagement.js +279 -0
  145. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -0
  146. package/lib/module/ui/index.js +1 -2
  147. package/lib/module/ui/index.js.map +1 -1
  148. package/lib/module/ui/navigation/routes.js +1 -5
  149. package/lib/module/ui/navigation/routes.js.map +1 -1
  150. package/lib/module/ui/screens/AccountCenterScreen.js +4 -9
  151. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  152. package/lib/module/ui/screens/AccountSettingsScreen.js +19 -37
  153. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  154. package/lib/module/ui/screens/AccountSwitcherScreen.js +5 -5
  155. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  156. package/lib/module/ui/screens/OxyAuthScreen.js +15 -2
  157. package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
  158. package/lib/module/ui/screens/PrivacySettingsScreen.js +98 -77
  159. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  160. package/lib/module/ui/screens/ProfileScreen.js +6 -6
  161. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  162. package/lib/module/ui/stores/authStore.js +6 -54
  163. package/lib/module/ui/stores/authStore.js.map +1 -1
  164. package/lib/module/ui/styles/spacing.js +2 -6
  165. package/lib/module/ui/styles/spacing.js.map +1 -1
  166. package/lib/module/ui/utils/avatarUtils.js +12 -9
  167. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  168. package/lib/module/ui/utils/sessionHelpers.js +1 -7
  169. package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
  170. package/lib/module/utils/deviceManager.js +171 -0
  171. package/lib/module/utils/deviceManager.js.map +1 -0
  172. package/lib/module/utils/errorUtils.js +0 -7
  173. package/lib/module/utils/errorUtils.js.map +1 -1
  174. package/lib/module/utils/index.js +1 -2
  175. package/lib/module/utils/index.js.map +1 -1
  176. package/lib/module/utils/sessionUtils.js +1 -8
  177. package/lib/module/utils/sessionUtils.js.map +1 -1
  178. package/lib/module/utils/validationUtils.js +0 -13
  179. package/lib/module/utils/validationUtils.js.map +1 -1
  180. package/lib/typescript/core/OxyServices.d.ts +1 -1
  181. package/lib/typescript/core/index.d.ts +3 -3
  182. package/lib/typescript/core/index.d.ts.map +1 -1
  183. package/lib/typescript/core/mixins/OxyServices.auth.d.ts +21 -44
  184. package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
  185. package/lib/typescript/core/mixins/OxyServices.user.d.ts +1 -0
  186. package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -1
  187. package/lib/typescript/core/mixins/index.d.ts +8 -15
  188. package/lib/typescript/core/mixins/index.d.ts.map +1 -1
  189. package/lib/typescript/core/services/TokenService.d.ts.map +1 -1
  190. package/lib/typescript/crypto/index.d.ts +0 -1
  191. package/lib/typescript/crypto/index.d.ts.map +1 -1
  192. package/lib/typescript/crypto/keyManager.d.ts +2 -15
  193. package/lib/typescript/crypto/keyManager.d.ts.map +1 -1
  194. package/lib/typescript/crypto/polyfill.d.ts +1 -2
  195. package/lib/typescript/crypto/polyfill.d.ts.map +1 -1
  196. package/lib/typescript/crypto/signatureService.d.ts +0 -13
  197. package/lib/typescript/crypto/signatureService.d.ts.map +1 -1
  198. package/lib/typescript/index.d.ts +7 -12
  199. package/lib/typescript/index.d.ts.map +1 -1
  200. package/lib/typescript/models/interfaces.d.ts +36 -5
  201. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  202. package/lib/typescript/models/session.d.ts +18 -3
  203. package/lib/typescript/models/session.d.ts.map +1 -1
  204. package/lib/typescript/node/index.d.ts +0 -1
  205. package/lib/typescript/node/index.d.ts.map +1 -1
  206. package/lib/typescript/ui/components/BottomSheetRouter.d.ts +0 -5
  207. package/lib/typescript/ui/components/BottomSheetRouter.d.ts.map +1 -1
  208. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  209. package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts +2 -2
  210. package/lib/typescript/ui/components/TextField/helpers.d.ts +2 -2
  211. package/lib/typescript/ui/components/TextField/types.d.ts +0 -1
  212. package/lib/typescript/ui/components/TextField/types.d.ts.map +1 -1
  213. package/lib/typescript/ui/context/OxyContext.d.ts +28 -5
  214. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  215. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +59 -0
  216. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -0
  217. package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts +27 -0
  218. package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts.map +1 -0
  219. package/lib/typescript/ui/context/hooks/useStorage.d.ts +22 -0
  220. package/lib/typescript/ui/context/hooks/useStorage.d.ts.map +1 -0
  221. package/lib/typescript/ui/hooks/index.d.ts +0 -1
  222. package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
  223. package/lib/typescript/ui/hooks/mutations/index.d.ts +1 -1
  224. package/lib/typescript/ui/hooks/mutations/index.d.ts.map +1 -1
  225. package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts +8 -19
  226. package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  227. package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts +1 -1
  228. package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
  229. package/lib/typescript/ui/hooks/queries/index.d.ts +1 -1
  230. package/lib/typescript/ui/hooks/queries/index.d.ts.map +1 -1
  231. package/lib/typescript/ui/hooks/queries/queryKeys.d.ts +0 -2
  232. package/lib/typescript/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  233. package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts +5 -17
  234. package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  235. package/lib/typescript/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  236. package/lib/typescript/ui/hooks/useDeviceManagement.d.ts +27 -0
  237. package/lib/typescript/ui/hooks/useDeviceManagement.d.ts.map +1 -0
  238. package/lib/typescript/ui/hooks/useProfileEditing.d.ts.map +1 -1
  239. package/lib/typescript/ui/hooks/useSessionManagement.d.ts +41 -0
  240. package/lib/typescript/ui/hooks/useSessionManagement.d.ts.map +1 -0
  241. package/lib/typescript/ui/index.d.ts +0 -1
  242. package/lib/typescript/ui/index.d.ts.map +1 -1
  243. package/lib/typescript/ui/navigation/routes.d.ts +1 -1
  244. package/lib/typescript/ui/navigation/routes.d.ts.map +1 -1
  245. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  246. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  247. package/lib/typescript/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  248. package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  249. package/lib/typescript/ui/stores/authStore.d.ts +1 -8
  250. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
  251. package/lib/typescript/ui/styles/spacing.d.ts +0 -5
  252. package/lib/typescript/ui/styles/spacing.d.ts.map +1 -1
  253. package/lib/typescript/ui/utils/avatarUtils.d.ts +4 -1
  254. package/lib/typescript/ui/utils/avatarUtils.d.ts.map +1 -1
  255. package/lib/typescript/ui/utils/sessionHelpers.d.ts +0 -1
  256. package/lib/typescript/ui/utils/sessionHelpers.d.ts.map +1 -1
  257. package/lib/typescript/utils/deviceManager.d.ts +66 -0
  258. package/lib/typescript/utils/deviceManager.d.ts.map +1 -0
  259. package/lib/typescript/utils/errorUtils.d.ts +0 -6
  260. package/lib/typescript/utils/errorUtils.d.ts.map +1 -1
  261. package/lib/typescript/utils/index.d.ts +2 -0
  262. package/lib/typescript/utils/index.d.ts.map +1 -1
  263. package/lib/typescript/utils/sessionUtils.d.ts.map +1 -1
  264. package/lib/typescript/utils/validationUtils.d.ts +0 -8
  265. package/lib/typescript/utils/validationUtils.d.ts.map +1 -1
  266. package/package.json +1 -6
  267. package/src/core/OxyServices.ts +1 -1
  268. package/src/core/index.ts +5 -8
  269. package/src/core/mixins/OxyServices.auth.ts +44 -87
  270. package/src/core/mixins/OxyServices.user.ts +10 -18
  271. package/src/core/services/TokenService.ts +27 -16
  272. package/src/crypto/index.ts +1 -3
  273. package/src/crypto/keyManager.ts +21 -30
  274. package/src/crypto/polyfill.ts +1 -2
  275. package/src/crypto/signatureService.ts +19 -43
  276. package/src/index.ts +6 -41
  277. package/src/models/interfaces.ts +39 -12
  278. package/src/models/session.ts +19 -7
  279. package/src/node/index.ts +0 -3
  280. package/src/ui/components/BottomSheetRouter.tsx +1 -6
  281. package/src/ui/components/OxyProvider.tsx +10 -17
  282. package/src/ui/components/TextField/Addons/Outline.tsx +2 -2
  283. package/src/ui/components/TextField/helpers.tsx +2 -2
  284. package/src/ui/components/TextField/types.tsx +1 -1
  285. package/src/ui/context/OxyContext.tsx +831 -463
  286. package/src/ui/context/hooks/useAuthOperations.ts +620 -0
  287. package/src/ui/context/hooks/useDeviceManagement.ts +108 -0
  288. package/src/ui/context/hooks/useStorage.ts +104 -0
  289. package/src/ui/hooks/index.ts +1 -2
  290. package/src/ui/hooks/mutations/index.ts +0 -2
  291. package/src/ui/hooks/mutations/useAccountMutations.ts +20 -66
  292. package/src/ui/hooks/queries/index.ts +0 -2
  293. package/src/ui/hooks/queries/queryKeys.ts +0 -2
  294. package/src/ui/hooks/queries/useAccountQueries.ts +19 -53
  295. package/src/ui/hooks/queries/useServicesQueries.ts +5 -5
  296. package/src/ui/hooks/useDeviceManagement.ts +108 -0
  297. package/src/ui/hooks/useProfileEditing.ts +3 -3
  298. package/src/ui/hooks/useSessionManagement.ts +405 -0
  299. package/src/ui/index.ts +1 -2
  300. package/src/ui/navigation/routes.ts +2 -6
  301. package/src/ui/screens/AccountCenterScreen.tsx +4 -9
  302. package/src/ui/screens/AccountSettingsScreen.tsx +31 -49
  303. package/src/ui/screens/AccountSwitcherScreen.tsx +5 -5
  304. package/src/ui/screens/OxyAuthScreen.tsx +19 -4
  305. package/src/ui/screens/PrivacySettingsScreen.tsx +101 -67
  306. package/src/ui/screens/ProfileScreen.tsx +10 -10
  307. package/src/ui/stores/authStore.ts +8 -48
  308. package/src/ui/styles/spacing.ts +2 -15
  309. package/src/ui/utils/avatarUtils.ts +21 -19
  310. package/src/ui/utils/sessionHelpers.ts +0 -7
  311. package/src/utils/__tests__/validationUtils.test.ts +1 -16
  312. package/src/utils/deviceManager.ts +198 -0
  313. package/src/utils/errorUtils.ts +1 -8
  314. package/src/utils/index.ts +2 -1
  315. package/src/utils/sessionUtils.ts +0 -8
  316. package/src/utils/validationUtils.ts +0 -12
  317. package/lib/commonjs/adapters/expo/crypto.js +0 -56
  318. package/lib/commonjs/adapters/expo/crypto.js.map +0 -1
  319. package/lib/commonjs/adapters/expo/fetch.js +0 -30
  320. package/lib/commonjs/adapters/expo/fetch.js.map +0 -1
  321. package/lib/commonjs/adapters/expo/index.js +0 -48
  322. package/lib/commonjs/adapters/expo/index.js.map +0 -1
  323. package/lib/commonjs/adapters/expo/storage.js +0 -201
  324. package/lib/commonjs/adapters/expo/storage.js.map +0 -1
  325. package/lib/commonjs/adapters/index.js +0 -48
  326. package/lib/commonjs/adapters/index.js.map +0 -1
  327. package/lib/commonjs/adapters/node/crypto.js +0 -40
  328. package/lib/commonjs/adapters/node/crypto.js.map +0 -1
  329. package/lib/commonjs/adapters/node/fetch.js +0 -62
  330. package/lib/commonjs/adapters/node/fetch.js.map +0 -1
  331. package/lib/commonjs/adapters/node/index.js +0 -34
  332. package/lib/commonjs/adapters/node/index.js.map +0 -1
  333. package/lib/commonjs/adapters/node/storage.js +0 -163
  334. package/lib/commonjs/adapters/node/storage.js.map +0 -1
  335. package/lib/commonjs/core/identity-session/DeviceManager.js +0 -237
  336. package/lib/commonjs/core/identity-session/DeviceManager.js.map +0 -1
  337. package/lib/commonjs/core/identity-session/INTEGRATION_GUIDE.md +0 -287
  338. package/lib/commonjs/core/identity-session/IdentityManager.js +0 -400
  339. package/lib/commonjs/core/identity-session/IdentityManager.js.map +0 -1
  340. package/lib/commonjs/core/identity-session/IdentitySessionCore.js +0 -394
  341. package/lib/commonjs/core/identity-session/IdentitySessionCore.js.map +0 -1
  342. package/lib/commonjs/core/identity-session/RefreshManager.js +0 -137
  343. package/lib/commonjs/core/identity-session/RefreshManager.js.map +0 -1
  344. package/lib/commonjs/core/identity-session/SessionManager.js +0 -427
  345. package/lib/commonjs/core/identity-session/SessionManager.js.map +0 -1
  346. package/lib/commonjs/core/identity-session/createIdentitySessionCore.js +0 -24
  347. package/lib/commonjs/core/identity-session/createIdentitySessionCore.js.map +0 -1
  348. package/lib/commonjs/core/identity-session/errors.js +0 -176
  349. package/lib/commonjs/core/identity-session/errors.js.map +0 -1
  350. package/lib/commonjs/core/identity-session/index.js +0 -80
  351. package/lib/commonjs/core/identity-session/index.js.map +0 -1
  352. package/lib/commonjs/core/identity-session/types.js +0 -2
  353. package/lib/commonjs/core/identity-session/types.js.map +0 -1
  354. package/lib/commonjs/crypto/README.md +0 -142
  355. package/lib/commonjs/crypto/core.js +0 -147
  356. package/lib/commonjs/crypto/core.js.map +0 -1
  357. package/lib/commonjs/node/signatureService.js +0 -107
  358. package/lib/commonjs/node/signatureService.js.map +0 -1
  359. package/lib/commonjs/ui/hooks/auth/index.js +0 -37
  360. package/lib/commonjs/ui/hooks/auth/index.js.map +0 -1
  361. package/lib/commonjs/ui/hooks/auth/useUsernameValidation.js +0 -171
  362. package/lib/commonjs/ui/hooks/auth/useUsernameValidation.js.map +0 -1
  363. package/lib/commonjs/ui/hooks/useAvatarPicker.js +0 -52
  364. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +0 -1
  365. package/lib/commonjs/ui/hooks/useIdentityTransfer.js +0 -125
  366. package/lib/commonjs/ui/hooks/useIdentityTransfer.js.map +0 -1
  367. package/lib/commonjs/ui/hooks/useTransferCodesPersistence.js +0 -81
  368. package/lib/commonjs/ui/hooks/useTransferCodesPersistence.js.map +0 -1
  369. package/lib/commonjs/ui/hooks/useTransferQueries.js +0 -85
  370. package/lib/commonjs/ui/hooks/useTransferQueries.js.map +0 -1
  371. package/lib/commonjs/ui/stores/transferStore.js +0 -157
  372. package/lib/commonjs/ui/stores/transferStore.js.map +0 -1
  373. package/lib/module/adapters/expo/crypto.js +0 -51
  374. package/lib/module/adapters/expo/crypto.js.map +0 -1
  375. package/lib/module/adapters/expo/fetch.js +0 -26
  376. package/lib/module/adapters/expo/fetch.js.map +0 -1
  377. package/lib/module/adapters/expo/index.js +0 -45
  378. package/lib/module/adapters/expo/index.js.map +0 -1
  379. package/lib/module/adapters/expo/storage.js +0 -198
  380. package/lib/module/adapters/expo/storage.js.map +0 -1
  381. package/lib/module/adapters/index.js +0 -45
  382. package/lib/module/adapters/index.js.map +0 -1
  383. package/lib/module/adapters/node/crypto.js +0 -36
  384. package/lib/module/adapters/node/crypto.js.map +0 -1
  385. package/lib/module/adapters/node/fetch.js +0 -57
  386. package/lib/module/adapters/node/fetch.js.map +0 -1
  387. package/lib/module/adapters/node/index.js +0 -31
  388. package/lib/module/adapters/node/index.js.map +0 -1
  389. package/lib/module/adapters/node/storage.js +0 -159
  390. package/lib/module/adapters/node/storage.js.map +0 -1
  391. package/lib/module/core/identity-session/DeviceManager.js +0 -232
  392. package/lib/module/core/identity-session/DeviceManager.js.map +0 -1
  393. package/lib/module/core/identity-session/INTEGRATION_GUIDE.md +0 -287
  394. package/lib/module/core/identity-session/IdentityManager.js +0 -395
  395. package/lib/module/core/identity-session/IdentityManager.js.map +0 -1
  396. package/lib/module/core/identity-session/IdentitySessionCore.js +0 -390
  397. package/lib/module/core/identity-session/IdentitySessionCore.js.map +0 -1
  398. package/lib/module/core/identity-session/RefreshManager.js +0 -132
  399. package/lib/module/core/identity-session/RefreshManager.js.map +0 -1
  400. package/lib/module/core/identity-session/SessionManager.js +0 -422
  401. package/lib/module/core/identity-session/SessionManager.js.map +0 -1
  402. package/lib/module/core/identity-session/createIdentitySessionCore.js +0 -21
  403. package/lib/module/core/identity-session/createIdentitySessionCore.js.map +0 -1
  404. package/lib/module/core/identity-session/errors.js +0 -170
  405. package/lib/module/core/identity-session/errors.js.map +0 -1
  406. package/lib/module/core/identity-session/index.js +0 -17
  407. package/lib/module/core/identity-session/index.js.map +0 -1
  408. package/lib/module/core/identity-session/types.js +0 -2
  409. package/lib/module/core/identity-session/types.js.map +0 -1
  410. package/lib/module/crypto/README.md +0 -142
  411. package/lib/module/crypto/core.js +0 -133
  412. package/lib/module/crypto/core.js.map +0 -1
  413. package/lib/module/node/signatureService.js +0 -101
  414. package/lib/module/node/signatureService.js.map +0 -1
  415. package/lib/module/ui/hooks/auth/index.js +0 -7
  416. package/lib/module/ui/hooks/auth/index.js.map +0 -1
  417. package/lib/module/ui/hooks/auth/useUsernameValidation.js +0 -167
  418. package/lib/module/ui/hooks/auth/useUsernameValidation.js.map +0 -1
  419. package/lib/module/ui/hooks/useAvatarPicker.js +0 -48
  420. package/lib/module/ui/hooks/useAvatarPicker.js.map +0 -1
  421. package/lib/module/ui/hooks/useIdentityTransfer.js +0 -121
  422. package/lib/module/ui/hooks/useIdentityTransfer.js.map +0 -1
  423. package/lib/module/ui/hooks/useTransferCodesPersistence.js +0 -77
  424. package/lib/module/ui/hooks/useTransferCodesPersistence.js.map +0 -1
  425. package/lib/module/ui/hooks/useTransferQueries.js +0 -80
  426. package/lib/module/ui/hooks/useTransferQueries.js.map +0 -1
  427. package/lib/module/ui/stores/transferStore.js +0 -152
  428. package/lib/module/ui/stores/transferStore.js.map +0 -1
  429. package/lib/typescript/adapters/expo/crypto.d.ts +0 -17
  430. package/lib/typescript/adapters/expo/crypto.d.ts.map +0 -1
  431. package/lib/typescript/adapters/expo/fetch.d.ts +0 -16
  432. package/lib/typescript/adapters/expo/fetch.d.ts.map +0 -1
  433. package/lib/typescript/adapters/expo/index.d.ts +0 -23
  434. package/lib/typescript/adapters/expo/index.d.ts.map +0 -1
  435. package/lib/typescript/adapters/expo/storage.d.ts +0 -23
  436. package/lib/typescript/adapters/expo/storage.d.ts.map +0 -1
  437. package/lib/typescript/adapters/index.d.ts +0 -17
  438. package/lib/typescript/adapters/index.d.ts.map +0 -1
  439. package/lib/typescript/adapters/node/crypto.d.ts +0 -17
  440. package/lib/typescript/adapters/node/crypto.d.ts.map +0 -1
  441. package/lib/typescript/adapters/node/fetch.d.ts +0 -16
  442. package/lib/typescript/adapters/node/fetch.d.ts.map +0 -1
  443. package/lib/typescript/adapters/node/index.d.ts +0 -23
  444. package/lib/typescript/adapters/node/index.d.ts.map +0 -1
  445. package/lib/typescript/adapters/node/storage.d.ts +0 -23
  446. package/lib/typescript/adapters/node/storage.d.ts.map +0 -1
  447. package/lib/typescript/core/identity-session/DeviceManager.d.ts +0 -64
  448. package/lib/typescript/core/identity-session/DeviceManager.d.ts.map +0 -1
  449. package/lib/typescript/core/identity-session/IdentityManager.d.ts +0 -88
  450. package/lib/typescript/core/identity-session/IdentityManager.d.ts.map +0 -1
  451. package/lib/typescript/core/identity-session/IdentitySessionCore.d.ts +0 -141
  452. package/lib/typescript/core/identity-session/IdentitySessionCore.d.ts.map +0 -1
  453. package/lib/typescript/core/identity-session/RefreshManager.d.ts +0 -36
  454. package/lib/typescript/core/identity-session/RefreshManager.d.ts.map +0 -1
  455. package/lib/typescript/core/identity-session/SessionManager.d.ts +0 -104
  456. package/lib/typescript/core/identity-session/SessionManager.d.ts.map +0 -1
  457. package/lib/typescript/core/identity-session/createIdentitySessionCore.d.ts +0 -11
  458. package/lib/typescript/core/identity-session/createIdentitySessionCore.d.ts.map +0 -1
  459. package/lib/typescript/core/identity-session/errors.d.ts +0 -63
  460. package/lib/typescript/core/identity-session/errors.d.ts.map +0 -1
  461. package/lib/typescript/core/identity-session/index.d.ts +0 -14
  462. package/lib/typescript/core/identity-session/index.d.ts.map +0 -1
  463. package/lib/typescript/core/identity-session/types.d.ts +0 -196
  464. package/lib/typescript/core/identity-session/types.d.ts.map +0 -1
  465. package/lib/typescript/crypto/core.d.ts +0 -56
  466. package/lib/typescript/crypto/core.d.ts.map +0 -1
  467. package/lib/typescript/node/signatureService.d.ts +0 -55
  468. package/lib/typescript/node/signatureService.d.ts.map +0 -1
  469. package/lib/typescript/ui/hooks/auth/index.d.ts +0 -6
  470. package/lib/typescript/ui/hooks/auth/index.d.ts.map +0 -1
  471. package/lib/typescript/ui/hooks/auth/useUsernameValidation.d.ts +0 -32
  472. package/lib/typescript/ui/hooks/auth/useUsernameValidation.d.ts.map +0 -1
  473. package/lib/typescript/ui/hooks/useAvatarPicker.d.ts +0 -18
  474. package/lib/typescript/ui/hooks/useAvatarPicker.d.ts.map +0 -1
  475. package/lib/typescript/ui/hooks/useIdentityTransfer.d.ts +0 -24
  476. package/lib/typescript/ui/hooks/useIdentityTransfer.d.ts.map +0 -1
  477. package/lib/typescript/ui/hooks/useTransferCodesPersistence.d.ts +0 -6
  478. package/lib/typescript/ui/hooks/useTransferCodesPersistence.d.ts.map +0 -1
  479. package/lib/typescript/ui/hooks/useTransferQueries.d.ts +0 -26
  480. package/lib/typescript/ui/hooks/useTransferQueries.d.ts.map +0 -1
  481. package/lib/typescript/ui/stores/transferStore.d.ts +0 -36
  482. package/lib/typescript/ui/stores/transferStore.d.ts.map +0 -1
  483. package/src/adapters/expo/crypto.ts +0 -55
  484. package/src/adapters/expo/fetch.ts +0 -28
  485. package/src/adapters/expo/index.ts +0 -51
  486. package/src/adapters/expo/storage.ts +0 -228
  487. package/src/adapters/index.ts +0 -48
  488. package/src/adapters/node/crypto.ts +0 -39
  489. package/src/adapters/node/fetch.ts +0 -59
  490. package/src/adapters/node/index.ts +0 -37
  491. package/src/adapters/node/storage.ts +0 -170
  492. package/src/core/identity-session/DeviceManager.ts +0 -273
  493. package/src/core/identity-session/INTEGRATION_GUIDE.md +0 -287
  494. package/src/core/identity-session/IdentityManager.ts +0 -474
  495. package/src/core/identity-session/IdentitySessionCore.ts +0 -464
  496. package/src/core/identity-session/RefreshManager.ts +0 -189
  497. package/src/core/identity-session/SessionManager.ts +0 -500
  498. package/src/core/identity-session/createIdentitySessionCore.ts +0 -19
  499. package/src/core/identity-session/errors.ts +0 -197
  500. package/src/core/identity-session/index.ts +0 -15
  501. package/src/core/identity-session/types.ts +0 -188
  502. package/src/crypto/README.md +0 -142
  503. package/src/crypto/__tests__/core.test.ts +0 -203
  504. package/src/crypto/core.ts +0 -142
  505. package/src/node/signatureService.ts +0 -126
  506. package/src/ui/hooks/auth/index.ts +0 -9
  507. package/src/ui/hooks/auth/useUsernameValidation.ts +0 -177
  508. package/src/ui/hooks/useAvatarPicker.ts +0 -62
  509. package/src/ui/hooks/useIdentityTransfer.ts +0 -135
  510. package/src/ui/hooks/useTransferCodesPersistence.ts +0 -80
  511. package/src/ui/hooks/useTransferQueries.ts +0 -102
  512. package/src/ui/stores/transferStore.ts +0 -201
@@ -1,196 +0,0 @@
1
- /**
2
- * Core Identity and Session Types
3
- *
4
- * These types are aligned with backend models (IUser, ISession) to ensure
5
- * consistency across the entire ecosystem.
6
- */
7
- /**
8
- * Identity - Aligned with IUser from backend
9
- * Represents a user's cryptographic identity
10
- */
11
- export interface Identity {
12
- id: string;
13
- publicKey: string;
14
- username?: string;
15
- email?: string;
16
- avatar?: string;
17
- verified?: boolean;
18
- language?: string;
19
- privacySettings?: {
20
- isPrivateAccount?: boolean;
21
- hideOnlineStatus?: boolean;
22
- hideLastSeen?: boolean;
23
- profileVisibility?: boolean;
24
- loginAlerts?: boolean;
25
- blockScreenshots?: boolean;
26
- login?: boolean;
27
- biometricLogin?: boolean;
28
- showActivity?: boolean;
29
- allowTagging?: boolean;
30
- allowMentions?: boolean;
31
- hideReadReceipts?: boolean;
32
- allowDirectMessages?: boolean;
33
- dataSharing?: boolean;
34
- locationSharing?: boolean;
35
- analyticsSharing?: boolean;
36
- sensitiveContent?: boolean;
37
- autoFilter?: boolean;
38
- muteKeywords?: boolean;
39
- [key: string]: unknown;
40
- };
41
- name?: {
42
- first?: string;
43
- last?: string;
44
- full?: string;
45
- [key: string]: unknown;
46
- };
47
- bio?: string;
48
- description?: string;
49
- locations?: Array<{
50
- id: string;
51
- name: string;
52
- label?: string;
53
- type?: 'home' | 'work' | 'school' | 'other';
54
- address?: {
55
- street?: string;
56
- streetNumber?: string;
57
- streetDetails?: string;
58
- postalCode?: string;
59
- city?: string;
60
- state?: string;
61
- country?: string;
62
- formattedAddress?: string;
63
- };
64
- coordinates?: {
65
- lat: number;
66
- lon: number;
67
- };
68
- metadata?: {
69
- placeId?: string;
70
- osmId?: string;
71
- osmType?: string;
72
- countryCode?: string;
73
- timezone?: string;
74
- };
75
- createdAt?: string;
76
- updatedAt?: string;
77
- }>;
78
- links?: string[];
79
- linksMetadata?: Array<{
80
- url: string;
81
- title: string;
82
- description: string;
83
- image?: string;
84
- }>;
85
- _count?: {
86
- followers?: number;
87
- following?: number;
88
- };
89
- accountExpiresAfterInactivityDays?: number | null;
90
- createdAt?: string;
91
- updatedAt?: string;
92
- [key: string]: unknown;
93
- }
94
- /**
95
- * Session - Aligned with ISession from backend
96
- * Represents an active user session
97
- */
98
- export interface Session {
99
- sessionId: string;
100
- userId: string;
101
- deviceId: string;
102
- expiresAt: string;
103
- lastActive: string;
104
- deviceInfo: DeviceInfo;
105
- isActive?: boolean;
106
- accessToken?: string;
107
- refreshToken?: string;
108
- isCurrent?: boolean;
109
- }
110
- /**
111
- * DeviceInfo - Aligned with ISession.deviceInfo
112
- */
113
- export interface DeviceInfo {
114
- deviceName?: string;
115
- deviceType: string;
116
- platform: string;
117
- browser?: string;
118
- os?: string;
119
- lastActive: string;
120
- ipAddress?: string;
121
- userAgent?: string;
122
- location?: string;
123
- fingerprint?: string;
124
- }
125
- /**
126
- * Device - Represents device information
127
- */
128
- export interface Device {
129
- deviceId: string;
130
- deviceName?: string;
131
- deviceType: string;
132
- platform: string;
133
- browser?: string;
134
- os?: string;
135
- fingerprint?: string;
136
- createdAt?: string;
137
- updatedAt?: string;
138
- }
139
- /**
140
- * DeviceSession - Aligned with backend device session model
141
- */
142
- export interface DeviceSession {
143
- deviceId: string;
144
- deviceName?: string;
145
- deviceType: string;
146
- platform: string;
147
- browser?: string;
148
- os?: string;
149
- lastActive: string;
150
- fingerprint?: string;
151
- createdAt?: string;
152
- updatedAt?: string;
153
- }
154
- /**
155
- * BackupData - Encrypted backup data for identity
156
- */
157
- export interface BackupData {
158
- encrypted: string;
159
- salt: string;
160
- iv: string;
161
- publicKey: string;
162
- }
163
- /**
164
- * IdentitySessionEvent - Events emitted by the core
165
- */
166
- export type IdentitySessionEvent = {
167
- type: 'identity:created';
168
- identity: Identity;
169
- } | {
170
- type: 'identity:imported';
171
- identity: Identity;
172
- } | {
173
- type: 'identity:deleted';
174
- } | {
175
- type: 'identity:synced';
176
- identity: Identity;
177
- } | {
178
- type: 'session:created';
179
- session: Session;
180
- } | {
181
- type: 'session:refreshed';
182
- session: Session;
183
- } | {
184
- type: 'session:invalidated';
185
- sessionId: string;
186
- } | {
187
- type: 'session:all-invalidated';
188
- } | {
189
- type: 'device:changed';
190
- device: Device;
191
- };
192
- /**
193
- * Platform type
194
- */
195
- export type Platform = 'native' | 'web' | 'node';
196
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/identity-session/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE;QAChB,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,KAAK,CAAC;QAChB,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;QAC5C,OAAO,CAAC,EAAE;YACR,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;SAC3B,CAAC;QACF,WAAW,CAAC,EAAE;YACZ,GAAG,EAAE,MAAM,CAAC;YACZ,GAAG,EAAE,MAAM,CAAC;SACb,CAAC;QACF,QAAQ,CAAC,EAAE;YACT,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;SACnB,CAAC;QACF,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,KAAK,CAAC;QACpB,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,iCAAiC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,kBAAkB,CAAA;CAAE,GAC5B;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAC7C;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,qBAAqB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,IAAI,EAAE,yBAAyB,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC"}
@@ -1,56 +0,0 @@
1
- /**
2
- * Core Cryptographic Functions - Platform Agnostic
3
- *
4
- * This module contains the core signature verification logic
5
- * that is shared between all platforms (React Native, Node.js, Web).
6
- * Platform-specific implementations (hashing, random generation) are injected.
7
- */
8
- import type { EC as ECType } from 'elliptic';
9
- export declare const CHALLENGE_TTL_MS: number;
10
- export declare const MAX_SIGNATURE_AGE_MS: number;
11
- /**
12
- * Core signature verification using elliptic curve
13
- * This is platform-agnostic and works everywhere
14
- */
15
- export declare function verifySignatureCore(messageHash: string, signature: string, publicKey: string): boolean;
16
- /**
17
- * Validate that a string is a valid public key
18
- */
19
- export declare function isValidPublicKey(publicKey: string): boolean;
20
- /**
21
- * Validate that a string is a valid private key
22
- */
23
- export declare function isValidPrivateKey(privateKey: string): boolean;
24
- /**
25
- * Get a shortened display version of a public key
26
- * Format: first 8 chars...last 8 chars
27
- */
28
- export declare function shortenPublicKey(publicKey: string): string;
29
- /**
30
- * Derive public key from a private key (without storing)
31
- */
32
- export declare function derivePublicKey(privateKey: string): string;
33
- /**
34
- * Check timestamp freshness
35
- */
36
- export declare function isTimestampFresh(timestamp: number, maxAgeMs?: number): boolean;
37
- /**
38
- * Build authentication challenge message
39
- * Format: auth:{publicKey}:{challenge}:{timestamp}
40
- */
41
- export declare function buildAuthMessage(publicKey: string, challenge: string, timestamp: number): string;
42
- /**
43
- * Build registration message
44
- * Format: oxy:register:{publicKey}:{timestamp}
45
- */
46
- export declare function buildRegistrationMessage(publicKey: string, timestamp: number): string;
47
- /**
48
- * Build request signature message
49
- * Format: request:{publicKey}:{timestamp}:{canonicalString}
50
- */
51
- export declare function buildRequestMessage(publicKey: string, timestamp: number, data: Record<string, unknown>): string;
52
- /**
53
- * Get the elliptic curve instance (for key generation)
54
- */
55
- export declare function getEllipticCurve(): ECType;
56
- //# sourceMappingURL=core.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/crypto/core.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAK7C,eAAO,MAAM,gBAAgB,QAAgB,CAAC;AAC9C,eAAO,MAAM,oBAAoB,QAAgB,CAAC;AAElD;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAOT;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAY3D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAwB7D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAG1D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAG1D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,GAAE,MAA6B,GAAG,OAAO,CAGpG;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEhG;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAErF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,MAAM,CAKR;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC"}
@@ -1,55 +0,0 @@
1
- /**
2
- * Node.js Signature Service
3
- *
4
- * Provides synchronous signature operations for Node.js backend.
5
- * Uses Node's crypto module for hashing and the shared core for verification.
6
- */
7
- export declare class SignatureService {
8
- /**
9
- * Generate a random challenge string
10
- */
11
- static generateChallenge(): string;
12
- /**
13
- * Compute SHA-256 hash of a message (synchronous)
14
- */
15
- static hashMessage(message: string): string;
16
- /**
17
- * Verify an ECDSA signature (synchronous)
18
- *
19
- * @param message - The original message that was signed
20
- * @param signature - The signature in DER format (hex encoded)
21
- * @param publicKey - The public key (hex encoded, uncompressed)
22
- * @returns true if the signature is valid
23
- */
24
- static verifySignature(message: string, signature: string, publicKey: string): boolean;
25
- /**
26
- * Verify an authentication challenge response
27
- *
28
- * @param publicKey - The user's public key
29
- * @param challenge - The original challenge string
30
- * @param signature - The signature of the auth message
31
- * @param timestamp - The timestamp when the signature was created
32
- * @returns true if the challenge response is valid
33
- */
34
- static verifyChallengeResponse(publicKey: string, challenge: string, signature: string, timestamp: number): boolean;
35
- /**
36
- * Verify a registration signature
37
- * Signature format: oxy:register:{publicKey}:{timestamp}
38
- */
39
- static verifyRegistrationSignature(publicKey: string, signature: string, timestamp: number): boolean;
40
- /**
41
- * Verify a signed request
42
- * Used for authenticated API operations
43
- */
44
- static verifyRequestSignature(publicKey: string, data: Record<string, unknown>, signature: string, timestamp: number): boolean;
45
- /**
46
- * Validate that a string is a valid public key
47
- */
48
- static isValidPublicKey(publicKey: string): boolean;
49
- /**
50
- * Get a shortened display version of a public key
51
- */
52
- static shortenPublicKey(publicKey: string): string;
53
- }
54
- export default SignatureService;
55
- //# sourceMappingURL=signatureService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"signatureService.d.ts","sourceRoot":"","sources":["../../../src/node/signatureService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,qBAAa,gBAAgB;IAC3B;;OAEG;IACH,MAAM,CAAC,iBAAiB,IAAI,MAAM;IAIlC;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAI3C;;;;;;;OAOG;IACH,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAKtF;;;;;;;;OAQG;IACH,MAAM,CAAC,uBAAuB,CAC5B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO;IAWV;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAChC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO;IAUV;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CAC3B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO;IAUV;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAInD;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;CAGnD;AAED,eAAe,gBAAgB,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Auth-related hooks
3
- */
4
- export { useUsernameValidation, USERNAME_MIN_LENGTH, USERNAME_REGEX, USERNAME_FORMAT_ERROR, USERNAME_DEBOUNCE_MS } from './useUsernameValidation';
5
- export type { UsernameValidationResult } from './useUsernameValidation';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/auth/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,cAAc,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAClJ,YAAY,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,32 +0,0 @@
1
- import type { OxyServices } from '../../../core';
2
- /**
3
- * Username validation constants
4
- */
5
- export declare const USERNAME_MIN_LENGTH = 4;
6
- export declare const USERNAME_REGEX: RegExp;
7
- export declare const USERNAME_FORMAT_ERROR = "You can use a-z, 0-9. Minimum length is 4 characters.";
8
- export declare const USERNAME_DEBOUNCE_MS = 500;
9
- /**
10
- * Username validation result interface
11
- */
12
- export interface UsernameValidationResult {
13
- isValid: boolean;
14
- isAvailable: boolean | null;
15
- error: string | null;
16
- isChecking: boolean;
17
- }
18
- /**
19
- * Hook for username validation with debouncing and availability checking
20
- *
21
- * Uses TanStack Query for efficient API calls with:
22
- * - Automatic request cancellation when username changes
23
- * - Built-in caching (same username checked multiple times = cached result)
24
- * - Request deduplication (multiple components checking same username = single request)
25
- * - Proper error handling
26
- *
27
- * @param username - The username to validate
28
- * @param oxyServices - OxyServices instance for API calls
29
- * @returns Username validation state and result
30
- */
31
- export declare function useUsernameValidation(username: string, oxyServices: OxyServices | null): UsernameValidationResult;
32
- //# sourceMappingURL=useUsernameValidation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useUsernameValidation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/auth/useUsernameValidation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD;;GAEG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,cAAc,QAAiB,CAAC;AAC7C,eAAO,MAAM,qBAAqB,0DAA0D,CAAC;AAC7F,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AA8BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,GAAG,IAAI,GAC9B,wBAAwB,CA2G1B"}
@@ -1,18 +0,0 @@
1
- import { useQueryClient } from '@tanstack/react-query';
2
- import type { OxyServices } from '../../core';
3
- import type { User } from '../../models/interfaces';
4
- interface UseAvatarPickerOptions {
5
- oxyServices: OxyServices;
6
- currentLanguage: string;
7
- activeSessionId: string | null;
8
- queryClient: ReturnType<typeof useQueryClient>;
9
- syncIdentity: (username?: string) => Promise<User>;
10
- }
11
- /**
12
- * Hook to handle avatar picker functionality
13
- */
14
- export declare function useAvatarPicker({ oxyServices, currentLanguage, activeSessionId, queryClient, syncIdentity, }: UseAvatarPickerOptions): {
15
- openAvatarPicker: () => void;
16
- };
17
- export {};
18
- //# sourceMappingURL=useAvatarPicker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAvatarPicker.d.ts","sourceRoot":"","sources":["../../../../src/ui/hooks/useAvatarPicker.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,UAAU,sBAAsB;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC/C,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,eAAe,EACf,eAAe,EACf,WAAW,EACX,YAAY,GACb,EAAE,sBAAsB;;EAiCxB"}
@@ -1,24 +0,0 @@
1
- import type { IdentitySessionCore } from '../../core/identity-session';
2
- interface UseIdentityTransferOptions {
3
- identityCore: IdentitySessionCore | null;
4
- currentDeviceId: string | null;
5
- activeSessionId: string | null;
6
- getPublicKey: () => Promise<string | null>;
7
- deleteIdentityAndClearAccount: (skipBackup?: boolean, force?: boolean, userConfirmed?: boolean) => Promise<void>;
8
- logger: (message: string, err?: unknown) => void;
9
- }
10
- /**
11
- * Hook to handle identity transfer completion
12
- * This hook processes the identity_transfer_complete event and deletes the identity from the source device
13
- */
14
- export declare function useIdentityTransfer({ identityCore, currentDeviceId, activeSessionId, getPublicKey, deleteIdentityAndClearAccount, logger, }: UseIdentityTransferOptions): {
15
- handleIdentityTransferComplete: (data: {
16
- transferId: string;
17
- sourceDeviceId: string;
18
- publicKey: string;
19
- transferCode?: string;
20
- completedAt: string;
21
- }) => Promise<void>;
22
- };
23
- export {};
24
- //# sourceMappingURL=useIdentityTransfer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useIdentityTransfer.d.ts","sourceRoot":"","sources":["../../../../src/ui/hooks/useIdentityTransfer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,UAAU,0BAA0B;IAClC,YAAY,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACzC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC3C,6BAA6B,EAAE,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjH,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,6BAA6B,EAC7B,MAAM,GACP,EAAE,0BAA0B;2CAMZ;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE;EAsG7H"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Hook to handle persistence of transfer codes to storage
3
- * This hook automatically loads transfer codes on mount and persists them when they change
4
- */
5
- export declare function useTransferCodesPersistence(storageKeyPrefix?: string): void;
6
- //# sourceMappingURL=useTransferCodesPersistence.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTransferCodesPersistence.d.ts","sourceRoot":"","sources":["../../../../src/ui/hooks/useTransferCodesPersistence.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,gBAAgB,GAAE,MAAsB,QAmEnF"}
@@ -1,26 +0,0 @@
1
- import type { OxyServices } from '../../core';
2
- /**
3
- * Query keys for transfer-related queries
4
- */
5
- export declare const transferQueryKeys: {
6
- pending: () => readonly ["transfers", "pending"];
7
- };
8
- /**
9
- * Hook to check all pending transfers for completion
10
- * Used when app comes back online
11
- *
12
- * This version accepts oxyServices and isAuthenticated as parameters to avoid
13
- * circular dependency when used inside OxyContext
14
- */
15
- export declare const useCheckPendingTransfers: (oxyServices?: OxyServices | null, isAuthenticated?: boolean) => import("@tanstack/react-query").UseQueryResult<{
16
- transferId: string;
17
- completed: boolean;
18
- data?: {
19
- transferId?: string;
20
- sourceDeviceId?: string;
21
- publicKey?: string;
22
- transferCode?: string;
23
- completedAt?: string;
24
- };
25
- }[], Error>;
26
- //# sourceMappingURL=useTransferQueries.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTransferQueries.d.ts","sourceRoot":"","sources":["../../../../src/ui/hooks/useTransferQueries.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,iBAAiB;;CAE7B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GACnC,cAAc,WAAW,GAAG,IAAI,EAChC,kBAAkB,OAAO;gBAaP,MAAM;eACP,OAAO;WACX;QACL,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;WA2DR,CAAC"}
@@ -1,36 +0,0 @@
1
- export interface TransferCodeData {
2
- code: string;
3
- sourceDeviceId: string | null;
4
- publicKey: string;
5
- timestamp: number;
6
- state: 'pending' | 'completed' | 'failed';
7
- }
8
- export interface TransferState {
9
- transferCodes: Record<string, TransferCodeData>;
10
- activeTransferId: string | null;
11
- isRestored: boolean;
12
- storeTransferCode: (transferId: string, code: string, sourceDeviceId: string | null, publicKey: string) => void;
13
- getTransferCode: (transferId: string) => TransferCodeData | null;
14
- clearTransferCode: (transferId: string) => void;
15
- updateTransferState: (transferId: string, state: 'pending' | 'completed' | 'failed') => void;
16
- getAllPendingTransfers: () => Array<{
17
- transferId: string;
18
- data: TransferCodeData;
19
- }>;
20
- getActiveTransferId: () => string | null;
21
- setActiveTransferId: (transferId: string | null) => void;
22
- restoreFromStorage: (codes: Record<string, TransferCodeData>, activeTransferId: string | null) => void;
23
- markRestored: () => void;
24
- cleanupExpired: () => void;
25
- reset: () => void;
26
- clearAll: () => void;
27
- }
28
- export declare const useTransferStore: import("zustand").UseBoundStore<import("zustand").StoreApi<TransferState>>;
29
- /**
30
- * Hook to get transfer codes for persistence
31
- */
32
- export declare const useTransferCodesForPersistence: () => {
33
- transferCodes: Record<string, TransferCodeData>;
34
- activeTransferId: string | null;
35
- };
36
- //# sourceMappingURL=transferStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transferStore.d.ts","sourceRoot":"","sources":["../../../../src/ui/stores/transferStore.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;CAC3C;AAED,MAAM,WAAW,aAAa;IAE5B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAGhD,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGhC,UAAU,EAAE,OAAO,CAAC;IAGpB,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAChH,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,gBAAgB,GAAG,IAAI,CAAC;IACjE,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,mBAAmB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,KAAK,IAAI,CAAC;IAC7F,sBAAsB,EAAE,MAAM,KAAK,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,gBAAgB,CAAA;KAAE,CAAC,CAAC;IACpF,mBAAmB,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACzC,mBAAmB,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvG,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAUD,eAAO,MAAM,gBAAgB,4EA8I1B,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,8BAA8B;;;CAO1C,CAAC"}
@@ -1,55 +0,0 @@
1
- /**
2
- * Expo 54 Crypto Adapter
3
- *
4
- * Uses expo-crypto which works in both React Native and Web
5
- */
6
-
7
- // Lazy import
8
- let ExpoCrypto: typeof import('expo-crypto') | null = null;
9
-
10
- /**
11
- * Initialize expo-crypto
12
- */
13
- async function initExpoCrypto(): Promise<typeof import('expo-crypto')> {
14
- if (!ExpoCrypto) {
15
- try {
16
- ExpoCrypto = await import('expo-crypto');
17
- } catch (error) {
18
- const errorMessage = error instanceof Error ? error.message : String(error);
19
- throw new Error(`Failed to load expo-crypto: ${errorMessage}`);
20
- }
21
- }
22
- return ExpoCrypto;
23
- }
24
-
25
- /**
26
- * Crypto Adapter Interface
27
- */
28
- export interface CryptoAdapter {
29
- getRandomBytes(length: number): Promise<Uint8Array>;
30
- digestStringAsync(algorithm: 'SHA256' | 'SHA512', data: string): Promise<string>;
31
- }
32
-
33
- /**
34
- * Create Expo Crypto Adapter
35
- */
36
- export async function createExpoCryptoAdapter(): Promise<CryptoAdapter> {
37
- const crypto = await initExpoCrypto();
38
-
39
- return {
40
- /**
41
- * Generate cryptographically secure random bytes
42
- */
43
- async getRandomBytes(length: number): Promise<Uint8Array> {
44
- return crypto.getRandomBytes(length);
45
- },
46
-
47
- /**
48
- * Hash a string using the specified algorithm
49
- */
50
- async digestStringAsync(algorithm: 'SHA256' | 'SHA512', data: string): Promise<string> {
51
- return crypto.digestStringAsync(algorithm, data);
52
- },
53
- };
54
- }
55
-
@@ -1,28 +0,0 @@
1
- /**
2
- * Expo 54 Fetch Adapter
3
- *
4
- * Uses native fetch which works in both React Native and Web
5
- */
6
-
7
- /**
8
- * Fetch Adapter Interface
9
- */
10
- export interface FetchAdapter {
11
- fetch(url: string, options?: RequestInit): Promise<Response>;
12
- }
13
-
14
- /**
15
- * Create Expo Fetch Adapter
16
- */
17
- export async function createExpoFetchAdapter(): Promise<FetchAdapter> {
18
- if (typeof fetch === 'undefined') {
19
- throw new Error('fetch is not available in this environment');
20
- }
21
-
22
- return {
23
- fetch(url: string, options?: RequestInit): Promise<Response> {
24
- return fetch(url, options);
25
- },
26
- };
27
- }
28
-
@@ -1,51 +0,0 @@
1
- /**
2
- * Expo 54 Platform Adapter
3
- *
4
- * Provides storage, crypto, and fetch adapters for Expo 54 (React Native + Web)
5
- */
6
-
7
- import { Platform } from 'react-native';
8
- import { createExpoStorageAdapter, type StorageAdapter } from './storage';
9
- import { createExpoCryptoAdapter, type CryptoAdapter } from './crypto';
10
- import { createExpoFetchAdapter, type FetchAdapter } from './fetch';
11
- import type { Platform as PlatformType } from '../../core/identity-session/types';
12
-
13
- /**
14
- * Platform Adapter Interface
15
- */
16
- export interface PlatformAdapter {
17
- storage: StorageAdapter;
18
- crypto: CryptoAdapter;
19
- fetch: FetchAdapter;
20
- platform: PlatformType;
21
- }
22
-
23
- /**
24
- * Create Expo Platform Adapter
25
- */
26
- export async function createExpoAdapter(): Promise<PlatformAdapter> {
27
- const storage = await createExpoStorageAdapter();
28
- const crypto = await createExpoCryptoAdapter();
29
- const fetchAdapter = await createExpoFetchAdapter();
30
-
31
- // Determine platform
32
- let platform: PlatformType = 'web';
33
- try {
34
- if (Platform.OS !== 'web') {
35
- platform = 'native';
36
- }
37
- } catch {
38
- // Fallback detection
39
- if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
40
- platform = 'native';
41
- }
42
- }
43
-
44
- return {
45
- storage,
46
- crypto,
47
- fetch: fetchAdapter,
48
- platform,
49
- };
50
- }
51
-